:root {
  --craft-brown-950: #3b2b1d;
  --craft-brown-900: #5a442c;
  --craft-brown-800: #6d5336;
  --craft-brown-700: #88663f;
  --craft-brown-600: #a37d4d;
  --craft-beige-50: #fdfbf7;
  --craft-beige-100: #f9f5ed;
  --craft-beige-200: #f1e8d4;
  --craft-beige-300: #e7d9ba;
  --craft-beige-500: #d0b784;
  --craft-green-100: #eaf3e7;
  --craft-green-600: #5d8a49;
  --craft-green-700: #4a6e3b;
  --text-main: #33291e;
  --text-muted: #6f675d;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(74, 53, 36, 0.14);
  --shadow-card: 0 12px 24px rgba(74, 53, 36, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--craft-beige-50) 0%, #ffffff 46%, var(--craft-beige-100) 100%);
  line-height: 1.6;
}

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

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

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: rgba(90, 68, 44, 0.96);
  color: var(--craft-beige-100);
  box-shadow: 0 10px 30px rgba(43, 29, 18, 0.24);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 22px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--craft-brown-950);
  background: linear-gradient(135deg, var(--craft-beige-200), var(--craft-beige-500));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 650;
}

.main-nav a,
.mobile-nav a {
  color: var(--craft-beige-100);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--white);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--craft-beige-100);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: rgba(90, 68, 44, 0.98);
}

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

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

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-shade {
  background: linear-gradient(90deg, rgba(58, 38, 23, 0.96), rgba(90, 68, 44, 0.72), rgba(90, 68, 44, 0.18));
}

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

.hero-copy {
  max-width: 720px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--craft-beige-300);
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.detail-copy h1,
.sub-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-lead,
.detail-line,
.sub-hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: var(--craft-beige-100);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(163, 125, 77, 0.92);
  font-size: 14px;
  font-weight: 650;
}

.hero-tags span:nth-child(2n),
.tag-row span:nth-child(2n) {
  background: rgba(93, 138, 73, 0.92);
}

.hero-actions {
  margin-top: 30px;
}

.hero-mini-tags {
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--craft-beige-500), var(--craft-brown-600));
  box-shadow: 0 14px 30px rgba(74, 53, 36, 0.28);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: var(--white);
}

.page-intro,
.content-section,
.detail-content {
  padding: 56px 0;
}

.page-intro h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  color: var(--craft-brown-800);
}

.page-intro p,
.section-heading p,
.story-card p,
.category-panel p,
.movie-body p {
  color: var(--text-muted);
}

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

.section-heading h2 {
  margin: 0 0 10px;
  color: var(--craft-brown-800);
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  margin: 0;
  max-width: 780px;
}

.soft-section,
.ranking-strip {
  padding: 60px 0;
  background: var(--craft-beige-100);
}

.ranking-strip {
  background: linear-gradient(90deg, var(--craft-brown-100, #f5f0e8), var(--craft-beige-100));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(217, 197, 163, 0.5);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
  opacity: 0.78;
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  font-size: 13px;
  font-weight: 750;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.movie-body {
  padding: 16px;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--craft-brown-600);
  font-size: 13px;
  font-weight: 750;
}

.movie-body h3 {
  margin: 0 0 8px;
  color: var(--craft-brown-800);
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: var(--craft-brown-600);
}

.movie-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.tag-row {
  gap: 8px;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 10px;
  color: var(--craft-brown-800);
  background: var(--craft-beige-100);
  font-size: 12px;
}

.tag-row span:nth-child(2n) {
  color: var(--craft-green-700);
  background: var(--craft-green-100);
}

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

.category-tile,
.category-panel {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: var(--radius-xl);
  background: var(--craft-brown-900);
  box-shadow: var(--shadow-card);
}

.category-tile img,
.category-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img,
.category-panel:hover img {
  transform: scale(1.06);
  opacity: 0.56;
}

.category-tile span,
.category-panel span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 62px;
  color: var(--white);
  font-size: 24px;
  font-weight: 850;
}

.category-tile small,
.category-panel p {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  margin: 0;
  color: var(--craft-beige-100);
  font-size: 14px;
}

.category-panel {
  min-height: 260px;
}

.sub-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--craft-brown-950), var(--craft-brown-800));
}

.sub-hero-image {
  min-height: 420px;
  display: flex;
  align-items: center;
}

.sub-hero-image > img,
.sub-hero-shade {
  position: absolute;
  inset: 0;
}

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

.sub-hero-shade {
  background: linear-gradient(90deg, rgba(58, 38, 23, 0.96), rgba(90, 68, 44, 0.48));
}

.sub-hero .container {
  position: relative;
  z-index: 2;
}

.filter-panel {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid rgba(217, 197, 163, 0.6);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--craft-brown-700);
  font-weight: 750;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(217, 197, 163, 0.85);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--white);
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--craft-brown-600);
  box-shadow: 0 0 0 4px rgba(163, 125, 77, 0.14);
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-compact .movie-cover {
  aspect-ratio: 1 / 1.18;
}

.movie-card-compact .movie-body {
  display: grid;
  align-content: center;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--white);
  background: rgba(163, 125, 77, 0.94);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: var(--white);
  background: var(--craft-brown-900);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(1px);
  transform: scale(1.02);
}

.detail-shade {
  background: linear-gradient(90deg, rgba(58, 38, 23, 0.96), rgba(90, 68, 44, 0.78), rgba(90, 68, 44, 0.2));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 52px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--craft-beige-200);
  font-weight: 700;
}

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

.detail-tags {
  margin-top: 18px;
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #080605;
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.88);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.46;
  transform: scale(1.03);
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--craft-brown-950);
  background: var(--craft-beige-200);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.story-card {
  padding: 28px;
  border: 1px solid rgba(217, 197, 163, 0.55);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.story-card h2 {
  margin: 0 0 14px;
  color: var(--craft-brown-800);
}

.story-card p {
  margin: 0;
}

.site-footer {
  margin-top: 40px;
  padding: 34px 0;
  color: var(--craft-beige-100);
  background: var(--craft-brown-900);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
}

.filter-empty {
  padding: 34px;
  border-radius: var(--radius-lg);
  color: var(--craft-brown-800);
  background: var(--craft-beige-100);
  text-align: center;
  font-weight: 750;
}

@media (max-width: 1080px) {
  .main-nav {
    gap: 16px;
    font-size: 14px;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-control {
    display: none;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

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

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

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

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

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

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

  .hero {
    height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 90px;
  }

  .hero h1,
  .detail-copy h1,
  .sub-hero h1 {
    font-size: 34px;
  }

  .movie-grid,
  .category-grid,
  .category-panels,
  .detail-content,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .page-intro,
  .content-section,
  .detail-content {
    padding: 38px 0;
  }

  .sub-hero {
    padding: 68px 0;
  }

  .footer-inner {
    display: grid;
  }
}
