:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #818cf8;
  --brand-strong: #6366f1;
  --accent: #22d3ee;
  --warm: #f59e0b;
  --danger: #fb7185;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% -10%, rgba(99, 102, 241, 0.24), transparent 36rem),
    radial-gradient(circle at 86% 4%, rgba(14, 165, 233, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.nav-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #020617;
  box-shadow: 0 14px 40px rgba(99, 102, 241, 0.3);
}

.logo-main {
  display: block;
  font-size: 20px;
}

.logo-sub {
  display: block;
  margin-top: -4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.8);
  color: #ffffff;
  font-size: 22px;
}

main {
  min-height: 70vh;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 52%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: 48px;
  padding-top: 34px;
  padding-bottom: 54px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(129, 140, 248, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: #c7d2fe;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.76);
  color: #ffffff;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(129, 140, 248, 0.44);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-strong), #06b6d4);
  box-shadow: 0 18px 50px rgba(99, 102, 241, 0.32);
}

.hero-panel,
.info-panel,
.player-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-panel {
  padding: 18px;
}

.hero-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 4 / 5;
  background: #111827;
}

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

.hero-panel:hover .hero-poster img,
.movie-card:hover .poster img {
  transform: scale(1.05);
}

.hero-mini {
  display: grid;
  gap: 8px;
  padding: 16px 4px 2px;
}

.hero-mini strong {
  font-size: 20px;
}

.hero-mini span {
  color: var(--subtle);
  font-size: 14px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-btn,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 18px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
}

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

.section {
  padding: 68px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.section-desc {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--subtle);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 0 0 24px;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  padding: 0 18px;
  outline: none;
  font-size: 15px;
}

.search-box input:focus {
  border-color: rgba(129, 140, 248, 0.66);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.42);
  background: rgba(30, 41, 59, 0.82);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #111827, #312e81);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.45;
}

.card-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
}

.card-text {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card {
  min-height: 176px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 0%, rgba(34, 211, 238, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.78));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.46);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
}

.page-hero {
  padding: 62px 0 34px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 22% 0%, rgba(99, 102, 241, 0.22), transparent 36rem),
    radial-gradient(circle at 74% 20%, rgba(14, 165, 233, 0.14), transparent 26rem);
}

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

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

.player-panel {
  overflow: hidden;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.44));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-ready .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-strong), var(--accent));
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.42);
}

.detail-copy,
.side-card {
  padding: 24px;
}

.detail-copy h2,
.side-card h2,
.side-card h3 {
  margin: 0 0 12px;
}

.detail-copy p {
  margin: 0 0 18px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 6px 10px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 999px;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  margin-bottom: 18px;
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.related-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
}

.related-list span:last-child {
  color: var(--subtle);
  white-space: nowrap;
}

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

.footer-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--subtle);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

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

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .hero-panel {
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    inset: 72px 14px auto;
    display: none;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .hero-content {
    padding-top: 28px;
    gap: 24px;
  }

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

  .section {
    padding-top: 52px;
  }

  .section-head,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .search-box {
    grid-template-columns: 1fr;
  }

  .detail-copy,
  .side-card {
    padding: 18px;
  }
}
