:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5f0ff;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --orange: #fb923c;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

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

.brand-name {
  font-size: 1.08rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 72% 38%, rgba(34, 211, 238, 0.2), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.detail-tags a {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 0.86rem;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  min-height: 480px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster,
.poster-link img,
.list-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  pointer-events: none;
}

.hero-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.search-strip {
  position: relative;
  z-index: 3;
  margin-top: -34px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip-form {
  display: flex;
  gap: 12px;
}

.search-strip input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.62);
  color: #e2e8f0;
  padding: 0 16px;
}

.search-strip 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);
}

.search-strip button {
  min-width: 128px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.strip-link,
.text-link,
.section-heading a {
  color: #67e8f9;
  font-weight: 700;
}

.section-block {
  padding: 64px 0 0;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.compact-heading h2 {
  font-size: 1.7rem;
}

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

.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.compact-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card,
.list-card,
.category-card,
.category-overview-card,
.story-card,
.side-card,
.player-card,
.filter-panel,
.ranking-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.54));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 24px 70px rgba(14, 165, 233, 0.16);
}

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

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

.score-pill {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.92);
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
}

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

.card-meta,
.list-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta a {
  color: #67e8f9;
}

.movie-card h3,
.list-card h3 {
  margin: 10px 0 8px;
  line-height: 1.28;
  font-size: 1.08rem;
}

.movie-card h3 a:hover,
.list-card h3 a:hover {
  color: #67e8f9;
}

.movie-card p,
.list-card p,
.category-card small,
.category-overview-copy p,
.story-card p,
.footer-grid p {
  color: #94a3b8;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.movie-card-compact h3 {
  font-size: 1rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.list-stack,
.ranking-list,
.ranking-page-list {
  display: grid;
  gap: 14px;
}

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.rank-number {
  position: absolute;
  left: -10px;
  top: -10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.list-poster {
  height: 132px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

.list-card-body h3 {
  font-size: 1.08rem;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: var(--radius);
}

.ranking-panel .list-card {
  grid-template-columns: 70px 1fr;
  background: rgba(2, 6, 23, 0.22);
}

.ranking-panel .list-poster {
  height: 92px;
}

.ranking-panel .list-card p {
  display: none;
}

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

.category-card {
  min-height: 172px;
  padding: 22px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.category-card span {
  color: #67e8f9;
  font-weight: 800;
}

.category-card strong {
  font-size: 1.1rem;
}

.page-hero {
  padding: 70px 0 28px;
}

.page-hero h1 {
  max-width: 900px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 22px;
}

.search-field span,
.select-field span {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
}

.empty-message {
  display: none;
  margin: 36px 0;
  text-align: center;
  color: var(--muted);
}

.empty-message.visible {
  display: block;
}

.category-overview-list {
  display: grid;
  gap: 22px;
  padding-bottom: 40px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-copy h2 {
  margin: 14px 0 10px;
  font-size: 1.8rem;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 64px 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: #67e8f9;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-poster {
  min-height: 500px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  max-width: 900px;
}

.detail-tags a:hover {
  color: white;
  border-color: rgba(34, 211, 238, 0.52);
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 3;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: black;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.58));
  color: white;
  cursor: pointer;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.38);
  font-size: 2rem;
  padding-left: 5px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 24px;
  padding-top: 36px;
}

.story-card,
.side-card {
  border-radius: var(--radius);
  padding: 26px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 14px;
}

.story-card h2 + p {
  margin-bottom: 28px;
}

.side-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.side-card div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 12px;
}

.side-card dt {
  color: #67e8f9;
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: #cbd5e1;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-tags a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

@media (max-width: 980px) {
  .hero-content,
  .detail-layout,
  .split-section,
  .detail-content-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-shell {
    height: 66px;
  }

  .menu-button {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

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

  .hero-content {
    padding: 48px 0 82px;
  }

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

  .search-strip,
  .search-strip-form,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .list-card,
  .ranking-panel .list-card {
    grid-template-columns: 86px 1fr;
  }

  .list-poster,
  .ranking-panel .list-poster {
    height: 112px;
  }

  .detail-poster {
    min-height: 420px;
  }

  .player-section {
    margin-top: -30px;
  }

  .side-card div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.55rem;
  }
}
