:root {
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-500: #a8a29e;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --amber-200: #fde68a;
  --amber-100: #fef3c7;
  --paper: #fffaf0;
  --shadow: 0 20px 50px rgba(41, 37, 36, 0.18);
  --soft-shadow: 0 12px 28px rgba(41, 37, 36, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-900);
  background: linear-gradient(180deg, var(--stone-100) 0%, #fff7ed 52%, #fff 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(41, 37, 36, 0.92);
  border-bottom: 1px solid rgba(253, 230, 138, 0.18);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.32);
}

.brand-text {
  font-size: 1.35rem;
}

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

.nav-link,
.mobile-link {
  color: var(--amber-100);
  font-size: 0.95rem;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--amber-100);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  background: rgba(41, 37, 36, 0.96);
}

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

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

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

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

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

.hero-slide.active img {
  animation: heroFloat 8s ease forwards;
}

@keyframes heroFloat {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1.12);
  }
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.25), transparent 30%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.76) 43%, rgba(28, 25, 23, 0.34) 72%, rgba(28, 25, 23, 0.66) 100%),
    linear-gradient(0deg, rgba(28, 25, 23, 1) 0%, transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1280px;
  margin: 0 auto;
  min-height: min(760px, 85vh);
  padding: 118px 24px 82px;
  display: flex;
  align-items: center;
}

.hero-text {
  max-width: 720px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(253, 230, 138, 0.38);
  border-radius: 999px;
  color: var(--amber-200);
  background: rgba(146, 64, 14, 0.38);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 18px 0 0;
  max-width: 680px;
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.83);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-row span,
.info-chip,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-meta span,
.detail-meta span,
.info-chip {
  padding: 8px 12px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

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

.btn-primary {
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.hero-dot.active {
  width: 32px;
  background: var(--amber-300);
}

main {
  display: block;
}

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 78px;
}

.section {
  margin-top: 70px;
}

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

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

.section-title,
.page-hero h1,
.detail-section h2 {
  color: var(--stone-900);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin: 0;
}

.section-subtitle,
.page-hero p,
.detail-section p,
.card-body p,
.category-card p {
  color: var(--stone-600);
  line-height: 1.75;
}

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

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

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

.poster-card {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--stone-800);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow);
}

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

.poster-card:hover img {
  transform: scale(1.09);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 5px 9px;
  border-radius: 10px;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.86) 100%);
}

.poster-info {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: #fff;
}

.poster-info h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 850;
}

.poster-info p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.card-body {
  padding: 12px 2px 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--amber-800);
  background: var(--amber-100);
}

.card-body p {
  margin: 0;
  font-size: 0.92rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(180, 83, 9, 0.18);
  background: linear-gradient(135deg, #fff 0%, #fffbeb 55%, #fed7aa 160%);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--stone-900);
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  font-size: 0.96rem;
}

.category-card strong {
  display: inline-flex;
  margin-top: 18px;
  color: var(--amber-700);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 24px;
}

.rank-panel,
.search-panel,
.detail-card,
.info-panel {
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.rank-panel {
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(245, 245, 244, 0.7);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: var(--amber-100);
  transform: translateX(4px);
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item strong {
  font-style: normal;
  color: var(--stone-900);
  font-weight: 850;
}

.rank-item em {
  margin-top: 5px;
  color: var(--stone-600);
  font-size: 0.86rem;
  font-style: normal;
  line-height: 1.5;
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  font-weight: 900;
}

.page-hero {
  padding: 58px 0 34px;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: 1.08rem;
}

.search-panel {
  padding: 22px;
  margin-bottom: 28px;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span,
.filter-row > span {
  color: var(--stone-700);
  font-weight: 850;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--stone-200);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--stone-900);
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 16px;
}

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

.filter-chip {
  border: 1px solid rgba(180, 83, 9, 0.18);
  padding: 8px 12px;
  color: var(--stone-700);
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--stone-950);
  border-color: var(--amber-500);
  background: var(--amber-100);
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  color: var(--stone-600);
  font-weight: 700;
}

.empty-state.show {
  display: block;
}

.detail-hero {
  position: relative;
  background: linear-gradient(135deg, var(--stone-950), var(--stone-900));
  color: #fff;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.22;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.08);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 62px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: min(114px, 26vw);
  height: min(114px, 26vw);
  border: 0;
  border-radius: 999px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  box-shadow: 0 22px 44px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  padding-left: 8px;
}

.detail-title {
  padding: 6px 0;
}

.detail-title h1 {
  color: #fff;
}

.detail-title p {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
  font-size: 1.05rem;
}

.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-card,
.info-panel {
  padding: 26px;
}

.detail-section + .detail-section {
  margin-top: 34px;
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 1.65rem;
}

.detail-section p {
  margin: 0;
  font-size: 1.02rem;
}

.info-grid {
  display: grid;
  gap: 14px;
}

.info-item {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stone-200);
}

.info-item span {
  color: var(--stone-500);
  font-size: 0.88rem;
  font-weight: 800;
}

.info-item strong {
  color: var(--stone-900);
  font-size: 1rem;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.info-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--amber-800);
  background: var(--amber-100);
  font-size: 0.85rem;
  font-weight: 800;
}

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

.library-actions {
  margin-top: 20px;
}

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

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

  .player-layout,
  .detail-main,
  .rank-layout {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    height: 64px;
    padding: 0 18px;
  }

  .brand-text {
    font-size: 1.15rem;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding: 92px 18px 76px;
  }

  .section-head {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

  .page-wrap,
  .detail-wrap,
  .detail-main {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .filter-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .poster-info h3 {
    font-size: 0.9rem;
  }

  .card-body p {
    display: none;
  }

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

.page-wrap .btn-ghost {
  color: var(--amber-800);
  background: rgba(254, 243, 199, 0.72);
  border-color: rgba(180, 83, 9, 0.16);
}

.detail-hero .btn-ghost,
.hero .btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.site-footer {
  color: var(--stone-300);
  background: var(--stone-950);
  border-top: 1px solid rgba(253, 230, 138, 0.14);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--stone-500);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--amber-100);
  font-weight: 700;
}

.footer-links a:hover,
.footer-brand:hover {
  color: var(--amber-300);
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 30px;
  color: var(--stone-500);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .footer-inner {
    display: grid;
  }
}

