:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --amber-2: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: #0f172a;
}

body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: #b45309;
  border-radius: 999px;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  width: min(1280px, 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: 10px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-2);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
  background: var(--amber-soft);
}

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

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

.hero-stage,
.hero-slide,
.hero-slide > img,
.hero-gradient {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-gradient {
  background:
    radial-gradient(circle at 18% 32%, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 46%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 120px 0 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.88rem;
  font-weight: 800;
}

.hero-site-title {
  margin: 18px 0 8px;
  color: var(--muted-2);
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 860px;
  margin: 8px 0 16px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--muted-2);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
}

.hero-meta span,
.detail-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.hero-actions,
.category-overview-head,
.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.25);
}

.btn-ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.12);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 86px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

.hero-arrow:hover,
.hero-dot.is-active,
.hero-dot:hover {
  background: var(--amber);
  color: #0f172a;
}

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

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

.hero-search {
  position: absolute;
  z-index: 4;
  right: max(16px, calc((100vw - 1280px) / 2));
  bottom: 70px;
  width: min(420px, calc(100% - 32px));
  display: flex;
  padding: 8px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.hero-search button,
.search-box button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: #0f172a;
  background: var(--amber);
  font-weight: 900;
}

.section-block {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.section-dark {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1280px) / 2));
  padding-right: max(16px, calc((100vw - 1280px) / 2));
  background: var(--bg-soft);
}

.section-head {
  margin-bottom: 32px;
  text-align: center;
}

.left-head,
.row-head {
  text-align: left;
}

.section-head span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--amber);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.section-head h2,
.page-hero h1,
.detail-info h1,
.content-card h2,
.side-card h2,
.section-side h2,
.category-overview-card h2 {
  margin: 0 0 10px;
  color: #fff;
  line-height: 1.15;
  font-weight: 950;
}

.section-head h2,
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-tile strong,
.category-overview-card p,
.site-footer p {
  color: var(--muted);
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame img,
.compact-card img,
.rank-row img,
.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-frame img,
.compact-card:hover img,
.rank-row:hover img {
  transform: scale(1.08);
}

.card-badge,
.card-year {
  position: absolute;
  top: 12px;
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-badge {
  left: 12px;
  color: var(--amber);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.card-year {
  right: 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.movie-card-body {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  gap: 8px;
  padding: 17px;
}

.movie-card-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover strong,
.compact-card:hover strong,
.rank-row:hover strong,
.text-link:hover {
  color: var(--amber);
}

.movie-card-body span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body em,
.compact-card em,
.rank-info em {
  margin-top: auto;
  color: #64748b;
  font-size: 0.82rem;
  font-style: normal;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 0 18px;
}

.wide-card {
  width: 310px;
  flex: 0 0 310px;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.74);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-tile span {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 950;
}

.category-tile em {
  color: var(--amber);
  font-style: normal;
  font-size: 0.88rem;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.48);
}

.rank-number {
  color: var(--amber);
  font-size: 1.25rem;
  font-weight: 950;
}

.rank-row img {
  width: 86px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
}

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

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

.rank-score {
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--amber);
  font-weight: 950;
}

.section-side,
.side-card,
.content-card,
.detail-info,
.player-panel,
.category-overview-card,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.section-side {
  position: sticky;
  top: 98px;
  height: max-content;
  padding: 24px;
}

.section-side a {
  display: block;
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  color: var(--muted-2);
  background: rgba(30, 41, 59, 0.7);
}

.section-side a:hover {
  color: var(--amber);
}

.spotlight-grid .spotlight-card:first-child {
  grid-column: span 2;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 44px;
}

.small-hero > div {
  overflow: hidden;
  padding: clamp(30px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
}

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

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

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.68);
}

.compact-card img {
  width: 92px;
  height: 62px;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.search-box {
  display: flex;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted-2);
  background: rgba(30, 41, 59, 0.68);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #0f172a;
  border-color: transparent;
  background: var(--amber);
}

.filter-empty {
  display: none;
  margin: 18px 0 0;
  color: var(--muted);
}

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

.movie-card.is-hidden {
  display: none;
}

.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 86px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

.player-panel {
  overflow: hidden;
  padding: 12px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #0f172a;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.26);
  font-size: 30px;
  transform: translateX(2px);
}

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

.detail-info,
.content-card,
.side-card {
  padding: 24px;
}

.detail-info h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

.lead-text {
  color: var(--muted-2);
  font-size: 1.1rem;
}

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

.meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.4);
}

.meta-grid strong,
.meta-grid span {
  display: block;
}

.meta-grid strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.meta-grid span {
  margin-top: 4px;
  color: #fff;
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.tag-cloud span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(30, 41, 59, 0.72);
}

.content-card h2,
.side-card h2,
.section-side h2,
.category-overview-card h2 {
  font-size: 1.35rem;
}

.content-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 1rem;
  line-height: 1.85;
}

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

.side-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.side-poster img {
  aspect-ratio: 16 / 10;
}

.side-poster .btn {
  margin: 16px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 0;
}

.related-card .poster-frame {
  height: 100%;
  aspect-ratio: auto;
}

.related-card .movie-card-body {
  min-height: 108px;
  padding: 12px;
}

.related-card .movie-card-body span {
  -webkit-line-clamp: 1;
}

.full-ranking {
  max-width: 980px;
  margin: 0 auto;
}

.text-link {
  color: var(--muted-2);
  font-weight: 900;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 12px;
}

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

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

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

  .detail-side,
  .section-side {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding: 96px 0 206px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(2.3rem, 12vw, 4.2rem);
  }

  .hero-controls {
    bottom: 144px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
    bottom: 74px;
    width: auto;
  }

  .section-block {
    padding: 54px 0;
  }

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

  .spotlight-grid .spotlight-card:first-child {
    grid-column: auto;
  }

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

  .rank-score {
    display: none;
  }

  .category-overview-head,
  .row-head,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .related-card {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-meta,
  .detail-tags {
    gap: 7px;
  }

  .search-box,
  .hero-search {
    flex-direction: column;
  }

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