:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-strong: #020617;
  --panel: rgba(30, 41, 59, 0.62);
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --pink: #f472b6;
  --orange: #fb923c;
  --green: #4ade80;
  --shadow: 0 25px 50px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.13), transparent 30rem),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.14), transparent 36rem),
    linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0f172a 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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled,
.site-header.menu-open {
  background: rgba(2, 6, 23, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(16px);
}

.nav-shell {
  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: 10px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.36);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.78);
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 4px;
  background: #fff;
}

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

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

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(34, 211, 238, 0.08);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--bg-strong);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.75) 45%, rgba(15, 23, 42, 0.12) 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1200px) / 2));
  bottom: 86px;
  width: min(680px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.65;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 13px;
}

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

.center-actions {
  justify-content: center;
}

.primary-btn,
.ghost-btn,
.tile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: #fff;
  box-shadow: 0 16px 30px rgba(6, 182, 212, 0.22);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
}

.primary-btn:hover,
.ghost-btn:hover,
.tile-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1200px) / 2));
  bottom: 38px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--cyan);
}

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

.panel-section {
  width: 100%;
  max-width: none;
  padding: 64px max(16px, calc((100% - 1200px) / 2));
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.42), rgba(15, 23, 42, 0.68));
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
}

.section-head h2 span {
  color: var(--cyan);
}

.section-more,
.category-block-head a {
  color: var(--cyan);
  font-weight: 700;
}

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

.compact-grid,
.catalog-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.catalog-grid {
  padding-top: 24px;
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.featured-grid .poster-wrap {
  aspect-ratio: 16 / 9;
}

.poster-wrap img,
.wide-thumb img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-wrap img,
.movie-card:hover .wide-thumb img,
.rank-row:hover .rank-thumb img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 56%);
  opacity: 0.86;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.9);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.card-body strong,
.wide-body strong,
.rank-info strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover strong,
.rank-row:hover strong {
  color: var(--cyan);
}

.card-body span,
.wide-body span,
.rank-info span {
  color: var(--muted);
  font-size: 13px;
}

.card-body em,
.wide-body em,
.rank-info em {
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  padding: 12px;
  flex-direction: row;
}

.wide-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.wide-body {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.category-list {
  display: grid;
  gap: 44px;
}

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

.category-block-head h3 {
  margin: 0;
  color: var(--cyan);
  font-size: 22px;
}

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

.page-main {
  padding-top: 72px;
}

.page-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: 96px 16px 70px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.2), transparent 34rem),
    linear-gradient(90deg, rgba(30, 58, 138, 0.3), rgba(15, 23, 42, 0.88), rgba(88, 28, 135, 0.24));
}

.small-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
}

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

.category-tile {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.7));
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.2);
}

.category-tile h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.tile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-links a {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: #cbd5e1;
  font-size: 13px;
}

.tile-button {
  width: fit-content;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.filter-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.16);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 14px;
}

.filter-row label {
  display: grid;
  gap: 8px;
}

.filter-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.66);
  color: #fff;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 126px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.56);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(30, 41, 59, 0.82);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-action {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 800;
}

.movie-main {
  background:
    radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.08), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(244, 114, 182, 0.08), transparent 30rem);
}

.movie-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 0;
}

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

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

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.45));
}

.player-start[hidden] {
  display: none;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
  transition: transform 0.2s ease;
}

.player-start:hover span {
  transform: scale(1.08);
}

.movie-detail-head {
  padding: 28px;
}

.movie-detail-head h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
}

.movie-detail-head p {
  max-width: 900px;
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.7;
}

.detail-text {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.52);
}

.detail-text h2 {
  margin: 10px 0 0;
  color: #fff;
  font-size: 26px;
}

.detail-text p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.9;
}

.related-section {
  width: 100%;
}

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

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

.footer-grid p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

  .desktop-nav {
    gap: 16px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .poster-grid,
  .compact-grid,
  .catalog-grid,
  .ranking-grid,
  .category-tile-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .rank-action {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-section,
  .movie-layout,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1200px);
  }

  .brand {
    font-size: 22px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    left: 16px;
    bottom: 78px;
    width: calc(100% - 32px);
  }

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
  }

  .poster-grid,
  .compact-grid,
  .catalog-grid,
  .ranking-grid,
  .category-tile-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .panel-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .movie-card-wide {
    grid-template-columns: 112px 1fr;
  }

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

  .movie-detail-head,
  .detail-text {
    padding: 20px;
  }
}
