:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e5f0ff;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --accent: #f97316;
  --green: #34d399;
  --shadow: 0 22px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 38rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.26);
}

.nav-wrap {
  max-width: 1240px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #082f49;
  background: linear-gradient(135deg, #38bdf8, #67e8f9);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.34);
  font-size: 14px;
}

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

.nav-links a {
  transition: color .2s ease, transform .2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--blue);
  transform: translateY(-1px);
}

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

.nav-search input,
.toolbar input {
  width: 235px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
  border-radius: 999px;
  padding: 10px 15px;
  outline: none;
}

.nav-search input:focus,
.toolbar input:focus {
  border-color: rgba(56, 189, 248, .8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}

.nav-search button,
.primary-button,
.ghost-button,
.panel-link,
.filter-row button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.nav-search button,
.primary-button {
  color: #06121f;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
  font-weight: 800;
  padding: 10px 18px;
  box-shadow: 0 14px 28px rgba(14, 165, 233, .24);
}

.nav-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.panel-link:hover,
.filter-row button:hover {
  transform: translateY(-2px);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  color: #fff;
  background: rgba(30, 41, 59, .74);
  border-radius: 12px;
  padding: 7px 10px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity .7s ease, transform 1.2s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, .95) 0%, rgba(15, 23, 42, .78) 48%, rgba(2, 6, 23, .56) 100%),
    radial-gradient(circle at 24% 36%, rgba(56, 189, 248, .25), transparent 28rem);
}

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

.hero-copy {
  position: relative;
  max-width: 760px;
  margin-left: max(28px, calc((100vw - 1240px) / 2 + 22px));
  padding: 112px 24px 72px 0;
}

.eyebrow,
.section-head span,
.page-hero span,
.detail-category {
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero h1 {
  margin: 14px 0;
  font-size: clamp(42px, 8vw, 82px);
  line-height: .98;
  letter-spacing: -.05em;
}

.hero p {
  max-width: 700px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, .66);
  padding: 5px 10px;
  font-size: 12px;
}

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

.ghost-button,
.panel-link {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, .38);
  background: rgba(15, 23, 42, .58);
  padding: 10px 18px;
  font-weight: 800;
}

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

.hero-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, .35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.section-wrap,
.page-main,
.detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
}

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

.section-head.compact {
  display: block;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

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

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

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

.movie-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .86), rgba(15, 23, 42, .58));
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 28px 80px rgba(8, 145, 178, .18);
}

.poster,
.detail-poster {
  position: relative;
  display: block;
  min-height: 300px;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
}

.poster::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, .08), rgba(2, 6, 23, .85)),
    radial-gradient(circle at center, rgba(56, 189, 248, .12), transparent 14rem);
}

.poster-score,
.poster-year {
  position: absolute;
  z-index: 2;
  top: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-score {
  left: 14px;
  color: #082f49;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
}

.poster-year {
  right: 14px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, .72);
  border: 1px solid var(--border);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
  margin-bottom: 8px;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  margin-bottom: 12px;
}

.large-card .poster {
  min-height: 380px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

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

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

.category-tile,
.category-card a {
  display: block;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(8, 145, 178, .12)),
    rgba(15, 23, 42, .78);
  box-shadow: var(--shadow);
  transition: transform .24s ease, border-color .24s ease;
}

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

.category-tile strong,
.category-card span {
  display: block;
  color: #fff;
  font-size: 22px;
  margin-bottom: 8px;
}

.category-tile span,
.category-card p {
  color: var(--muted);
  margin: 0;
}

.category-card h2 {
  margin: 8px 0;
}

.rank-panel,
.text-panel,
.player-section,
.page-hero,
.detail-hero {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 86px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(30, 41, 59, .58);
  color: #dbeafe;
}

.rank-item em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 900;
}

.panel-link {
  display: inline-flex;
  margin-top: 18px;
}

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

.page-hero {
  padding: 42px;
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, .18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(30, 41, 59, .72));
}

.page-hero.slim p {
  max-width: 780px;
  color: #cbd5e1;
}

.toolbar {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.toolbar input {
  width: min(520px, 100%);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row button {
  color: #dbeafe;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, .74);
  padding: 8px 13px;
}

.filter-row button.is-active {
  color: #082f49;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  padding: 24px;
  overflow: hidden;
}

.detail-poster {
  min-height: 520px;
  border-radius: 22px;
  overflow: hidden;
}

.detail-info {
  padding: 18px 10px;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.one-line {
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(125, 211, 252, .24);
  background: #000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, .28), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, .28), rgba(2, 6, 23, .72));
}

.play-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #082f49;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
  box-shadow: 0 20px 55px rgba(14, 165, 233, .35);
  font-size: 28px;
}

.play-cover strong {
  font-size: 18px;
}

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

.content-section {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 24px;
  margin-top: 28px;
}

.text-panel {
  padding: 26px;
}

.text-panel h2 {
  margin-top: 0;
}

.text-panel p {
  color: #cbd5e1;
  margin-bottom: 0;
}

.related-wrap {
  padding-left: 0;
  padding-right: 0;
}

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

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

.site-footer a:hover {
  color: var(--blue);
}

.copyright {
  max-width: 1240px;
  margin: 24px auto 0;
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .nav-links {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, .98);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 10px;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-search {
    display: none;
  }

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

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    padding: 0 14px;
  }

  .brand {
    font-size: 17px;
  }

  .hero,
  .hero-stage {
    min-height: 560px;
  }

  .hero-copy {
    margin-left: 20px;
    padding-top: 90px;
  }

  .hero p {
    font-size: 15px;
  }

  .section-wrap,
  .page-main,
  .detail-main {
    padding: 30px 14px;
  }

  .section-head {
    display: block;
  }

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

  .poster {
    min-height: 360px;
  }

  .page-hero,
  .detail-hero,
  .player-section,
  .text-panel {
    padding: 20px;
    border-radius: 22px;
  }

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

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