:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #cbd5e1;
  --fog: #2563eb;
  --fog-dark: #1d4ed8;
  --rose: #e11d48;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(15, 23, 42, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(203, 213, 225, .72);
  backdrop-filter: blur(18px);
  transition: box-shadow .25s ease, background .25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 35px rgba(15, 23, 42, .08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--fog), #7c3aed);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .35);
}

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

.nav-link {
  padding: 10px 14px;
  color: #334155;
  border-radius: 999px;
  font-weight: 650;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--fog);
  background: rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: #eef2ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #1e293b;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 22px 18px;
  border-top: 1px solid rgba(203, 213, 225, .58);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  color: #334155;
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: transform 5s ease;
}

.hero-slide.is-active .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(37, 99, 235, .55), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, .95), rgba(2, 6, 23, .55) 52%, rgba(2, 6, 23, .15)),
    linear-gradient(0deg, rgba(2, 6, 23, .88), transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18vh 22px 170px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

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

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  color: #1e3a8a;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: rgba(239, 246, 255, .92);
  font-size: 13px;
  font-weight: 700;
}

.hero .hero-tags span,
.detail-hero .hero-tags span {
  color: #dbeafe;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(8px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--fog), #7c3aed);
  box-shadow: 0 18px 35px rgba(37, 99, 235, .28);
}

.btn-primary:hover {
  box-shadow: 0 22px 42px rgba(37, 99, 235, .38);
}

.btn-glass {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
}

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: var(--fog);
}

.hero-controls {
  position: absolute;
  right: max(22px, calc((100vw - 1280px) / 2 + 22px));
  bottom: 118px;
  z-index: 3;
}

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

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

.hero-dots button.is-active {
  width: 36px;
  background: #fff;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(920px, calc(100% - 44px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 16px;
  color: #0f172a;
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  background: #fff;
  outline: none;
}

.hero-search input {
  border-color: transparent;
}

.hero-search button {
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  border: 0;
  border-radius: 15px;
  background: var(--fog);
  font-weight: 800;
  cursor: pointer;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 22px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.text-link {
  color: var(--fog);
  font-weight: 800;
}

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

.stat-card {
  padding: 24px;
  border: 1px solid rgba(203, 213, 225, .74);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.stat-card strong {
  display: block;
  color: var(--fog);
  font-size: 32px;
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

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

.category-card,
.category-overview-card,
.content-card {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.category-card {
  position: relative;
  min-height: 230px;
  padding: 20px;
  color: #fff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  transition: transform .35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

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

.category-card span,
.category-card h3,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.category-card h3 {
  margin: 78px 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #e2e8f0;
  font-size: 14px;
}

.dark-panel {
  max-width: min(1280px, calc(100% - 44px));
  margin-top: 34px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .42), transparent 34%),
    linear-gradient(135deg, #020617, #111827 58%, #1e1b4b);
}

.dark-panel .section-head h2,
.dark-panel .text-link {
  color: #fff;
}

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 15px 38px rgba(15, 23, 42, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, .14);
}

.movie-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, .68));
}

.play-mini {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: rgba(37, 99, 235, .88);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .3);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  min-height: 52px;
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

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

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

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

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1280px;
  margin: 36px auto 0;
  padding: 58px 22px;
}

.compact-hero,
.category-page-hero,
.rank-hero {
  overflow: hidden;
  min-height: 300px;
  padding: 54px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, .22), transparent 32%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
}

.rank-hero {
  max-width: min(1280px, calc(100% - 44px));
  color: #fff;
  background-position: center;
  background-size: cover;
}

.rank-hero h1,
.rank-hero p {
  color: #fff;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.overview-cover img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}

.overview-body {
  padding: 24px;
}

.overview-body h2 {
  margin: 14px 0 8px;
}

.overview-body ul {
  margin: 16px 0;
  padding-left: 18px;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 190px));
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.filter-bar input:focus,
.filter-bar select:focus,
.hero-search input:focus {
  border-color: rgba(37, 99, 235, .72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.result-note {
  min-height: 28px;
  color: var(--muted);
  font-weight: 700;
}

.side-rank {
  min-width: 320px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, .15);
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
}

.side-rank strong {
  display: block;
  margin-bottom: 12px;
}

.side-rank a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 700;
}

.side-rank span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--fog);
  font-size: 12px;
}

.side-rank small {
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(14px);
  opacity: .35;
  transform: scale(1.08);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 75% 20%, rgba(37, 99, 235, .45), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, .74), #020617);
}

.detail-shell {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  background: linear-gradient(135deg, #1e293b, #020617);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

.detail-info h1,
.detail-info p {
  color: #fff;
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.one-line {
  max-width: 820px;
  font-size: 20px;
}

.large-tags span {
  color: #dbeafe;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .12);
}

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

.player-section {
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.video-element {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, .3), rgba(2, 6, 23, .7));
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fog), #7c3aed);
  box-shadow: 0 22px 55px rgba(37, 99, 235, .4);
  font-size: 30px;
}

.player-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.player-tools button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-table div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-table dt {
  color: var(--muted);
  font-weight: 800;
}

.info-table dd {
  margin: 0;
}

.site-footer {
  margin-top: 42px;
  padding: 48px 22px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 34px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand {
  color: #fff;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
}

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

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

.footer-links a:hover {
  color: #fff;
}

.is-hidden-by-filter {
  display: none;
}

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

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

  .overview-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 82vh;
  }

  .hero-content {
    padding-top: 14vh;
  }

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

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

  .section-head,
  .page-hero,
  .player-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-hero,
  .category-page-hero,
  .rank-hero {
    margin: 20px 22px 0;
    padding: 34px 24px;
  }

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

  .category-overview-card,
  .detail-layout,
  .footer-inner,
  .info-table {
    grid-template-columns: 1fr;
  }

  .overview-cover img {
    max-height: 260px;
  }

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

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

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .section {
    padding: 46px 16px;
  }

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

  .movie-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .movie-cover {
    height: 100%;
    min-height: 176px;
  }

  .movie-card h3 {
    min-height: 0;
  }

  .hero-controls {
    right: 22px;
    bottom: 150px;
  }

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

  .detail-info h1 {
    font-size: 34px;
  }
}
