:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --yellow: #facc15;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 36rem),
    radial-gradient(circle at 85% 10%, rgba(167, 139, 250, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 38%, #020617 100%);
  color: var(--text);
}

body.nav-open {
  overflow: hidden;
}

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

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

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 99px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.65) 45%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.14) 48%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2));
  bottom: 110px;
  width: min(680px, calc(100% - 56px));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.hero-text,
.detail-intro,
.page-hero p {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-text {
  width: min(620px, 100%);
  margin: 22px 0 12px;
}

.hero-tags {
  margin: 0 0 26px;
  color: #e0f2fe;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.btn:hover,
.hero-search button:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn.primary,
.hero-search button {
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), #2563eb);
  box-shadow: 0 18px 36px rgba(8, 145, 178, 0.28);
}

.btn.glass {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn.ghost {
  color: #e0f2fe;
  background: transparent;
  border: 1px solid rgba(34, 211, 238, 0.38);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2));
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 28px;
  display: flex;
  gap: 12px;
  max-width: 520px;
  z-index: 4;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  padding: 0 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.inner-page {
  padding-top: 48px;
}

.category-pills {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 28px 0 8px;
}

.category-pills a {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 11px 18px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(34, 211, 238, 0.24);
}

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

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--soft);
}

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

.glow-panel {
  margin: 34px 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.18), rgba(88, 28, 135, 0.2)),
    rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(124, 58, 237, 0.24));
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 10px;
  top: 10px;
  color: white;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rank-badge {
  left: 10px;
  top: 10px;
  color: #111827;
  background: var(--yellow);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-meta,
.movie-desc,
.movie-tags {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

.movie-desc {
  margin-top: 8px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags {
  margin-top: 10px;
  color: #a5f3fc;
}

.movie-card.compact .movie-info h3 {
  font-size: 15px;
}

.movie-card.compact .movie-desc {
  display: none;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  color: var(--yellow);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

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

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--soft);
  font-size: 13px;
}

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

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

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

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.46;
}

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

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(32px, 6vw, 70px);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.20), transparent 32rem),
    radial-gradient(circle at 100% 0%, rgba(167, 139, 250, 0.22), transparent 28rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(34px, 6vw, 60px);
}

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

.category-overview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 180px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.category-overview-body h2 {
  margin: 0 0 10px;
}

.category-overview-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-body span {
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.full-filter {
  grid-template-columns: minmax(220px, 1fr) 150px 150px 150px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--soft);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.12), rgba(88, 28, 135, 0.18)),
    var(--panel);
  box-shadow: var(--shadow);
}

.detail-cover-wrap {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 6vw, 66px);
}

.detail-meta,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span,
.tag-cloud span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.62);
}

.player-section {
  padding: 44px 0 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  background: rgba(2, 6, 23, 0.52);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-shell.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  font-size: 36px;
  background: linear-gradient(135deg, var(--cyan-dark), #2563eb);
  box-shadow: 0 20px 52px rgba(8, 145, 178, 0.34);
}

.play-text {
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

.story-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px;
  background: var(--panel);
}

.story-panel h2 {
  margin: 0 0 14px;
}

.story-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--soft);
}

@media (max-width: 1080px) {
  .feature-grid,
  .poster-grid,
  .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.96);
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

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

  .hero-content {
    bottom: 150px;
  }

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

  .category-overview-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-cover-wrap {
    max-width: 360px;
  }

  .filter-panel,
  .full-filter {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .nav-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-dots {
    right: 18px;
  }

  .feature-grid,
  .poster-grid,
  .listing-grid,
  .category-grid,
  .category-grid.small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .glow-panel,
  .detail-hero,
  .story-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .rank-row {
    grid-template-columns: 34px 52px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }

  .category-covers {
    height: 120px;
  }
}
