:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e5edf6;
  --white: #ffffff;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --pink: #f472b6;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(59, 130, 246, 0.18), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

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

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.36);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1220px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.46);
  font-size: 14px;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(51, 65, 85, 0.72);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  color: white;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 88vh;
  padding-top: 68px;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center;
  filter: saturate(1.12) blur(1px);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.46) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-inner {
  width: min(1220px, calc(100% - 32px));
  min-height: calc(88vh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 390px;
  align-items: center;
  gap: 52px;
  padding: 64px 0 96px;
}

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

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

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  color: var(--white);
  text-shadow: 0 24px 80px rgba(2, 6, 23, 0.76);
}

.hero-text,
.page-hero p,
.lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-tags,
.meta-row,
.inline-links,
.footer-links,
.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.meta-row span,
.inline-links a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.42);
  color: #bae6fd;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

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

.btn.ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.22);
}

.btn.line {
  color: #bae6fd;
  border-color: rgba(34, 211, 238, 0.26);
  background: rgba(8, 47, 73, 0.2);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow), 0 0 0 1px rgba(148, 163, 184, 0.18);
  transform: rotate(1.5deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.5));
  pointer-events: none;
}

.hero-poster img {
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.04);
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 4;
}

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

.hero-arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
  font-size: 26px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.36);
}

.hero-dot.active {
  width: 30px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section,
.page-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head h2,
.text-panel h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.section-head p,
.text-panel p,
.card-body p,
.category-card-large p,
.category-tile strong {
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: #a5f3fc;
  font-weight: 800;
  padding: 10px 14px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  background: rgba(8, 47, 73, 0.22);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(18px);
  margin-bottom: 28px;
}

.sticky-panel {
  position: sticky;
  top: 84px;
  z-index: 8;
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: 0;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.62);
  padding: 0 16px;
}

.filter-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

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

.full-grid {
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 6px 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.25);
}

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

.meta-row {
  margin-bottom: 10px;
  gap: 6px;
}

.meta-row span {
  padding: 4px 7px;
  font-size: 11px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

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

.card-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card-large {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 42%),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.24);
}

.category-tile {
  padding: 18px;
}

.category-tile span,
.category-card-large h2 {
  display: block;
  color: #fff;
  font-weight: 900;
}

.category-tile span {
  font-size: 20px;
  margin-bottom: 8px;
}

.category-tile strong {
  display: block;
  min-height: 52px;
  font-weight: 500;
}

.category-tile div,
.category-preview-links {
  margin-top: 14px;
}

.category-tile div a,
.category-preview-links a,
.footer-links a {
  color: #a5f3fc;
  font-size: 13px;
}

.category-card-large {
  padding: 24px;
}

.category-card-large h2 {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 16%, rgba(34, 211, 238, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.page-hero.compact {
  padding: clamp(40px, 7vw, 78px);
}

.inline-links {
  margin-top: 24px;
}

.ranking-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.ranking-board.two-col {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.35);
}

.rank-row b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-row span {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: #cbd5e1;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 0%, rgba(59, 130, 246, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.66));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5);
}

.detail-poster img {
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.player-section {
  padding-bottom: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.62);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.44);
  font-size: 34px;
}

.player-overlay strong {
  max-width: min(90%, 640px);
  color: white;
  font-size: clamp(20px, 4vw, 34px);
  text-align: center;
  text-shadow: 0 12px 40px rgba(2, 6, 23, 0.8);
}

.text-panel {
  max-width: 900px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.28);
}

.text-panel h2 + p {
  margin-top: 12px;
}

.text-panel p + h2 {
  margin-top: 28px;
}

.text-panel p {
  font-size: 17px;
}

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

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  gap: 18px;
}

.footer strong {
  color: #fff;
  font-size: 20px;
}

.footer p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.copyright {
  font-size: 13px;
}

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

@media (max-width: 920px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

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

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

  .hero-inner {
    padding-top: 46px;
  }

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

@media (max-width: 640px) {
  .nav-wrap,
  .section,
  .page-main,
  .hero-inner,
  .hero-controls,
  .footer-inner {
    width: min(100% - 24px, 1220px);
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding-bottom: 120px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 16px;
    display: inline-flex;
  }

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

  .card-body {
    padding: 12px;
  }

  .rank-row {
    grid-template-columns: 34px 1fr;
  }

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

  .page-hero.compact,
  .detail-head {
    padding: 24px;
    border-radius: 22px;
  }

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