:root {
  --stone-50: #faf9f7;
  --stone-100: #f5f3f0;
  --stone-200: #e5e1da;
  --stone-300: #d1cac0;
  --stone-400: #b8aea0;
  --stone-500: #91877b;
  --stone-600: #746a60;
  --stone-700: #5f574f;
  --stone-800: #5c534c;
  --stone-900: #4c4740;
  --earth-50: #faf8f5;
  --earth-100: #f2ede4;
  --earth-300: #dbc5a3;
  --earth-500: #b88d55;
  --earth-600: #a47549;
  --earth-700: #8a5f3e;
  --earth-900: #5a4029;
  --moss-600: #61704a;
  --canyon-600: #c44e2c;
  --white: #ffffff;
  --black: #000000;
  --shadow-soft: 0 18px 40px rgba(76, 71, 64, 0.12);
  --shadow-card: 0 14px 30px rgba(76, 71, 64, 0.14);
  --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", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--stone-900);
  background: var(--stone-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 225, 218, 0.9);
  background: rgba(250, 249, 247, 0.95);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  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: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-600));
  box-shadow: 0 10px 20px rgba(164, 117, 73, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--stone-700);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--earth-700);
  background: var(--earth-100);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.search-hero input {
  border: 1px solid var(--stone-300);
  outline: none;
  border-radius: 14px;
  background: var(--white);
  color: var(--stone-900);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 180px;
  padding: 9px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.search-hero input:focus {
  border-color: var(--earth-500);
  box-shadow: 0 0 0 4px rgba(184, 141, 85, 0.16);
}

.header-search button,
.mobile-search button,
.search-hero button {
  border: 0;
  border-radius: 14px;
  padding: 9px 14px;
  color: var(--white);
  background: var(--earth-600);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover {
  background: var(--earth-700);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--stone-900);
  background: var(--stone-100);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--stone-700);
  font-weight: 600;
}

.mobile-link:hover {
  background: var(--earth-50);
  color: var(--earth-700);
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(184, 141, 85, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(44, 37, 31, 0.92) 0%, rgba(44, 37, 31, 0.74) 38%, rgba(44, 37, 31, 0.18) 100%),
    linear-gradient(0deg, rgba(44, 37, 31, 0.72), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(6vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  width: min(720px, calc(100% - 48px));
  color: var(--white);
}

.hero-labels,
.detail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-labels span,
.detail-labels span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 650px;
  color: var(--stone-100);
  font-size: clamp(17px, 2vw, 22px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.button-primary {
  color: var(--white);
  background: var(--earth-600);
  box-shadow: 0 14px 28px rgba(164, 117, 73, 0.28);
}

.button-primary:hover {
  background: var(--earth-700);
}

.button-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.button-light {
  color: var(--earth-700);
  background: var(--earth-100);
}

.hero-controls {
  position: absolute;
  left: max(6vw, 24px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

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

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

.page-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-section-tight {
  padding: 42px 0 72px;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--earth-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.content-block h2,
.player-section h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--stone-600);
  font-size: 17px;
}

.section-more {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--earth-700);
  background: var(--earth-100);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(76, 71, 64, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(184, 141, 85, 0.5);
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--stone-200);
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.type-badge,
.rank-index {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.type-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.rank-index {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-600));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.card-content {
  padding: 16px;
}

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

.card-content h2,
.card-content h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.card-content h2 a:hover,
.card-content h3 a:hover {
  color: var(--earth-700);
}

.card-content p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--stone-600);
  font-size: 14px;
}

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

.card-tags span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--earth-700);
  background: var(--earth-100);
  font-size: 12px;
  font-weight: 800;
}

.card-tags span {
  padding: 4px 8px;
}

.tag-chip {
  padding: 7px 11px;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--stone-200);
  box-shadow: var(--shadow-soft);
}

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

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(38, 33, 28, 0.86), rgba(38, 33, 28, 0.12));
}

.category-name,
.category-intro {
  position: absolute;
  left: 22px;
  right: 22px;
  color: var(--white);
}

.category-name {
  bottom: 58px;
  font-size: 26px;
  font-weight: 900;
}

.category-intro {
  bottom: 22px;
  color: var(--stone-100);
  font-size: 14px;
}

.ranking-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.rank-feature {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--stone-900);
  color: var(--white);
}

.rank-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.rank-feature-content {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.rank-feature-content h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 48px);
}

.rank-feature-content p {
  color: var(--stone-100);
  font-size: 17px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: var(--earth-600);
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--stone-200);
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--stone-600);
  font-size: 14px;
}

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

.inner-hero {
  padding: 78px 0;
}

.inner-hero .inner-content,
.detail-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.inner-hero h1,
.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.inner-hero p,
.detail-copy p {
  max-width: 780px;
  margin: 0;
  color: var(--stone-100);
  font-size: 18px;
}

.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--earth-700);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(76, 71, 64, 0.04);
}

.filter-bar input {
  flex: 1 1 320px;
  min-height: 46px;
  padding: 12px 14px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--stone-100);
  font-weight: 800;
}

.detail-hero {
  margin-top: 0;
  padding: 52px 0;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(230px, 320px) 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  background: var(--stone-800);
}

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

.detail-tags {
  margin: 22px 0 28px;
}

.detail-tags .tag-chip {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.player-section,
.content-block,
.related-block {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.player-section {
  padding: 56px 0 28px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--black);
  box-shadow: var(--shadow-card);
}

.movie-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-600));
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.34);
  font-size: 34px;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  font-weight: 700;
}

.player-message.is-visible {
  display: block;
}

.content-block {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 34px;
  padding: 32px 0 64px;
}

.article-panel,
.side-panel {
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(76, 71, 64, 0.04);
}

.article-panel {
  padding: 30px;
}

.article-panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.article-panel p {
  margin: 0 0 24px;
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.85;
  white-space: pre-line;
}

.side-panel {
  align-self: start;
  padding: 24px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}

.side-card img {
  width: 70px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--stone-200);
}

.side-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.side-card p {
  margin: 0;
  color: var(--stone-600);
  font-size: 13px;
}

.related-block {
  padding: 0 0 72px;
}

.search-hero {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 36px;
  text-align: center;
}

.search-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.search-hero p {
  margin: 0 auto 24px;
  color: var(--stone-600);
  font-size: 18px;
}

.search-hero form {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.search-hero input {
  width: min(560px, 100%);
  min-height: 52px;
  padding: 14px 16px;
}

.search-hero button {
  min-width: 96px;
}

.site-footer {
  color: var(--stone-300);
  background: var(--stone-900);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: var(--white);
  font-size: 21px;
}

.site-footer p {
  color: var(--stone-400);
}

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

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

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

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(229, 225, 218, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--earth-300);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.empty-state {
  padding: 34px;
  border: 1px dashed var(--stone-300);
  border-radius: var(--radius-lg);
  color: var(--stone-600);
  background: var(--white);
  text-align: center;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .ranking-strip,
  .content-block {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero {
    min-height: 72vh;
  }

  .hero-content {
    top: 46%;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 16px;
  }

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

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

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

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

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

  .article-panel {
    padding: 22px;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-hero form {
    flex-direction: column;
  }
}

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .rank-row {
    grid-template-columns: 38px 58px 1fr;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }
}
