:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.18);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.20);
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --radius: 24px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(245, 158, 11, 0.15), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(34, 211, 238, 0.13), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #020617 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
}

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #111827;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

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

.hero-track {
  position: relative;
  min-height: 70vh;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 42%, rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.55) 42%, transparent 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 48px;
  padding-top: 32px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.065em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #111827;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.24);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.wide-btn {
  width: 100%;
  margin-top: 18px;
}

.hero-poster {
  position: relative;
  display: block;
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
}

.hero-poster img {
  width: min(100%, 360px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-dot,
.hero-arrow {
  cursor: pointer;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 38px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  background: linear-gradient(135deg, var(--gold), var(--red));
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
  pointer-events: auto;
}

.section {
  padding: 76px 0;
}

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  font-weight: 920;
  letter-spacing: -0.05em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.center-head {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: block;
}

.stacked-head {
  display: block;
}

.more-link {
  color: #fbbf24;
  font-weight: 800;
}

.search-section {
  padding-top: 42px;
}

.search-shell,
.filter-panel,
.content-card,
.content-side-card,
.rank-panel,
.category-overview-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.search-shell {
  padding: 34px;
}

.global-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 24px;
}

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

.global-search input,
.search-field input {
  padding: 0 18px;
}

.filter-selects select {
  padding: 0 14px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.search-result-card {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

.search-result-card img {
  width: 64px;
  height: 90px;
  flex: 0 0 64px;
  border-radius: 12px;
  object-fit: cover;
}

.search-result-card strong,
.search-result-card span {
  display: block;
}

.search-result-card strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.search-result-card span {
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.5;
}

.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 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.card-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #111827;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 880;
}

.card-body p {
  margin: 0;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card .card-body p {
  min-height: 0;
  -webkit-line-clamp: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-body .tag-row {
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  background: var(--gold-soft);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
}

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

.dark-panel-section {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(2, 6, 23, 0.18)),
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12), transparent 32rem);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
}

.panel-main {
  min-width: 0;
}

.rank-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 96px;
}

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

.hot-row {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.46);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hot-row:hover {
  background: rgba(148, 163, 184, 0.1);
  transform: translateX(4px);
}

.hot-index {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--red-soft);
  color: #fecaca;
  font-weight: 900;
}

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

.hot-row-body {
  min-width: 0;
}

.hot-row-body strong,
.hot-row-body em,
.hot-row-body small {
  display: block;
}

.hot-row-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-row-body em,
.hot-row-body small {
  color: var(--subtle);
  font-style: normal;
  line-height: 1.5;
}

.hot-row-body small {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.56));
  overflow: hidden;
}

.category-tile > a {
  display: grid;
  min-height: 160px;
  padding: 18px;
}

.category-tile span {
  color: #fbbf24;
  font-weight: 900;
}

.category-tile strong {
  align-self: end;
  color: var(--muted);
  line-height: 1.75;
}

.category-sample {
  display: grid;
  gap: 1px;
  padding: 0 14px 14px;
}

.category-sample a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 0;
  color: var(--subtle);
  font-size: 13px;
}

.page-hero {
  position: relative;
  padding: 84px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 4%, rgba(245, 158, 11, 0.22), transparent 28rem),
    radial-gradient(circle at 86% 0%, rgba(139, 92, 246, 0.2), transparent 26rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
}

.compact-hero {
  padding-bottom: 44px;
}

.page-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  margin-bottom: 24px;
}

.search-field span {
  display: block;
  margin: 0 0 8px 4px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

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

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

.overview-list {
  display: grid;
  gap: 26px;
  padding: 52px 0 76px;
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 34px 0 58px;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.64)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.3) 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 900px;
}

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

.player-section {
  padding-top: 24px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.66));
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #111827;
  font-size: 34px;
  box-shadow: 0 20px 56px rgba(239, 68, 68, 0.32);
}

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.content-card,
.content-side-card {
  padding: 26px;
}

.content-card h2,
.content-side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.content-card h2:not(:first-child) {
  margin-top: 28px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

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

.info-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 620px;
  color: var(--subtle);
  line-height: 1.75;
}

.footer-grid strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-links a:hover {
  color: #fbbf24;
}

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-poster {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .catalog-grid,
  .category-grid,
  .search-results,
  .expanded-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .filter-panel,
  .global-search,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 24px), var(--max));
  }

  .header-inner {
    min-height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-slider,
  .hero-track,
  .hero-slide > img {
    min-height: 680px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 92px;
  }

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

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
  }

  .section {
    padding: 52px 0;
  }

  .section-head,
  .page-hero-inner {
    display: block;
  }

  .more-link,
  .page-hero-inner .btn {
    display: inline-flex;
    margin-top: 14px;
  }

  .movie-grid,
  .small-grid,
  .catalog-grid,
  .category-grid,
  .search-results,
  .expanded-list {
    grid-template-columns: 1fr;
  }

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

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

  .player-frame {
    border-radius: 20px;
  }

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