:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(34, 211, 238, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --orange: #f97316;
  --rose: #fb7185;
  --shadow: 0 28px 80px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.10), transparent 32rem),
    var(--bg);
}

body.nav-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.38), transparent);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
body.nav-open .site-header {
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--cyan);
}

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

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  height: 76vh;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 150px max(24px, calc((100vw - 1180px) / 2)) 92px;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 45%, rgba(2, 6, 23, 0.08) 100%),
    radial-gradient(circle at 20% 75%, rgba(34, 211, 238, 0.18), transparent 24rem);
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(760px, 100%);
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-content h3 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: #bae6fd;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.42);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(34, 211, 238, 0.22);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 56px;
  z-index: 6;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.55);
}

.section-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0;
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: -34px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.54));
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.content-card h2,
.footer-block h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.intro-panel p,
.content-card p,
.page-hero p,
.category-overview-body h2 {
  color: #cbd5e1;
  line-height: 1.8;
}

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

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

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

.movie-card.hidden {
  display: none;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(8, 47, 73, 0.72));
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.year-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--orange), var(--rose));
}

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

.movie-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

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

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

.movie-card p {
  min-height: 68px;
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.65;
}

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

.category-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-card span {
  color: var(--cyan);
  font-weight: 850;
}

.category-card h2 {
  max-width: 520px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.35;
}

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

.category-samples a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-list.mini {
  grid-template-columns: 1fr;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.compact-card img {
  width: 72px;
  height: 96px;
  border-radius: 13px;
  object-fit: cover;
}

.compact-card strong {
  display: block;
  color: #ffffff;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.compact-rank {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.filter-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-search {
  flex: 1;
}

.filter-search label {
  display: block;
  margin-bottom: 9px;
  color: #cbd5e1;
  font-weight: 780;
}

.filter-search input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  color: #ffffff;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: 0;
  background: rgba(2, 6, 23, 0.52);
}

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

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  color: #cbd5e1;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(8, 145, 178, 0.32);
}

.page-main {
  padding-top: 68px;
}

.page-hero,
.detail-hero {
  min-height: 420px;
  display: flex;
  align-items: end;
  padding: 120px max(24px, calc((100vw - 1180px) / 2)) 64px;
  background-size: cover;
  background-position: center;
}

.page-hero.slim {
  min-height: 370px;
}

.page-hero h1 {
  max-width: 780px;
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  font-size: 18px;
}

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

.category-overview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.category-overview-media {
  min-height: 240px;
  background-size: cover;
  background-position: center;
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body .primary-btn {
  margin-top: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

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

.detail-info h1 {
  max-width: 860px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 880px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta-grid span {
  padding: 12px 14px;
  color: #cbd5e1;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.58);
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  padding-top: 54px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.player-play-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.34);
}

.player-overlay strong {
  max-width: 80%;
  font-size: 22px;
}

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

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

.content-card p {
  margin: 16px 0 0;
  font-size: 16px;
}

.site-footer {
  margin-top: 54px;
  padding: 56px 0 30px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.96));
}

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

.footer-brand p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-block h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--cyan);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .movie-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 220px 1fr;
  }
}

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

  .nav-links {
    position: fixed;
    top: 68px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 13px 14px;
    border-radius: 14px;
  }

  .nav-links a:hover {
    background: rgba(15, 23, 42, 0.88);
  }

  .hero-carousel {
    min-height: 650px;
    height: 78vh;
  }

  .hero-slide {
    padding: 120px 20px 86px;
  }

  .hero-dots {
    right: 20px;
    bottom: 34px;
  }

  .intro-panel,
  .section-heading,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .category-grid,
  .category-overview-grid,
  .content-section,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .compact-list {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-nav,
  .section-wrap,
  .footer-inner,
  .copyright {
    width: calc(100% - 24px);
  }

  .site-logo {
    font-size: 17px;
  }

  .hero-content p,
  .detail-one-line,
  .page-hero p {
    font-size: 16px;
  }

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

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

  .category-card,
  .intro-panel,
  .content-card {
    padding: 22px;
    border-radius: 22px;
  }

  .page-hero,
  .detail-hero {
    padding: 108px 16px 48px;
  }

  .player-play-icon {
    width: 58px;
    height: 58px;
  }
}
