:root {
  color-scheme: dark;
  --bg: #070b16;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #111827;
  --panel-soft: #172033;
  --text: #f8fafc;
  --muted: #a8b3c7;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --orange: #fb923c;
  --emerald: #34d399;
  --blue: #60a5fa;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.14), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #111827 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #07111f;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

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

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

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #dbe7f7;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 99px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 680px;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 26%, rgba(34, 211, 238, 0.24), transparent 28rem),
    linear-gradient(135deg, #0f172a, #020617);
}

.hero-backdrop img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(8px) saturate(1.2);
  transform: scale(1.06);
}

.hero-backdrop::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 52%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 88px 0 112px;
}

.hero-copy h1,
.detail-info h1,
.page-hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy p,
.detail-info p,
.page-hero p {
  max-width: 720px;
  color: #d3dce9;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #e5f6ff;
  background: rgba(15, 23, 42, 0.58);
}

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

.primary-btn,
.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  color: #07111f;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  box-shadow: 0 18px 42px rgba(251, 146, 60, 0.24);
}

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

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ghost-btn.dark {
  background: rgba(2, 6, 23, 0.55);
}

.hero-poster {
  display: block;
  transform: rotate(2deg);
  transition: 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.32), transparent 12rem),
    linear-gradient(145deg, #1e293b, #020617);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.hero-poster .poster-wrap {
  box-shadow: var(--shadow);
}

img.image-hidden {
  display: none;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 99px;
  opacity: 0.54;
}

.hero-dot.is-active {
  width: 28px;
  opacity: 1;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
}

.quick-search,
.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search {
  position: relative;
  z-index: 4;
  margin-top: -42px;
}

.quick-search-inner,
.filter-panel,
.category-overview-card,
.article-card,
.side-card,
.player-card,
.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.quick-search h2 {
  margin: 6px 0 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.home-search {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.home-search input,
.filter-field input,
.filter-field select {
  padding: 0 14px;
}

.home-search button {
  min-width: 96px;
  border: 0;
  border-radius: 16px;
  color: #07111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
}

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

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

.section-heading h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.compact-heading {
  margin-bottom: 18px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

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

.movie-card .poster-wrap {
  border-radius: 24px 24px 0 0;
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 3.4em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.movie-card.compact h2 {
  font-size: 1rem;
}

.movie-card.compact p {
  font-size: 0.86rem;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 0.76rem;
}

.large-tags span {
  font-size: 0.9rem;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(251, 146, 60, 0.36);
  background: rgba(251, 146, 60, 0.1);
}

.rank-number {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #07111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.more-link {
  width: 100%;
  margin-top: 16px;
  color: #07111f;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
}

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

.category-card,
.category-overview-card {
  overflow: hidden;
  transition: 0.25s ease;
}

.category-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

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

.category-covers {
  height: 138px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.category-card div:last-child {
  padding: 18px;
}

.category-card h2,
.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 25%, rgba(34, 211, 238, 0.18), transparent 30rem),
    linear-gradient(135deg, #0f172a, #020617);
}

.page-hero {
  padding: 92px max(16px, calc((100vw - 1200px) / 2)) 70px;
}

.slim-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.category-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
}

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

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 180px;
  gap: 16px;
}

.filter-field span {
  display: block;
  margin-bottom: 8px;
  color: #dbe7f7;
  font-size: 0.82rem;
  font-weight: 800;
}

.empty-state {
  margin: 16px 0 0;
  color: var(--orange);
}

.full-rank {
  gap: 12px;
}

.full-rank .rank-item {
  grid-template-columns: 58px 1fr auto;
}

.full-rank .rank-meta {
  text-align: right;
}

.stacked-section {
  display: grid;
  gap: 26px;
}

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

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.detail-hero {
  min-height: 580px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-content {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  min-height: 580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster .poster-wrap {
  box-shadow: var(--shadow);
}

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

.detail-meta {
  margin: 24px 0;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 13rem),
    rgba(2, 6, 23, 0.58);
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #07111f;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.player-card,
.article-card,
.side-card {
  padding: 24px;
}

.player-status {
  margin: 14px 0 0;
  color: var(--muted);
}

.article-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.article-card p {
  margin: 0;
  color: #dbe7f7;
  font-size: 1rem;
  line-height: 2;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 24px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #fff;
}

.side-related {
  display: grid;
  gap: 14px;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 82px 1fr;
}

.side-related .poster-wrap {
  border-radius: 18px 0 0 18px;
}

.side-related .movie-card-body {
  padding: 12px;
}

.side-related .movie-card p,
.side-related .tag-row {
  display: none;
}

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

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-grid p {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

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

[hidden] {
  display: none !important;
}

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

  .hero-content,
  .detail-content,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .ranking-panel,
  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 64px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    padding-top: 58px;
    gap: 30px;
  }

  .quick-search-inner,
  .home-search,
  .category-overview-head,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search,
  .category-overview-head {
    display: grid;
  }

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

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

  .full-rank .rank-item,
  .rank-item {
    grid-template-columns: 44px 1fr;
  }

  .full-rank .rank-meta {
    grid-column: 2;
    text-align: left;
  }

  .detail-content {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 44px 0;
  }

  .detail-hero {
    min-height: auto;
  }

  .side-related .movie-card {
    grid-template-columns: 76px 1fr;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .catalog-grid,
  .small-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 2.5rem;
  }
}
