* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #07111f;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #b6c1d6;
  --muted-2: #8090aa;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.18);
  --cyan: #38bdf8;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 34rem), linear-gradient(180deg, #030712 0%, #07111f 45%, #030712 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.38);
}

.brand-text {
  font-size: 1.15rem;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.64) 42%, rgba(3, 7, 18, 0.12) 100%), linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.18) 40%, rgba(3, 7, 18, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - 1280px) / 2));
  bottom: 10vh;
  width: min(720px, calc(100% - 56px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero h1,
.hero h2,
.page-hero h1,
.feature-panel h2,
.detail-content h1 {
  margin: 0;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.hero h1,
.hero h2 {
  max-width: 860px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 660px;
  margin: 22px 0 30px;
  color: #d8e2f5;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.footer-links,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
}

.btn.small {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.88);
  transform: translateY(-50%) scale(1.04);
}

.hero-control.prev {
  left: 28px;
}

.hero-control.next {
  right: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

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

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

.content-section.lift {
  position: relative;
  z-index: 8;
  margin-top: -72px;
}

.content-section.flat {
  padding-top: 34px;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading h2,
.category-overview-head h2,
.detail-block h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.section-heading a,
.category-overview-head a,
.breadcrumb a,
.detail-meta a {
  color: #93c5fd;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.58));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(96, 165, 250, 0.54);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.72));
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster-link img {
  opacity: 0.84;
  transform: scale(1.07);
}

.play-cue {
  position: absolute;
  inset: auto 16px 16px auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.36);
}

.rank-badge {
  position: absolute;
  inset: 12px auto auto 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.92);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 1.08rem;
  line-height: 1.28;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span,
.tag-chip {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.78rem;
}

.content-band {
  padding: 72px max(16px, calc((100vw - 1280px) / 2));
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.52), rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.52));
}

.band-heading {
  width: min(1280px, 100%);
  margin-inline: auto;
}

.scroll-row {
  display: grid;
  grid-auto-columns: minmax(260px, 300px);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.45s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.66;
  transform: scale(1.06);
}

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

.category-tile span {
  display: block;
  padding: 110px 18px 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  padding: 0 18px 18px;
  color: #dbeafe;
  font-size: 0.9rem;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 7, 18, 0.82) 100%);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: stretch;
}

.feature-panel,
.rank-list,
.filter-panel,
.page-hero,
.category-overview-card,
.detail-block,
.detail-layout,
.player-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-panel {
  padding: clamp(28px, 5vw, 54px);
}

.feature-panel h2 {
  font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.feature-panel p {
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.rank-list {
  padding: 12px;
}

.rank-list.extended {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(4px);
}

.rank-number {
  color: #93c5fd;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-copy strong,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-main {
  padding: 112px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(32px, 7vw, 70px);
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.32), transparent 32rem), linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.9));
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(2.4rem, 5.6vw, 5rem);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.compact-actions {
  margin-top: 26px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(3, 7, 18, 0.56);
  color: #fff;
  padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.empty-state {
  display: none;
  margin: 34px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: clamp(18px, 4vw, 28px);
}

.category-overview-card p {
  max-width: 820px;
  margin: -8px 0 20px;
  color: var(--muted);
}

.compact .movie-card.tiny .poster-link {
  aspect-ratio: 16 / 10;
}

.detail-main {
  padding: 100px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--muted);
}

.player-section {
  margin-bottom: 28px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.28), rgba(3, 7, 18, 0.72));
  color: #fff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: clamp(74px, 10vw, 104px);
  height: clamp(74px, 10vw, 104px);
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.44);
  font-size: 2.1rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  margin-bottom: 28px;
  padding: clamp(18px, 4vw, 28px);
}

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

.detail-content h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.lead {
  margin: 18px 0 22px;
  color: #e2e8f0;
  font-size: 1.2rem;
}

.detail-meta {
  color: var(--muted);
}

.detail-tags {
  margin-top: 18px;
}

.detail-block {
  margin-bottom: 28px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-block h2 {
  margin-bottom: 16px;
}

.detail-block p {
  margin: 0 0 14px;
  color: #d8e2f5;
  font-size: 1.02rem;
}

.related-section {
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.84);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  color: var(--muted);
}

.footer-brand {
  color: #fff;
  font-size: 1.1rem;
}

.footer-links {
  margin: 14px 0;
}

.footer-links a {
  color: #93c5fd;
}

.footer-inner p {
  margin: 0;
}

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

  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout,
  .rank-list.extended {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

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

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 86px;
  }

  .hero-control {
    display: none;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(2.45rem, 13vw, 4.4rem);
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

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

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

  .rank-row img {
    width: 54px;
    height: 72px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-shell,
  .mobile-nav,
  .content-section,
  .page-main,
  .detail-main,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

  .card-grid.four,
  .card-grid.three,
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .poster-link {
    aspect-ratio: 2 / 3;
  }
}
