:root {
  color-scheme: light;
  --page-bg: #fffaf0;
  --paper: #ffffff;
  --paper-soft: rgba(255, 255, 255, 0.82);
  --ink: #19150c;
  --muted: #71624a;
  --soft: #9a8765;
  --line: rgba(120, 90, 32, 0.16);
  --gold: #f6b71a;
  --gold-deep: #d99405;
  --amber: #fff3c4;
  --orange: #f97316;
  --dark: #18120a;
  --shadow: 0 24px 70px rgba(92, 62, 9, 0.16);
  --radius: 28px;
  --radius-card: 22px;
  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;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 102, 0.42), transparent 32rem),
    radial-gradient(circle at top right, rgba(255, 160, 64, 0.22), transparent 30rem),
    linear-gradient(135deg, #fff9e8 0%, #ffffff 44%, #fff2c9 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 240, 0.86);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-weight: 900;
  color: #141008;
  background: linear-gradient(135deg, #fff2b0 0%, var(--gold) 48%, #f59e0b 100%);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.36);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.brand.dark .brand-copy small,
.brand.dark .brand-copy strong {
  color: #fff7d6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4d412f;
  font-weight: 700;
  transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #171006;
  background: rgba(246, 183, 26, 0.22);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(246, 183, 26, 0.18);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--ink);
}

main {
  overflow: hidden;
}

.hero {
  padding: 28px 0 34px;
}

.hero-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
}

.hero-viewport {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border-radius: 36px;
  background: #241809;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 36px;
  padding: 64px;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 12, 4, 0.96) 0%, rgba(38, 23, 4, 0.76) 44%, rgba(38, 23, 4, 0.18) 100%),
    linear-gradient(0deg, rgba(13, 8, 2, 0.58), rgba(13, 8, 2, 0.18)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.08);
}

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

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  color: #7a4a02;
  background: rgba(255, 216, 96, 0.26);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-kicker {
  color: #ffe68d;
  background: rgba(246, 183, 26, 0.18);
  border: 1px solid rgba(255, 225, 120, 0.24);
}

.hero h1 {
  margin: 22px 0 16px;
  max-width: 760px;
  color: #fff7d6;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 250, 229, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags {
  margin-top: 22px;
}

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

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

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

.btn.primary {
  color: #1d1304;
  background: linear-gradient(135deg, #fff0a3 0%, var(--gold) 52%, #f59e0b 100%);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.34);
}

.btn.ghost {
  color: #fff7d6;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 245, 205, 0.22);
}

.btn.text {
  color: #ffe28a;
  background: transparent;
  padding-inline: 8px;
}

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(246, 183, 26, 0.24), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 64px;
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  width: 56px;
  background: var(--gold);
}

.hero-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-rail > span {
  color: #7a4a02;
  font-weight: 900;
}

.hero-mini-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--dark);
  box-shadow: 0 12px 32px rgba(71, 48, 11, 0.16);
}

.hero-mini-card img {
  height: 126px;
  object-fit: cover;
  opacity: 0.75;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.hero-mini-card span {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 2;
  color: #fff9df;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-mini-card:hover img {
  opacity: 0.95;
  transform: scale(1.08);
}

.quick-search,
.content-section,
.filter-panel,
.page-hero,
.breadcrumb,
.detail-hero,
.detail-section,
.player-section {
  width: min(1220px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.quick-search h2,
.filter-panel h2,
.section-heading h2,
.detail-section h2,
.page-hero h1 {
  margin: 8px 0 0;
  color: var(--ink);
  letter-spacing: -0.05em;
}

.home-search-box {
  display: flex;
  gap: 12px;
}

.home-search-box input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 2px solid rgba(180, 135, 28, 0.16);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--ink);
  background: #fffefa;
  outline: none;
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

.home-search-box input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(246, 183, 26, 0.16);
}

.content-section {
  padding: 64px 0 10px;
}

.warm-section {
  padding: 64px 24px 34px;
  width: min(1268px, calc(100% - 16px));
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(255, 246, 211, 0.9), rgba(255, 251, 241, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.88);
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 48px);
}

.section-heading p,
.filter-panel p,
.page-hero p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: #7a4a02;
  background: rgba(246, 183, 26, 0.18);
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(92, 62, 9, 0.12);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(92, 62, 9, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fff3c4, #f7c948 54%, #372409);
}

.poster-frame img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
}

.rank-badge {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: #1b1204;
  background: var(--gold);
  font-weight: 1000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-meta {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2,
.ranking-copy h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
  letter-spacing: -0.04em;
}

.movie-card h2 a:hover,
.ranking-copy h2 a:hover,
.category-samples a:hover {
  color: #b16b02;
}

.movie-card p,
.ranking-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.movie-card.compact p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #7a4a02;
  background: rgba(246, 183, 26, 0.16);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #fff0a6;
  background: rgba(255, 255, 255, 0.12);
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 14px;
  border-radius: 999px;
  color: #1d1304;
  background: rgba(246, 183, 26, 0.22);
  font-weight: 900;
}

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

.category-card,
.category-overview-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(92, 62, 9, 0.1);
}

.category-main-link {
  display: grid;
  gap: 8px;
}

.category-main-link span,
.category-overview-card h2 {
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: -0.05em;
}

.category-main-link strong,
.category-overview-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-samples a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(246, 183, 26, 0.14);
  color: #5e4216;
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-list.slim {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranking-item {
  display: grid;
  grid-template-columns: 92px 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff3c4, #f6b71a);
}

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

.ranking-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #1d1304;
  background: var(--gold);
  font-weight: 1000;
}

.ranking-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #1d1304;
  background: rgba(246, 183, 26, 0.22);
  font-weight: 900;
}

.page-hero {
  margin-top: 34px;
  padding: 58px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 85% 20%, rgba(246, 183, 26, 0.42), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 243, 196, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.page-hero .kicker {
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.page-hero p {
  margin-left: auto;
  margin-right: auto;
}

.center-actions {
  justify-content: center;
}

.center-actions .btn.ghost,
.page-hero .btn.ghost {
  color: #694a12;
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(180, 135, 28, 0.18);
}

.filter-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-top: 28px;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 44px rgba(92, 62, 9, 0.1);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff3c4, #f6b71a);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #b16b02;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 22px;
  padding: 32px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 90% 10%, rgba(246, 183, 26, 0.44), transparent 26rem),
    linear-gradient(135deg, #1b1206 0%, #3c2508 48%, #fff3c4 160%);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff3c4, #f6b71a);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 18px 0 16px;
  color: #fff7d6;
  font-size: clamp(34px, 5.5vw, 66px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 250, 229, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff1ad;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 245, 205, 0.16);
  font-weight: 800;
}

.detail-tags {
  margin-top: 16px;
}

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

.compact-heading {
  margin-bottom: 16px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  border: 0;
  color: #fff7d6;
  background:
    linear-gradient(0deg, rgba(9, 7, 4, 0.76), rgba(9, 7, 4, 0.24)),
    radial-gradient(circle at center, rgba(246, 183, 26, 0.24), transparent 26rem);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(246, 183, 26, 0.24);
  border: 1px solid rgba(255, 240, 163, 0.48);
  box-shadow: 0 0 0 12px rgba(246, 183, 26, 0.08);
}

.play-ring span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff1a6;
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 46px);
  letter-spacing: -0.05em;
}

.player-cover em {
  font-style: normal;
  color: #ffe28a;
  font-weight: 900;
}

.detail-section {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 44px rgba(92, 62, 9, 0.1);
}

.detail-section h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.detail-section p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.site-footer {
  margin-top: 74px;
  color: rgba(255, 250, 229, 0.76);
  background:
    radial-gradient(circle at top right, rgba(246, 183, 26, 0.22), transparent 24rem),
    #151008;
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 36px;
  padding: 54px 0 38px;
}

.footer-brand p {
  max-width: 560px;
  color: rgba(255, 250, 229, 0.64);
  line-height: 1.8;
}

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

.footer-columns h2 {
  margin: 0 0 14px;
  color: #ffe28a;
  font-size: 18px;
}

.footer-columns a {
  display: block;
  margin: 10px 0;
  color: rgba(255, 250, 229, 0.68);
}

.footer-columns a:hover {
  color: var(--gold);
}

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: rgba(255, 250, 229, 0.48);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1120px) {
  .hero-shell,
  .detail-hero,
  .filter-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .hero-rail > span {
    grid-column: 1 / -1;
  }

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

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

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

  .footer-inner {
    gap: 18px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 250, 240, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    min-height: 680px;
    padding: 30px;
  }

  .hero-viewport {
    min-height: 680px;
    border-radius: 28px;
  }

  .hero-poster {
    width: min(62vw, 260px);
    justify-self: center;
    order: -1;
  }

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

  .hero-rail,
  .quick-search,
  .ranking-list.slim,
  .category-overview-grid,
  .category-overview-card,
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .home-search-box {
    flex-direction: column;
  }

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

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

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

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

  .detail-hero {
    padding: 20px;
  }

  .detail-poster {
    width: min(68vw, 280px);
    justify-self: center;
  }

  .ranking-item {
    grid-template-columns: 74px 42px minmax(0, 1fr);
  }

  .ranking-play {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    display: none;
  }

  .movie-grid,
  .catalog-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .content-section {
    padding-top: 44px;
  }

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