:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --pink: #f472b6;
  --yellow: #facc15;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  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 28rem),
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.11), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 58%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #2563eb 52%, var(--pink));
  color: white;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.28);
}

.brand-text {
  font-size: 1.18rem;
}

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

.nav-link {
  color: var(--soft);
  padding: 10px 16px;
  border-radius: 14px;
  transition: 0.22s ease;
}

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

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

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-stage,
.page-hero,
.content-card,
.side-panel,
.player-card,
.category-overview-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy {
  padding: 48px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  right: -80px;
  bottom: -80px;
  background: rgba(34, 211, 238, 0.18);
  filter: blur(4px);
}

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

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.2vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-intro,
.page-hero p,
.detail-one-line {
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.9;
}

.hero-search {
  margin-top: 34px;
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  transition: 0.2s ease;
}

.hero-search input {
  border: 0;
  background: transparent;
  padding: 12px 12px;
}

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

.hero-search button,
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary,
.hero-search button {
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
  color: white;
}

.btn.wide {
  width: 100%;
  margin-top: 12px;
}

.hero-stage {
  min-height: 680px;
  border-radius: 36px;
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1s ease;
}

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

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.6) 46%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 58%);
}

.hero-content {
  position: absolute;
  left: clamp(26px, 5vw, 58px);
  right: clamp(24px, 5vw, 58px);
  bottom: clamp(68px, 9vw, 108px);
  max-width: 620px;
}

.hero-content h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.8vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 1.02rem;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #bae6fd;
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1;
}

.tag-row.large span {
  padding: 8px 12px;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: white;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(34, 211, 238, 0.25);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

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

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

.section {
  padding: 56px 0;
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h2,
.side-panel h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

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

.category-grid,
.movie-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-card {
  min-height: 142px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(30, 41, 59, 0.72));
  transition: 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-row:hover,
.mini-card:hover,
.category-overview-card:hover {
  border-color: rgba(34, 211, 238, 0.55);
  transform: translateY(-4px);
}

.category-card span {
  display: block;
  color: white;
  margin-bottom: 14px;
  font-size: 1.1rem;
  font-weight: 900;
}

.category-card strong {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  transition: 0.24s ease;
}

.poster-link,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link {
  aspect-ratio: 3 / 4.15;
}

.poster-link img,
.rank-cover img,
.mini-card img,
.detail-poster img,
.player-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.rank-cover img,
.mini-card img {
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-link img,
.rank-row:hover .rank-cover img,
.mini-card:hover img {
  transform: scale(1.06);
}

.score-badge,
.year-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.score-badge {
  left: 12px;
  background: rgba(250, 204, 21, 0.92);
  color: #1e293b;
}

.year-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
  color: white;
}

.card-body {
  padding: 16px;
}

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

.card-title {
  margin: 8px 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-title a:hover,
.rank-info a:hover {
  color: var(--cyan);
}

.card-desc {
  min-height: 3.1em;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

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

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

.side-panel p {
  color: var(--muted);
  line-height: 1.8;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 90px 52px minmax(0, 1fr) 70px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  padding: 12px;
  transition: 0.24s ease;
}

.compact-list .rank-row {
  grid-template-columns: 76px 44px minmax(0, 1fr) 58px;
}

.rank-cover {
  width: 90px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

.compact-list .rank-cover {
  width: 76px;
}

.rank-number {
  color: var(--cyan);
  font-size: 1.6rem;
  font-weight: 900;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(250, 204, 21, 0.14);
  color: var(--yellow);
  font-size: 1.2rem;
  font-weight: 900;
}

.page-hero {
  margin-top: 32px;
  padding: clamp(32px, 6vw, 64px);
  border-radius: 34px;
}

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

.page-hero p {
  max-width: 780px;
}

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

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

.filter-panel {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 0.9rem;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 12px;
}

.filter-empty {
  margin: 18px 0 0;
  color: var(--muted);
}

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

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

.category-overview-card {
  border-radius: var(--radius);
  padding: 24px;
  transition: 0.24s ease;
}

.category-overview-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.category-index {
  color: var(--cyan);
  font-size: 2rem;
  font-weight: 900;
}

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

.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.mini-card-row,
.side-related {
  display: grid;
  gap: 12px;
}

.mini-card-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.mini-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
  padding: 8px;
  color: var(--soft);
  transition: 0.2s ease;
}

.mini-card img {
  width: 54px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: #0f172a;
}

.mini-card span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding: 42px 0 56px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  min-height: 520px;
}

.detail-poster {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4.18;
  background: #0f172a;
}

.detail-content {
  max-width: 760px;
}

.detail-content h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 20px;
}

.player-card,
.content-card {
  border-radius: var(--radius);
}

.player-card {
  padding: 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-trigger {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: #000;
  color: white;
  cursor: pointer;
  z-index: 3;
}

.player-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
}

.player-trigger.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  color: #00111a;
  font-size: 2.2rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.42);
}

.content-card {
  padding: 26px;
}

.content-card p {
  color: var(--soft);
  line-height: 2;
}

.detail-side .sticky-card {
  position: sticky;
  top: 92px;
}

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

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 32px;
  align-items: start;
}

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

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--soft);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

  .hero-stage {
    min-height: 580px;
  }

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

  .side-panel,
  .detail-side .sticky-card {
    position: static;
  }
}

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

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

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

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 30px;
  }

  .hero-stage {
    min-height: 520px;
  }

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

  .section-head,
  .footer-shell,
  .detail-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .detail-grid {
    min-height: auto;
  }

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

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

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

  .rank-row,
  .compact-list .rank-row {
    grid-template-columns: 72px 40px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .rank-cover,
  .compact-list .rank-cover {
    width: 72px;
  }

  .mini-card-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .shell,
  .hero,
  .nav-shell,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero-stage {
    min-height: 480px;
    border-radius: 26px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .category-grid,
  .movie-grid,
  .category-overview-grid,
  .filter-grid,
  .mini-card-row {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .poster-link {
    height: 100%;
    aspect-ratio: auto;
  }

  .card-desc {
    min-height: auto;
  }

  .rank-info p,
  .rank-meta,
  .compact-list .tag-row,
  .rank-list .tag-row {
    display: none;
  }

  .detail-hero {
    min-height: auto;
  }

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

  .play-icon {
    width: 66px;
    height: 66px;
    font-size: 1.7rem;
  }
}
