:root {
  --canyon-950: #1b0906;
  --canyon-900: #32110c;
  --canyon-850: #4c1d13;
  --canyon-800: #6f2b1c;
  --earth-900: #2b1b12;
  --earth-800: #59351f;
  --sand-50: #fff8ec;
  --sand-100: #f7ead5;
  --gold-300: #f7d37b;
  --gold-400: #eab84f;
  --gold-500: #d99623;
  --forest-700: #3e623c;
  --text: #28150f;
  --muted: #756257;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(73, 30, 16, 0.18);
  --soft-shadow: 0 10px 28px rgba(73, 30, 16, 0.12);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #fff8ec 0%, #ffffff 46%, #f7ead5 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--canyon-800), var(--earth-800));
  box-shadow: 0 12px 30px rgba(42, 12, 5, 0.28);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--canyon-900);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 8px 22px rgba(217, 150, 35, 0.32);
}

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

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

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--gold-300);
  transform: translateY(-1px);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input {
  width: 230px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  backdrop-filter: blur(12px);
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.64);
}

.search-form input:focus {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(247, 211, 123, 0.24);
}

.search-form button,
.btn,
.player-start {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-500), #c97817);
  box-shadow: 0 8px 22px rgba(217, 150, 35, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover,
.btn:hover,
.player-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(217, 150, 35, 0.34);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-panel a {
  display: block;
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  margin-top: 12px;
}

.hero-carousel {
  position: relative;
  height: min(650px, 72vh);
  min-height: 500px;
  overflow: hidden;
  color: #fff;
  background: var(--canyon-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.50) 44%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-eyebrow {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-eyebrow span,
.tag-row span,
.detail-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--canyon-900);
  background: rgba(247, 211, 123, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 780px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn.secondary {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);
}

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

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

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--gold-500);
}

.main-content {
  padding: 46px 0 10px;
}

.section-block {
  margin-bottom: 56px;
}

.section-block.panel {
  border-radius: 28px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 234, 213, 0.78));
  box-shadow: var(--soft-shadow);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--canyon-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

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

.movie-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
  width: 280px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--canyon-850), var(--earth-800));
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e7b447, #bc6812);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--canyon-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--gold-500);
}

.meta-line {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4a3931;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  color: var(--forest-700);
  background: rgba(62, 98, 60, 0.12);
}

.compact .movie-info {
  padding: 12px;
}

.compact .movie-info h3 {
  font-size: 15px;
}

.compact .card-desc,
.compact .tag-row {
  display: none;
}

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

.category-card {
  min-height: 160px;
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--canyon-800), var(--earth-800));
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.page-title {
  padding: 44px 0 24px;
}

.breadcrumb {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.filter-bar input,
.filter-bar select {
  min-height: 42px;
  border: 1px solid #ead8bd;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.filter-bar input {
  width: min(360px, 100%);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.ranking-num {
  color: var(--gold-500);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 80px;
  height: 106px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-main h2,
.ranking-main h3 {
  margin: 0 0 6px;
  color: var(--canyon-900);
}

.ranking-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.heat {
  color: var(--canyon-800);
  font-weight: 800;
  white-space: nowrap;
}

.detail-hero {
  padding: 38px 0 50px;
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(247, 211, 123, 0.24), transparent 28%), linear-gradient(135deg, var(--canyon-950), var(--earth-900));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 34px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-title h1 {
  color: #fff;
}

.detail-title p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-meta div {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta b {
  display: block;
  color: var(--gold-300);
  margin-bottom: 4px;
}

.player-section,
.detail-copy {
  margin-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.28));
  cursor: pointer;
  z-index: 2;
}

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

.player-start {
  font-size: 18px;
  padding: 14px 26px;
}

.content-card {
  border-radius: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--canyon-900);
  font-size: 28px;
}

.content-card p {
  margin: 0 0 18px;
  color: #4a3931;
  line-height: 1.9;
  font-size: 16px;
}

.site-footer {
  margin-top: 58px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, var(--canyon-950), var(--earth-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 42px 0;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

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

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

  .search-form:not(.mobile-search) {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

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

  .hero-carousel {
    min-height: 540px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-control {
    display: none;
  }

  .main-content {
    padding-top: 30px;
  }

  .movie-grid,
  .small-grid,
  .category-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .section-block.panel {
    padding: 18px;
  }

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

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

  .ranking-item {
    grid-template-columns: 46px 70px 1fr;
  }

  .ranking-item .heat {
    grid-column: 3;
  }

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

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .small-grid,
  .category-cards {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 42px 62px 1fr;
    gap: 10px;
  }

  .ranking-item img {
    width: 62px;
    height: 86px;
  }
}
