:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-850: #241f1d;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-400: #a8a29e;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-100: #fef3c7;
  --white: #ffffff;
  --shadow-sm: 0 8px 20px rgba(12, 10, 9, .08);
  --shadow-md: 0 16px 36px rgba(12, 10, 9, .12);
  --shadow-xl: 0 28px 70px rgba(12, 10, 9, .28);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-900);
  background: var(--stone-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, .96);
  color: var(--stone-100);
  border-bottom: 1px solid rgba(245, 245, 244, .08);
  backdrop-filter: blur(12px);
}

.top-nav {
  width: min(100% - 32px, var(--max));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--amber-500);
  background: rgba(245, 158, 11, .12);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .25);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong,
.footer-brand {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: .02em;
}

.brand em {
  display: block;
  margin-top: 3px;
  color: var(--stone-400);
  font-size: 12px;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--stone-300);
}

.nav-link {
  transition: color .2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-500);
}

.nav-search {
  padding: 8px 14px;
  color: var(--stone-950);
  background: var(--amber-500);
  border-radius: 999px;
  font-weight: 700;
}

.nav-search:hover,
.nav-search.is-active {
  color: var(--stone-950);
  background: var(--amber-400);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--stone-100);
  transition: transform .2s ease, opacity .2s ease;
}

.mobile-panel {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 0 0 18px;
  color: var(--stone-200);
}

.mobile-panel a {
  display: block;
  padding: 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.mobile-panel.is-open {
  display: block;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 50%, rgba(245, 158, 11, .22), transparent 28%),
    linear-gradient(90deg, rgba(12, 10, 9, .92), rgba(12, 10, 9, .58) 48%, rgba(12, 10, 9, .08)),
    linear-gradient(0deg, rgba(12, 10, 9, .95), transparent 45%);
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 16vh;
  width: min(720px, calc(100% - 48px));
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 10px;
  color: var(--stone-950);
  background: var(--amber-500);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--amber-700);
  background: var(--amber-100);
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .98;
  letter-spacing: -.04em;
}

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

.hero-meta,
.page-stats,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.page-stats span {
  padding: 6px 12px;
  color: var(--stone-200);
  background: rgba(41, 37, 36, .82);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.primary-btn,
.quick-search button {
  color: var(--stone-950);
  background: var(--amber-500);
}

.primary-btn:hover,
.quick-search button:hover {
  background: var(--amber-400);
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--stone-100);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 44px;
  width: min(520px, calc(100% - 48px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.hero-dot {
  min-width: 0;
  padding: 8px;
  color: var(--stone-100);
  background: rgba(12, 10, 9, .58);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  text-align: left;
  backdrop-filter: blur(10px);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.hero-dot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 7px;
}

.hero-dot span {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-dot.is-active,
.hero-dot:hover {
  border-color: var(--amber-500);
  background: rgba(28, 25, 23, .84);
  transform: translateY(-2px);
}

.section-wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 64px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: center;
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.ranking-panel h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.intro-panel p,
.page-hero p {
  margin: 14px 0 0;
  color: var(--stone-600);
  font-size: 17px;
}

.quick-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--stone-900);
  background: var(--stone-50);
  outline: none;
}

.filter-bar select {
  max-width: 180px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.quick-search input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
}

.filter-bar span[data-filter-count] {
  min-width: max-content;
  padding: 10px 12px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 12px;
  font-weight: 800;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading a {
  color: var(--amber-700);
  font-weight: 800;
}

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

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

.list-grid {
  margin-top: 24px;
}

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(231, 229, 228, .92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, .42);
  box-shadow: var(--shadow-md);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: var(--stone-800);
  aspect-ratio: 3 / 4;
}

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

.card-link:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(12, 10, 9, .78), transparent);
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  left: 12px;
  color: var(--stone-100);
  background: rgba(12, 10, 9, .62);
}

.rank-badge {
  right: 12px;
  color: var(--stone-950);
  background: var(--amber-500);
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--stone-500);
  font-size: 12px;
}

.card-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: var(--stone-400);
}

.card-body h3 {
  margin: 8px 0 8px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.25;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.muted-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - var(--max)) / 2));
  padding-right: max(16px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(180deg, var(--stone-100), var(--stone-50));
}

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

.category-tile,
.category-overview-card a {
  display: block;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.category-covers,
.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 8px;
  background: var(--stone-900);
}

.category-covers img,
.category-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-tile div:last-child,
.category-overview-body {
  padding: 16px;
}

.category-tile strong,
.category-overview-body h2 {
  display: block;
  margin: 0;
  color: var(--stone-900);
  font-size: 19px;
}

.category-tile span,
.category-overview-body span {
  display: block;
  margin-top: 4px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 800;
}

.category-tile p,
.category-overview-body p {
  margin: 8px 0 0;
  color: var(--stone-600);
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  color: var(--stone-100);
  background: linear-gradient(140deg, var(--stone-950), var(--stone-800));
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
}

.ranking-panel h2 {
  color: var(--white);
}

.ranking-panel ol {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-panel a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.ranking-panel span {
  grid-row: span 2;
  color: var(--amber-500);
  font-weight: 900;
}

.ranking-panel strong {
  overflow: hidden;
  color: var(--stone-100);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-panel em {
  color: var(--stone-400);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  min-height: 420px;
  display: grid;
  align-items: end;
  padding: 110px max(24px, calc((100vw - var(--max)) / 2)) 70px;
  color: var(--white);
  background-color: var(--stone-950);
  background-position: center;
  background-size: cover;
}

.page-hero.slim-hero {
  min-height: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(245, 158, 11, .22), transparent 26%),
    linear-gradient(120deg, var(--stone-950), var(--stone-800));
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  max-width: 760px;
  color: var(--stone-300);
}

.page-stats {
  margin-top: 22px;
}

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

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

.search-filter {
  position: sticky;
  top: 82px;
  z-index: 20;
}

.detail-hero {
  padding: 34px max(16px, calc((100vw - var(--max)) / 2)) 0;
  background:
    radial-gradient(circle at 25% 0%, rgba(245, 158, 11, .18), transparent 28%),
    linear-gradient(180deg, var(--stone-950), var(--stone-900));
}

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

.breadcrumb a:hover {
  color: var(--amber-500);
}

.breadcrumb strong {
  color: var(--stone-100);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
  gap: 26px;
  align-items: stretch;
  padding-bottom: 44px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--white);
  background:
    radial-gradient(circle, rgba(245, 158, 11, .24), transparent 32%),
    linear-gradient(0deg, rgba(12, 10, 9, .76), rgba(12, 10, 9, .34));
  border: 0;
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, visibility .2s ease;
  pointer-events: auto;
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: var(--stone-950);
  background: var(--amber-500);
  border-radius: 999px;
  font-size: 36px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, .32);
}

.play-cover strong {
  font-size: 20px;
}

.detail-info-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 18px;
  color: var(--stone-100);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  backdrop-filter: blur(10px);
}

.detail-info-card > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.detail-info-card h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.detail-info-card p {
  margin: 0 0 16px;
  color: var(--stone-300);
}

.detail-info-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-info-card dt {
  color: var(--stone-400);
  font-size: 12px;
}

.detail-info-card dd {
  margin: 2px 0 0;
  color: var(--stone-100);
  font-weight: 700;
}

.detail-tags span {
  color: var(--stone-950);
  background: var(--amber-500);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.site-footer {
  margin-top: 40px;
  color: var(--stone-400);
  background: var(--stone-950);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

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

.footer-brand,
.site-footer h2 {
  color: var(--stone-100);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.site-footer p {
  max-width: 520px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--amber-500);
}

.footer-bottom {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 12px;
    font-size: 13px;
  }

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

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

  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .top-nav {
    min-height: 64px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-copy {
    bottom: 270px;
  }

  .hero-dots {
    left: 24px;
    right: 24px;
    bottom: 32px;
    width: auto;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-dot:nth-child(n + 5) {
    display: none;
  }

  .intro-panel,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar select {
    max-width: none;
  }

  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .brand strong {
    font-size: 17px;
  }

  .brand em {
    display: none;
  }

  .hero {
    min-height: 700px;
  }

  .hero-copy {
    left: 18px;
    bottom: 250px;
    width: calc(100% - 36px);
  }

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

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

  .hero-dots {
    left: 18px;
    right: 18px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .section-wrap {
    width: min(100% - 24px, var(--max));
    padding: 44px 0;
  }

  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    min-height: 300px;
    padding: 90px 18px 48px;
  }

  .detail-hero {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .detail-info-card > img {
    max-width: 180px;
  }

  .detail-info-card dl {
    grid-template-columns: 1fr;
  }

  .movie-video,
  .player-shell {
    min-height: 250px;
  }
}
