:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --purple: #a78bfa;
  --green: #22c55e;
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem),
    radial-gradient(circle at 78% 10%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 80%);
}

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

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #00111f;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.26);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: #cbd5e1;
}

.nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
}

.mobile-nav a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.82);
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  display: none;
  min-height: 650px;
  position: relative;
  isolation: isolate;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(2px) saturate(1.2);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.35) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, #020617 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 54px;
  min-height: 650px;
  padding: 64px 0;
}

.hero-content {
  max-width: 760px;
}

.kicker,
.section-kicker {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-lead {
  margin: 22px 0 0;
  max-width: 700px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.45);
}

.button.primary {
  color: #00111f;
  border: none;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.25);
}

.hero-poster-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.45));
  box-shadow: var(--shadow);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.24));
}

.hero-poster-meta {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

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

.hero-dot {
  width: 36px;
  height: 4px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 26px 0 0;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.stat-card strong {
  display: block;
  font-size: 28px;
  color: #ffffff;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.26);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-head p:not(.section-kicker) {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.55);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  background: var(--bg-card-strong);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4.05;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.38), transparent 58%),
    linear-gradient(135deg, #0f172a, #111827 52%, #0e7490);
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
}

.poster-wrap img.image-missing {
  opacity: 0;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  color: #03111f;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #fde68a);
}

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

.card-meta,
.detail-meta,
.hero-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span,
.hero-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

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

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 12px;
  background: rgba(14, 116, 144, 0.12);
}

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

.category-card {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 50%),
    rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 24px;
}

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

.category-card span {
  display: inline-flex;
  margin-top: 14px;
  color: var(--cyan);
  font-weight: 700;
}

.filter-panel {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.28);
}

.filter-search label,
.filter-row label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-search input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  outline: none;
  background: rgba(2, 6, 23, 0.6);
}

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

.filter-count {
  margin: 16px 0 0;
  color: var(--cyan);
  font-size: 14px;
}

.page-hero {
  padding: 78px 0 34px;
}

.page-hero h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 74px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-number {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #00111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.ranking-thumb {
  overflow: hidden;
  width: 82px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0e7490);
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-main h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ranking-score {
  text-align: right;
  color: #fde68a;
  font-size: 22px;
  font-weight: 900;
}

.detail-hero {
  padding: 48px 0 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

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

.detail-poster {
  position: sticky;
  top: 98px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster .poster-wrap {
  border-radius: 20px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-intro {
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.player-card {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.18), transparent 45%),
    linear-gradient(135deg, #020617, #0f172a 60%, #082f49);
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.play-button {
  pointer-events: auto;
  width: 108px;
  height: 108px;
  border: none;
  border-radius: 999px;
  color: #00111f;
  font-size: 38px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 22px 80px rgba(34, 211, 238, 0.32);
}

.player-card.playing .player-overlay {
  display: none;
}

.player-caption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 14px;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.66);
}

.content-card + .content-card {
  margin-top: 18px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 2;
}

.site-footer {
  padding: 54px 0 26px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.6fr 0.7fr;
  gap: 32px;
}

.footer-grid p,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid a:not(.brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

.footer-brand {
  margin-bottom: 16px;
}

.copyright {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

  .hero-poster-card {
    max-width: 360px;
  }
}

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

  .stats-strip,
  .filter-row,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    position: relative;
    top: auto;
    max-width: 360px;
  }

  .ranking-item {
    grid-template-columns: 52px 70px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 3;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .brand {
    font-size: 20px;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-slide,
  .hero-grid {
    min-height: auto;
  }

  .hero-grid {
    padding: 46px 0 78px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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

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