:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --panel-deep: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --orange: #fb923c;
  --green: #22c55e;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(37, 99, 235, 0.28));
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 32px rgba(34, 211, 238, 0.22);
  font-size: 14px;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}

.nav-search input,
.mobile-search input,
.page-filter input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 12px 110px 12px 18px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.page-filter input:focus {
  border-color: rgba(34, 211, 238, 0.84);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.92);
}

.nav-search button,
.mobile-search button,
.page-filter button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  padding: 0 20px;
  cursor: pointer;
}

.desktop-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-links a,
.mobile-menu a,
.site-footer a {
  transition: color 0.22s ease;
}

.desktop-links a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
  color: var(--cyan);
}

.mobile-toggle {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  padding: 9px 13px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 12px;
}

.mobile-search {
  position: relative;
}

.hero {
  position: relative;
  height: min(74vh, 620px);
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms 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-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 22%, rgba(15, 23, 42, 0.4) 56%, rgba(2, 6, 23, 0.76) 100%), radial-gradient(circle at 22% 58%, rgba(34, 211, 238, 0.22), transparent 24rem);
}

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

.hero-kicker,
.section-head span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.86);
  color: white;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.55);
}

.hero p {
  margin: 0 0 22px;
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: #cffafe;
  padding: 6px 12px;
  font-size: 13px;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  color: white;
  box-shadow: 0 18px 36px rgba(8, 145, 178, 0.3);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: white;
}

.btn-ghost {
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(8, 145, 178, 0.14);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.54);
  color: white;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(8, 145, 178, 0.84);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.wide-section {
  padding-top: 70px;
}

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

.section-head h2,
.page-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-link {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.rail {
  overflow-x: auto;
  padding-bottom: 18px;
  margin: 0 -24px;
  padding-left: 24px;
}

.rail-track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding-right: 24px;
}

.rail .movie-card {
  width: 330px;
}

.movie-card,
.list-card,
.ranking-card,
.category-overview-card,
.detail-card,
.side-box,
.category-tile {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.68);
  box-shadow: 0 26px 56px rgba(8, 145, 178, 0.18);
}

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

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.play-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: white;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.year-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: white;
  padding: 5px 9px;
  font-size: 12px;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card-body strong {
  color: white;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.22s ease;
}

.movie-card:hover .card-body strong {
  color: var(--cyan);
}

.card-body span,
.list-card-body span,
.ranking-body span,
.site-footer p,
.page-hero p,
.detail-card p {
  color: var(--muted);
  line-height: 1.72;
}

.card-body em,
.list-card-body em,
.ranking-body em {
  color: var(--dim);
  font-size: 13px;
  font-style: normal;
}

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

.category-tile {
  border-radius: var(--radius);
  padding: 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(30, 41, 59, 0.88);
}

.category-tile span {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 800;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-list span,
.rank-number {
  color: var(--orange);
  font-weight: 900;
  font-size: 20px;
}

.rank-list em {
  color: var(--dim);
  font-size: 13px;
  font-style: normal;
}

.list-stack {
  display: grid;
  gap: 14px;
}

.list-card {
  border-radius: 18px;
  overflow: hidden;
}

.list-card a {
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 18px;
  min-height: 118px;
}

.list-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card-body {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px 18px 16px 0;
}

.list-card-body strong,
.ranking-body strong {
  color: white;
  font-size: 18px;
}

.page-main {
  padding-top: 32px;
}

.page-hero {
  margin: 0 0 36px;
  padding: 48px;
  border-radius: 28px;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 28rem), linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.page-filter {
  position: relative;
  max-width: 560px;
  margin-top: 24px;
}

.search-page-form {
  max-width: 660px;
}

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

.category-overview-card {
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 170px;
}

.thumb-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #020617;
  overflow: hidden;
}

.thumb-stack img {
  width: 100%;
  height: 85px;
  object-fit: cover;
}

.overview-body {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
}

.overview-body strong {
  font-size: 24px;
}

.overview-body em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card {
  border-radius: 20px;
  overflow: hidden;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 74px 220px 1fr;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
}

.ranking-card img {
  width: 220px;
  height: 124px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.ranking-body {
  display: grid;
  gap: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

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

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

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

.player-panel {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

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

.player-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.player-overlay span {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96));
  color: white;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.38);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  margin: 0;
  color: #fca5a5;
  font-weight: 700;
}

.detail-card,
.side-box {
  border-radius: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #cffafe;
  padding: 7px 12px;
  font-size: 13px;
}

.lead-text {
  font-size: 18px;
  color: #dbeafe !important;
}

.detail-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.side-box h2 {
  margin: 0 0 18px;
}

.side-box dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  margin: 0;
}

.side-box dt {
  color: var(--dim);
}

.side-box dd {
  margin: 0;
  color: #dbeafe;
}

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

.detail-related {
  padding-left: 0;
  padding-right: 0;
}

.mini-card .card-body span {
  font-size: 14px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
  padding: 48px 24px 34px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--dim);
  text-align: center;
  font-size: 14px;
}

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

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

  .split-section,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-inner {
    min-height: 64px;
    padding: 0 18px;
  }

  .nav-search,
  .desktop-links {
    display: none;
  }

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

  .hero {
    height: 620px;
  }

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

  .hero-arrow {
    display: none;
  }

  .content-section,
  .page-main {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .category-overview-card a,
  .ranking-card a,
  .list-card a {
    grid-template-columns: 1fr;
  }

  .ranking-card img,
  .list-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-number {
    padding-top: 10px;
  }

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

  .page-hero {
    padding: 32px 22px;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .hero {
    min-height: 560px;
  }

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rail .movie-card {
    width: 286px;
  }

  .rank-list a {
    grid-template-columns: 40px 1fr;
  }

  .rank-list em {
    grid-column: 2;
  }

  .detail-card,
  .side-box {
    padding: 22px;
  }

  .player-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
