:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --cyan: #22d3ee;
  --rose: #fb7185;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

img.hide-image {
  opacity: 0;
}

button,
input {
  font: inherit;
}

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

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

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.38);
}

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

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.15);
}

.header-search,
.mobile-search,
.big-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  width: 310px;
}

.header-search input,
.mobile-search input,
.big-search input,
.page-search input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.page-search input:focus,
.filter-bar input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.header-search button,
.mobile-search button,
.big-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.page-search button:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-panel {
  display: none;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-slide > img,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.16) 58%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 78px;
  z-index: 2;
  max-width: 760px;
  padding-right: 24px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.detail-facts span,
.detail-facts a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 12px;
}

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

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

.btn.primary {
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  color: #fff;
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.35);
}

.btn.ghost,
.btn.subtle {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.28);
  color: #fff;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  color: #fff;
  cursor: pointer;
  font-size: 32px;
  backdrop-filter: blur(14px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 32px;
  background: #fff;
}

main {
  overflow: hidden;
}

.home-search-panel,
.section-block,
.page-hero,
.detail-shell,
.footer-grid,
.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -38px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.home-search-panel h2,
.section-head h2,
.category-preview h2,
.category-card-body h2,
.detail-copy h2,
.wide-card h2,
.movie-card h2 {
  margin: 0;
}

.home-search-panel p,
.section-head p,
.category-preview p,
.category-card-body p,
.page-hero p,
.detail-line,
.movie-desc,
.wide-card p,
.detail-copy p,
.site-footer p {
  color: var(--muted-strong);
  line-height: 1.75;
}

.big-search input,
.page-search input,
.mobile-search input {
  padding: 14px 16px;
}

.big-search button,
.page-search button,
.mobile-search button {
  padding: 14px 20px;
}

.section-block {
  padding: 70px 0 0;
}

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

.section-head.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.04em;
}

.text-link {
  color: #93c5fd;
  font-weight: 800;
}

.text-link:hover {
  color: #fff;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.64));
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 24px 76px rgba(15, 23, 42, 0.38);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.5), rgba(2, 6, 23, 0.92));
}

.poster-wrap img,
.wide-thumb img,
.mini-card img,
.category-mosaic img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-wrap img,
.mini-card:hover img,
.wide-card:hover img,
.category-card-large:hover img {
  transform: scale(1.05);
}

.poster-score,
.poster-play,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.poster-score {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.poster-play {
  left: 10px;
  bottom: 10px;
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-card h2 {
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.wide-card h2 a:hover {
  color: #93c5fd;
}

.movie-meta {
  margin: 8px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  margin: 0 0 12px;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.tag-row span {
  background: rgba(59, 130, 246, 0.1);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 22px;
}

.ranking-panel,
.quick-category-panel,
.category-preview,
.detail-copy,
.player-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 68px rgba(0, 0, 0, 0.2);
}

.ranking-panel,
.quick-category-panel,
.detail-copy,
.player-section {
  padding: 24px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
}

.wide-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.18);
}

.rank-num {
  left: 8px;
  top: 8px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.78);
}

.wide-card h2 {
  font-size: 17px;
}

.wide-card p {
  margin: 6px 0 8px;
  font-size: 13px;
}

.category-pill-grid {
  display: grid;
  gap: 10px;
}

.category-pill-grid a {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  color: #dbeafe;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-pill-grid a:hover {
  transform: translateX(4px);
  border-color: rgba(96, 165, 250, 0.48);
}

.category-showcase {
  padding-bottom: 70px;
}

.category-preview {
  padding: 22px;
  margin-bottom: 18px;
}

.category-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.category-preview p {
  margin: 8px 0 0;
}

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

.mini-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
}

.mini-card img {
  aspect-ratio: 16 / 11;
  background: rgba(59, 130, 246, 0.18);
}

.mini-card span {
  display: block;
  padding: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 24px;
  align-items: end;
  min-height: 300px;
  padding: 88px 0 36px;
}

.slim-hero,
.ranking-hero,
.latest-hero,
.search-hero {
  grid-template-columns: minmax(0, 780px);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  font-size: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.filter-bar input {
  max-width: 420px;
  padding: 13px 16px;
}

.category-large-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 70px;
}

.category-card-large {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card-large:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.5);
}

.category-card-link {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 210px;
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  overflow: hidden;
  background: rgba(59, 130, 246, 0.18);
}

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

.category-card-body span {
  color: #93c5fd;
  font-weight: 900;
}

.ranking-list-page {
  padding-bottom: 70px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(1px) saturate(1.1);
}

.detail-overlay {
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.45) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 66%, rgba(2, 6, 23, 0.9) 100%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  min-height: 620px;
  padding: 96px 0 56px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(2, 6, 23, 0.9));
  box-shadow: var(--shadow);
}

.detail-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted-strong);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: 20px;
}

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

.player-section {
  margin-top: 70px;
}

.watch-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.44);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.18), rgba(2, 6, 23, 0.7));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  width: clamp(72px, 10vw, 112px);
  height: clamp(72px, 10vw, 112px);
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  color: #fff;
  font-size: 38px;
  box-shadow: 0 22px 64px rgba(37, 99, 235, 0.42);
}

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

.detail-copy h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-copy p {
  margin: 0 0 24px;
  font-size: 17px;
}

.detail-facts {
  margin-top: 12px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-brand {
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: #fff;
  border-color: rgba(96, 165, 250, 0.48);
}

.footer-bottom {
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.empty-results {
  grid-column: 1 / -1;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted-strong);
  text-align: center;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

  .category-card-link {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

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

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

  .mobile-panel {
    position: fixed;
    inset: 72px 0 auto;
    z-index: 99;
    display: grid;
    gap: 12px;
    padding: 18px;
    background: rgba(2, 6, 23, 0.96);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.28s ease;
  }

  body.menu-open .mobile-panel {
    transform: translateY(0);
  }

  .mobile-link {
    padding: 14px 16px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    left: 18px;
    bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .page-hero,
  .split-section,
  .detail-shell,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search-panel {
    margin-top: 18px;
  }

  .big-search,
  .page-search,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar input {
    max-width: none;
  }

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

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

  .category-mosaic {
    height: 210px;
  }

  .detail-poster {
    width: min(260px, 78vw);
  }

  .detail-shell {
    gap: 24px;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .home-search-panel,
  .section-block,
  .page-hero,
  .detail-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1240px);
  }

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

  .hero-slider {
    height: 520px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

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

  .section-block {
    padding-top: 48px;
  }

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

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

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

  .movie-desc {
    min-height: auto;
  }

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

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

  .player-section,
  .ranking-panel,
  .quick-category-panel,
  .detail-copy {
    padding: 16px;
  }

  .watch-player {
    border-radius: 18px;
  }
}
