:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-elevated: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius-small: 14px;
  --container: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(100%, var(--container));
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.logo-text {
  font-size: 1.14rem;
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.nav-link-muted {
  color: var(--muted);
}

.nav-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: #020617;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 0.65s ease, transform 1.1s ease;
}

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

.hero-shade,
.page-hero-shade,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.25)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.12) 44%, rgba(2, 6, 23, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, var(--container));
  min-height: 76vh;
  margin: 0 auto;
  padding: 132px 22px 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 740px;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.hero-tags,
.tag-cloud,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-tags span,
.tag-cloud span,
.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
  font-size: 0.82rem;
}

.hero-tags span,
.tag-cloud span {
  padding: 7px 11px;
}

.card-meta span,
.detail-meta span {
  padding: 6px 10px;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  padding: 0 24px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

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

.ghost-button {
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  width: min(100% - 44px, var(--container));
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.hero-rail {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(100% - 44px, var(--container));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.compact-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.compact-item:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(30, 41, 59, 0.86);
}

.compact-item img {
  width: 42px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.08);
}

.compact-item span {
  min-width: 0;
}

.compact-item strong,
.compact-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item strong {
  color: #fff;
  font-size: 0.92rem;
}

.compact-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.compact-rank {
  position: absolute;
  width: 28px;
  height: 28px;
  margin-left: -2px;
  margin-top: -34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
}

.section,
.page-main,
.detail-main {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 58px 22px;
}

.section-dark {
  width: 100%;
  max-width: none;
  padding-left: max(22px, calc((100vw - var(--container)) / 2 + 22px));
  padding-right: max(22px, calc((100vw - var(--container)) / 2 + 22px));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0));
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: #fff;
  line-height: 1.1;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

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

.text-link {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--accent);
}

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

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

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

.card-link {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: var(--radius-small);
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(59, 130, 246, 0.08)),
    var(--bg-card);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.64));
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

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

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

.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}

.card-year {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: rgba(245, 158, 11, 0.94);
}

.card-body h3 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--accent);
}

.card-body p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  gap: 6px;
}

.card-meta span {
  font-size: 0.72rem;
  padding: 4px 8px;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.88));
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 1;
}

.category-tile span {
  color: #fff;
  font-size: 1.18rem;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 500;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 32px;
  align-items: start;
}

.compact-list {
  display: grid;
  gap: 12px;
}

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

.movie-card-wide .card-link {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.movie-card-wide .card-poster {
  margin: 0;
}

.page-main,
.detail-main {
  padding-top: 34px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  margin-bottom: 30px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  display: flex;
  align-items: end;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.20), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.95));
  box-shadow: var(--shadow);
}

.page-hero > div:not(.page-hero-shade) {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 690px;
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.75;
}

.category-hero {
  background-size: cover;
  background-position: center;
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card a:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.52);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  background: var(--bg-card);
}

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

.category-overview-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.category-overview-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-body span {
  color: var(--accent);
  font-weight: 800;
}

.filter-panel {
  position: sticky;
  top: 82px;
  z-index: 20;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.search-box {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  padding: 0 14px;
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.10);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: var(--muted-strong);
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  border-color: rgba(245, 158, 11, 0.58);
  background: var(--accent-soft);
  color: #fff;
}

.empty-state {
  display: none;
  margin: 34px 0 0;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

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

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

.rank-row a {
  display: grid;
  grid-template-columns: 64px 74px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.52);
}

.rank-number {
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 74px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
}

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

.rank-content strong {
  color: #fff;
  font-size: 1.08rem;
}

.rank-content em {
  margin: 8px 0;
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.55;
}

.rank-content small {
  color: var(--muted);
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 30px;
  min-height: 450px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(14px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.62;
}

.detail-cover,
.detail-info {
  position: relative;
  z-index: 2;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  background: rgba(148, 163, 184, 0.08);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 5rem);
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0 22px;
  color: var(--muted-strong);
  font-size: 1.1rem;
  line-height: 1.8;
}

.detail-meta {
  margin-bottom: 18px;
}

.player-section {
  padding-top: 36px;
  padding-bottom: 36px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: calc(var(--radius) + 8px);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.20), rgba(2, 6, 23, 0.48) 40%, rgba(2, 6, 23, 0.76)),
    transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 20px 58px rgba(245, 158, 11, 0.34);
  font-size: 2.2rem;
  text-indent: 6px;
}

.play-overlay strong {
  font-size: 1.1rem;
}

.player-wrap.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.detail-content-grid {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 28px 22px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-article,
.detail-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.95;
}

.tag-cloud-large {
  margin-top: 6px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 38px 22px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.75;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--muted-strong);
}

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

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

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

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

  .hero-rail .compact-item:nth-child(n + 4) {
    display: none;
  }

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

  .detail-side {
    order: 2;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0 2px;
  }

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

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0;
  }

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

  .hero-content {
    padding-top: 110px;
    padding-bottom: 145px;
  }

  .hero-controls {
    bottom: 96px;
  }

  .hero-rail {
    grid-template-columns: 1fr;
  }

  .hero-rail .compact-item:nth-child(n + 2) {
    display: none;
  }

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

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

  .category-overview-card a {
    grid-template-columns: 1fr;
  }

  .category-thumbs {
    min-height: 190px;
  }

  .page-hero,
  .detail-hero {
    padding: 26px;
    border-radius: var(--radius);
  }

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

  .detail-cover {
    max-width: 250px;
  }

  .rank-row a {
    grid-template-columns: 44px 62px 1fr;
    gap: 10px;
  }

  .rank-row img {
    width: 62px;
    height: 84px;
  }

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

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

@media (max-width: 520px) {
  .section,
  .page-main,
  .detail-main,
  .detail-content-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-controls,
  .hero-rail {
    width: calc(100% - 32px);
  }

  .hero-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .movie-grid,
  .movie-grid-featured,
  .movie-grid-related {
    gap: 14px;
  }

  .movie-card-wide .card-link {
    grid-template-columns: 96px 1fr;
  }

  .card-body h3 {
    font-size: 0.94rem;
  }

  .card-body p {
    font-size: 0.8rem;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .rank-content em {
    display: none;
  }
}
