: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;
  --bronze-800: #846358;
  --bronze-700: #977669;
  --bronze-600: #a18072;
  --bronze-400: #d2bab0;
  --bronze-50: #fdf8f6;
  --heritage-100: #e4e4e1;
  --heritage-50: #f7f7f6;
  --white: #ffffff;
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  min-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;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--bronze-400), var(--bronze-600));
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(161, 128, 114, 0.28);
}

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

.brand-text strong {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.03em;
}

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

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

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--stone-100);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

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

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

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

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(210, 186, 176, 0.26), transparent 30%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(28, 25, 23, 0.78) 42%, rgba(12, 10, 9, 0.42) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.72), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
  padding-block: 90px;
}

.hero-kicker,
.page-hero span,
.section-title span,
.category-overview-card span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  color: var(--bronze-400);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--stone-200);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  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(--white);
  background: var(--bronze-600);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(12, 10, 9, 0.58);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(12, 10, 9, 0.78);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.page-section {
  padding-block: 56px;
}

.search-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  align-items: center;
  padding-block: 32px;
}

.search-intro h2,
.section-title h2,
.story-card h2,
.site-footer h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  font-weight: 900;
}

.search-intro p,
.section-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--stone-600);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

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

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

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

.section-title {
  margin-bottom: 28px;
}

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

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

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.82), transparent 62%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-region,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-region {
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--bronze-600);
}

.rank-badge {
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(12, 10, 9, 0.75);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 6px;
  color: var(--stone-900);
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta,
.card-summary {
  margin: 0;
  color: var(--stone-600);
  font-size: 0.9rem;
}

.card-summary {
  min-height: 42px;
  margin-top: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--bronze-800);
  background: var(--bronze-50);
  font-size: 0.75rem;
  font-weight: 700;
}

.heritage-band {
  background: var(--heritage-100);
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  width: 288px;
  flex: 0 0 288px;
  scroll-snap-align: start;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  color: var(--white);
  background: var(--stone-900);
  box-shadow: var(--shadow-lg);
}

.category-card img,
.category-card span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card span {
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.84), rgba(12, 10, 9, 0.16));
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 2;
  display: block;
  padding-inline: 18px;
}

.category-card strong {
  padding-top: 115px;
  font-size: 1.25rem;
}

.category-card small {
  margin-top: 6px;
  color: var(--stone-300);
}

.category-card:hover img {
  transform: scale(1.1);
}

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

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

.dark-cinema {
  color: var(--white);
  background: var(--stone-900);
}

.dark-cinema .section-title h2,
.dark-cinema .section-title p {
  color: var(--white);
}

.dark-grid .movie-card {
  background: var(--stone-800);
}

.dark-grid .card-body h3,
.dark-grid .card-meta,
.dark-grid .card-summary {
  color: var(--stone-100);
}

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-950);
}

.page-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
}

.page-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 78% 18%, rgba(210, 186, 176, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.92), rgba(28, 25, 23, 0.72), rgba(12, 10, 9, 0.54));
}

.page-hero .container {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 76px;
}

.small-hero {
  background:
    radial-gradient(circle at 70% 20%, rgba(210, 186, 176, 0.22), transparent 28%),
    linear-gradient(135deg, var(--stone-950), var(--stone-800));
}

.small-hero::before,
.small-hero::after {
  display: none;
}

.overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 20px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

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

.overview-posters a {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--stone-200);
}

.overview-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-posters span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: 20px 8px 8px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.88), transparent);
  font-size: 0.78rem;
}

.overview-body h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

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

.text-link {
  color: var(--bronze-700);
  font-weight: 900;
}

.category-list,
.ranking-list {
  margin-top: 26px;
}

.detail-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-950);
}

.detail-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(14px);
  transform: scale(1.08);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(28, 25, 23, 0.82), rgba(12, 10, 9, 0.62));
}

.detail-hero-grid {
  min-height: 540px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding-block: 54px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: var(--stone-800);
  box-shadow: var(--shadow-2xl);
}

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

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

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block: 18px;
}

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

.detail-tags {
  margin-bottom: 22px;
}

.player-section {
  padding-top: 48px;
}

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

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--stone-950);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(161, 128, 114, 0.18), rgba(12, 10, 9, 0.78));
  cursor: pointer;
  text-align: center;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--stone-950);
  background: var(--bronze-400);
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(210, 186, 176, 0.28);
}

.player-cover strong {
  max-width: min(90%, 760px);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
}

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

.story-card {
  padding: 26px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.story-card p {
  margin: 14px 0 0;
  color: var(--stone-700);
  font-size: 1.02rem;
}

.related-grid .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--stone-100);
  font-size: 1.05rem;
}

.site-footer p,
.site-footer a {
  color: var(--stone-400);
}

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

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

.footer-brand {
  margin-bottom: 14px;
  color: var(--stone-100);
  font-size: 1.2rem;
}

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

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-slide img,
  .hero-content {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .search-section,
  .split-showcase,
  .detail-content,
  .category-overview-card,
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    width: min(100%, 320px);
  }

  .overview-posters {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero-copy {
    padding-top: 80px;
  }

  .hero-actions,
  .detail-meta {
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-card {
    min-height: 180px;
  }

  .overview-posters {
    grid-template-columns: repeat(2, 1fr);
  }

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