:root {
  --cream-50: #fffaf6;
  --cream-100: #fff5ed;
  --cream-200: #ffe8d6;
  --cream-300: #ffd8be;
  --cream-400: #ffc9a7;
  --cocoa-50: #efebe9;
  --cocoa-100: #d7ccc8;
  --cocoa-200: #bcaaa4;
  --cocoa-500: #795548;
  --cocoa-600: #5d4037;
  --cocoa-700: #4e342e;
  --cocoa-800: #3e2723;
  --cocoa-900: #2c1810;
  --chocolate-500: #4e342e;
  --chocolate-600: #3e2723;
  --text-main: #2c1810;
  --text-soft: #795548;
  --shadow-soft: 0 24px 70px rgba(62, 39, 35, 0.16);
  --shadow-card: 0 16px 40px rgba(62, 39, 35, 0.12);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--cream-50), var(--cocoa-50));
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, var(--cocoa-200), var(--cocoa-700));
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--cocoa-800), var(--cocoa-700), var(--chocolate-600));
  box-shadow: 0 14px 38px rgba(44, 24, 16, 0.28);
}

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream-100);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--cocoa-900);
  background: var(--cream-300);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-4deg);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: var(--cream-100);
  font-weight: 700;
  opacity: 0.88;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  opacity: 1;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input,
.mobile-panel input,
.filter-panel input {
  border: 1px solid rgba(255, 245, 237, 0.55);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  min-width: 220px;
  color: var(--cocoa-800);
  background: rgba(255, 250, 246, 0.92);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-search input:focus,
.mobile-panel input:focus,
.filter-panel input:focus {
  border-color: var(--cream-300);
  box-shadow: 0 0 0 4px rgba(255, 216, 190, 0.28);
}

.site-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--cocoa-900);
  background: var(--cream-300);
  font-weight: 800;
  cursor: pointer;
}

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

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

.mobile-panel {
  display: none;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(255, 245, 237, 0.14);
  background: var(--cocoa-800);
}

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

.mobile-panel a {
  color: var(--cream-100);
  font-weight: 700;
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.hero {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--cocoa-900);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(44, 24, 16, 0.96), rgba(62, 39, 35, 0.72), rgba(44, 24, 16, 0.12));
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 44px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--cream-100);
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-tags strong,
.detail-tags strong,
.card-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--cocoa-900);
  background: var(--cream-400);
  font-size: 14px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span,
.tag-line span,
.detail-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--cream-100);
  background: rgba(78, 52, 46, 0.7);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: var(--cocoa-900);
  background: var(--cream-300);
  box-shadow: 0 14px 34px rgba(255, 216, 190, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 38px rgba(44, 24, 16, 0.24);
}

.ghost-btn {
  color: var(--cream-100);
  background: rgba(62, 39, 35, 0.52);
  border: 1px solid rgba(255, 245, 237, 0.22);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  right: 42px;
  bottom: 38px;
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 216, 190, 0.5);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--cream-300);
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px 76px;
}

.page-top {
  padding-top: 38px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-title > span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--cream-100);
  background: linear-gradient(135deg, var(--cocoa-700), var(--chocolate-600));
  box-shadow: var(--shadow-card);
}

.section-title h2 {
  margin: 0;
  color: var(--cocoa-900);
  font-size: clamp(26px, 3vw, 36px);
}

.section-title p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 320px);
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
}

.rail .movie-card {
  scroll-snap-align: start;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4.05;
  overflow: hidden;
}

.poster-wrap img,
.wide-card img,
.compact-link img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(44, 24, 16, 0.76), transparent);
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 201, 167, 0.86);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3,
.compact-link h3 {
  margin: 10px 0 8px;
  color: var(--cocoa-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-body p,
.compact-link p,
.rank-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  margin: 12px 0;
  color: var(--cocoa-600);
  font-size: 13px;
  font-weight: 700;
}

.tag-line span {
  color: var(--cocoa-700);
  background: var(--cocoa-50);
}

.deep-panel {
  border-radius: 28px;
  padding: 34px;
  background: linear-gradient(135deg, var(--cocoa-700), var(--chocolate-600));
  box-shadow: var(--shadow-soft);
}

.deep-panel .section-title h2,
.deep-panel .section-title p {
  color: var(--cream-100);
}

.deep-panel .section-title > span {
  color: var(--cocoa-900);
  background: var(--cream-300);
}

.editor-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.editor-main,
.editor-side,
.side-list {
  display: grid;
  gap: 18px;
}

.wide-card a {
  display: grid;
  grid-template-columns: minmax(240px, 42%) 1fr;
}

.wide-card img {
  min-height: 260px;
}

.compact {
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(62, 39, 35, 0.1);
}

.compact-link {
  display: grid !important;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 12px;
  background: var(--cream-50);
}

.compact-link img {
  height: 76px;
  border-radius: 12px;
}

.compact-link h3 {
  margin-top: 0;
  font-size: 15px;
  -webkit-line-clamp: 1;
}

.compact-link span {
  display: inline-block;
  margin-top: 8px;
  color: var(--cocoa-500);
  font-size: 12px;
  font-weight: 700;
}

.soft-panel {
  border-radius: 28px;
  padding: 34px;
  background: var(--cream-100);
}

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

.rank-grid.full-list {
  grid-template-columns: 1fr;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: stretch;
}

.rank-item > span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--cream-100);
  background: linear-gradient(135deg, var(--cocoa-600), var(--chocolate-500));
  font-size: 24px;
  font-weight: 900;
}

.rank-row {
  border-radius: 16px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  padding: 12px;
}

.rank-row img {
  height: 86px;
  border-radius: 12px;
}

.rank-copy strong {
  color: var(--cocoa-900);
  font-size: 17px;
}

.rank-copy span {
  display: inline-block;
  margin-top: 9px;
  color: var(--cocoa-500);
  font-size: 13px;
  font-weight: 700;
}

.center-actions {
  justify-content: center;
  margin-top: 28px;
}

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

.category-card,
.category-overview-card > a {
  display: block;
  min-height: 180px;
  border-radius: 24px;
  padding: 26px;
  color: var(--cream-100);
  background: radial-gradient(circle at 22% 20%, rgba(255, 216, 190, 0.32), transparent 30%), linear-gradient(135deg, var(--cocoa-700), var(--chocolate-600));
  box-shadow: var(--shadow-card);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.category-card:hover,
.category-overview-card > a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card span,
.category-overview-card p {
  color: var(--cream-200);
  line-height: 1.7;
}

.category-strip {
  border-radius: 28px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 38px rgba(62, 39, 35, 0.08);
}

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

.strip-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
  color: var(--cocoa-900);
}

.strip-head p {
  margin: 0;
  color: var(--text-soft);
}

.strip-head a,
.enter-link {
  color: var(--cocoa-700);
  font-weight: 900;
}

.page-hero-small {
  border-radius: 30px;
  padding: 42px;
  margin-bottom: 34px;
  color: var(--cream-100);
  background: radial-gradient(circle at 20% 15%, rgba(255, 216, 190, 0.32), transparent 28%), linear-gradient(135deg, var(--cocoa-800), var(--cocoa-700), var(--chocolate-600));
  box-shadow: var(--shadow-soft);
}

.page-hero-small span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--cocoa-900);
  background: var(--cream-300);
  font-weight: 900;
}

.page-hero-small h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
}

.page-hero-small p {
  max-width: 760px;
  margin: 0;
  color: var(--cream-200);
  font-size: 17px;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 38px rgba(62, 39, 35, 0.08);
}

.filter-panel input {
  width: 100%;
  min-width: 0;
  border-color: var(--cocoa-100);
  background: #ffffff;
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-links a {
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--cocoa-700);
  background: var(--cream-100);
  font-weight: 800;
}

.search-panel p {
  margin: 0;
  color: var(--text-soft);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--cocoa-600);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

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

.player-card,
.detail-copy,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--cocoa-900);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(44, 24, 16, 0.76), rgba(44, 24, 16, 0.18));
  cursor: pointer;
}

.player-start span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--cocoa-900);
  background: var(--cream-300);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
  font-size: 28px;
}

.player-start strong {
  font-size: 20px;
}

.player-start.hidden {
  display: none;
}

.detail-copy {
  padding: 30px;
}

.detail-copy h1 {
  margin: 18px 0 16px;
  color: var(--cocoa-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
}

.detail-meta span {
  color: var(--cocoa-700);
  background: var(--cream-100);
  backdrop-filter: none;
  font-weight: 800;
}

.detail-copy section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--cocoa-100);
}

.detail-copy h2,
.side-card h2 {
  margin: 0 0 12px;
  color: var(--cocoa-800);
  font-size: 22px;
}

.detail-copy p {
  margin: 0;
  color: var(--cocoa-700);
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 22px;
}

.more-related {
  margin-top: 46px;
}

.site-footer {
  color: var(--cream-200);
  background: var(--cocoa-900);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 560px;
  color: var(--cocoa-100);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  color: var(--cream-200);
  font-weight: 700;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 245, 237, 0.12);
  padding: 18px 22px 26px;
  color: var(--cocoa-100);
  font-size: 14px;
}

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-copy {
    bottom: 88px;
  }

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

  .hero-dots {
    left: 22px;
    right: auto;
  }

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

  .wide-card a {
    grid-template-columns: 1fr;
  }

  .footer-inner,
  .strip-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .nav-wrap {
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy {
    width: calc(100% - 32px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .cards-4,
  .category-cards,
  .overview-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .deep-panel,
  .soft-panel,
  .category-strip,
  .page-hero-small,
  .detail-copy {
    padding: 22px;
    border-radius: 22px;
  }

  .rank-item {
    grid-template-columns: 46px 1fr;
  }

  .rank-row a,
  .compact-link {
    grid-template-columns: 90px 1fr;
  }

  .rank-row img,
  .compact-link img {
    height: 72px;
  }
}
