:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #111827;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --red-500: #ef4444;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.14);
  --shadow-dark: 0 30px 80px rgba(2, 6, 23, 0.42);
  --radius-xl: 24px;
  --radius-lg: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 45%, #f8fafc 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-900) 42%, #172554 100%);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.25);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  box-shadow: 0 12px 25px rgba(245, 158, 11, 0.32);
  font-size: 17px;
  font-weight: 900;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-text small {
  color: var(--slate-300);
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--slate-200);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--slate-950);
  background: var(--amber-400);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--white);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 22%, rgba(245, 158, 11, 0.35), transparent 30%),
    radial-gradient(circle at 80% 16%, rgba(59, 130, 246, 0.24), transparent 28%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}

.hero-container {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: center;
}

.hero-track {
  position: relative;
  min-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  color: var(--amber-400);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  max-width: 760px;
  color: var(--slate-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta,
.detail-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--slate-100);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span {
  color: var(--slate-600);
  background: var(--slate-100);
}

.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags,
.detail-tags {
  margin-top: 16px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

.primary-button,
.search-form button {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.text-button {
  color: var(--amber-400);
  padding-inline: 8px;
}

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

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(420px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-dark);
}

.hero-poster img,
.detail-poster img,
.movie-poster img,
.category-card img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.65));
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 26px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  background: var(--amber-400);
}

.search-section,
.content-section {
  padding: clamp(48px, 7vw, 86px) 0;
}

.search-section {
  background: linear-gradient(180deg, var(--white), #f8fafc);
}

.tinted-section {
  background: rgba(15, 23, 42, 0.035);
}

.search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.search-panel h2,
.section-heading h2,
.ranking-head h2,
.detail-article h2,
.detail-side-card h2,
.footer-links h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p {
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.search-form,
.filter-panel {
  display: flex;
}

.search-form {
  gap: 10px;
  min-width: min(480px, 100%);
}

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
}

.filter-panel {
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  margin-bottom: 28px;
  box-shadow: none;
}

.search-results:not(:empty) {
  margin-top: 26px;
}

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

.section-link,
.ranking-head a {
  color: var(--amber-500);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
  transform: translateY(-6px);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.movie-card.compact .movie-poster {
  aspect-ratio: 3 / 4.1;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.72));
  opacity: 0.85;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: var(--amber-400);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.32);
  transform: scale(0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--slate-950);
  background: var(--amber-400);
  font-weight: 1000;
}

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

.movie-card h2 {
  margin: 12px 0 9px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

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

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--slate-900);
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.88));
}

.category-card div {
  position: absolute;
  inset: auto 20px 20px;
  color: var(--white);
}

.category-card strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--slate-200);
  line-height: 1.6;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.ranking-panel,
.detail-side-card,
.detail-article,
.rank-list-wrap {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.ranking-panel ol,
.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-panel li + li {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px 12px;
  padding: 14px 0;
}

.ranking-panel li span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--slate-950);
  background: var(--amber-400);
  font-weight: 1000;
}

.ranking-panel li strong {
  color: var(--slate-900);
}

.ranking-panel li em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-900) 48%, #172554);
}

.page-hero {
  padding: clamp(72px, 10vw, 130px) 0;
}

.slim-hero {
  padding: clamp(58px, 8vw, 94px) 0;
}

.category-preview + .category-preview {
  margin-top: 64px;
}

.top-rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 34px;
}

.rank-list-wrap {
  overflow: hidden;
}

.rank-row a {
  display: grid;
  grid-template-columns: 58px 72px minmax(180px, 1fr) minmax(240px, 1.4fr) 78px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.rank-row:first-child a {
  border-top: 0;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--slate-950);
  background: #fde68a;
  font-weight: 1000;
}

.rank-row img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  background: var(--slate-900);
}

.rank-row strong {
  color: var(--slate-900);
  font-size: 17px;
}

.rank-row em {
  color: var(--slate-500);
  font-style: normal;
}

.rank-row b {
  justify-self: end;
  color: var(--amber-500);
}

.detail-hero {
  padding: clamp(42px, 7vw, 82px) 0;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--slate-300);
  font-size: 14px;
}

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

.breadcrumb strong {
  color: var(--white);
}

.detail-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  background: var(--slate-800);
  box-shadow: var(--shadow-dark);
}

.detail-poster span {
  position: absolute;
  inset: auto 18px 18px auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: var(--amber-400);
  font-weight: 900;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: var(--slate-950);
  box-shadow: var(--shadow-dark);
}

.player-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--slate-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.35);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.detail-article,
.detail-side-card {
  padding: 28px;
}

.detail-article h2 + p,
.detail-side-card dl {
  margin-top: 14px;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-article p {
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.9;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px 16px;
}

.detail-side-card dt {
  color: var(--slate-500);
  font-weight: 800;
}

.detail-side-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

.wide-button {
  width: 100%;
  margin-top: 24px;
}

.site-footer {
  color: var(--slate-300);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
  margin-top: 42px;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-logo .brand-text strong {
  color: var(--white);
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  line-height: 1.8;
}

.footer-links h2 {
  color: var(--white);
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.footer-links a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--slate-500);
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  padding: 26px;
  border-radius: var(--radius-lg);
  color: var(--slate-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

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

  .two-column-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 86px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-dark);
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.menu-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 36px 0 70px;
  }

  .hero-track,
  .hero-container,
  .hero-carousel {
    min-height: 760px;
  }

  .hero-poster {
    justify-self: start;
    width: min(300px, 78vw);
  }

  .search-panel,
  .filter-panel,
  .section-heading,
  .ranking-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-form {
    min-width: 0;
  }

  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 82vw);
  }

  .rank-row a {
    grid-template-columns: 46px 64px minmax(0, 1fr);
  }

  .rank-row em,
  .rank-row b {
    grid-column: 3;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .container,
  .nav-shell,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

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

  .card-meta span:nth-child(3) {
    display: none;
  }

  .search-form {
    display: grid;
  }

  .player-card {
    border-radius: 18px;
  }

  .play-circle {
    width: 66px;
    height: 66px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .movie-grid.small-grid,
  .movie-grid.catalog-grid,
  .category-grid,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }
}
