* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(245, 158, 11, 0.18);
  --line-strong: rgba(245, 158, 11, 0.38);
  --text: #fef3c7;
  --muted: #d6c7a4;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --purple: #a855f7;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.16), transparent 34rem),
    radial-gradient(circle at 75% 10%, rgba(245, 158, 11, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 75%);
  z-index: -1;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #d97706);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.3);
}

.brand-name {
  font-size: 20px;
}

.desktop-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link,
.mobile-link,
.footer-links a {
  color: #fde68a;
  opacity: 0.82;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.footer-links a:hover {
  opacity: 1;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.14);
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fbbf24;
  border-radius: 999px;
}

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

main,
.page-main,
.detail-main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  position: relative;
  margin: 24px auto 44px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 380px;
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 5vw, 70px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
  transform: scale(1.04);
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 35%, rgba(245, 158, 11, 0.22), transparent 26rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 56%);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #fcd34d;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.category-hero h1,
.rank-hero h1,
.detail-copy h1 {
  margin: 18px 0;
  color: #fff7ed;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.category-hero p,
.rank-hero p,
.detail-one-line,
.intro-copy p {
  max-width: 780px;
  color: #fdecc9;
  font-size: 18px;
  line-height: 1.8;
}

.hero-poster {
  align-self: stretch;
  min-height: 460px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}

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

.hero-poster:hover img {
  transform: scale(1.07);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 16px;
  color: #1f1300;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #fde68a;
  font-size: 12px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
}

.tag-row.large span {
  min-height: 34px;
  font-size: 13px;
  background: rgba(2, 6, 23, 0.48);
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 850;
  border-radius: 999px;
  transition: 0.22s ease;
}

.primary-btn {
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.22);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(245, 158, 11, 0.32);
}

.ghost-btn {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(2, 6, 23, 0.46);
}

.ghost-btn:hover,
.text-link:hover {
  color: #fff7ed;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
}

.text-link {
  min-height: 38px;
  padding: 0 12px;
  color: #fbbf24;
}

.hero-dots {
  position: absolute;
  left: 34px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 30px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  width: 54px;
  background: #fbbf24;
}

.hero-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.section-block,
.filter-panel,
.page-hero,
.category-hero,
.rank-hero,
.player-section,
.detail-content,
.detail-hero {
  margin: 34px 0;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stats-grid span {
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.36);
}

.stats-grid b {
  color: #fbbf24;
  font-size: 34px;
}

.stats-grid em,
.movie-meta-row,
.horizontal-copy em,
.muted {
  color: var(--soft);
  font-style: normal;
}

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

.section-heading h2,
.filter-panel h2,
.detail-text-block h2,
.side-card h2 {
  margin: 8px 0 0;
  color: #fff7ed;
  font-size: clamp(24px, 3vw, 36px);
}

.compact-heading h2 {
  font-size: 26px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 22px;
  align-items: end;
}

.filter-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: #fcd34d;
  font-weight: 700;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 46px;
  color: var(--text);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.filter-result {
  grid-column: 1 / -1;
  margin: 0;
  color: #fbbf24;
}

.category-grid,
.movie-grid,
.category-overview-grid,
.related-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-overview-card,
.side-card {
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.72));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile {
  min-height: 210px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover,
.horizontal-item:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.82));
}

.category-number {
  display: inline-flex;
  width: fit-content;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.category-tile strong {
  color: #fff7ed;
  font-size: 22px;
}

.category-tile em,
.category-tile small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
  transition: 0.22s ease;
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.play-dot,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  color: #1f1300;
  background: #fbbf24;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 38px;
  height: 32px;
  color: #1f1300;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  font-size: 14px;
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #fff7ed;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

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

.movie-card.compact p {
  min-height: 50px;
  -webkit-line-clamp: 2;
}

.side-panel {
  position: sticky;
  top: 100px;
}

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

.horizontal-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
  transition: 0.22s ease;
}

.horizontal-item img {
  width: 92px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.horizontal-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.horizontal-copy strong {
  color: #fff7ed;
  line-height: 1.35;
}

.mini-rank {
  display: inline-flex;
  margin-right: 8px;
  color: #fbbf24;
}

.page-hero,
.category-hero,
.rank-hero {
  min-height: 310px;
  display: flex;
  align-items: end;
  background-position: center;
  background-size: cover;
}

.small-hero {
  min-height: 260px;
}

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

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

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

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

.category-overview-card h2 {
  margin: 8px 0;
  color: #fff7ed;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.65;
}

.category-hero,
.rank-hero {
  position: relative;
  overflow: hidden;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-hero {
  grid-template-columns: 340px 1fr;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  border-radius: 26px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 26px 0 0;
}

.detail-meta div {
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
}

.detail-meta dt {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 6px 0 0;
  color: #fff7ed;
  line-height: 1.5;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: #000;
  box-shadow: var(--shadow);
}

.video-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff7ed;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
}

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

.video-play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #1f1300;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  border-radius: 999px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  color: #fcd34d;
  pointer-events: none;
}

.detail-text-block,
.side-card {
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.36);
  margin-bottom: 18px;
}

.detail-text-block p,
.side-card p {
  color: var(--muted);
  line-height: 1.9;
}

.side-card a {
  color: #fbbf24;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(2, 6, 23, 0.8);
}

.footer-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
}

.footer-inner p,
.copyright {
  color: var(--muted);
}

.copyright {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  border-top: 1px solid rgba(245, 158, 11, 0.08);
}

.is-filter-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .hero-slide,
  .intro-grid,
  .two-column,
  .detail-content,
  .detail-hero,
  .filter-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 760px;
  }

  .hero-poster {
    min-height: 320px;
  }

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 6px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-stage {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero-copy h1,
  .page-hero h1,
  .category-hero h1,
  .rank-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-rail,
  .category-grid,
  .category-overview-grid,
  .stats-grid,
  .filter-controls,
  .detail-meta,
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
