:root {
  --sand-50: #faf7f1;
  --sand-100: #f3eadb;
  --sand-200: #e8d7bc;
  --sand-300: #d6ba91;
  --desert-400: #d39b57;
  --desert-500: #c97f2d;
  --desert-600: #a96422;
  --dune-50: #fbf4e9;
  --dune-600: #8f5c2f;
  --dune-700: #714723;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-card: 0 10px 24px rgba(41, 37, 36, 0.10);
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sand-50), var(--stone-50));
  color: var(--stone-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

img {
  background: linear-gradient(135deg, var(--sand-200), var(--dune-600));
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(250, 247, 241, 0.96), rgba(251, 244, 233, 0.96));
  border-bottom: 1px solid var(--sand-200);
  box-shadow: 0 4px 16px rgba(41, 37, 36, 0.06);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--stone-800);
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(169, 100, 34, 0.26);
}

.logo-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--stone-700);
  font-weight: 650;
}

.desktop-nav a,
.mobile-menu a {
  transition: color 0.18s ease, transform 0.18s ease;
}

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

.header-search {
  position: relative;
  width: min(280px, 24vw);
}

.header-search input,
.filter-input,
.search-box input,
.select-control {
  width: 100%;
  border: 1px solid var(--sand-300);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
  color: var(--stone-800);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.header-search input {
  padding: 10px 18px 10px 42px;
}

.header-search input:focus,
.filter-input:focus,
.search-box input:focus,
.select-control:focus {
  border-color: var(--desert-500);
  box-shadow: 0 0 0 4px rgba(201, 127, 45, 0.16);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stone-400);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--stone-700);
  transition: background 0.18s ease;
}

.mobile-toggle:hover {
  background: var(--sand-200);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--sand-200);
  padding: 14px 24px 18px;
  background: rgba(250, 247, 241, 0.98);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-weight: 650;
  color: var(--stone-700);
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f2b66f;
  font-weight: 750;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  margin-bottom: 22px;
  letter-spacing: -0.03em;
}

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

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-primary {
  padding: 14px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 14px 28px rgba(169, 100, 34, 0.28);
}

.btn-secondary {
  padding: 13px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.btn-ghost {
  padding: 11px 18px;
  color: var(--desert-600);
  background: var(--dune-50);
  border: 1px solid var(--sand-200);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 44px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: background 0.18s ease, width 0.18s ease;
}

.hero-dot.is-active {
  width: 72px;
  background: #f2b66f;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section.compact {
  padding-top: 34px;
  padding-bottom: 34px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.12;
  color: var(--stone-800);
  margin-bottom: 8px;
}

.section-lead {
  max-width: 780px;
  color: var(--stone-600);
  line-height: 1.8;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(41, 37, 36, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sand-200), var(--dune-600));
}

.poster-wrap.wide {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(201, 127, 45, 0.92);
  backdrop-filter: blur(6px);
}

.poster-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--stone-500);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--desert-600);
  background: var(--dune-50);
  font-size: 12px;
  font-weight: 800;
}

.card-title {
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
}

.feature-card {
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.feature-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.filter-panel,
.content-card,
.category-card,
.info-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(232, 215, 188, 0.72);
}

.ranking-panel,
.filter-panel,
.info-panel {
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--sand-50);
  transition: transform 0.18s ease, background 0.18s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: var(--dune-50);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
}

.rank-thumb {
  width: 82px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sand-200), var(--dune-600));
}

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

.rank-title {
  font-weight: 850;
  margin-bottom: 5px;
  color: var(--stone-800);
}

.rank-meta {
  color: var(--stone-500);
  font-size: 13px;
}

.page-hero {
  background: linear-gradient(135deg, var(--dune-700), var(--desert-600));
  color: #ffffff;
  padding: 66px 0;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  margin-bottom: 20px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.page-title {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 950;
  margin-bottom: 16px;
}

.page-desc {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.controls-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-input,
.search-box input,
.select-control {
  padding: 12px 16px;
  border-radius: 16px;
}

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

.category-card {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
}

.category-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 9px;
}

.category-desc {
  color: var(--stone-600);
  line-height: 1.75;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--sand-200);
  background: #ffffff;
  color: var(--stone-700);
  font-weight: 800;
}

.pager .active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
}

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

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.26;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 62px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--sand-200), var(--dune-600));
}

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

.detail-title {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 950;
  margin-bottom: 18px;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.detail-one-line {
  max-width: 880px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-orb {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 16px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  display: none;
}

.player-status.is-visible {
  display: block;
}

.content-card {
  padding: 28px;
  margin-bottom: 24px;
}

.content-card h2,
.info-panel h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--stone-800);
}

.content-card p,
.info-panel p {
  color: var(--stone-700);
  line-height: 1.9;
  margin-bottom: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--desert-600);
  font-weight: 750;
  background: var(--dune-50);
}

.search-box {
  max-width: 760px;
  position: relative;
}

.search-box input {
  font-size: 18px;
  padding: 16px 22px;
}

.search-status {
  color: var(--stone-600);
  line-height: 1.8;
  margin: 16px 0 26px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 30px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 850;
  font-size: 20px;
  margin-bottom: 16px;
}

.footer-desc {
  max-width: 560px;
  line-height: 1.8;
}

.footer-title {
  color: #ffffff;
  font-weight: 850;
  margin-bottom: 14px;
}

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

.footer-links a:hover {
  color: #f2b66f;
}

.is-hidden-by-filter {
  display: none !important;
}

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

  .detail-layout,
  .split-grid,
  .feature-row {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .hero-content {
    padding-top: 72px;
    padding-bottom: 86px;
  }

  .hero-title {
    font-size: 42px;
  }

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

  .controls-bar {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    grid-template-columns: 150px 1fr;
    gap: 20px;
    align-items: center;
  }

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

@media (max-width: 580px) {
  .header-inner,
  .hero-content,
  .section,
  .page-hero-inner,
  .detail-hero-inner,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-title,
  .page-title,
  .detail-title {
    font-size: 34px;
  }

  .hero-desc,
  .page-desc,
  .detail-one-line {
    font-size: 16px;
  }

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

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

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

  .rank-thumb {
    width: 72px;
  }

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

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