:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(34, 211, 238, 0.18);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --orange: #fb923c;
  --purple: #c084fc;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(34, 211, 238, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.13), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

main {
  min-height: 64vh;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark,
.footer-brand span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #00111a;
  font-size: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
}

.brand-copy strong {
  display: block;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), #a5f3fc);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-copy small {
  display: block;
  margin-top: 4px;
  color: rgba(34, 211, 238, 0.68);
  font-size: 11px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: #cbd5e1;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-link {
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 10px 32px rgba(34, 211, 238, 0.1);
}

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

.menu-button span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  border-radius: 99px;
  background: var(--cyan);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-link {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
}

.hero-carousel {
  position: relative;
  min-height: clamp(620px, 74vh, 780px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.94)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617 96%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(620px, 74vh, 780px);
  margin: 0 auto;
  padding: 64px 0 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: center;
}

.hero-eyebrow,
.section-eyebrow,
.page-eyebrow {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta,
.movie-meta,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin: 22px 0 0;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  font-size: 13px;
}

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

.button-primary,
.button-ghost,
.button-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.button-primary {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.button-ghost,
.button-soft {
  color: #cffafe;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.62);
}

.button-primary:hover,
.button-ghost:hover,
.button-soft:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 60px rgba(34, 211, 238, 0.14);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}

.hero-card-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 24px;
}

.hero-card-caption strong {
  display: block;
  font-size: 24px;
}

.hero-card-caption small {
  color: var(--muted);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(34, 211, 238, 0.72);
  transform: translateY(-50%) scale(1.06);
}

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

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

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: var(--cyan);
}

.container,
.page-section,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-section {
  padding: 60px 0 0;
}

.section-head,
.page-head {
  margin-bottom: 26px;
}

.section-head h2,
.page-head h1,
.detail-title h1 {
  margin: 8px 0 0;
  color: transparent;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-head p,
.page-head p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  scroll-snap-align: start;
}

.movie-card:hover,
.movie-list-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.movie-card figure,
.movie-list-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #020617;
}

.movie-card figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover figure img,
.movie-list-card:hover figure img {
  transform: scale(1.06);
}

.movie-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  background: rgba(6, 182, 212, 0.86);
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.25);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 44px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  transition: opacity 0.3s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h2,
.movie-list-card h2 {
  margin: 0 0 9px;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.movie-card:hover h2,
.movie-list-card:hover h2 {
  color: #67e8f9;
}

.movie-info p,
.movie-list-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 45%),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.75;
}

.category-card span {
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 170px 170px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 15px;
  top: 50%;
  color: var(--cyan);
  transform: translateY(-50%);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.58);
  outline: none;
}

.filter-panel input {
  padding: 0 14px 0 42px;
}

.filter-panel select {
  padding: 0 12px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.movie-list {
  display: grid;
  gap: 16px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.movie-list-card figure img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.movie-list-card figure span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 34px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.44);
  transition: opacity 0.25s ease;
}

.movie-list-card:hover figure span {
  opacity: 1;
}

.movie-list-card > div {
  padding: 20px 20px 20px 0;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: border 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.86);
}

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

.rank-item img {
  width: 58px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.detail-wrap {
  padding: 38px 0 68px;
}

.breadcrumbs {
  margin-bottom: 24px;
  font-size: 14px;
}

.breadcrumbs a {
  color: #67e8f9;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #00111a;
  font-size: 30px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.48);
}

.detail-panel,
.side-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
}

.detail-title h1 {
  font-size: clamp(30px, 5vw, 52px);
}

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

.detail-text h2,
.side-panel h2 {
  color: #a5f3fc;
  font-size: 22px;
}

.detail-text p,
.side-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-panel .movie-card {
  margin-top: 14px;
}

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

.empty-state {
  display: none;
  margin: 26px 0;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.6);
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #a5f3fc;
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #a5f3fc;
  font-size: 18px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--dim);
  font-size: 13px;
}

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

  .menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

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

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

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

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

  .rank-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-content {
    padding: 44px 0 92px;
  }

  .hero-control {
    top: auto;
    bottom: 28px;
  }

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

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

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

  .movie-list-card {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
  }

  .movie-list-card > div {
    padding: 14px 14px 14px 0;
  }

  .movie-list-card p {
    display: none;
  }

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

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

  .rank-meta {
    grid-column: 3;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.compact,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-rail {
    grid-auto-columns: 82%;
  }

  .hero-copy h1 {
    font-size: 38px;
  }
}
