:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --red-soft: rgba(239, 68, 68, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 34rem),
    radial-gradient(circle at 80% 0, rgba(59, 130, 246, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.26);
}

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

.desktop-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link,
.dropdown-toggle {
  padding: 10px 14px;
  border: 0;
  color: var(--muted-strong);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.dropdown-toggle:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--muted-strong);
}

.dropdown-panel a:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.home-hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.home-hero {
  min-height: 760px;
  padding: 62px 0 72px;
}

.hero-shell,
.section-wrap,
.footer-grid,
.footer-bottom,
.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.hero-glow-one {
  inset: 10% auto auto -10%;
  width: 420px;
  height: 420px;
  background: rgba(245, 158, 11, 0.15);
}

.hero-glow-two {
  right: -8%;
  bottom: 10%;
  width: 520px;
  height: 520px;
  background: rgba(59, 130, 246, 0.13);
}

.hero-headline {
  max-width: 860px;
  margin-bottom: 28px;
}

.hero-headline span,
.section-heading span,
.page-hero span,
.movie-kicker,
.eyebrow,
.category-overview-card span {
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-headline h1,
.page-hero h1,
.detail-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-headline p,
.page-hero p,
.detail-copy p {
  max-width: 740px;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-slider {
  position: relative;
  min-height: 455px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  min-height: 455px;
  position: relative;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.1), rgba(15, 23, 42, 0.95));
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 60px);
}

.hero-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0 0 20px;
  color: var(--muted-strong);
  font-size: 17px;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span,
.detail-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.25);
}

.ghost-btn {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dots button.active {
  width: 34px;
  background: var(--amber-light);
}

.section-wrap {
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: var(--amber-light);
  font-weight: 700;
}

.section-heading.slim h2 {
  font-size: 28px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  min-height: 220px;
  position: relative;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

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

.category-card span {
  font-size: 21px;
  font-weight: 800;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.category-card:hover img {
  opacity: 0.64;
  transform: scale(1.1);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.home-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ranking-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 22px 55px rgba(245, 158, 11, 0.1);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b, #020617);
}

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

.poster-link:hover img {
  transform: scale(1.08);
  opacity: 0.86;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: #111827;
  background: var(--amber-light);
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(239, 68, 68, 0.86);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h2 {
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.28;
}

.movie-card h2 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #fde68a;
  letter-spacing: 0;
  text-transform: none;
}

.hot-panel,
.content-card,
.side-card,
.filter-panel,
.category-overview-card,
.player-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
}

.hot-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 54px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.12);
  transform: translateX(2px);
}

.rank-number,
.rank-score {
  color: var(--amber-light);
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  line-height: 1.28;
}

.rank-info em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  padding: 88px 0 54px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.17), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.96));
}

.page-hero > div {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  margin-bottom: 24px;
}

.search-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-weight: 700;
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 16px;
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.filter-actions button {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.filter-actions button:hover {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.45);
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-card h2 {
  margin: 8px 0;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted-strong);
}

.detail-hero {
  min-height: 520px;
  background-image: var(--detail-cover);
  background-size: cover;
  background-position: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.96)),
    radial-gradient(circle at 35% 20%, rgba(245, 158, 11, 0.22), transparent 34rem);
  backdrop-filter: blur(12px);
}

.detail-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-light);
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
  font-size: 30px;
}

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

.player-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  color: var(--muted-strong);
}

.player-caption strong {
  color: #fff;
}

.content-card,
.side-card {
  padding: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 16px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: var(--muted-strong);
}

.side-card a {
  color: var(--amber-light);
}

.side-related {
  display: grid;
  gap: 14px;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  border-radius: 18px;
}

.side-related .poster-link {
  aspect-ratio: 2 / 3;
}

.side-related .movie-card-body {
  padding: 12px;
}

.side-related .movie-tags,
.side-related .play-chip,
.side-related .rank-badge {
  display: none;
}

.side-related .movie-card p {
  min-height: auto;
  -webkit-line-clamp: 2;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 36px;
  padding: 46px 0 28px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-grid a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1100px) {
  .category-grid,
  .movie-grid,
  .ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hot-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: flex;
    flex-wrap: wrap;
  }

  .home-hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-slide {
    position: relative;
    display: none;
    grid-template-columns: 1fr;
  }

  .hero-slide.active {
    display: grid;
  }

  .hero-image {
    min-height: 290px;
  }

  .hero-image::after {
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.96));
  }

  .hero-slider {
    min-height: 0;
  }

  .category-grid,
  .movie-grid,
  .home-grid,
  .ranking-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel,
  .category-overview-card,
  .footer-grid,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-wrap: wrap;
  }

  .detail-poster {
    max-width: 240px;
  }
}

@media (max-width: 540px) {
  .header-inner,
  .hero-shell,
  .section-wrap,
  .footer-grid,
  .footer-bottom,
  .detail-shell,
  .page-hero > div {
    width: min(100% - 22px, 1200px);
  }

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

  .hero-headline h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .category-grid,
  .movie-grid,
  .home-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 118px 1fr;
  }

  .poster-link {
    height: 100%;
    min-height: 178px;
  }

  .movie-card p {
    min-height: auto;
  }

  .side-related .movie-card {
    grid-template-columns: 88px 1fr;
  }
}
