:root {
  --stone-50: #f8f7f4;
  --stone-100: #efede6;
  --stone-200: #ddd9cc;
  --stone-600: #6f6a5f;
  --stone-700: #514b42;
  --earth-100: #ede3d9;
  --earth-700: #7c4b35;
  --earth-800: #6a4130;
  --earth-900: #573729;
  --bronze-100: #f1ede3;
  --bronze-300: #d0bd9f;
  --bronze-500: #a68558;
  --bronze-600: #98724c;
  --bronze-800: #684c37;
  --white: #ffffff;
  --black: #050505;
  --shadow-soft: 0 18px 50px rgba(87, 55, 41, 0.14);
  --shadow-card: 0 12px 34px rgba(87, 55, 41, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--stone-700);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
}

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: 100;
  background: rgba(87, 55, 41, 0.96);
  color: var(--stone-50);
  box-shadow: 0 10px 30px rgba(36, 24, 18, 0.22);
  backdrop-filter: blur(14px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bronze-500), var(--bronze-800));
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(166, 133, 88, 0.36);
}

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

.nav-link {
  color: var(--stone-200);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--bronze-300);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 2px;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--earth-900), var(--bronze-800));
}

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

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

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 24%, rgba(208, 189, 159, 0.3), transparent 28%),
    linear-gradient(90deg, rgba(48, 29, 22, 0.96) 0%, rgba(87, 55, 41, 0.83) 44%, rgba(87, 55, 41, 0.24) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  min-height: 680px;
  gap: 56px;
  color: var(--white);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--bronze-300);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0 0 20px;
  color: inherit;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.hero-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.detail-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--bronze-500);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(166, 133, 88, 0.32);
}

.btn-primary:hover {
  background: var(--bronze-600);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  aspect-ratio: 3 / 4;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.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: 32px;
  background: var(--bronze-300);
}

.search-strip {
  position: relative;
  z-index: 10;
  margin-top: -38px;
}

.quick-search,
.filter-panel,
.prose-card,
.detail-content-card,
.info-card,
.poster-card,
.ranking-card,
.category-overview-card {
  border: 1px solid rgba(106, 65, 48, 0.1);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.quick-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.quick-search label,
.filter-panel label span {
  color: var(--earth-900);
  font-weight: 900;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(106, 65, 48, 0.16);
  border-radius: 14px;
  background: var(--stone-50);
  color: var(--earth-900);
  outline: none;
  padding: 0 14px;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--bronze-500);
  box-shadow: 0 0 0 4px rgba(166, 133, 88, 0.14);
}

.page-section {
  padding: 70px 0;
}

.soft-section {
  background: var(--stone-100);
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--earth-900);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--stone-600);
}

.section-link {
  color: var(--bronze-600);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(87, 55, 41, 0.2);
}

.card-cover {
  position: relative;
  overflow: hidden;
  height: 270px;
  margin: 0;
  background: linear-gradient(135deg, var(--earth-800), var(--bronze-800));
}

.feature-card .card-cover {
  height: 360px;
}

.compact-grid .card-cover,
.mini-grid .card-cover,
.movie-card.compact .card-cover {
  height: 210px;
}

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

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

.card-cover::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 56%;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(166, 133, 88, 0.94);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  right: 12px;
  left: auto;
  background: rgba(87, 55, 41, 0.9);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--earth-900);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-600);
  font-size: 13px;
}

.card-meta span:not(:last-child)::after {
  margin-left: 8px;
  color: var(--stone-200);
  content: "/";
}

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

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 36px;
}

.ranking-card {
  align-self: start;
  padding: 22px;
}

.small-heading h2 {
  font-size: 28px;
}

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

.movie-row {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--stone-50);
  transition: transform 0.2s ease, background 0.2s ease;
}

.movie-row:hover {
  background: var(--bronze-100);
  transform: translateX(4px);
}

.list-rank {
  color: var(--bronze-600);
  font-weight: 950;
}

.movie-row img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--earth-800);
}

.movie-row-text strong,
.movie-row-text em {
  display: block;
}

.movie-row-text strong {
  overflow: hidden;
  color: var(--earth-900);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-row-text em {
  overflow: hidden;
  color: var(--stone-600);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-row-score {
  color: var(--bronze-600);
  font-weight: 950;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--white);
  box-shadow: var(--shadow-card);
  align-content: end;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(36, 24, 18, 0.85), rgba(36, 24, 18, 0.1));
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 21px;
  font-weight: 950;
}

.category-tile strong {
  color: var(--bronze-300);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--earth-900), var(--bronze-800));
  color: var(--white);
}

.compact-hero {
  padding: 74px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.filter-panel {
  margin-bottom: 30px;
  padding: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(150px, 0.8fr));
  gap: 14px;
}

.filter-row label {
  display: grid;
  gap: 8px;
}

.filter-search.wide {
  grid-column: span 3;
}

.filter-count {
  margin: 14px 0 0;
  color: var(--stone-600);
  font-weight: 800;
}

.movie-card.is-hidden {
  display: none;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.category-overview-head h2 {
  margin: 0 0 12px;
  color: var(--earth-900);
  font-size: 30px;
  font-weight: 950;
}

.category-overview-head p {
  color: var(--stone-600);
}

.search-page .movie-grid {
  min-height: 320px;
}

.detail-hero {
  min-height: 390px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.2);
  transform: scale(1.08);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(36, 24, 18, 0.94), rgba(87, 55, 41, 0.74)), linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--black);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  aspect-ratio: 16 / 9;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  background: radial-gradient(circle, rgba(166, 133, 88, 0.26), rgba(0, 0, 0, 0.72));
  color: var(--white);
  cursor: pointer;
  text-align: center;
}

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

.play-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: var(--bronze-500);
  box-shadow: 0 14px 36px rgba(166, 133, 88, 0.45);
}

.player-overlay strong {
  font-size: 24px;
}

.player-overlay em {
  color: var(--stone-200);
  font-style: normal;
}

.player-message {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 5;
  margin: 0;
  color: var(--bronze-300);
  font-size: 13px;
  font-weight: 800;
}

.detail-content-card,
.info-card,
.prose-card {
  padding: 28px;
}

.detail-content-card h2,
.info-card h2,
.prose-card h2 {
  margin: 0 0 14px;
  color: var(--earth-900);
  font-size: 26px;
  font-weight: 950;
}

.detail-content-card p,
.prose-card p {
  margin: 0;
  color: var(--stone-700);
  font-size: 17px;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.poster-card {
  overflow: hidden;
  padding: 14px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
  background: var(--earth-800);
}

.block-btn {
  width: 100%;
  margin-top: 14px;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stone-100);
}

.info-card dt {
  color: var(--stone-600);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--earth-900);
  font-weight: 900;
}

.info-card dd a {
  color: var(--bronze-600);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  background: var(--earth-100);
  color: var(--earth-900);
}

.detail-nav-links {
  justify-content: space-between;
}

.detail-nav-links a {
  flex: 1 1 240px;
  padding: 16px;
  border-radius: 16px;
  background: var(--earth-100);
  color: var(--earth-900);
  font-weight: 900;
}

.related-section {
  padding-top: 38px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

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

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

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

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

  .hero-content,
  .two-column-section,
  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .site-logo {
    font-size: 23px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--earth-900);
    box-shadow: var(--shadow-soft);
  }

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

  .nav-link {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-slider,
  .hero-content {
    min-height: 610px;
  }

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

  .hero-copy p,
  .page-hero p,
  .detail-hero p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .quick-search,
  .filter-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-search.wide {
    grid-column: auto;
  }

  .movie-grid,
  .feature-grid,
  .compact-grid,
  .mini-grid,
  .category-movie-grid,
  .ranking-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .card-cover,
  .feature-card .card-cover {
    height: 220px;
  }

  .page-section {
    padding: 46px 0;
  }

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

  .movie-row {
    grid-template-columns: 28px 50px minmax(0, 1fr);
  }

  .movie-row-score {
    display: none;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .feature-grid,
  .compact-grid,
  .mini-grid,
  .category-movie-grid,
  .ranking-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

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