: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-800: #846358;
  --bronze-700: #977669;
  --bronze-600: #a18072;
  --bronze-500: #b39486;
  --bronze-400: #d2bab0;
  --bronze-200: #eaddd7;
  --heritage-100: #e4e4e1;
  --heritage-50: #f7f7f6;
  --white-soft: rgba(255, 255, 255, 0.92);
  --shadow-soft: 0 24px 60px rgba(12, 10, 9, 0.16);
  --shadow-card: 0 12px 34px rgba(12, 10, 9, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1220px;
}

* {
  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: var(--stone-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--stone-100);
  background: rgba(28, 25, 23, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(12, 10, 9, 0.22);
  backdrop-filter: blur(16px);
}

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

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

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

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

.brand-title {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  color: var(--stone-400);
  font-size: 0.76rem;
}

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

.nav-link {
  color: var(--stone-300);
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--stone-100);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-nav-link {
  padding: 12px 16px;
  color: var(--stone-200);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

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

.hero-track {
  position: relative;
  min-height: 72vh;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 72vh;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(210, 186, 176, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.64) 42%, rgba(12, 10, 9, 0.18)),
    linear-gradient(0deg, rgba(12, 10, 9, 0.92), transparent 46%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 48px;
  padding-top: 76px;
  padding-bottom: 70px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--bronze-200);
  background: rgba(161, 128, 114, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4.8rem);
}

.hero p {
  max-width: 740px;
  margin: 0;
  color: var(--stone-200);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--stone-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  font-size: 0.82rem;
}

.hero-actions,
.detail-info .btn {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--bronze-400), var(--bronze-700));
  box-shadow: 0 14px 28px rgba(151, 118, 105, 0.34);
}

.btn-ghost {
  color: var(--stone-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster {
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(1deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgba(12, 10, 9, 0.56);
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

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

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

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.12;
}

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

.light-heading h2,
.light-heading a {
  color: var(--stone-100);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 16px;
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--stone-600);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--stone-900);
  background: var(--heritage-50);
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  outline: none;
}

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

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

.compact-grid,
.search-grid,
.category-movie-grid,
.ranking-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  background: white;
  border: 1px solid rgba(231, 229, 228, 0.96);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card.is-hidden,
.ranking-line.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  color: white;
  background: rgba(12, 10, 9, 0.68);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, var(--bronze-700), var(--bronze-400));
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span {
  color: var(--bronze-800);
  background: rgba(161, 128, 114, 0.12);
  border-color: transparent;
}

.card-title {
  margin: 0;
  color: var(--stone-900);
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 850;
}

.card-title a:hover {
  color: var(--bronze-700);
}

.card-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-desc.compact {
  -webkit-line-clamp: 2;
}

.wide-band {
  color: var(--stone-100);
  background:
    radial-gradient(circle at 20% 10%, rgba(210, 186, 176, 0.16), transparent 34%),
    linear-gradient(135deg, var(--stone-900), var(--stone-950));
}

.horizontal-row {
  display: grid;
  grid-auto-columns: minmax(230px, 1fr);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 0 22px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  width: 250px;
  scroll-snap-align: start;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  display: grid;
  align-content: end;
  gap: 8px;
  overflow: hidden;
  padding: 20px;
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.18));
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 1.26rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: var(--stone-200);
  font-size: 0.9rem;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 78% 20%, rgba(210, 186, 176, 0.22), transparent 28%),
    linear-gradient(135deg, var(--stone-900), var(--stone-950));
}

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

.page-hero h1 {
  max-width: 900px;
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--stone-200);
  font-size: 1.1rem;
}

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

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

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.category-chip {
  padding: 8px 14px;
  color: var(--stone-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  font-weight: 800;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.category-cover {
  overflow: hidden;
  border-radius: 18px;
  background: var(--stone-900);
}

.category-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 1.4rem;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--stone-600);
}

.category-samples {
  display: grid;
  gap: 8px;
}

.category-samples a {
  color: var(--bronze-800);
  font-weight: 700;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 90px 100px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: 16px;
}

.ranking-line span {
  color: var(--bronze-800);
  font-weight: 900;
}

.ranking-line a {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-line em {
  color: var(--stone-500);
  font-style: normal;
}

.ranking-line strong {
  color: var(--bronze-800);
  text-align: right;
}

.detail-hero {
  min-height: 640px;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(210, 186, 176, 0.2), transparent 26%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.72) 46%, rgba(12, 10, 9, 0.32)),
    linear-gradient(0deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.24));
}

.detail-layout {
  position: relative;
  z-index: 1;
  padding: 64px 0 76px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  align-items: end;
  gap: 42px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0;
  color: var(--stone-200);
  font-size: 1.14rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.player-card {
  overflow: hidden;
  background: var(--stone-950);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 80px rgba(12, 10, 9, 0.24);
}

.player-header {
  padding: 24px;
  color: white;
  background: linear-gradient(135deg, var(--stone-900), var(--stone-950));
}

.player-header h2 {
  margin: 0 0 6px;
  font-size: 1.7rem;
}

.player-header p {
  margin: 0;
  color: var(--stone-300);
}

.movie-player {
  position: relative;
  background: black;
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.72), rgba(12, 10, 9, 0.1));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--bronze-400), var(--bronze-700));
  border-radius: 50%;
  font-size: 2.1rem;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 20px;
}

.content-card {
  padding: 26px;
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.content-card p {
  margin: 0;
  color: var(--stone-700);
  line-height: 1.9;
}

.site-footer {
  color: var(--stone-200);
  background: var(--stone-950);
  margin-top: 54px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 46px 0 34px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: var(--stone-400);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 1rem;
}

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

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

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

.footer-bottom {
  padding: 18px 16px;
  color: var(--stone-500);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

  .hero-poster {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-track,
  .hero-image {
    min-height: 78vh;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-control {
    display: none;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .movie-grid,
  .compact-grid,
  .search-grid,
  .category-movie-grid,
  .ranking-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .detail-main {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    padding: 14px;
  }

  .category-cover {
    max-height: 260px;
  }

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

  .ranking-line {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .ranking-line em,
  .ranking-line strong {
    display: none;
  }
}

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

  .nav-container {
    min-height: 66px;
  }

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

  .brand-title {
    font-size: 1.05rem;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.035em;
  }

  .section-block {
    padding: 46px 0;
  }
}
