:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-solid: #111827;
  --border: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-small: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(139, 92, 246, 0.18), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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;
  background: rgba(2, 6, 23, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #020617;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--text);
  background: rgba(34, 211, 238, 0.11);
}

.nav-link.slim {
  font-size: 13px;
  padding: 0 10px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 10px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.86)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 48%, rgba(2, 6, 23, 0.74) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) 380px;
  align-items: center;
  gap: 64px;
  padding: 108px 0 92px;
}

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

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.movie-meta-line,
.compact-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted-strong);
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: #001018;
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.24);
}

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

.text-button {
  min-height: 34px;
  padding: 0;
  color: var(--cyan);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster,
.detail-poster,
.category-cover,
.rank-cover,
.poster-link,
.category-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
}

.hero-poster {
  aspect-ratio: 2 / 2.9;
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img,
.poster-link img,
.category-tile img,
.category-cover img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.hero-poster:hover img,
.detail-poster:hover img,
.poster-link:hover img,
.category-tile:hover img,
.category-cover:hover img,
.rank-cover:hover img {
  transform: scale(1.05);
  filter: saturate(1.1);
}

.hero-poster span,
.detail-poster span,
.play-dot {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.95);
  color: #001018;
  font-size: 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid rgba(248, 250, 252, 0.65);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.2);
}

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

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

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

.home-intro,
.page-hero,
.detail-hero,
.filter-panel,
.category-panel,
.article-block,
.video-shell,
.site-footer {
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.home-intro {
  margin-top: -42px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  border-radius: var(--radius);
}

.intro-card h2,
.section-head h2,
.article-block h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.intro-card p,
.section-head p,
.article-block p,
.category-panel p,
.category-tile p,
.site-footer p {
  color: var(--muted-strong);
  line-height: 1.75;
}

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

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

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

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

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.poster-link {
  display: block;
  aspect-ratio: 2 / 2.85;
  border-radius: 0;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #fff;
  font-size: 14px;
}

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

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.movie-card.compact h2 {
  font-size: 16px;
}

.movie-card.compact p {
  min-height: auto;
  font-size: 13px;
}

.movie-meta-line {
  gap: 6px;
}

.movie-meta-line span {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

.tag-row span {
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
}

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

.category-tile {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border: 1px solid var(--border);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.88));
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin-bottom: 0;
  font-size: 14px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-top: 34px;
  padding: 46px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.12), transparent 24rem),
    rgba(15, 23, 42, 0.78);
}

.compact-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
}

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

.category-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius);
}

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

.category-panel h2 {
  margin: 0;
  font-size: 26px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 8px;
}

.mini-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  font-size: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.36fr));
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: var(--radius-small);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.filter-empty {
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted-strong);
  text-align: center;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 2 / 2.65;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-top {
  padding-bottom: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  padding: 26px;
  border-radius: var(--radius);
}

.detail-poster {
  aspect-ratio: 2 / 2.86;
  border: 1px solid var(--border);
}

.detail-copy {
  align-self: center;
}

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

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

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
  color: var(--text);
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.94);
  color: #001018;
  font-size: 30px;
  box-shadow: 0 18px 54px rgba(34, 211, 238, 0.28);
}

.play-overlay strong {
  max-width: min(640px, 82vw);
  text-align: center;
  font-size: clamp(22px, 4vw, 36px);
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.article-block {
  padding: 28px;
  border-radius: var(--radius);
}

.article-block p {
  margin: 18px 0 0;
  font-size: 16px;
}

.info-block dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 20px 0 0;
}

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

.info-block dd {
  margin: 0;
  color: var(--text);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 44px auto 28px;
  padding: 30px;
  border-radius: var(--radius);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 16px;
}

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

.footer-links a {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted-strong);
  font-size: 13px;
}

.copyright {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 6px;
  }

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

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

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

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

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

@media (max-width: 760px) {
  .site-header-inner {
    height: 62px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 780px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 82px 0 88px;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-arrow {
    display: none;
  }

  .home-intro,
  .page-hero,
  .section-head,
  .detail-hero,
  .category-panel,
  .rank-row,
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-intro,
  .page-hero,
  .detail-hero,
  .article-block,
  .site-footer {
    padding: 22px;
  }

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

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

  .movie-card.compact .poster-link {
    aspect-ratio: 2 / 2.85;
  }

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

  .category-panel {
    gap: 16px;
  }

  .category-cover {
    max-height: 260px;
  }

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

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

  .rank-row .text-button {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .footer-grid {
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .content-section,
  .page-hero,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

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

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

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

  .play-overlay span {
    width: 72px;
    height: 72px;
  }
}
