:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --orange: #f97316;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0, #f8fafc 18rem, #ffffff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.28);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-weight: 900;
  font-size: 20px;
  color: #78350f;
  letter-spacing: 0.02em;
}

.top-search {
  flex: 1;
  max-width: 460px;
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(146, 64, 14, 0.08);
}

.top-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
  min-width: 0;
  color: #78350f;
}

.top-search button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  padding: 9px 18px;
  cursor: pointer;
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #78350f;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  color: #78350f;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 22px 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  color: #78350f;
  border: 1px solid #fde68a;
}

.hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 22px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(245, 158, 11, 0.28), transparent 38%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.26)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 42px;
  align-items: center;
  padding: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.24);
  border: 1px solid rgba(252, 211, 77, 0.45);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  color: #fff;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 26px 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 14px 26px rgba(245, 158, 11, 0.32);
}

.ghost-btn {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

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

.hero-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
}

.hero-control {
  margin: -74px auto 0;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 26px;
}

.hero-control button {
  border: 0;
  cursor: pointer;
}

.hero-control > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 28px;
  backdrop-filter: blur(12px);
}

.hero-control div {
  display: flex;
  gap: 8px;
}

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

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

.stats-band {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats-band a {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fde68a;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--soft-shadow);
}

.stats-band strong {
  display: block;
  color: #b45309;
  font-size: 28px;
  line-height: 1;
}

.stats-band span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.content-section {
  max-width: 1280px;
  margin: 48px auto;
  padding: 0 22px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: #b45309;
  font-weight: 900;
}

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

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

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

.category-tile img,
.tile-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
}

.tile-shade {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.1));
}

.category-tile strong,
.category-tile em,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 24px;
  line-height: 1.1;
}

.category-tile em {
  margin-top: 6px;
  font-style: normal;
  color: #fde68a;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.6;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #78350f;
  background: #fef3c7;
}

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

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.card-meta {
  margin-top: 7px;
  font-size: 13px;
  color: #b45309;
  font-weight: 800;
}

.movie-card p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.tag-row span {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.page-hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 22px;
}

.page-hero > div {
  border-radius: 30px;
  padding: 54px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 20%, rgba(251, 191, 36, 0.32), transparent 30%),
    linear-gradient(135deg, #111827, #78350f 55%, #f97316);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(32px, 5vw, 60px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #fffbeb;
  line-height: 1.8;
}

.filter-panel {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 22px;
}

.filter-panel input {
  width: 100%;
  border: 1px solid #fde68a;
  border-radius: 22px;
  padding: 16px 18px;
  outline: 0;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row span {
  color: #92400e;
  font-weight: 900;
  margin-right: 4px;
}

.filter-row button {
  border: 1px solid #fde68a;
  background: #fff7ed;
  color: #92400e;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.filter-row button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

#resultCount {
  color: var(--muted);
  font-weight: 800;
}

.ranking-list {
  max-width: 1100px;
  margin: 34px auto 60px;
  padding: 0 22px;
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: #fbbf24;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fffbeb;
  color: #b45309;
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-main strong {
  font-size: 18px;
}

.rank-main em {
  margin-top: 5px;
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
}

.rank-score {
  justify-self: end;
  color: #b45309;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(12px) saturate(1.05);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.66)), linear-gradient(0deg, #020617, transparent);
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 22px 58px;
  color: #fff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: #fde68a;
  font-size: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(34px, 6vw, 70px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.detail-info .lead {
  max-width: 780px;
  color: #e2e8f0;
  line-height: 1.8;
  font-size: 18px;
}

.detail-tags {
  margin: 22px 0 28px;
}

.player-section {
  max-width: 1180px;
  margin: 42px auto 0;
  padding: 0 22px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.25));
  z-index: 3;
}

.player-overlay.is-hidden {
  display: none;
}

.big-play {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.36);
  font-size: 34px;
}

.player-overlay strong {
  font-size: 22px;
}

.detail-body {
  max-width: 1180px;
  margin: 42px auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-body article,
.detail-body aside {
  border-radius: 26px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

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

.detail-body p {
  color: #334155;
  line-height: 1.9;
}

.detail-body dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.detail-body dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-body dd {
  margin: 0;
  color: #0f172a;
}

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

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.footer-grid strong {
  color: #fff;
  font-size: 18px;
}

.footer-grid p {
  line-height: 1.8;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  padding: 18px;
  color: #94a3b8;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-nav.open {
    display: flex;
  }

  .hero-stage,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 38px 24px 92px;
  }

  .hero-poster {
    max-width: 220px;
    transform: none;
  }

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

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

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

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

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

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

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

  .rank-score {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero,
  .content-section,
  .page-hero,
  .filter-panel,
  .player-section,
  .detail-body,
  .detail-inner,
  .stats-band,
  .ranking-list {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-text {
    font-size: 17px;
  }

  .hero-stage,
  .hero-content {
    min-height: 650px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .detail-info .lead {
    font-size: 15px;
  }

  .stats-band,
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .page-hero > div {
    padding: 34px 22px;
  }
}
