:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --indigo: #818cf8;
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.48);
  --radius: 24px;
}

* {
  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 top right, rgba(96, 165, 250, 0.14), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 46%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

main {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.32);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #06111f;
  box-shadow: 0 15px 35px rgba(34, 211, 238, 0.28);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav a:hover {
  color: var(--cyan);
  background: rgba(51, 65, 85, 0.62);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.inline-filter,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.28);
  outline: none;
  color: var(--text);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 16px;
  padding: 12px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 260px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.inline-filter:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  color: #06111f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.hero {
  position: relative;
  min-height: 680px;
}

.hero-stage {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.28)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(34, 211, 238, 0.28), transparent 30rem),
    linear-gradient(180deg, transparent 70%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 420px);
  gap: 48px;
  align-items: center;
  padding: 70px 0 96px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.section-head p,
.category-overview-head p {
  color: #cbd5e1;
  line-height: 1.9;
}

.hero-copy p {
  max-width: 720px;
  font-size: 18px;
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.movie-tags span {
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 16px;
  padding: 0 22px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.62);
}

.hero-cover {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(96, 165, 250, 0.08));
}

.hero-cover::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  z-index: 2;
  pointer-events: none;
}

.hero-img,
.poster-img,
.detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(51, 65, 85, 0.86);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
}

.hero-dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section,
.page-hero,
.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 72px 0 0;
}

.section-search {
  padding-top: 44px;
}

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

.section-head.centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.section-head h2,
.page-hero h1,
.category-overview-head h2,
.content-card h2,
.side-card h2 {
  margin: 12px 0 0;
  color: #fff;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head h2,
.category-overview-head h2,
.content-card h2,
.side-card h2 {
  font-size: clamp(26px, 3vw, 40px);
}

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

.text-link {
  color: var(--cyan);
  font-weight: 900;
  text-decoration: none;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(760px, 100%);
  margin: 28px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.big-search input {
  width: 100%;
  background: rgba(30, 41, 59, 0.68);
}

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

.category-card {
  position: relative;
  min-height: 170px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.28);
}

.category-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  transform: scale(1.02);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-card:hover .category-image {
  opacity: 0.75;
  transform: scale(1.09);
}

.category-info {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 22px;
}

.category-info strong {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.category-info small {
  color: #cbd5e1;
  line-height: 1.6;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.78));
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.36);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(96, 165, 250, 0.1));
}

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.84));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

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

.movie-tags {
  margin-bottom: 12px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card h3 a {
  color: #fff;
  text-decoration: none;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  min-height: 56px;
  margin: 0;
  color: #a8b5c6;
  line-height: 1.75;
  font-size: 14px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 13px;
}

.movie-meta-line span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
}

.page-hero {
  position: relative;
  margin-top: 44px;
  padding: 66px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at right, rgba(34, 211, 238, 0.22), transparent 30rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.84));
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: #94a3b8;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card,
.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.24);
}

.category-overview-card {
  padding: 28px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 12%, rgba(34, 211, 238, 0.24), transparent 28rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.94)),
    linear-gradient(180deg, transparent 70%, var(--bg) 100%);
}

.detail-inner {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  min-height: 580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  background: rgba(30, 41, 59, 0.7);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin: 14px 0 14px;
  color: #fff;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 850px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-top: 48px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.86);
  box-shadow: var(--shadow);
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.play-symbol {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto;
  border-radius: 50%;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 25px 60px rgba(34, 211, 238, 0.28);
  font-size: 34px;
}

.player-card.is-playing .player-start {
  display: none;
}

.content-card,
.side-card {
  padding: 28px;
}

.content-card p {
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.detail-side {
  min-width: 0;
}

.side-related {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 120px 1fr;
}

.side-related .movie-poster {
  aspect-ratio: 3 / 4;
}

.side-related .movie-card p,
.side-related .movie-tags {
  display: none;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-cover,
  .detail-poster {
    width: min(420px, 100%);
    margin: 0 auto;
  }

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

  .detail-side {
    width: 100%;
  }
}

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

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

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

  .hero-content {
    padding: 46px 0 108px;
    gap: 30px;
  }

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

  .section {
    padding-top: 46px;
  }

  .section-head,
  .category-overview-head,
  .footer-inner {
    display: grid;
    justify-content: stretch;
  }

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

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

  .page-hero {
    padding: 34px;
    border-radius: 26px;
  }

  .detail-inner {
    padding: 44px 0;
  }

  .side-related .movie-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .section,
  .page-hero,
  .detail-layout,
  .header-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1240px);
  }

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

  .big-search,
  .mobile-search {
    grid-template-columns: 1fr;
  }

  .hero-controls {
    bottom: 22px;
  }

  .movie-card p {
    min-height: auto;
  }

  .content-card,
  .side-card,
  .category-overview-card {
    padding: 20px;
  }
}
