:root {
  --sand-50: #fdfbf7;
  --sand-100: #f8f0e2;
  --sand-200: #f2e5cc;
  --sand-300: #e8d2a8;
  --desert-400: #f29d4e;
  --desert-500: #ee7b29;
  --desert-600: #df5f1f;
  --desert-700: #b9481c;
  --dune-50: #fff7ed;
  --dune-100: #fdebd2;
  --dune-600: #c76522;
  --stone-50: #faf9f6;
  --stone-100: #edece6;
  --stone-300: #c1bbac;
  --stone-500: #938971;
  --stone-700: #6f6555;
  --stone-800: #5d5449;
  --stone-900: #29231d;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 16px 40px rgba(41, 35, 29, 0.12);
  --shadow-strong: 0 26px 60px rgba(41, 35, 29, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--sand-50), var(--stone-50));
  color: var(--stone-800);
  min-height: 100vh;
}

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

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

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: linear-gradient(90deg, rgba(253, 251, 247, 0.96), rgba(255, 247, 237, 0.96));
  border-bottom: 1px solid var(--sand-200);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 16px rgba(41, 35, 29, 0.05);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--stone-800);
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 10px 20px rgba(238, 123, 41, 0.28);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--stone-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--desert-600);
}

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

.nav-search input,
.filter-row input,
.filter-row select {
  border: 1px solid var(--sand-300);
  background: var(--white);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--stone-800);
  outline: none;
  min-width: 0;
}

.nav-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--desert-500);
  box-shadow: 0 0 0 3px rgba(238, 123, 41, 0.16);
}

.nav-search button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--desert-500);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 26px rgba(238, 123, 41, 0.3);
}

.nav-search button:hover,
.primary-button:hover {
  transform: translateY(-1px) scale(1.02);
  background: var(--desert-600);
  box-shadow: 0 16px 34px rgba(238, 123, 41, 0.35);
}

.menu-button {
  display: none;
  border: 0;
  background: var(--sand-100);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--stone-800);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 12px;
  flex-wrap: wrap;
}

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

.hero-carousel {
  position: relative;
  min-height: 560px;
  height: 72vh;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-slides,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

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

.hero-shade {
  background:
    radial-gradient(circle at 78% 18%, rgba(238, 123, 41, 0.36), transparent 36%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding-right: 36%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--desert-400);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 660px;
  margin: 22px 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-tools,
.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-tools {
  bottom: 84px;
  justify-content: flex-end;
}

.hero-tools a {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.36);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-dots {
  bottom: 34px;
  justify-content: center;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--desert-500);
}

.floating-featured {
  position: relative;
  z-index: 4;
  margin-top: -78px;
}

.featured-grid,
.movie-grid,
.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

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

.section-band {
  padding: 64px 0;
  background: linear-gradient(90deg, var(--dune-100), var(--sand-100));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--stone-800);
  line-height: 1.15;
}

.section-heading a {
  color: var(--desert-600);
  font-weight: 900;
}

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

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

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

.movie-card.wide .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.card-year,
.play-dot {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
}

.card-year {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(238, 123, 41, 0.92);
  font-size: 12px;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span,
.detail-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--desert-700);
  background: var(--sand-100);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 11px 0 8px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--desert-600);
}

.movie-card p {
  margin: 0;
  color: var(--stone-700);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 700;
}

.category-card,
.category-overview-card {
  display: block;
  padding: 22px;
  border-radius: 24px;
  min-height: 150px;
  background: linear-gradient(135deg, var(--white), var(--sand-100));
  border: 1px solid var(--sand-200);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--stone-900);
  font-size: 22px;
}

.category-card span,
.category-overview-card p {
  color: var(--stone-700);
  line-height: 1.7;
}

.category-overview-card span {
  color: var(--desert-600);
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 6px 16px rgba(41, 35, 29, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-number {
  color: var(--desert-600);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-main {
  min-width: 0;
}

.rank-main strong,
.rank-main em {
  display: block;
}

.rank-main strong {
  color: var(--stone-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-main em {
  margin-top: 5px;
  color: var(--stone-500);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 44px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 86% 24%, rgba(238, 123, 41, 0.28), transparent 30%),
    linear-gradient(135deg, var(--stone-900), #47362b);
  box-shadow: var(--shadow-strong);
  margin-bottom: 34px;
}

.small-hero {
  margin-bottom: 34px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-row input {
  flex: 1;
  min-width: min(100%, 320px);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--stone-600);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--desert-600);
}

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

.rank-side h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  margin-bottom: 32px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: var(--black);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-strong);
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.player-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-button[hidden] {
  display: none;
}

.player-button span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--desert-500);
  box-shadow: 0 16px 34px rgba(238, 123, 41, 0.45);
  font-size: 26px;
}

.player-button strong {
  font-size: 18px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 36px;
}

.detail-poster img {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
}

.detail-info {
  padding: 32px;
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  color: var(--stone-900);
  font-size: clamp(32px, 5vw, 56px);
}

.detail-one-line {
  color: var(--stone-700);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--stone-800);
  background: var(--stone-100);
  font-weight: 800;
}

.detail-section {
  margin-bottom: 36px;
  padding: 30px;
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-section h2 {
  margin: 0 0 14px;
  color: var(--stone-900);
  font-size: 28px;
}

.detail-section p {
  color: var(--stone-700);
  line-height: 1.9;
  font-size: 17px;
}

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

.site-footer {
  margin-top: 64px;
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
  color: var(--stone-300);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--white);
}

.footer-inner p {
  margin: 0;
  max-width: 560px;
  line-height: 1.8;
}

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

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: var(--stone-500);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hidden-card {
  display: none !important;
}

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

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

  .site-nav {
    gap: 14px;
  }

  .nav-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

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

  .nav-search {
    width: 100%;
    order: 3;
  }

  .nav-search input {
    flex: 1;
  }

  .hero-carousel {
    min-height: 620px;
    height: auto;
  }

  .hero-content {
    padding: 120px 0 120px;
    max-width: none;
  }

  .hero-tools {
    bottom: 76px;
    justify-content: center;
  }

  .featured-grid,
  .movie-grid,
  .page-grid,
  .category-grid,
  .category-overview-grid,
  .compact-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-featured {
    margin-top: -50px;
  }

  .page-hero,
  .detail-info,
  .detail-section {
    padding: 24px;
    border-radius: 24px;
  }

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

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

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

@media (max-width: 520px) {
  .container,
  .site-nav,
  .mobile-nav,
  .footer-inner,
  .footer-copy,
  .hero-content,
  .hero-tools,
  .hero-dots {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .page-grid,
  .category-grid,
  .category-overview-grid,
  .compact-grid,
  .related-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .section-block,
  .page-main,
  .section-band {
    padding: 42px 0;
  }

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

  .rank-item {
    grid-template-columns: 38px 52px minmax(0, 1fr);
  }
}
