:root {
  --night-950: #020617;
  --night-900: #07111f;
  --night-850: #0b1424;
  --night-800: #101827;
  --night-700: #1e293b;
  --night-500: #64748b;
  --night-300: #cbd5e1;
  --moon-500: #8b5cf6;
  --moon-400: #a78bfa;
  --ocean-500: #06b6d4;
  --ocean-400: #22d3ee;
  --gold-400: #fbbf24;
  --rose-500: #f43f5e;
  --white: #ffffff;
  --soft-white: rgba(255, 255, 255, 0.82);
  --glass: rgba(15, 23, 42, 0.68);
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--soft-white);
  background:
    radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.22), transparent 36rem),
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.15), transparent 30rem),
    linear-gradient(180deg, var(--night-950), var(--night-900) 42%, var(--night-950));
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
  z-index: -1;
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

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

.nav-shell {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--moon-500), var(--ocean-500));
  box-shadow: 0 14px 36px rgba(139, 92, 246, 0.38);
}

.brand-text {
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.78);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  min-width: 290px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.nav-search input,
.page-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
}

.nav-search input {
  padding: 9px 12px;
}

.nav-search button,
.page-search button {
  border: 0;
  color: var(--white);
  cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--moon-500), var(--ocean-500));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-search button {
  padding: 9px 16px;
}

.nav-search button:hover,
.page-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--white);
}

.mobile-nav {
  display: grid;
  gap: 8px;
  padding: 10px 20px 20px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav a {
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-track,
.hero-slide {
  min-height: inherit;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.36)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.95));
  z-index: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 260px;
  background: linear-gradient(180deg, transparent, var(--night-950));
  z-index: 2;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.08);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
  padding-top: 86px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--ocean-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  color: var(--white);
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 720px;
  margin: 28px 0 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.detail-tags a,
.tag-row span {
  border: 1px solid var(--border);
  color: rgba(226, 232, 240, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.hero-tags span,
.detail-meta span,
.detail-tags a {
  padding: 8px 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--moon-500), var(--ocean-500));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.22);
}

.ghost-btn {
  border: 1px solid var(--border);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.text-btn {
  color: var(--ocean-400);
  padding-inline: 8px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  font-size: 34px;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section {
  padding: 68px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.story-card h2 {
  margin: 0;
  color: var(--white);
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p:not(.eyebrow),
.page-hero p,
.site-footer p {
  margin: 10px 0 0;
  color: rgba(203, 213, 225, 0.78);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(15, 23, 42, 0.82);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.28), rgba(6, 182, 212, 0.24));
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-width: 54px;
  height: 30px;
  padding: 0 12px;
  background: rgba(6, 182, 212, 0.86);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold-400), var(--rose-500));
  box-shadow: 0 12px 26px rgba(244, 63, 94, 0.3);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
}

.movie-card h2 {
  margin: 9px 0 8px;
  color: var(--white);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.46));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  display: block;
  color: var(--white);
  font-size: 28px;
  font-weight: 900;
}

.category-tile p {
  max-width: 360px;
  margin: 14px 0 0;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.8;
}

.category-tile:hover img {
  opacity: 0.33;
  transform: scale(1.06);
}

.page-hero {
  padding: 72px 0 24px;
}

.compact-hero {
  padding-top: 76px;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.page-search {
  display: flex;
  gap: 10px;
  width: min(720px, 100%);
  margin-top: 28px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.page-search input {
  padding: 12px 14px;
}

.page-search button {
  padding: 0 24px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 42px 0 0;
}

.pagination a,
.pagination span {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.pagination .current {
  color: var(--white);
  background: linear-gradient(135deg, var(--moon-500), var(--ocean-500));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 56px;
  border-bottom: 1px solid var(--border);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.78)),
    var(--detail-image) center / cover;
  filter: saturate(1.1);
  transform: scale(1.05);
}

.detail-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  max-width: 850px;
  margin: 0;
  color: var(--white);
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.player-section {
  padding-top: 56px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.74));
  font-size: 18px;
  font-weight: 900;
}

.player-overlay.is-hidden {
  display: none;
}

.player-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--moon-500), var(--ocean-500));
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.32);
  font-size: 34px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(2, 6, 23, 0.66);
}

.player-status:empty {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.story-card h2 {
  font-size: 28px;
}

.story-card p:last-child {
  margin: 16px 0 0;
  color: rgba(226, 232, 240, 0.84);
  line-height: 1.95;
}

.filter-empty {
  margin-bottom: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 20px;
  color: var(--white);
  background: rgba(251, 191, 36, 0.12);
}

.site-footer {
  margin-top: 80px;
  padding: 52px 0 22px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: rgba(226, 232, 240, 0.78);
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 40px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: rgba(148, 163, 184, 0.8);
  font-size: 14px;
}

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

  .detail-hero-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 640px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .listing-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 26px, 1200px);
  }

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

  .hero-content {
    width: min(100% - 26px, 1200px);
  }

  .hero-content h1,
  .detail-info h1 {
    font-size: 42px;
  }

  .hero-summary,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .listing-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 16px;
  }

  .page-search {
    display: grid;
  }

  .page-search button {
    min-height: 46px;
  }
}
