:root {
  --craft-beige-50: #fdfbf7;
  --craft-beige-100: #f9f5ed;
  --craft-beige-200: #f1e8d4;
  --craft-beige-300: #e7d9ba;
  --craft-beige-500: #d0b784;
  --craft-beige-600: #bfa06c;
  --craft-brown-50: #faf8f5;
  --craft-brown-100: #f5f0e8;
  --craft-brown-300: #d9c5a3;
  --craft-brown-600: #a37d4d;
  --craft-brown-700: #88663f;
  --craft-brown-800: #6d5336;
  --craft-brown-900: #5a442c;
  --craft-green-100: #eaf3e7;
  --craft-green-600: #5d8a49;
  --craft-green-700: #4a6e3b;
  --text: #2d241b;
  --muted: #6d6257;
  --line: rgba(136, 102, 63, 0.18);
  --shadow: 0 18px 45px rgba(90, 68, 44, 0.16);
  --shadow-soft: 0 10px 24px rgba(90, 68, 44, 0.12);
  --radius: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--craft-beige-50), #ffffff 45%, var(--craft-brown-50));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: rgba(109, 83, 54, 0.96);
  box-shadow: 0 12px 32px rgba(47, 34, 20, 0.25);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--craft-brown-900);
  background: linear-gradient(135deg, var(--craft-beige-300), #ffffff);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

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

.site-nav__link {
  color: var(--craft-beige-100);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.site-nav__pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(241, 232, 212, 0.28);
  border-radius: 999px;
  color: var(--craft-beige-100);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav__pill:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.quick-nav {
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
  overflow-x: auto;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-nav__link {
  padding: 10px 0;
  color: var(--craft-beige-100);
  font-weight: 700;
}

.mobile-nav__link.is-active {
  color: #ffffff;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--craft-brown-900);
}

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

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

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

.hero-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.02);
}

.hero-slide__overlay {
  background: linear-gradient(90deg, rgba(90, 68, 44, 0.94) 0%, rgba(90, 68, 44, 0.72) 45%, rgba(90, 68, 44, 0.42) 100%);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow,
.section-eyebrow {
  margin: 0 0 10px;
  color: var(--craft-brown-700);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: var(--craft-beige-300);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 660px;
  color: var(--craft-beige-100);
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.tag-list,
.movie-card__labels,
.detail-tags,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.hero-meta span,
.tag,
.movie-card__labels span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--craft-brown-800);
  background: var(--craft-brown-100);
}

.hero-meta span:nth-child(1) {
  color: #ffffff;
  background: rgba(163, 125, 77, 0.92);
}

.hero-meta span:nth-child(2) {
  color: #ffffff;
  background: rgba(93, 138, 73, 0.92);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 800;
  background: var(--craft-beige-500);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--craft-beige-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.btn--dark {
  background: var(--craft-brown-600);
}

.btn--dark:hover {
  background: var(--craft-brown-700);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.22);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

main {
  display: block;
}

.page-section,
.category-page,
.search-page,
.ranking-page {
  padding: 64px 0;
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-content h1 {
  margin: 0;
  color: var(--craft-brown-800);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.section-link {
  color: var(--craft-brown-700);
  font-weight: 800;
}

.section-link:hover {
  color: var(--craft-brown-900);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card__link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card__link:hover {
  border-color: rgba(163, 125, 77, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--craft-brown-100);
}

.movie-card__poster--wide {
  aspect-ratio: 16 / 9;
}

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

.movie-card__link:hover img {
  transform: scale(1.08);
}

.movie-card__shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease;
}

.movie-card__link:hover .movie-card__shade {
  opacity: 1;
}

.movie-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--craft-brown-800);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card__link:hover .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card__year,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 10px;
  right: auto;
  min-width: 32px;
  text-align: center;
  background: rgba(163, 125, 77, 0.94);
}

.movie-card__body {
  display: block;
  padding: 16px;
}

.movie-card__labels {
  margin-bottom: 10px;
}

.movie-card__labels span:nth-child(2) {
  color: var(--craft-green-700);
  background: var(--craft-green-100);
}

.movie-card__title {
  display: -webkit-box;
  min-height: 46px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--craft-brown-800);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card__desc {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card__meta {
  color: #817469;
  font-size: 13px;
  font-weight: 700;
}

.movie-card--large .movie-card__title {
  min-height: auto;
  font-size: 22px;
}

.movie-card--compact .movie-card__link {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.movie-card--compact .movie-card__poster {
  border-radius: 12px;
}

.movie-card--compact .movie-card__body {
  padding: 0;
}

.movie-card--compact .movie-card__title {
  min-height: 0;
  -webkit-line-clamp: 1;
}

.movie-card--compact .movie-card__desc {
  min-height: 0;
}

.category-strip {
  background: var(--craft-beige-100);
}

.category-card {
  display: block;
  min-height: 172px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, var(--craft-beige-50));
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--craft-brown-800);
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--craft-brown-100), var(--craft-beige-100));
  box-shadow: var(--shadow-soft);
}

.search-panel h2 {
  margin: 0 0 8px;
  color: var(--craft-brown-800);
}

.search-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.search-panel__controls {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.8fr;
  gap: 12px;
}

.search-panel label {
  display: grid;
  gap: 7px;
  color: var(--craft-brown-700);
  font-size: 13px;
  font-weight: 800;
}

.search-panel input,
.search-panel select {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(136, 102, 63, 0.26);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--text);
  background: #ffffff;
  outline: 0;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--craft-brown-600);
  box-shadow: 0 0 0 3px rgba(163, 125, 77, 0.16);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 12px;
  color: var(--craft-brown-700);
  background: rgba(255, 255, 255, 0.6);
}

.page-title {
  margin-bottom: 30px;
}

.page-title p {
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.ranking-hero,
.library-hero,
.detail-hero {
  padding: 68px 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(90, 68, 44, 0.96), rgba(109, 83, 54, 0.82)), var(--craft-brown-900);
}

.ranking-hero h1,
.library-hero h1,
.detail-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
}

.ranking-hero p,
.library-hero p,
.detail-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--craft-beige-100);
  font-size: 18px;
  line-height: 1.8;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
}

.detail-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.detail-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(90, 68, 44, 0.96), rgba(90, 68, 44, 0.72));
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-hero__poster {
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
  margin-bottom: 16px;
  color: var(--craft-beige-200);
  font-size: 14px;
}

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

.player-shell {
  padding: 48px 0;
  background: #0d0b09;
}

.player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.66));
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--craft-brown-900);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.player-overlay strong {
  display: block;
  font-size: 22px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  padding: 12px 14px;
  border-radius: 10px;
  color: #ffffff;
  text-align: center;
  background: rgba(124, 31, 31, 0.92);
}

.player-error:empty {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: 56px 0;
}

.detail-content,
.detail-side-card,
.related-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-content {
  padding: 32px;
}

.detail-content h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 44px);
}

.detail-content h2 {
  margin: 34px 0 14px;
  color: var(--craft-brown-800);
  font-size: 24px;
}

.detail-content p {
  color: #55483d;
  font-size: 16px;
  line-height: 1.9;
}

.detail-side-card {
  position: sticky;
  top: 112px;
  padding: 20px;
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  object-fit: cover;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 12px;
  margin: 18px 0 0;
}

.detail-side-card dt {
  color: var(--craft-brown-700);
  font-weight: 800;
}

.detail-side-card dd {
  margin: 0;
  color: var(--muted);
}

.related-panel {
  margin-bottom: 64px;
  padding: 30px;
}

.site-footer {
  color: var(--craft-beige-100);
  background: var(--craft-brown-900);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p {
  margin: 12px 0 0;
  line-height: 1.8;
}

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

.site-footer a:hover {
  color: #ffffff;
}

.site-footer__bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.site-footer__bottom p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

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

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

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

  .detail-side-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-nav,
  .quick-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
  }

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

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

  .section-head,
  .search-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .section-head {
    display: grid;
  }

  .search-panel__controls {
    grid-template-columns: 1fr;
  }

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

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

  .detail-hero__poster {
    width: 190px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand__name {
    font-size: 20px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

  .grid--cards,
  .grid--compact,
  .grid--category {
    grid-template-columns: 1fr;
  }

  .movie-card--compact .movie-card__link {
    grid-template-columns: 118px 1fr;
  }

  .detail-content,
  .related-panel {
    padding: 22px;
  }
}
