:root {
  color-scheme: dark;
  --bg: #0d0d10;
  --panel: #1a1a1f;
  --panel-soft: #24242b;
  --line: #2c2c34;
  --muted: #9ca3af;
  --text: #f8fafc;
  --gold: #eab308;
  --gold-light: #facc15;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  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(234, 179, 8, 0.12), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(239, 68, 68, 0.11), transparent 28rem),
    var(--bg);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 13, 16, 0.78);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #111;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 12px 36px rgba(234, 179, 8, 0.28);
}

.logo-text {
  font-size: 19px;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #111;
  background: var(--gold);
}

.site-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
}

.site-search input,
.large-search input,
.filter-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.site-search input {
  padding: 11px 14px;
}

.site-search button,
.large-search button {
  border: 0;
  cursor: pointer;
  color: #111;
  background: var(--gold);
  font-weight: 800;
}

.site-search button {
  padding: 11px 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero-slider {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg), rgba(13, 13, 16, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(250px, 360px);
  gap: 56px;
  align-items: center;
  padding: 80px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(44px, 7vw, 88px);
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.hero-tags span,
.detail-meta span,
.movie-meta span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.07);
}

.hero-tags span,
.detail-meta span {
  padding: 8px 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-btn {
  min-width: 138px;
  padding: 14px 22px;
  color: #111;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 18px 45px rgba(234, 179, 8, 0.25);
}

.ghost-btn {
  min-width: 128px;
  padding: 13px 22px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
  pointer-events: none;
}

.hero-poster img,
.poster img,
.detail-poster img,
.category-cover img {
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1a1a1f, #2c2c34);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 26px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.active {
  width: 46px;
  background: var(--gold);
}

.section {
  padding: 56px 0;
}

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

.section-head h2,
.text-panel h2,
.category-content h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 950;
}

.text-link {
  color: var(--gold-light);
}

.quick-panel {
  margin-top: -36px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(26, 26, 31, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.category-nav,
.category-samples,
.footer-links,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-nav a,
.category-samples a,
.tag-row span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-nav a {
  padding: 12px 16px;
  color: #e5e7eb;
  font-weight: 800;
}

.category-nav a:hover,
.category-samples a:hover {
  color: #111;
  background: var(--gold);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  transition: 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.09);
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #111;
  background: var(--gold);
  font-weight: 950;
}

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

.rank-meta,
.movie-meta,
.movie-card p,
.category-content p,
.page-hero p,
.footer-inner p,
.filter-box p {
  color: var(--muted);
}

.filter-box {
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(234, 179, 8, 0.18);
}

.filter-box input,
.large-search input {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inline-filter {
  max-width: 560px;
  margin-top: 24px;
  padding: 12px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(26, 26, 31, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.2);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(234, 179, 8, 0.42);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--panel-soft);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #111;
  background: var(--gold);
  font-weight: 950;
}

.movie-info {
  padding: 14px;
}

.movie-meta {
  gap: 6px;
  font-size: 12px;
}

.movie-meta span {
  padding: 4px 7px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.7;
}

.tag-row span {
  padding: 5px 8px;
  color: #d1d5db;
  font-size: 12px;
}

.page-main {
  padding: 42px 0 70px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  padding: clamp(36px, 5vw, 68px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(234, 179, 8, 0.16), transparent 28rem),
    linear-gradient(135deg, rgba(26, 26, 31, 0.95), rgba(44, 44, 52, 0.78));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(26, 26, 31, 0.72);
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover img {
  aspect-ratio: 2 / 3;
}

.category-content p {
  line-height: 1.8;
}

.category-samples a {
  padding: 7px 10px;
  color: #d1d5db;
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(1px) saturate(1.05);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  padding: clamp(24px, 4vw, 46px);
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: var(--panel-soft);
}

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.detail-one-line {
  max-width: 860px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.9;
}

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

.player-section,
.detail-content,
.related-section {
  margin-top: 30px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58));
  transition: 0.2s ease;
}

.play-overlay span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: var(--gold);
  font-size: 28px;
  box-shadow: 0 18px 55px rgba(234, 179, 8, 0.28);
}

.video-player.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.text-panel {
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(26, 26, 31, 0.74);
}

.text-panel p {
  color: #d1d5db;
  font-size: 16px;
  line-height: 2;
}

.large-search {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 12px;
  max-width: 760px;
  margin-top: 26px;
}

.large-search button {
  border-radius: 16px;
}

.search-results {
  min-height: 420px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

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

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

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

.copyright {
  margin: 0;
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

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

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

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

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

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

  body.nav-open .main-nav,
  body.nav-open .site-search {
    display: flex;
  }

  body.nav-open .main-nav {
    order: 4;
    flex-direction: column;
    align-items: stretch;
  }

  body.nav-open .site-search {
    order: 5;
  }

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

  .hero-content {
    min-height: 720px;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: end;
  }

  .hero-poster {
    max-width: 260px;
  }

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

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

  .rank-meta {
    grid-column: 2;
  }

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

  .category-cover {
    max-width: 280px;
  }

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

@media (max-width: 520px) {
  .shell,
  .header-inner,
  .footer-inner,
  .hero-content,
  .hero-controls {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy h1 {
    font-size: 38px;
  }

  .quick-panel,
  .page-hero,
  .text-panel {
    padding: 22px;
  }

  .movie-grid,
  .catalog-grid,
  .related-grid,
  .mini-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .movie-info {
    padding: 11px;
  }

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

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