:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow-cyan: 0 18px 45px rgba(34, 211, 238, 0.18);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.18), transparent 26rem),
    var(--page-bg);
  color: var(--text-main);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  height: 64px;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(20px, calc((100vw - 1280px) / 2));
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand-text,
.footer-brand span:last-child {
  background: linear-gradient(90deg, var(--cyan), #3b82f6);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.32);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 26px;
  cursor: pointer;
}

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

.nav-link {
  color: var(--text-soft);
  font-weight: 650;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.page-main {
  min-height: calc(100vh - 64px);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, var(--page-bg), transparent 45%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  right: 24px;
  bottom: 11%;
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--cyan);
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 700px;
  margin: 20px 0 28px;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: var(--shadow-cyan);
}

.btn-secondary,
.btn-ghost {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control:hover {
  background: rgba(15, 23, 42, 0.92);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 44px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.02em;
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.26);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: var(--shadow-cyan);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
}

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

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

.movie-poster img {
  transition: transform 0.45s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.04) 65%);
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.9);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  color: white;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.34);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
}

.movie-card h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  min-height: 48px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(37, 99, 235, 0.04)),
    rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.category-tile span {
  color: var(--cyan);
  font-weight: 850;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 58px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 34rem),
    linear-gradient(315deg, rgba(37, 99, 235, 0.16), transparent 34rem),
    rgba(15, 23, 42, 0.32);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 14px;
}

.filter-field {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 750;
  font-size: 14px;
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: var(--text-main);
  background: rgba(2, 6, 23, 0.68);
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(34, 211, 238, 0.68);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  color: var(--text-muted);
}

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

.detail-hero {
  padding: 64px 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.12), transparent 28rem),
    rgba(15, 23, 42, 0.22);
}

.detail-layout {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.44);
}

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

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

.detail-copy p {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.85;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 24px;
}

.content-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.content-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-panel p {
  color: var(--text-soft);
  line-height: 1.9;
}

.player-block {
  padding: 54px 0 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  background: black;
  border: 1px solid rgba(34, 211, 238, 0.24);
  box-shadow: var(--shadow-cyan);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.72)),
    rgba(2, 6, 23, 0.4);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 22px 58px rgba(34, 211, 238, 0.28);
  font-size: 34px;
}

.prose-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 36px 0;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px 18px;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid var(--line);
  }

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

  .nav-link {
    padding: 12px 0;
  }

  .hero-carousel {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    bottom: 12%;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

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

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

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

  .prose-section {
    grid-template-columns: 1fr;
  }

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