:root {
  --primary-50: #faf8f5;
  --primary-100: #f5f0e8;
  --primary-400: #c9aa78;
  --primary-500: #b8915a;
  --primary-600: #a67c4a;
  --primary-700: #8a6640;
  --secondary-50: #f0f9ff;
  --secondary-600: #0284c7;
  --accent-50: #fffbeb;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 10px 25px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 24px 60px rgba(28, 25, 23, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--neutral-800);
  background: var(--neutral-50);
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: 0 10px 20px rgba(166, 124, 74, 0.22);
  font-size: 15px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  color: var(--neutral-900);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--neutral-500);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: var(--neutral-700);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary-600);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  color: var(--neutral-800);
  font-size: 22px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
  padding: 10px 18px 18px;
}

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

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.72) 42%, rgba(255, 255, 255, 0.12) 100%);
}

.hero-inner {
  position: relative;
  height: 100%;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
}

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

.hero-kicker,
.section-title span,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-600);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
  margin: 16px 0 20px;
  color: var(--neutral-900);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 670px;
  margin: 0 0 28px;
  color: var(--neutral-700);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

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

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

.btn-primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 12px 26px rgba(166, 124, 74, 0.25);
}

.btn-primary:hover {
  background: var(--primary-700);
  box-shadow: 0 18px 34px rgba(166, 124, 74, 0.32);
}

.btn-light {
  color: var(--neutral-900);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(166, 124, 74, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(166, 124, 74, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-soft {
  background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

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

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

.section-title h2,
.page-title h1 {
  margin: 8px 0 0;
  color: var(--neutral-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--neutral-600);
  line-height: 1.8;
}

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

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

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

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

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--neutral-200);
}

.movie-card-small .movie-poster {
  aspect-ratio: 4 / 3;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img,
.rank-card:hover .rank-thumb img,
.related-card:hover img {
  transform: scale(1.06);
}

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 62%);
  transition: opacity 0.25s ease;
}

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

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.78);
  border-radius: 999px;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  z-index: 2;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 18px;
}

.movie-card h3,
.rank-card h3,
.related-card h3 {
  margin: 8px 0 8px;
  color: var(--neutral-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a,
.rank-card h3 a,
.related-card h3 a {
  transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover,
.related-card h3 a:hover {
  color: var(--primary-600);
}

.movie-card p,
.rank-card p,
.related-card p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.65;
}

.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--neutral-500);
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 999px;
  background: var(--neutral-300, #d6d3d1);
  vertical-align: middle;
}

.mini-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 700;
}

.scroll-row {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 14px;
}

.scroll-track {
  display: flex;
  gap: 18px;
  min-width: max-content;
}

.scroll-track .movie-card {
  width: 320px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: var(--radius);
  color: var(--neutral-900);
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.category-card span {
  display: inline-flex;
  margin-top: 20px;
  color: var(--primary-600);
  font-size: 14px;
  font-weight: 800;
}

.page-hero {
  padding: 64px 0 44px;
  background: linear-gradient(135deg, var(--white), var(--secondary-50), var(--primary-50));
  border-bottom: 1px solid var(--neutral-200);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--neutral-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-600);
  font-weight: 800;
}

.search-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 34px;
  padding: 18px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-input {
  flex: 1 1 320px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  outline: none;
  color: var(--neutral-800);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(184, 145, 90, 0.16);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filter-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--neutral-700);
  font-weight: 800;
  cursor: pointer;
}

.filter-tab.is-active {
  border-color: var(--primary-600);
  color: var(--white);
  background: var(--primary-600);
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 160px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--neutral-200);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.rank-body h3 {
  margin-top: 0;
}

.movie-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
  gap: 30px;
  align-items: start;
}

.detail-card,
.sidebar-card,
.player-card {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--neutral-900);
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-lead {
  margin: 22px 0;
  color: var(--neutral-700);
  font-size: 19px;
  line-height: 1.8;
  font-weight: 700;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--neutral-200);
}

.detail-section h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  color: var(--neutral-900);
  font-size: 22px;
}

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

.review-box {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--primary-50);
}

.player-card {
  margin-bottom: 24px;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.12));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.sidebar-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--neutral-50);
  transition: background 0.2s ease;
}

.related-card:hover {
  background: var(--primary-50);
}

.related-card .thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--neutral-200);
}

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

.related-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.related-card p {
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 48px 16px;
  text-align: center;
  color: var(--neutral-500);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  padding: 44px 0;
  color: var(--neutral-600);
  background: var(--white);
  border-top: 1px solid var(--neutral-200);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  color: var(--neutral-900);
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--primary-600);
}

@media (max-width: 1024px) {
  .card-grid,
  .card-grid-four,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 780px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: auto;
    min-height: 600px;
  }

  .hero-inner {
    padding: 92px 0 84px;
  }

  .hero h1,
  .hero h2 {
    letter-spacing: -0.04em;
  }

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

  .card-grid,
  .card-grid-four,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: auto 112px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 13px;
  }

  .related-card {
    grid-template-columns: 104px 1fr;
  }
}

@media (max-width: 520px) {
  .brand-sub {
    display: none;
  }

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

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

  .btn {
    width: 100%;
  }

  .scroll-track .movie-card {
    width: 280px;
  }

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

  .rank-thumb {
    width: 100%;
  }

  .rank-number {
    position: absolute;
    margin: 10px;
    z-index: 3;
  }

  .detail-card {
    padding: 22px;
  }
}
