:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --orange: #fb923c;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.48);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 14%, rgba(99, 102, 241, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.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);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.32);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #e0f2fe;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 28%, transparent 64%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 96px;
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 999px;
  padding: 7px 12px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.42);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 26px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.detail-copy .btn {
  margin-right: 12px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
}

.btn-ghost {
  color: #e0f2fe;
  border-color: rgba(224, 242, 254, 0.22);
  background: rgba(15, 23, 42, 0.52);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.58);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.86);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.home-search {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search h2,
.page-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.home-search p,
.page-hero p,
.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-bar {
  display: flex;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.58);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  padding: 0 16px;
  background: transparent;
}

.search-bar button {
  border: 0;
  padding: 0 22px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  background: var(--accent-strong);
}

.category-pills {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pills a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--line);
  font-size: 14px;
}

.section-block {
  padding-block: 56px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-title.with-link {
  justify-content: space-between;
  align-items: flex-end;
}

.section-title h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.section-title a,
.text-link {
  color: #7dd3fc;
  font-weight: 700;
}

.section-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.section-icon.orange {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(251, 146, 60, 0.22);
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.5);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), transparent 56%);
}

.type-badge,
.score-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
}

.type-badge {
  left: 10px;
}

.score-badge {
  right: 10px;
  color: #fef3c7;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  opacity: 0;
  background: rgba(14, 165, 233, 0.88);
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 15px;
}

.card-info strong {
  color: #fff;
  line-height: 1.35;
  min-height: 2.7em;
}

.card-line {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-meta {
  margin-top: auto;
  color: #64748b;
  font-size: 13px;
}

.movie-card-wide {
  grid-column: span 2;
}

.movie-card-wide .poster-frame {
  aspect-ratio: 21 / 9;
}

.scroll-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scrollbar-width: thin;
}

.scroll-row .movie-card {
  width: 300px;
  flex: 0 0 auto;
}

.panel-block,
.filter-panel,
.category-overview-card,
.story-card,
.player-shell,
.rank-list,
.rank-hero,
.page-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.panel-block {
  padding: 34px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
}

.rank-no,
.rank-row-no {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 800;
}

.rank-item img {
  width: 72px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-copy,
.rank-row-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-copy strong,
.rank-row-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em,
.rank-row-main em,
.rank-row-meta small {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-shell {
  padding: 34px 0 72px;
}

.page-hero {
  padding: clamp(30px, 5vw, 54px);
  margin-bottom: 32px;
  overflow: hidden;
}

.slim-hero {
  background:
    radial-gradient(circle at 84% 10%, rgba(56, 189, 248, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.66);
}

.category-hero,
.rank-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.search-bar.compact {
  align-self: end;
}

.filter-panel {
  padding: 22px;
  margin-bottom: 28px;
}

.filter-search input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  outline: 0;
  color: #fff;
  padding: 0 16px;
  background: rgba(2, 6, 23, 0.5);
}

.filter-groups {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-group strong {
  color: #e2e8f0;
  margin-right: 4px;
}

.filter-group button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--soft);
  cursor: pointer;
  background: rgba(30, 41, 59, 0.74);
}

.filter-group button.active,
.filter-group button:hover {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(14, 165, 233, 0.16);
}

.category-overview {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 20px;
}

.category-cover {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

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

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 62%);
}

.category-cover span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-size: 24px;
  font-weight: 800;
}

.category-copy h2 {
  margin: 4px 0 10px;
  font-size: 28px;
}

.category-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.34);
}

.compact-card img {
  width: 74px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 280px;
}

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

.rank-hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 58%);
}

.rank-hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-weight: 800;
  font-size: 24px;
}

.rank-list {
  padding: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 94px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 13px 8px;
}

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

.rank-row img {
  width: 94px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row-meta {
  display: grid;
  justify-items: end;
  color: #fef3c7;
  font-weight: 800;
}

.detail-page {
  padding-bottom: 70px;
}

.detail-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  display: flex;
  align-items: end;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-bg-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.8) 36%, rgba(2, 6, 23, 0.52) 100%),
    radial-gradient(circle at 78% 20%, rgba(14, 165, 233, 0.18), transparent 34rem);
}

.detail-layout {
  position: relative;
  z-index: 2;
  padding: 40px 0 54px;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.detail-main-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 30px 72px rgba(2, 6, 23, 0.62);
  background: #0f172a;
}

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

.detail-copy h1 {
  margin: 16px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

.player-section {
  margin-top: -24px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.22));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.34);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.story-card {
  padding: 24px;
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 4px 0 14px;
  font-size: 18px;
}

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

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

.footer-links a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .catalog-grid,
  .hot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .site-header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.95);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-control {
    display: none;
  }

  .home-search,
  .category-hero,
  .rank-hero,
  .category-overview-card,
  .detail-main-card,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    padding: 16px;
  }

  .detail-main-card {
    align-items: start;
  }

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

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

  .rank-row-meta {
    grid-column: 3;
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .container,
  .site-header-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel {
    height: 76vh;
    min-height: 540px;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .home-search {
    padding: 20px;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar input {
    min-height: 50px;
  }

  .search-bar button {
    min-height: 46px;
  }

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

  .movie-card-wide {
    grid-column: span 2;
  }

  .card-info {
    padding: 12px;
  }

  .card-info strong {
    font-size: 14px;
  }

  .card-line,
  .card-meta {
    font-size: 12px;
  }

  .rank-strip,
  .compact-list {
    grid-template-columns: 1fr;
  }

  .page-shell {
    padding-top: 20px;
  }

  .page-hero {
    padding: 24px;
  }

  .detail-hero {
    min-height: 720px;
  }

  .detail-layout {
    padding-top: 28px;
  }

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

  .player-section {
    margin-top: 0;
  }

  .story-card {
    padding: 18px;
  }
}
