:root {
  --bg: #fffbeb;
  --paper: #ffffff;
  --paper-soft: #fff7ed;
  --ink: #292524;
  --muted: #78716c;
  --line: #e7e5e4;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --stone: #1c1917;
  --stone-soft: #44403c;
  --shadow: 0 18px 50px rgba(41, 37, 36, 0.14);
  --radius: 22px;
}

* {
  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(--ink);
  background: linear-gradient(180deg, #fffbeb 0%, #fafaf9 48%, #fff7ed 100%);
}

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

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

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 251, 235, 0.86);
  border-bottom: 1px solid rgba(214, 211, 209, 0.65);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-dark);
  white-space: nowrap;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #57534e;
  font-weight: 700;
  transition: 0.2s ease;
}

.main-nav a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
}

.hero-carousel {
  position: relative;
  margin: 28px auto 30px;
  border-radius: 30px;
  overflow: hidden;
  min-height: 560px;
  background: linear-gradient(135deg, #92400e, #f59e0b 55%, #b45309);
  box-shadow: var(--shadow);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-slide img[src=""],
.poster img[src=""],
.rank-cover img[src=""] {
  display: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(251, 191, 36, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.88) 0%, rgba(28, 25, 23, 0.62) 44%, rgba(28, 25, 23, 0.14) 100%),
    linear-gradient(180deg, rgba(28, 25, 23, 0.10), rgba(28, 25, 23, 0.65));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: min(760px, 100%);
  padding: clamp(34px, 7vw, 78px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-content h1,
.page-hero h1,
.detail-copy h1,
.player-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 950;
}

.hero-content p,
.page-hero p,
.detail-copy .lead,
.player-info p {
  margin: 0 0 20px;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.hero-tags,
.tag-list,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-list span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn,
.card-actions a,
.more-link,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn.primary,
.rank-play,
.card-actions a:last-child {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.22);
}

.btn.ghost,
.card-actions a:first-child,
.more-link {
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid rgba(146, 64, 14, 0.12);
}

.btn.text {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn:hover,
.card-actions a:hover,
.more-link:hover,
.rank-play:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-prev,
.hero-next,
.hero-dot {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
  color: var(--stone);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.35);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fbbf24;
}

.panel,
.section-block,
.rank-list {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(231, 229, 228, 0.8);
  box-shadow: 0 12px 40px rgba(68, 64, 60, 0.08);
}

.quick-search,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  margin-bottom: 28px;
}

.quick-search h2,
.section-head h2,
.detail-main h2,
.detail-side h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 950;
  color: #292524;
}

.quick-search p,
.section-head p,
.detail-main p,
.detail-side p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, 100%);
  padding: 8px 10px 8px 16px;
  border-radius: 16px;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
}

.search-box.wide {
  width: 100%;
}

.search-box span {
  color: var(--brand-dark);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
}

.category-tile {
  min-height: 112px;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #fffbeb, #fed7aa);
  border: 1px solid rgba(217, 119, 6, 0.14);
  transition: 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.14);
}

.category-tile strong {
  font-size: 20px;
  color: var(--brand-dark);
}

.category-tile span {
  color: var(--muted);
  font-weight: 700;
}

.section-block {
  padding: clamp(20px, 4vw, 34px);
  margin-bottom: 34px;
}

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

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

.movie-grid.compact {
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e7e5e4;
  box-shadow: 0 10px 28px rgba(68, 64, 60, 0.08);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 46px rgba(68, 64, 60, 0.14);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #a8a29e);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(28, 25, 23, 0.72));
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.poster-badge {
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(185, 28, 28, 0.92);
}

.poster-play {
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(217, 119, 6, 0.94);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 46px;
  font-size: 16px;
  line-height: 1.42;
  font-weight: 900;
  color: #292524;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.card-body p {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  min-height: 68px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-heat {
  display: block;
  margin-top: 10px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.card-actions {
  margin-top: 12px;
}

.card-actions a {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  flex: 1;
}

.page-hero {
  margin: 28px 0;
  padding: clamp(34px, 7vw, 70px);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.30), transparent 34%),
    linear-gradient(135deg, #92400e, #f59e0b 56%, #78350f);
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.small-hero.dark {
  background:
    radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.18), transparent 34%),
    linear-gradient(135deg, #1c1917, #44403c 56%, #78350f);
}

.detail-hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 28px auto 34px;
  border-radius: 30px;
  overflow: hidden;
  background: #1c1917;
  box-shadow: var(--shadow);
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  filter: blur(8px) scale(1.05) saturate(1.1);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(251, 191, 36, 0.14), transparent 32%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.62));
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 54px);
  min-height: 640px;
  padding: clamp(28px, 6vw, 68px);
}

.detail-poster {
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy {
  color: #fff;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.crumb a:hover {
  color: #fbbf24;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-bottom: 34px;
}

.detail-main,
.detail-side,
.player-info {
  padding: clamp(22px, 4vw, 34px);
}

.detail-main p {
  color: #57534e;
  font-size: 17px;
  line-height: 2;
  margin-bottom: 26px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px 16px;
}

.detail-side dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-side dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.player-page {
  margin-top: 28px;
}

.player-shell {
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-info {
  margin-top: 22px;
}

.player-info .crumb {
  color: var(--muted);
}

.player-info h1 {
  color: var(--ink);
  font-size: clamp(32px, 6vw, 58px);
}

.player-info p {
  color: #57534e;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 18px;
  margin-bottom: 34px;
}

.rank-row {
  display: grid;
  grid-template-columns: 68px 96px minmax(0, 1fr) 100px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e7e5e4;
}

.rank-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.rank-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #fef3c7, #a8a29e);
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.25;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  margin-top: 48px;
  padding: 38px 0;
  background: #1c1917;
  color: #fafaf9;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
}

.footer-inner strong {
  color: #fbbf24;
  font-size: 22px;
}

.footer-inner p {
  color: #d6d3d1;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-content: flex-start;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .detail-inner {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 820px) {
  main,
  .nav-wrap,
  .detail-hero,
  .footer-inner {
    width: min(100% - 24px, 1240px);
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 251, 235, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 32px 24px 92px;
    justify-content: flex-end;
  }

  .quick-search,
  .toolbar,
  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .detail-inner {
    align-items: end;
    min-height: auto;
  }

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

  .rank-row {
    grid-template-columns: 52px 76px minmax(0, 1fr);
  }

  .rank-play {
    grid-column: 2 / -1;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-prev,
  .hero-next {
    width: 42px;
    height: 42px;
  }

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

  .rank-cover {
    display: none;
  }
}
