:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(34, 211, 238, 0.22);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-2: #38bdf8;
  --blue: #60a5fa;
  --gold: #fbbf24;
  --danger: #fb7185;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.22), transparent 30rem),
    radial-gradient(circle at 85% 8%, rgba(37, 99, 235, 0.18), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.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(16px);
  box-shadow: 0 16px 44px rgba(8, 145, 178, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 16px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.26);
}

.brand-text strong,
.footer-brand {
  display: block;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-text em {
  display: block;
  color: rgba(34, 211, 238, 0.62);
  font-size: 12px;
  font-style: normal;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 430px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-hero input {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  height: 42px;
  padding: 0 90px 0 20px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus,
.search-hero input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
  background: rgba(15, 23, 42, 0.92);
}

.header-search button,
.mobile-search button,
.search-hero button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  font-weight: 800;
  cursor: pointer;
}

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

.nav-link {
  border-radius: 999px;
  padding: 9px 14px;
  color: #cbd5e1;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(2, 6, 23, 0.98);
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 10px;
  border-radius: 14px;
  color: #cbd5e1;
}

.mobile-search {
  position: relative;
  margin-top: 10px;
}

.mobile-search input {
  height: 42px;
  padding: 0 90px 0 18px;
}

.hero {
  position: relative;
  height: min(780px, 82vh);
  min-height: 620px;
  overflow: hidden;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s 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;
  opacity: 0.42;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.18)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.96));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 48px;
  height: 100%;
  padding-top: 40px;
}

.hero-copy {
  max-width: 760px;
}

.kicker,
.section-head span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-title h1,
.search-hero h1 {
  margin: 0;
  background: linear-gradient(90deg, #ffffff, #cffafe, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 1.8vw, 22px);
}

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

.hero-meta {
  margin-top: 28px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.result-meta span,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  padding: 4px 10px;
  font-size: 13px;
}

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

.btn-primary,
.btn-secondary,
.section-more,
.category-card .button-link,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-secondary,
.section-more,
.category-card .button-link {
  border: 1px solid rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.62);
  color: var(--cyan);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.category-card .button-link:hover,
.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
}

.hero-poster {
  position: relative;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.5);
  padding: 14px;
  box-shadow: var(--shadow);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: 44px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%);
  filter: blur(22px);
  z-index: -1;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
  cursor: pointer;
}

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

.main-section {
  padding: 72px 0 0;
}

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

.section-head h2,
.category-card h2,
.detail-section h2,
.player-section h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  aspect-ratio: 2 / 3;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.42);
}

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

.poster-link::after,
.poster-glow {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.82));
  opacity: 0.8;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), #fb923c);
  color: #1e293b;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(251, 191, 36, 0.25);
}

.movie-card-body {
  padding: 12px 2px 0;
}

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.text-link:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 7px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  padding: 2px 7px;
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  color: rgba(34, 211, 238, 0.85);
  padding: 2px 7px;
  font-size: 12px;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  justify-content: space-between;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent 48%),
    rgba(15, 23, 42, 0.72);
  padding: 24px;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.26);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card p,
.page-hero p,
.detail-section p,
.footer-grid p,
.empty-note {
  color: var(--muted);
}

.ranking-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  padding: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.rank-row h3,
.search-result h3 {
  margin: 0 0 8px;
  color: #ffffff;
}

.page-hero,
.search-hero {
  padding: 82px 0 38px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  padding: 16px;
  margin-bottom: 28px;
}

.filter-input,
.filter-select {
  height: 46px;
  padding: 0 16px;
}

.detail-hero {
  padding: 46px 0 0;
}

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

.detail-cover {
  position: sticky;
  top: 104px;
  border: 1px solid var(--line-soft);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  padding: 12px;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

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

.detail-title .lead {
  max-width: 800px;
  margin: 22px 0 24px;
  color: #cbd5e1;
  font-size: 20px;
}

.player-section,
.detail-section {
  border: 1px solid var(--line-soft);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.7);
  padding: 22px;
  box-shadow: 0 18px 52px rgba(2, 6, 23, 0.24);
}

.player-section {
  margin-top: 34px;
}

.detail-section {
  margin-top: 22px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  min-width: 138px;
}

.detail-section h2,
.player-section h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.detail-section p {
  margin: 0;
  font-size: 16px;
}

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

.search-hero form {
  position: relative;
  max-width: 720px;
  margin-top: 28px;
}

.search-hero input {
  height: 54px;
  padding: 0 126px 0 22px;
}

.search-hero button {
  height: 42px;
  padding: 0 22px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 30px;
}

.search-result {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
  padding: 14px;
}

.search-result img {
  width: 108px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line-soft);
  background: rgba(2, 6, 23, 0.72);
  padding: 42px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
}

.footer-grid p {
  max-width: 560px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-content: start;
  justify-content: flex-end;
  color: #cbd5e1;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-search {
    max-width: none;
  }

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

@media (max-width: 900px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .header-search {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 720px;
  }

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

  .hero-content {
    padding-top: 88px;
    padding-bottom: 92px;
  }

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

  .category-strip,
  .movie-grid.compact,
  .ranking-board,
  .search-results,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-cover {
    position: static;
    max-width: 300px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1240px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 660px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1,
  .search-hero h1 {
    font-size: 36px;
  }

  .hero-summary,
  .detail-title .lead {
    font-size: 16px;
  }

  .hero-content {
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .related-grid,
  .category-strip,
  .ranking-board,
  .search-results,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-grid {
    gap: 14px;
  }

  .category-strip,
  .ranking-board,
  .search-results,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 76px minmax(0, 1fr);
  }

  .rank-row img {
    width: 76px;
  }

  .search-result {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .search-result img {
    width: 92px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
