:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-400: #a8a29e;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --bronze-700: #876452;
  --bronze-600: #a18072;
  --bronze-500: #b99a8c;
  --bronze-400: #d2bab0;
  --bronze-100: #f2e8e5;
  --bronze-50: #fdf8f6;
  --heritage-100: #e4e4e1;
  --heritage-50: #f7f7f6;
  --shadow-soft: 0 14px 35px rgba(28, 25, 23, 0.10);
  --shadow-strong: 0 26px 60px rgba(12, 10, 9, 0.28);
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--stone-900);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.96);
  color: var(--stone-100);
  box-shadow: 0 12px 24px rgba(12, 10, 9, 0.22);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bronze-400), var(--bronze-700));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(161, 128, 114, 0.38);
}

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

.brand-text strong {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--stone-400);
  font-size: 0.75rem;
}

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

.nav-link,
.mobile-link {
  color: var(--stone-300);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--stone-200);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mobile-link {
  padding: 10px 0;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--stone-950);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(210, 186, 176, 0.20), transparent 35%),
    linear-gradient(to top, rgba(12, 10, 9, 0.95), rgba(12, 10, 9, 0.62) 45%, rgba(12, 10, 9, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding-block: 72px;
}

.hero-copy {
  width: min(760px, 100%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--bronze-400);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--bronze-700);
  margin-bottom: 6px;
}

.hero h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero p,
.sub-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--stone-200);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.hero-actions,
.detail-copy .btn {
  margin-top: 30px;
}

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

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

.btn.primary {
  background: var(--bronze-600);
  color: #fff;
  box-shadow: 0 12px 26px rgba(161, 128, 114, 0.28);
}

.btn.primary:hover {
  background: var(--bronze-700);
}

.btn.ghost {
  margin-left: 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 10, 9, 0.52);
  color: #fff;
  font-size: 2rem;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(12, 10, 9, 0.78);
  transform: translateY(-2px);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--bronze-400);
}

.main-content {
  min-height: 70vh;
}

.page-hero-offset {
  background: var(--stone-50);
}

.page-stack {
  display: grid;
  gap: 64px;
  padding-block: 56px 72px;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-panel h2 {
  margin: 0;
  font-size: 1.9rem;
}

.search-controls {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 12px;
  max-width: 720px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 0 16px;
  background: var(--stone-50);
  color: var(--stone-900);
  outline: none;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--bronze-600);
  box-shadow: 0 0 0 4px rgba(161, 128, 114, 0.12);
}

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

.section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.section-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bronze-100);
  color: var(--bronze-700);
  font-size: 1rem;
  font-weight: 900;
}

.section-link,
.rank-action {
  color: var(--bronze-700);
  font-weight: 800;
}

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

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

.category-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff, var(--heritage-50));
  border: 1px solid var(--stone-200);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--bronze-400);
  box-shadow: var(--shadow-strong);
}

.category-card span {
  color: var(--bronze-700);
  font-size: 1.25rem;
  font-weight: 900;
}

.category-card strong {
  color: var(--stone-700);
  font-size: 0.95rem;
  font-weight: 500;
}

.category-card em {
  color: var(--stone-400);
  font-style: normal;
  font-size: 0.82rem;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--stone-200);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.68), transparent 55%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--bronze-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--bronze-700);
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--stone-500);
  font-size: 0.78rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--bronze-50);
  color: var(--bronze-700);
  font-size: 0.73rem;
  font-weight: 700;
}

.tag-row.large span {
  min-height: 30px;
  padding-inline: 12px;
  font-size: 0.85rem;
}

.rail-section {
  margin-inline: -16px;
  padding: 42px 16px;
  border-radius: var(--radius-lg);
  background: var(--heritage-100);
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scroll-snap-type: x proximity;
}

.rail-card {
  width: 292px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--stone-900);
  color: #fff;
}

.split-section .section-heading p,
.split-section .movie-info p {
  color: var(--stone-300);
}

.split-section .movie-card {
  background: var(--stone-800);
  color: #fff;
}

.split-section .movie-meta {
  color: var(--stone-300);
}

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

.sub-hero {
  padding: 92px 0 68px;
  background:
    radial-gradient(circle at 82% 18%, rgba(210, 186, 176, 0.22), transparent 30%),
    linear-gradient(135deg, var(--stone-950), var(--stone-800));
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--stone-300);
  font-size: 0.9rem;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-row.top {
  background: linear-gradient(135deg, #fff, var(--bronze-50));
  border: 1px solid var(--bronze-100);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--stone-900);
  color: var(--bronze-400);
  font-size: 1.35rem;
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--stone-200);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body h2 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.rank-body p {
  margin: 0 0 6px;
  color: var(--stone-600);
}

.rank-body span {
  color: var(--stone-500);
  font-size: 0.86rem;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--stone-950);
  color: #fff;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(4px);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.95), rgba(12, 10, 9, 0.70) 48%, rgba(12, 10, 9, 0.42));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 62px;
}

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

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  box-shadow: var(--shadow-strong);
  background: var(--stone-800);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 4rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--stone-200);
}

.detail-page {
  gap: 34px;
}

.player-section,
.article-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-section h2,
.article-card h2 {
  margin: 0 0 18px;
  font-size: 1.6rem;
}

.article-card p {
  margin: 0;
  color: var(--stone-700);
  font-size: 1.03rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--stone-950);
  box-shadow: var(--shadow-strong);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--stone-950);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(12, 10, 9, 0.12), rgba(12, 10, 9, 0.64));
  z-index: 4;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bronze-600);
  box-shadow: 0 20px 42px rgba(12, 10, 9, 0.36);
}

.play-overlay span::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid #fff;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.site-footer {
  background: var(--stone-900);
  color: var(--stone-300);
  padding-top: 52px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--stone-100);
  font-size: 1.08rem;
}

.footer-grid p,
.footer-grid li {
  color: var(--stone-400);
  font-size: 0.92rem;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  margin-top: 42px;
  padding: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--stone-500);
  text-align: center;
  font-size: 0.9rem;
}

[data-filter-card].hidden {
  display: none !important;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .brand-text strong {
    font-size: 1.12rem;
  }

  .hero,
  .hero-content {
    min-height: 62vh;
  }

  .hero-content {
    padding-block: 48px 72px;
  }

  .hero-control {
    display: none;
  }

  .search-panel,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-controls {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .card-grid,
  .card-grid.three,
  .library-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 54px 76px 1fr;
  }

  .rank-action {
    grid-column: 3;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .header-inner {
    height: 66px;
  }

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

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 64vh;
  }

  .hero-actions {
    display: grid;
    gap: 12px;
  }

  .btn.ghost {
    margin-left: 0;
  }

  .page-stack {
    gap: 42px;
    padding-block: 38px 52px;
  }

  .category-grid,
  .category-grid.large,
  .card-grid,
  .card-grid.three,
  .library-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .split-section,
  .player-section,
  .article-card {
    padding: 18px;
  }

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

  .rank-thumb {
    display: none;
  }

  .rank-body h2 {
    font-size: 1rem;
  }

  .rank-action {
    grid-column: 2;
  }

  .sub-hero {
    padding: 62px 0 44px;
  }

  .detail-hero-inner {
    padding-block: 42px;
  }
}
