:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(30, 41, 59, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --yellow: #facc15;
  --radius-xl: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  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;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.20), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 45%, #0f172a 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(34, 211, 238, 0.16);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.82), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.32);
}

.nav-inner {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.24);
}

.brand-text {
  font-size: 18px;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  padding: 9px 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.86;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cyan);
  opacity: 1;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(290px, 26vw);
  flex: 0 0 auto;
}

.nav-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  outline: none;
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 10px 14px;
}

.nav-search button,
.btn,
.page-link {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.btn:hover,
.page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.25);
}

.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-media,
.hero-media::after,
.hero-media img {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(34, 211, 238, 0.18));
}

.hero-media::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.60), rgba(2, 6, 23, 0.10)),
    linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.96));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 120px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 690px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

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

.hero-tags,
.meta-row,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--cyan);
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 56px 0;
}

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

.section-title {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-desc {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted-strong);
  line-height: 1.8;
}

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

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

.movie-card,
.category-card,
.panel,
.rank-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.88));
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: var(--shadow);
}

.poster-shell {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(34, 211, 238, 0.18)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.20), transparent 12rem),
    #0f172a;
}

.poster-shell.wide {
  aspect-ratio: 16 / 9;
}

.poster-shell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.05);
}

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

.poster-text {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: white;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
}

.poster-shell img + .poster-text {
  z-index: -1;
}

.poster-shell.poster-fallback .poster-text {
  z-index: 2;
}

.badge-row {
  position: absolute;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.70);
  color: white;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.badge.hot {
  color: #fde68a;
}

.card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-title {
  color: white;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-desc {
  color: var(--muted-strong);
  line-height: 1.65;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-top: auto;
}

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

.category-card {
  display: block;
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.50);
}

.category-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.category-card p {
  color: var(--muted-strong);
  line-height: 1.65;
}

.stat {
  color: var(--cyan);
  font-size: 32px;
  font-weight: 900;
}

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

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

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.90), rgba(34, 211, 238, 0.80));
  font-weight: 900;
}

.rank-title {
  color: white;
  font-weight: 900;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.weight {
  color: #fde68a;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 28px 0 0;
  font-size: 14px;
}

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

.page-hero {
  padding: 48px 0 30px;
}

.page-title {
  margin: 12px 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 64px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.22), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.78));
  pointer-events: none;
}

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

.player-start {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 38px;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.32);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 800;
}

.content-block {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.content-block h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-block p {
  color: var(--muted-strong);
  line-height: 1.9;
  margin: 0 0 14px;
}

.content-block p:last-child {
  margin-bottom: 0;
}

.info-card {
  padding: 20px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item .poster-shell {
  border-radius: 12px;
}

.side-title {
  font-weight: 900;
  line-height: 1.35;
}

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

.side-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.70);
  padding: 18px;
  margin-bottom: 28px;
}

.search-panel button {
  border-radius: 999px;
}

.results-info {
  color: var(--muted-strong);
  margin-bottom: 18px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 36px 0 12px;
}

.page-link {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: none;
}

.page-link.is-active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.34);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

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

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

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

@media (max-width: 860px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

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

  body.menu-open .nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .nav-search {
    max-width: none;
  }

  .hero {
    min-height: 78vh;
  }

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

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

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

  .rank-row,
  .search-result-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-row .weight,
  .search-result-row .weight {
    grid-column: 2;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-content {
    padding-top: 76px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }
}
