:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --bronze-700: #a16207;
  --bronze-600: #ca8a04;
  --bronze-500: #d6a23a;
  --bronze-400: #facc15;
  --paper: #fffbeb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--stone-900);
  background: linear-gradient(180deg, #fffaf0 0%, #f5f5f4 42%, #ffffff 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 9, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(250, 204, 21, 0.16);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--stone-100);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--stone-950);
  font-weight: 900;
  background: linear-gradient(135deg, var(--bronze-400), var(--bronze-700));
  box-shadow: 0 12px 25px rgba(202, 138, 4, 0.28);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-text em {
  font-style: normal;
  color: var(--stone-300);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--stone-300);
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--bronze-400);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--bronze-400);
}

.nav-toggle {
  display: none;
  color: var(--stone-100);
  background: transparent;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 12px;
  padding: 8px 12px;
}

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

.hero-stage {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background-image: linear-gradient(105deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.72) 38%, rgba(12, 10, 9, 0.42)), var(--hero-cover);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 24%, rgba(250, 204, 21, 0.26), transparent 34%), linear-gradient(180deg, transparent 0%, rgba(12, 10, 9, 0.88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 58px;
  align-items: center;
  min-height: 650px;
  padding: 72px 0;
}

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

.hero-kicker,
.page-hero span,
.section-heading span,
.category-block-head span {
  display: inline-flex;
  color: var(--bronze-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

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

.hero p,
.page-hero p,
.detail-copy .lead {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
}

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

.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;
}

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

.btn.primary {
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--bronze-400), var(--bronze-600));
  box-shadow: 0 16px 34px rgba(202, 138, 4, 0.32);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.ghost.dark {
  color: var(--stone-900);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(68, 64, 60, 0.16);
}

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-800), var(--bronze-700));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.46);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 36px;
  background: var(--bronze-400);
}

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

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 28px;
}

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

.section-heading p,
.category-block-head p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--stone-600);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(28, 25, 23, 0.22);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(250, 204, 21, 0.3), transparent 30%), linear-gradient(135deg, var(--stone-800), var(--stone-950));
}

.movie-card.compact .card-cover {
  aspect-ratio: 3 / 2;
}

.card-cover img {
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(12, 10, 9, 0.82) 100%);
  opacity: 0.95;
}

.region-badge,
.rank-no {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.region-badge {
  right: 12px;
  padding: 5px 10px;
  background: rgba(161, 98, 7, 0.92);
}

.rank-no {
  left: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--bronze-600);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card.compact .card-body h3 {
  font-size: 16px;
  min-height: 42px;
}

.card-body h3 a:hover,
.rank-info h2 a:hover,
.prev-next a:hover {
  color: var(--bronze-700);
}

.card-body p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--stone-500);
  font-size: 12px;
}

.wide-panel {
  padding: 64px 0;
  background: linear-gradient(135deg, #fef3c7, #f5f5f4);
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 0 22px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  width: 285px;
  min-width: 285px;
  scroll-snap-align: start;
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 164px;
  padding: 22px;
  border-radius: 22px;
  color: var(--white);
  background: radial-gradient(circle at 22% 0%, rgba(250, 204, 21, 0.35), transparent 34%), linear-gradient(135deg, var(--stone-900), var(--stone-700));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile span {
  color: var(--bronze-400);
  font-size: 13px;
  font-weight: 800;
}

.category-tile strong {
  font-size: 28px;
}

.category-tile em {
  color: var(--stone-300);
  font-style: normal;
  line-height: 1.55;
}

.page-hero,
.detail-hero {
  position: relative;
  color: var(--white);
  background-image: linear-gradient(110deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.76)), var(--hero-cover);
  background-size: cover;
  background-position: center;
}

.page-hero .container {
  padding: 94px 0;
}

.compact-hero .container {
  padding: 74px 0;
}

.toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 26px;
}

.toolbar input,
.toolbar select {
  min-height: 48px;
  border: 1px solid rgba(68, 64, 60, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0 16px;
  outline: none;
}

.toolbar input {
  flex: 1;
}

.category-block {
  padding: 34px 0;
  border-bottom: 1px solid rgba(68, 64, 60, 0.12);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.rank-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--stone-800), var(--bronze-700));
}

.rank-cover b {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--stone-950);
  background: var(--bronze-400);
}

.rank-info h2 {
  margin: 4px 0 10px;
  font-size: 26px;
}

.rank-info p {
  color: var(--stone-600);
  line-height: 1.8;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid rgba(68, 64, 60, 0.14);
  color: var(--stone-700);
}

.pagination a.active {
  color: var(--stone-950);
  background: var(--bronze-400);
  border-color: var(--bronze-400);
  font-weight: 900;
}

.detail-hero {
  padding: 74px 0;
}

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

.detail-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--stone-800), var(--bronze-700));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: var(--stone-200);
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--stone-950);
  box-shadow: 0 24px 70px rgba(12, 10, 9, 0.34);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--white);
  cursor: pointer;
  border: 0;
  background: radial-gradient(circle, rgba(12, 10, 9, 0.15), rgba(12, 10, 9, 0.68));
}

.player-overlay span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--stone-950);
  background: var(--bronze-400);
  box-shadow: 0 18px 44px rgba(250, 204, 21, 0.28);
}

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

.player-state {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--stone-200);
  background: rgba(12, 10, 9, 0.72);
  font-size: 13px;
}

.player-state.is-hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 14px 0 56px;
}

.prose-panel {
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.prose-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.prose-panel p {
  margin: 0;
  color: var(--stone-600);
  line-height: 2;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 64px;
}

.prev-next a {
  flex: 1;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.site-footer {
  color: var(--stone-300);
  background: var(--stone-950);
  padding: 52px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

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

.footer-grid p {
  line-height: 1.8;
  margin: 0;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--stone-500);
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .hero-poster,
  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

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

  .hero,
  .hero-stage,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    padding: 42px 0 86px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .toolbar,
  .category-block-head,
  .prev-next {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.dense,
  .category-grid {
    grid-template-columns: 1fr;
  }

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