:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #10b981;
  --orange: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -10%, rgba(34, 211, 238, 0.22), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(59, 130, 246, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 28px 40px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  font-weight: 900;
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.28);
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(34, 211, 238, 0.16);
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: center;
  padding: 74px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
  opacity: 0.94;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.84)),
    radial-gradient(circle at 74% 50%, rgba(34, 211, 238, 0.18), transparent 22rem);
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.44);
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.card-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.64);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.inline-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.inline-search button {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.23);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.inline-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.08));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 74px;
  bottom: 38px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--cyan);
}

.search-panel,
.page-hero,
.content-section,
.category-nav,
.breadcrumb,
.detail-hero,
.player-section,
.detail-content {
  margin-top: 28px;
}

.search-panel,
.page-hero,
.story-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.68));
}

.search-panel h2,
.page-hero h1,
.section-head h2,
.story-box h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.search-panel p,
.page-hero p,
.story-box p {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.inline-search {
  display: flex;
  min-width: min(100%, 480px);
  gap: 12px;
}

.inline-search input,
.filter-tools input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 18px;
}

.inline-search input:focus,
.filter-tools input:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.category-strip,
.year-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.category-strip a,
.year-strip button,
.category-nav a {
  padding: 12px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
  transition: 0.22s ease;
}

.category-strip a:hover,
.year-strip button:hover,
.category-nav a:hover,
.category-nav a.active {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.14);
}

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

.section-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  background: rgba(15, 23, 42, 0.96);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.08));
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.play-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: rgba(34, 211, 238, 0.92);
  color: #001018;
  font-size: 12px;
}

.rank-num {
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--blue));
  font-style: normal;
}

.card-body {
  padding: 15px;
}

.card-meta {
  gap: 6px;
}

.card-meta span {
  padding: 5px 8px;
  font-size: 12px;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  font-size: 12px;
}

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
}

.compact-card {
  min-width: 0;
  scroll-snap-align: start;
}

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

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

.category-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.8);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card span,
.category-card strong {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-card span {
  bottom: 58px;
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  bottom: 20px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tools {
  margin-bottom: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--cyan);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-copy p {
  margin: 20px 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.detail-meta {
  margin-bottom: 16px;
}

.player-section {
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame video {
  z-index: 1;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: #020617;
  cursor: pointer;
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: blur(1px) saturate(1.08);
}

.player-cover.is-hidden {
  display: none;
}

.play-circle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 55px rgba(34, 211, 238, 0.38);
  font-size: 28px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.story-box {
  display: block;
}

.site-footer {
  margin-top: 48px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.6fr 0.6fr;
  gap: 28px;
}

.footer-grid strong,
.footer-grid span {
  display: block;
  margin-bottom: 12px;
  font-weight: 900;
}

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

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

.is-filtered-out {
  display: none;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
    padding: 52px;
  }
}

@media (max-width: 860px) {
  .page-shell {
    padding: 0 16px 26px;
  }

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

  .site-nav {
    position: absolute;
    top: 72px;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(280px, calc(100vw - 32px));
    border-radius: 22px;
    padding: 12px;
  }

  .site-nav.open {
    display: flex;
  }

  .hero-carousel,
  .hero-track {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 28px;
  }

  .hero-poster {
    max-width: 260px;
  }

  .hero-dots {
    left: 28px;
  }

  .search-panel,
  .page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-search {
    flex-direction: column;
  }

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

  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .ranking-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-row {
    grid-auto-columns: minmax(220px, 82vw);
  }
}
