:root {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #7c3aed;
  --rose: #f43f5e;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.11);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #eef2ff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-name {
  font-size: 21px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 13px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
  background: #eff6ff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 310px;
  padding: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.header-search input,
.mobile-panel input,
.filter-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.header-search button,
.mobile-panel button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 8px 15px;
  border-radius: 999px;
  font-weight: 800;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #eff6ff;
  border-radius: 12px;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-weight: 800;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #f1f5f9;
  border-radius: 16px;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 660px;
  width: min(1220px, calc(100% - 32px));
  margin: 26px auto 0;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 20%, rgba(96, 165, 250, 0.45), transparent 28rem),
    radial-gradient(circle at 82% 38%, rgba(168, 85, 247, 0.38), transparent 24rem),
    linear-gradient(135deg, #0f172a, #1e1b4b 54%, #172554);
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding: 74px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.72)),
    var(--hero-image) center / cover no-repeat;
  opacity: 0.45;
}

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

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker,
.category-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
}

.hero .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(191, 219, 254, 0.26);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 22px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-one-line {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  max-width: 740px;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags .tag,
.detail-copy .tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-button,
.wide-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.text-button {
  color: #bfdbfe;
  padding-left: 8px;
}

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

.hero-poster {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.poster-art {
  position: relative;
  display: block;
  width: 100%;
  min-height: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.58)),
    var(--poster-url) center / cover no-repeat,
    linear-gradient(135deg, #dbeafe, #ede9fe);
  transition: transform 0.35s ease;
}

.poster-link:hover .poster-art,
.hero-poster:hover .poster-art,
.detail-cover:hover .poster-art {
  transform: scale(1.055);
}

.duration-badge,
.play-float {
  position: absolute;
  z-index: 2;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.play-float {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.85);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-link:hover .play-float,
.detail-cover:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 74px;
  bottom: 46px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 7px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.hero-dot.is-active {
  background: #ffffff;
}

.content-section {
  width: min(1220px, calc(100% - 32px));
  margin: 58px auto;
}

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

.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.section-more,
.wide-link {
  color: #ffffff;
  background: #0f172a;
  white-space: nowrap;
}

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

.category-tile,
.category-card-large {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span:last-child,
.category-card-large p {
  color: var(--muted);
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  display: block;
  overflow: hidden;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3,
.ranking-body h2 {
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-body h3 a:hover,
.ranking-body h2 a:hover,
.library-link:hover span {
  color: var(--primary);
}

.card-body p,
.ranking-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact .card-body p {
  display: none;
}

.card-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.card-score span:first-child {
  color: #f59e0b;
}

.side-panel,
.fact-card,
.story-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.side-panel {
  position: sticky;
  top: 96px;
}

.side-panel h2,
.fact-card h2,
.story-card h2 {
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.side-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-number {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 11px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-info {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: 64px;
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.32), transparent 28rem),
    linear-gradient(135deg, #0f172a, #172554 58%, #312e81);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 900px;
}

.slim-hero,
.search-hero,
.library-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
}

.channel-hero,
.ranking-hero {
  min-height: 370px;
  display: flex;
  align-items: center;
}

.category-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-card-head strong {
  color: var(--primary);
  font-size: 13px;
}

.category-mini-links {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.category-mini-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 12px;
  font-weight: 800;
}

.category-mini-links span {
  color: var(--muted);
  font-size: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto 150px;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.filter-search {
  padding: 11px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

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

.filter-buttons button,
.filter-bar select {
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.filter-buttons button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-index {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.86);
  border-radius: 13px;
  font-weight: 900;
}

.ranking-body {
  padding: 6px 0;
}

.ranking-body h2 {
  font-size: 24px;
}

.ranking-body .card-score {
  justify-content: flex-start;
  gap: 18px;
}

.ranking-body .card-score a {
  color: var(--primary);
}

.detail-hero {
  padding: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.62)),
    var(--hero-image) center / cover no-repeat,
    linear-gradient(135deg, #0f172a, #1d4ed8);
}

.detail-hero-inner {
  padding: 34px 64px 68px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  margin-bottom: 34px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

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

.detail-cover {
  display: block;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 66px);
}

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

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.watch-main {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #030712;
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #030712;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.28), transparent 22rem),
    linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.72));
  border: 0;
  cursor: pointer;
  text-align: center;
}

.player-card.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
  font-size: 28px;
}

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

.player-overlay em {
  color: #bfdbfe;
  font-style: normal;
  font-weight: 800;
}

.story-card p {
  margin: 0 0 22px;
  color: #334155;
  font-size: 16px;
}

.fact-grid {
  display: grid;
  gap: 10px;
}

.fact-grid div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.fact-grid span {
  color: var(--muted);
}

.fact-grid strong {
  text-align: right;
}

.related-rank {
  margin-top: 18px;
}

.library-year {
  margin-bottom: 34px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.library-year h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

.library-link {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 14px;
}

.library-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.library-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
}

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

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 680px;
  margin: 10px 0 0;
}

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

.footer-links a {
  padding: 8px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

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

  .header-search {
    margin-left: auto;
  }

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

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

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

  .side-panel,
  .detail-sidebar {
    position: static;
  }

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

@media (max-width: 820px) {
  .header-inner {
    height: 66px;
  }

  .brand-name {
    font-size: 18px;
  }

  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .hero,
  .page-hero,
  .detail-hero {
    width: min(100% - 20px, 1220px);
    border-radius: 24px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 24px 86px;
    gap: 24px;
  }

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

  .hero-poster {
    width: min(260px, 72vw);
  }

  .hero-controls {
    left: 24px;
    bottom: 30px;
  }

  .content-section {
    width: min(100% - 20px, 1220px);
    margin: 42px auto;
  }

  .section-heading {
    display: block;
  }

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

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

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

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

  .ranking-card {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .ranking-body h2 {
    font-size: 18px;
  }

  .page-hero {
    padding: 34px 24px;
  }

  .detail-hero-inner {
    padding: 24px;
  }

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

  .detail-cover {
    width: min(260px, 76vw);
  }

  .library-links {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 24px;
  }
}

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

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

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