:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-light: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --green: #22c55e;
  --yellow: #facc15;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 36rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 30rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(30, 58, 138, 0.92), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
}

.brand-text,
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 22px 0 18px;
  color: #cbd5e1;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

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

.nav-search input,
.mobile-search input,
.section-heading input,
.search-box input {
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 250px;
  padding: 11px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.section-heading input:focus,
.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-search button,
.mobile-search button,
.search-box button {
  border: 0;
  color: white;
  background: linear-gradient(90deg, var(--blue), #0891b2);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: white;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--line);
  background: #020617;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 12px 16px;
}

.mobile-links,
.mobile-cats {
  display: grid;
  gap: 8px;
}

.mobile-links a,
.mobile-cats a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 46px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 84px 22px 92px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.25);
  transform: scale(1.1);
  opacity: 0.34;
}

.hero-layer,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.98)),
    radial-gradient(circle at 62% 45%, rgba(34, 211, 238, 0.2), transparent 28rem);
}

.hero-content,
.hero-poster,
.detail-shell {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 24px;
  color: white;
  background: linear-gradient(90deg, var(--blue), #06b6d4);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 24px;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.55);
}

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

.primary-btn.full {
  width: 100%;
}

.text-link {
  color: var(--cyan);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-dot {
  width: 38px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  cursor: pointer;
}

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

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

.section-heading {
  margin-bottom: 26px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading input {
  width: min(360px, 100%);
  padding: 13px 18px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(30, 41, 59, 0.92);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(34, 211, 238, 0.12));
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.movie-card:hover .poster img {
  transform: scale(1.06);
  opacity: 0.8;
}

.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 44px;
  color: white;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
}

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

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  min-height: 42px;
  color: white;
  font-weight: 800;
  line-height: 1.45;
}

.card-title:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 60px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 145, 178, 0.18);
  font-size: 12px;
}

.tag-row.big span {
  padding: 8px 12px;
  font-size: 13px;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.46);
}

.category-tile span,
.category-overview-card span {
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.category-tile strong,
.category-overview-card strong {
  display: block;
  margin: 10px 0;
  color: var(--cyan);
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
}

.rank-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.rank-list span {
  color: var(--yellow);
  font-weight: 900;
}

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

.rank-list em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.page-hero {
  padding-top: 58px;
}

.slim-hero > div {
  position: relative;
  overflow: hidden;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 15px 20px;
}

.search-meta {
  color: var(--muted);
  margin-bottom: 22px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 66px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
}

.ranking-index {
  color: var(--yellow);
  font-size: 24px;
  font-weight: 900;
}

.ranking-score,
.score-pill {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  color: #052e16;
  background: #86efac;
  font-weight: 900;
}

.rank-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rank-title {
  font-size: 18px;
  font-weight: 900;
}

.rank-meta,
.rank-desc {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 22px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
  margin-bottom: 28px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 26px;
  background: black;
  box-shadow: var(--shadow);
}

.movie-player {
  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: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.56));
  cursor: pointer;
}

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

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  font-size: 38px;
  box-shadow: 0 0 45px rgba(34, 211, 238, 0.42);
}

.player-overlay strong {
  font-size: 22px;
}

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

.content-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
}

.content-panel h2 {
  margin: 0 0 12px;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, #020617, #0f172a);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
  gap: 34px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

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

.footer-cat-list {
  columns: 2;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 30px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

.hidden-by-filter {
  display: none !important;
}

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

  .two-columns,
  .footer-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

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

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 54px;
  }

  .hero-poster {
    max-width: 240px;
    transform: none;
  }

  .section-heading.split,
  .search-box,
  .ranking-row,
  .rank-card,
  .detail-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .detail-grid {
    gap: 24px;
  }

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

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

  .ranking-score {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    height: 62px;
    padding: 0 16px;
  }

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

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

  .section-shell {
    padding: 46px 16px 0;
  }

  .slim-hero > div,
  .content-panel {
    padding: 24px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

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

  .horizontal-scroll {
    grid-auto-columns: 260px;
  }

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