:root {
  color-scheme: dark;
  --page-bg: #030712;
  --panel-bg: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(31, 41, 55, 0.9);
  --line: rgba(148, 163, 184, 0.16);
  --text: #ffffff;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --blue: #2563eb;
  --blue-bright: #60a5fa;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #030712 44%, #0b1120 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(18px);
  border-color: var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.34);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: #ffffff;
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.brand-text span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-links a,
.mobile-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--soft);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-current,
.mobile-panel a:hover,
.mobile-panel a.is-current {
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(31, 41, 55, 0.86);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: relative;
}

.menu-toggle span::before {
  top: -7px;
}

.menu-toggle span::after {
  top: 5px;
}

.menu-toggle.is-active span {
  transform: rotate(45deg);
}

.menu-toggle.is-active span::before {
  transform: translateY(7px) rotate(90deg);
}

.menu-toggle.is-active span::after {
  opacity: 0;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.mobile-panel.is-active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.page {
  min-height: 100vh;
  padding-top: 76px;
}

.hero {
  position: relative;
  min-height: clamp(560px, 78vh, 860px);
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.7) 42%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.72) 28%, rgba(3, 7, 18, 0.12) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: clamp(560px, 78vh, 860px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  align-items: end;
  gap: 40px;
  padding: 80px 0 72px;
}

.hero-copy {
  max-width: 760px;
}

.hero-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.95);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.pill-soft {
  background: rgba(15, 23, 42, 0.74);
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.22);
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(229, 231, 235, 0.9);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.95);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-ghost:hover {
  background: rgba(30, 41, 59, 0.88);
  box-shadow: none;
}

.hero-side {
  align-self: end;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.hero-side h3 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.hero-side p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #ffffff;
  font-size: 28px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: max(16px, calc((100vw - 1200px) / 2 - 72px));
}

.hero-next {
  right: max(16px, calc((100vw - 1200px) / 2 - 72px));
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

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

.section-compact {
  padding: 34px 0;
}

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--blue-bright);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

.section h2,
.page-title h1,
.content-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p,
.content-card p {
  color: var(--muted);
  line-height: 1.75;
}

.view-more {
  min-width: max-content;
  color: #bfdbfe;
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.search-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  outline: none;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
}

.search-panel input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 9px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.quick-links a:hover {
  border-color: rgba(96, 165, 250, 0.72);
  transform: translateY(-2px);
}

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

.movie-grid.dense {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  position: relative;
  min-width: 0;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.26);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
  opacity: 0.88;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

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

.card-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 12px;
  background: rgba(37, 99, 235, 0.95);
}

.year-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.play-mark {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-mark span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.96);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.4);
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.card-body {
  padding-top: 14px;
}

.card-title {
  display: block;
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  color: #ffffff;
  transition: color 0.25s ease;
}

.movie-card:hover .card-title {
  color: var(--blue-bright);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding: 8px 0 22px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

.scroll-row::-webkit-scrollbar {
  height: 8px;
}

.scroll-row::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.35);
}

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.34), transparent 14rem),
    rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.55);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.46), transparent 16rem),
    rgba(17, 24, 39, 0.92);
}

.category-tile strong {
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-count {
  display: inline-flex;
  margin-top: 20px;
  color: #bfdbfe;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.44);
  background: rgba(30, 41, 59, 0.82);
}

.rank-num {
  font-size: 28px;
  font-weight: 900;
  color: #bfdbfe;
  text-align: center;
}

.rank-item img {
  width: 90px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-title {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 30px;
}

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

.breadcrumb a {
  color: #bfdbfe;
}

.detail-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 38px 0 64px;
}

.player-card,
.content-card,
.sidebar-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.14);
  color: #ffffff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.16));
}

.player-cover span {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.96);
  box-shadow: 0 18px 52px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

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

.content-card {
  padding: 28px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0;
}

.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.88);
  color: #d1d5db;
  font-size: 13px;
}

.lead {
  margin: 0 0 18px;
  color: #bfdbfe;
  font-size: 19px;
  line-height: 1.8;
}

.prose {
  color: #d1d5db;
  line-height: 1.9;
  font-size: 16px;
}

.prose p {
  margin: 0 0 18px;
}

.sidebar-card {
  padding: 20px;
}

.side-title {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.92);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 32px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.empty-result {
  display: none;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.72);
  color: var(--muted);
  text-align: center;
}

.empty-result.is-visible {
  display: block;
}

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .hero-side {
    display: none;
  }

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

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

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

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text span {
    display: none;
  }

  .page {
    padding-top: 66px;
  }

  .hero,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    padding: 74px 0 72px;
  }

  .hero-control {
    display: none;
  }

  .hero-actions,
  .section-head,
  .search-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 0;
  }

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

  .rank-item {
    grid-template-columns: 44px 74px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
  }

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

  .content-card {
    padding: 22px;
  }
}
