:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --teal-600: #0d9488;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(120deg, var(--slate-900), var(--slate-950));
  color: var(--white);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.28);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.38);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  color: var(--slate-300);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.desktop-nav a,
.nav-more button,
.mobile-nav a {
  color: var(--slate-200);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.nav-more button:hover,
.mobile-nav a:hover {
  color: var(--emerald-400);
}

.nav-more {
  position: relative;
}

.nav-more button,
.mobile-toggle {
  border: 0;
  background: transparent;
  color: var(--slate-200);
  cursor: pointer;
}

.nav-menu {
  position: absolute;
  right: 0;
  top: 32px;
  min-width: 150px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  display: none;
}

.nav-more:hover .nav-menu {
  display: grid;
  gap: 8px;
}

.mobile-toggle {
  display: none;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 52px;
  padding: 88px max(24px, calc((100vw - 1320px) / 2 + 24px));
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(4px) saturate(1.1);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(16, 185, 129, 0.28), transparent 32%),
    linear-gradient(120deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82) 52%, rgba(4, 120, 87, 0.72));
}

.hero-content,
.hero-poster,
.detail-wrap {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--emerald-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--emerald-700);
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--slate-200);
  font-size: 18px;
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tag-row span {
  color: var(--emerald-700);
  background: rgba(16, 185, 129, 0.1);
}

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

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

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.32);
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  width: min(360px, 100%);
  justify-self: center;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(145deg, var(--slate-800), var(--emerald-700));
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

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

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

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--emerald-400);
}

.search-band {
  max-width: 1320px;
  margin: -42px auto 0;
  position: relative;
  z-index: 5;
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  border-radius: var(--radius);
  color: var(--white);
  background: linear-gradient(120deg, var(--slate-800), var(--emerald-700));
  box-shadow: var(--shadow);
}

.search-band h2,
.search-band p {
  margin: 0;
}

.search-band p {
  margin-top: 6px;
  color: var(--slate-200);
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.quick-search input,
.quick-search button,
.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 0 14px;
  color: var(--slate-800);
  background: var(--white);
}

.quick-search button {
  padding: 0 20px;
  color: var(--white);
  background: var(--emerald-600);
  cursor: pointer;
  font-weight: 800;
}

.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 70px 22px 0;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head a {
  color: var(--emerald-700);
  font-weight: 800;
}

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

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

.category-card {
  padding: 18px;
  display: grid;
  gap: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--slate-800), var(--emerald-700));
}

.category-card h3,
.category-card p {
  margin: 0;
}

.category-card h3 {
  font-size: 20px;
}

.category-card p {
  margin-top: 6px;
  color: var(--slate-600);
  line-height: 1.7;
}

.hot-panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.compact-head h2 {
  font-size: 28px;
}

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

.hot-row {
  display: grid;
  grid-template-columns: 32px 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--slate-50);
}

.hot-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--slate-800);
  font-size: 13px;
  font-weight: 900;
}

.hot-row img {
  width: 52px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--slate-800), var(--emerald-700));
}

.hot-info strong,
.hot-info small {
  display: block;
}

.hot-info small {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 12px;
}

.hot-score {
  color: var(--emerald-700);
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(145deg, var(--slate-800), var(--emerald-700));
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.74));
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-600);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-900);
  background: var(--amber-400);
  font-weight: 900;
  font-size: 12px;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.card-meta,
.card-line {
  margin: 8px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.65;
}

.card-line {
  color: var(--slate-700);
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(120deg, var(--slate-900), var(--emerald-700));
}

.page-hero {
  min-height: 310px;
  display: grid;
  align-items: center;
  padding: 70px max(22px, calc((100vw - 1320px) / 2 + 22px));
}

.page-hero.slim {
  min-height: 250px;
}

.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--slate-200);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.empty-state {
  display: none;
  padding: 46px;
  text-align: center;
  color: var(--slate-600);
  border-radius: var(--radius);
  background: var(--white);
}

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

.detail-hero {
  min-height: 620px;
}

.detail-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 42px 22px 72px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 46px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(145deg, var(--slate-800), var(--emerald-700));
}

.detail-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--slate-200);
  font-size: 20px;
  line-height: 1.8;
}

.detail-section {
  padding-top: 52px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: var(--slate-950);
  box-shadow: var(--shadow);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.64));
  cursor: pointer;
}

.player-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.35);
  font-size: 34px;
}

.player-card.playing .player-overlay {
  display: none;
}

.content-card {
  margin-top: 28px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

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

.related-block {
  margin-top: 42px;
}

.site-footer {
  margin-top: 80px;
  color: var(--slate-300);
  background: var(--slate-950);
}

.footer-grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-grid p {
  margin: 0;
  max-width: 520px;
  color: var(--slate-400);
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin-top: 9px;
  color: var(--slate-300);
}

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

.footer-bottom {
  padding: 18px 22px;
  text-align: center;
  color: var(--slate-500);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-block;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 56px;
  }

  .hero-poster {
    width: 230px;
    justify-self: start;
  }

  .search-band,
  .filter-bar,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .filter-bar {
    flex-direction: column;
  }

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

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

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

@media (max-width: 520px) {
  .header-inner {
    padding-inline: 16px;
  }

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

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

  .section,
  .detail-wrap {
    padding-inline: 16px;
  }

  .movie-grid,
  .catalogue-grid,
  .related-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

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