:root {
  --brown-950: #3a2a1b;
  --brown-900: #5a442c;
  --brown-800: #6d5336;
  --brown-700: #8a6742;
  --brown-600: #a37d4d;
  --beige-50: #fdfbf7;
  --beige-100: #f9f5ed;
  --beige-200: #efe4cf;
  --beige-300: #dec998;
  --green-600: #5d8a49;
  --green-100: #eaf3e7;
  --text: #2d241b;
  --muted: #6e6257;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(68, 48, 28, 0.16);
  --soft-shadow: 0 10px 28px rgba(68, 48, 28, 0.10);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(90, 68, 44, 0.96);
  color: var(--white);
  box-shadow: 0 8px 28px rgba(58, 42, 27, 0.24);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--beige-300), var(--green-600));
  color: var(--brown-950);
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 700;
  color: var(--beige-100);
}

.main-nav a {
  position: relative;
  padding: 23px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--beige-300);
  transition: transform 0.24s ease;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: var(--brown-950);
  color: var(--white);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 620px;
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: blur(2px) saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 72% 38%, rgba(222, 201, 152, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(58, 42, 27, 0.96), rgba(90, 68, 44, 0.82) 46%, rgba(58, 42, 27, 0.5));
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(58, 42, 27, 0.10), rgba(58, 42, 27, 0.84));
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 420px;
  gap: 56px;
  align-items: center;
  min-height: 620px;
  padding: 72px 0 118px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 800;
  color: var(--beige-300);
}

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

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--beige-100);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.chip-row span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

.hero-tags span,
.detail-meta span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--beige-100);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

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

.btn-primary {
  background: var(--green-600);
  color: var(--white);
  box-shadow: 0 14px 26px rgba(93, 138, 73, 0.28);
}

.btn-primary:hover {
  background: #4f7d3d;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  background: linear-gradient(135deg, var(--brown-800), var(--beige-300));
}

.hero-poster-image,
.detail-poster-image,
.poster-image,
.rank-image,
.mini-cover,
.hero-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brown-800), var(--beige-300));
}

.image-load-error {
  opacity: 0;
}

.hero-play,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--brown-800);
  box-shadow: var(--soft-shadow);
}

.hero-play {
  left: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: var(--beige-300);
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 10px;
  max-width: 620px;
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--beige-100);
  backdrop-filter: blur(10px);
}

.hero-thumb-image {
  width: 42px;
  height: 54px;
  border-radius: 10px;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12px;
  font-weight: 700;
}

.site-section {
  padding: 58px 0;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.intro-strip div {
  border-radius: var(--radius-md);
  padding: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(163, 125, 77, 0.16);
}

.stat-number {
  display: block;
  font-size: 34px;
  font-weight: 900;
  color: var(--brown-800);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  color: var(--brown-900);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brown-800);
  color: var(--white);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(163, 125, 77, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.poster-image {
  transition: transform 0.45s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(58, 42, 27, 0.72));
}

.play-badge {
  z-index: 2;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
}

.movie-body {
  padding: 16px;
}

.chip-row span {
  background: var(--green-100);
  color: var(--green-600);
}

.movie-title {
  display: block;
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--brown-900);
}

.movie-title:hover {
  color: var(--green-600);
}

.movie-desc,
.rank-info p,
.compact-info p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  background: var(--beige-100);
  color: var(--brown-700);
}

.ranking-section {
  background: linear-gradient(135deg, var(--brown-900), var(--brown-800));
  color: var(--white);
}

.ranking-section .section-heading h2,
.ranking-section .section-heading p {
  color: var(--white);
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 62px 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.24s ease, background 0.24s ease;
}

.ranking-list .rank-item {
  background: var(--white);
  color: var(--text);
  box-shadow: var(--soft-shadow);
  border-color: rgba(163, 125, 77, 0.12);
}

.rank-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.18);
}

.ranking-list .rank-item:hover {
  background: var(--beige-50);
}

.rank-number {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  color: var(--beige-300);
}

.ranking-list .rank-number {
  color: var(--brown-700);
}

.rank-cover {
  width: 92px;
  height: 122px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brown-800), var(--beige-300));
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: inherit;
}

.meta-line {
  margin-top: 10px;
  color: inherit;
  opacity: 0.82;
  font-size: 13px;
}

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

.category-card {
  display: block;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(163, 125, 77, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.mini-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.mini-cover-stack span {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brown-800), var(--beige-300));
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--brown-900);
}

.category-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
}

.category-card strong {
  color: var(--green-600);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 160px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(163, 125, 77, 0.12);
}

.filter-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brown-800);
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(163, 125, 77, 0.25);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: var(--beige-50);
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(93, 138, 73, 0.12);
}

.filter-count {
  margin: 0;
  color: var(--brown-800);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  padding: 78px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(222, 201, 152, 0.28), transparent 32%),
    linear-gradient(135deg, var(--brown-950), var(--brown-800));
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--beige-100);
  font-size: 18px;
}

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

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

.compact-poster {
  border-radius: 14px;
}

.compact-info {
  padding: 8px 10px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  background: var(--brown-950);
  color: var(--white);
  isolation: isolate;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(4px) saturate(1.08);
  transform: scale(1.05);
  opacity: 0.34;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(58, 42, 27, 0.96), rgba(58, 42, 27, 0.72));
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--brown-800), var(--beige-300));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--beige-200);
  font-size: 14px;
}

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

.detail-one-line {
  max-width: 860px;
  margin: 18px 0 0;
  color: var(--beige-100);
  font-size: 20px;
}

.detail-meta,
.detail-tags {
  margin-top: 22px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--beige-100);
}

.detail-info .btn {
  margin-top: 30px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #050505;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  background: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  border: 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.player-card.is-playing .player-overlay {
  display: none;
}

.player-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brown-800);
  font-size: 26px;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  text-align: center;
}

.content-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(163, 125, 77, 0.12);
}

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

.content-card h2:not(:first-child) {
  margin-top: 30px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 18px;
  color: var(--beige-200);
}

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

@media (max-width: 1080px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: var(--brown-900);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 12px;
  }

  .main-nav a::after {
    display: none;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding: 56px 0 162px;
  }

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

  .hero-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .intro-strip,
  .footer-grid,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

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

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

  .rank-cover {
    width: 78px;
    height: 104px;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    margin-top: 16px;
  }

  .content-card {
    padding: 24px;
  }
}
