:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-light: rgba(30, 41, 59, 0.78);
  --text: #ffffff;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --emerald: #10b981;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: white;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.3);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #34d399, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #34d399;
}

.header-search {
  display: flex;
  align-items: center;
  width: 290px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.mobile-panel input,
.filter-row input,
.filter-row select,
.search-band input {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.header-search button,
.mobile-panel button,
.search-band button,
.primary-button {
  border: 0;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  color: white;
  font-weight: 700;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.search-band button:hover,
.primary-button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.28);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
}

.mobile-panel a {
  padding: 10px 4px;
  color: #cbd5e1;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  transition: opacity 0.9s ease, transform 1.2s ease;
  transform: scale(1.03);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
  transform: scale(1);
}

.hero-overlay,
.watch-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.92) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 56%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  padding-top: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #34d399;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.watch-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.detail-meta,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin: 26px 0;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags a,
.corner-label,
.back-link {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 14px 24px;
  color: white;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #34d399;
}

.search-band,
.content-section,
.page-shell,
.detail-content,
.ranking-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 6;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.84));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
}

.search-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-band form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
}

.content-section {
  padding: 68px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: #34d399;
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.86), rgba(6, 78, 59, 0.54)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.26), transparent 55%);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(52, 211, 153, 0.45);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(6, 1fr);
}

.compact-grid,
.all-grid {
  grid-template-columns: repeat(6, 1fr);
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img {
  transform: scale(1.1);
}

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.84) 100%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.74);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.corner-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.88);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 10px;
  min-height: 2.8em;
  font-size: 16px;
  line-height: 1.4;
}

.card-body h3 a:hover {
  color: #34d399;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.card-body p {
  margin: 10px 0 12px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.65;
}

.tag-row span {
  padding: 4px 8px;
  color: #a7f3d0;
  font-size: 12px;
}

.movie-card-compact .card-body p {
  display: none;
}

.movie-card-compact .card-body h3 {
  min-height: 2.8em;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.rank-side,
.detail-content aside {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.rank-panel h2,
.rank-side h2,
.detail-content h2 {
  margin: 0 0 18px;
}

.rank-panel ol,
.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-panel li + li {
  margin-top: 10px;
}

.rank-panel a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.52);
}

.rank-panel a:hover {
  color: #34d399;
  background: rgba(30, 41, 59, 0.86);
}

.rank-panel span,
.rank-num {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: white;
  font-weight: 900;
}

.rank-panel em {
  color: var(--muted);
  font-style: normal;
}

.page-shell {
  padding-bottom: 72px;
}

.page-hero {
  margin-top: 36px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(6, 78, 59, 0.4)),
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.18), transparent 40%);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.page-hero p {
  max-width: 800px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  padding-top: 34px;
}

.filter-row {
  position: sticky;
  top: 88px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 180px 180px 160px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.filter-row.search-only {
  grid-template-columns: 1fr auto;
}

.filter-row input,
.filter-row select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
}

.filter-row select {
  color: white;
}

.empty-state {
  display: none;
  margin: 44px 0;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding-top: 36px;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 42px 72px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
}

.ranking-list img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-list strong,
.ranking-list small {
  display: block;
}

.ranking-list small {
  margin-top: 8px;
  color: var(--muted);
}

.rank-side {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 10px;
}

.rank-side a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.56);
}

.watch-section {
  position: relative;
  background-position: center;
  background-size: cover;
}

.watch-layout {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 32px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 48px 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.66)),
    rgba(0, 0, 0, 0.18);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-size: 38px;
  box-shadow: 0 20px 48px rgba(16, 185, 129, 0.36);
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.watch-info {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.watch-info h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 62px);
}

.one-line {
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin: 22px 0;
}

.detail-tags a {
  color: #a7f3d0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding-top: 52px;
}

.detail-content article {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-content article p {
  color: #d1d5db;
  line-height: 2;
  font-size: 17px;
}

.detail-content dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.detail-content dt {
  color: var(--muted);
}

.detail-content dd {
  margin: 0;
  color: white;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0 30px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-grid a:hover {
  color: #34d399;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: #64748b;
}

@media (max-width: 1180px) {
  .movie-grid,
  .feature-grid,
  .compact-grid,
  .all-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-section,
  .ranking-layout,
  .watch-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-content {
    margin: 0 auto;
    padding: 0 6px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band {
    grid-template-columns: 1fr;
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .search-band form,
  .filter-row,
  .filter-row.search-only {
    grid-template-columns: 1fr;
  }

  .filter-row {
    position: static;
  }

  .movie-grid,
  .feature-grid,
  .compact-grid,
  .all-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 22px;
    border-radius: 24px;
  }

  .watch-layout {
    min-height: auto;
    padding: 28px 0;
  }

  .watch-info,
  .detail-content article,
  .detail-content aside {
    padding: 22px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-inner {
    height: 64px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero h1,
  .page-hero h1,
  .watch-info h1 {
    font-size: 36px;
  }

  .movie-grid,
  .feature-grid,
  .compact-grid,
  .all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 10px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .card-body h3 {
    font-size: 14px;
  }
}
