:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-soft: #0b1224;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --brand: #38bdf8;
  --brand-strong: #22d3ee;
  --accent: #818cf8;
  --gold: #fbbf24;
  --danger: #fb7185;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 32rem),
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.18), transparent 30rem),
    linear-gradient(180deg, #050816 0%, #07111f 46%, #030712 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #031320;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong), var(--accent));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.3);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, #67e8f9, #93c5fd, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand-strong);
  transform: translateY(-1px);
}

.top-search {
  width: min(300px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 6px 10px;
}

.top-search button,
.icon-button {
  border: 0;
  cursor: pointer;
  color: #031320;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: 999px;
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.menu-toggle {
  display: none;
}

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

.hero {
  position: relative;
  min-height: 650px;
  margin-top: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #020617;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.28) 100%),
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.26), transparent 28rem);
  z-index: 2;
}

.hero::after {
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.96));
  z-index: 4;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1s ease;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.9), rgba(30, 41, 59, 0.65)),
    var(--hero-image) center / cover no-repeat;
}

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

.hero-content {
  position: relative;
  z-index: 6;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 44px;
  align-items: center;
  padding: 72px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, #ffffff, #93c5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 660px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

.btn-primary {
  color: #04111e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
  color: #e0f2fe;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
  font-weight: 700;
}

.hero-panel {
  position: relative;
  display: grid;
  gap: 18px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 30px;
  aspect-ratio: 3 / 4.2;
  background:
    radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.45), transparent 35%),
    linear-gradient(145deg, #0f172a, #020617);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.poster-shell img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-hidden {
  display: none;
}

.hero-rank {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
}

.hero-rank a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #e2e8f0;
  font-weight: 800;
}

.hero-rank span {
  color: var(--brand-strong);
}

.hero-controls {
  position: absolute;
  z-index: 8;
  left: 72px;
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.section {
  margin: 54px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(15, 23, 42, 0.86);
}

.poster-link {
  display: block;
}

.poster-shell {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 20%, rgba(56, 189, 248, 0.42), transparent 34%),
    linear-gradient(145deg, #172554, #020617 70%);
}

.poster-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.88));
}

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #04111e;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04111e;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 32px rgba(8, 145, 178, 0.35);
}

.movie-body {
  padding: 14px;
}

.movie-name {
  display: block;
  color: #f8fafc;
  font-weight: 900;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.movie-line {
  margin: 10px 0 0;
  color: #aab7c9;
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-more {
  color: #bae6fd;
  font-weight: 900;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 52%),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.45);
}

.category-tile strong {
  font-size: 21px;
}

.category-tile span {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  margin: 26px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 34rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4.25;
  background:
    radial-gradient(circle at 40% 20%, rgba(56, 189, 248, 0.45), transparent 34%),
    linear-gradient(145deg, #172554, #020617 70%);
}

.detail-copy h1 {
  margin: 10px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-summary {
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.85;
}

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

.info-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.info-item strong {
  display: block;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-card {
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.18), transparent 30%),
    #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #04111e;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 20px 45px rgba(34, 211, 238, 0.32);
  font-size: 32px;
}

.player-caption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.85);
}

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

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.detail-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.filter-panel {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(120px, 0.6fr));
  gap: 12px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
  padding: 0 14px;
  outline: 0;
}

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

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

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #04111e;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  font-weight: 900;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner strong {
  color: #e0f2fe;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

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

  .hero-content {
    padding: 52px;
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 360px;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

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

  .top-search {
    order: 4;
    width: 100%;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 38px 24px 86px;
  }

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

  .hero-controls {
    left: 24px;
    bottom: 30px;
  }

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

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

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

@media (max-width: 680px) {
  .page-main,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1240px);
  }

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

  .section-heading,
  .footer-inner,
  .player-caption {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    margin-top: 16px;
    border-radius: 20px;
  }

  .hero-content {
    padding: 30px 18px 78px;
  }

  .hero-summary,
  .detail-summary {
    font-size: 15px;
  }

  .detail-hero {
    padding: 16px;
  }

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

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

  .rank-row .btn {
    grid-column: 1 / -1;
  }
}
