:root {
  --cocoa-950: #0f0a08;
  --cocoa-900: #2c1810;
  --cocoa-800: #3e2723;
  --cocoa-700: #4e342e;
  --cocoa-600: #5d4037;
  --cocoa-500: #6d4c41;
  --cocoa-300: #a1887f;
  --cream-50: #fffaf6;
  --cream-100: #fff5ed;
  --cream-200: #ffe8d6;
  --cream-300: #ffd8be;
  --cream-400: #ffc9a7;
  --gold: #f2b36d;
  --red: #d86b55;
  --shadow: 0 24px 70px rgba(44, 24, 16, 0.18);
  --soft-shadow: 0 14px 35px rgba(44, 24, 16, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--cocoa-900);
  background:
    radial-gradient(circle at top left, rgba(255, 201, 167, 0.52), transparent 34rem),
    linear-gradient(180deg, var(--cream-50), var(--cream-100));
  min-height: 100vh;
}

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

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

input,
button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--cocoa-800), var(--cocoa-700), var(--cocoa-600));
  color: var(--cream-100);
  box-shadow: 0 12px 30px rgba(15, 10, 8, 0.24);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cream-300), var(--gold));
  color: var(--cocoa-900);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--cream-200);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cream-50);
  background: rgba(255, 250, 246, 0.12);
  transform: translateY(-1px);
}

.top-search,
.mobile-search {
  position: relative;
}

.top-search input,
.mobile-search input,
.filter-input {
  border: 1px solid rgba(255, 232, 214, 0.24);
  border-radius: 999px;
  background: rgba(44, 24, 16, 0.55);
  color: var(--cream-50);
  outline: none;
  padding: 11px 18px;
  min-width: 230px;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.filter-input::placeholder {
  color: rgba(255, 232, 214, 0.72);
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
  border-color: var(--cream-300);
  box-shadow: 0 0 0 4px rgba(255, 201, 167, 0.15);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 232, 214, 0.22);
  border-radius: 14px;
  background: rgba(44, 24, 16, 0.35);
  color: var(--cream-50);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(255, 232, 214, 0.12);
}

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

.hero {
  position: relative;
  color: var(--cream-50);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 201, 167, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(44, 24, 16, 0.96), rgba(78, 52, 46, 0.92), rgba(15, 10, 8, 0.98));
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(44, 24, 16, 0.95), rgba(62, 39, 35, 0.62), rgba(15, 10, 8, 0.92)),
    var(--hero-image, none);
  background-size: cover;
  background-position: center;
  opacity: 0.92;
}

.hero::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  right: -160px;
  top: -170px;
  border-radius: 999px;
  background: rgba(255, 201, 167, 0.12);
  filter: blur(6px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 40px;
  padding: 80px 0 70px;
}

.hero-slide {
  display: none;
  animation: fadeUp 0.65s ease both;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 201, 167, 0.16);
  color: var(--cream-300);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1,
.page-title h1,
.detail-title {
  margin: 0;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-summary {
  margin: 22px 0 0;
  max-width: 720px;
  color: var(--cream-200);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--cream-300), var(--gold));
  color: var(--cocoa-900);
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(242, 179, 109, 0.25);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(242, 179, 109, 0.36);
}

.btn.secondary {
  background: rgba(255, 250, 246, 0.12);
  color: var(--cream-50);
  border: 1px solid rgba(255, 232, 214, 0.2);
  box-shadow: none;
}

.hero-panel {
  position: relative;
  border-radius: 32px;
  padding: 18px;
  background: rgba(255, 250, 246, 0.08);
  border: 1px solid rgba(255, 232, 214, 0.14);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(15, 10, 8, 0.34);
}

.hero-poster-wrap {
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cocoa-700), var(--cocoa-900));
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 142px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 232, 214, 0.35), transparent 28%),
    linear-gradient(135deg, var(--cocoa-700), var(--cocoa-900) 48%, #1b100c);
}

.hero-panel .poster {
  aspect-ratio: 16 / 18;
  min-height: 430px;
}

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

.poster-title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: var(--cream-50);
  font-weight: 850;
  font-size: 18px;
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hero-mini-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(44, 24, 16, 0.56);
  color: var(--cream-100);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-mini-list a:hover {
  background: rgba(255, 250, 246, 0.13);
  transform: translateX(4px);
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 250, 246, 0.24);
  cursor: pointer;
}

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

.main {
  padding: 56px 0 70px;
}

.section {
  margin-top: 48px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--cocoa-500);
}

.section-more {
  color: var(--cocoa-700);
  font-weight: 800;
}

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

.movie-card,
.category-card,
.rank-card,
.detail-box,
.filter-bar,
.info-card {
  border-radius: 24px;
  background: rgba(255, 250, 246, 0.86);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(188, 170, 164, 0.25);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3,
.card-title {
  display: block;
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.card-body p {
  color: var(--cocoa-600);
  line-height: 1.65;
  margin: 0 0 12px;
}

.category-pill,
.tag-row span,
.detail-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--cocoa-100, #d7ccc8);
  color: var(--cocoa-700);
  font-size: 12px;
  font-weight: 750;
  padding: 5px 9px;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-row span {
  color: var(--cocoa-500);
  font-size: 13px;
}

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

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

.category-card {
  display: block;
  padding: 22px;
  overflow: hidden;
  position: relative;
  min-height: 170px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -70px;
  bottom: -70px;
  border-radius: 999px;
  background: rgba(255, 201, 167, 0.38);
}

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

.category-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--cocoa-600);
  line-height: 1.7;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.rank-card {
  padding: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(188, 170, 164, 0.25);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream-300), var(--gold));
  font-weight: 900;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  color: var(--cocoa-500);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  background: linear-gradient(135deg, rgba(62, 39, 35, 0.95), rgba(44, 24, 16, 0.98));
  color: var(--cream-50);
  padding: 54px 0;
}

.page-title p,
.detail-intro {
  max-width: 780px;
  color: var(--cream-200);
  line-height: 1.8;
  font-size: 17px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--cream-300);
  font-weight: 700;
}

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

.filter-bar {
  padding: 18px;
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.filter-input {
  min-width: min(420px, 100%);
  background: white;
  color: var(--cocoa-900);
  border-color: rgba(188, 170, 164, 0.5);
}

.compact-card {
  display: grid;
  grid-template-columns: 140px 1fr;
}

.compact-card .poster {
  height: 100%;
  min-height: 160px;
  aspect-ratio: auto;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.detail-poster .poster {
  aspect-ratio: 3 / 4;
  min-height: 450px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-chip {
  background: rgba(255, 250, 246, 0.12);
  color: var(--cream-100);
  border: 1px solid rgba(255, 232, 214, 0.18);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.detail-box {
  padding: 24px;
  margin-bottom: 24px;
}

.detail-box h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-box p {
  line-height: 1.9;
  color: var(--cocoa-700);
  margin: 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #0f0a08;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0a08;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 201, 167, 0.22), rgba(15, 10, 8, 0.62)),
    linear-gradient(135deg, rgba(44, 24, 16, 0.86), rgba(15, 10, 8, 0.92));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-box.playing .player-cover {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 250, 246, 0.92);
  color: var(--cocoa-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.86);
  border: 1px solid rgba(188, 170, 164, 0.25);
}

.side-list .poster {
  min-height: 72px;
  border-radius: 14px;
}

.side-list strong {
  display: block;
  line-height: 1.35;
}

.side-list span {
  color: var(--cocoa-500);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 22px;
  background: white;
  color: var(--cocoa-600);
}

.site-footer {
  margin-top: 30px;
  background: linear-gradient(180deg, var(--cocoa-900), var(--cocoa-950));
  color: var(--cream-100);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 36px;
}

.footer-inner p {
  color: var(--cream-200);
  max-width: 520px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  max-width: 420px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: rgba(255, 232, 214, 0.72);
  border-top: 1px solid rgba(255, 232, 214, 0.12);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

  .mobile-nav .nav-link {
    display: block;
  }

  .hero-inner {
    min-height: auto;
    padding: 50px 0;
  }

  .hero-panel .poster {
    min-height: 300px;
  }

  .movie-grid,
  .category-grid,
  .rank-layout {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar,
  .footer-inner,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-card {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 560px) {
  .site-header-inner {
    height: 66px;
  }

  .movie-grid,
  .category-grid,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-title h1,
  .detail-title {
    font-size: 34px;
  }

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

  .btn {
    width: 100%;
  }

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

  .detail-poster .poster {
    min-height: 360px;
  }
}
