:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #10b981;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong,
.footer-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.nav-link {
  position: relative;
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

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

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.mobile-search input,
.quick-search input,
.filter-input input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: 0;
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 12px 46px 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search input:focus,
.filter-input input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.header-search button {
  position: absolute;
  right: 7px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.header-search button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 9px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-search input {
  padding-right: 16px;
}

.mobile-search button,
.quick-search button {
  border: 0;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(90deg, var(--cyan), #7dd3fc);
  padding: 12px 18px;
  font-weight: 800;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1280px) / 2));
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.95), rgba(59, 130, 246, 0.88));
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.2);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-one-line {
  margin: 0 0 12px;
  color: #e2e8f0;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 800;
}

.hero-summary {
  max-width: 620px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions,
.detail-meta,
.movie-meta,
.hero-dots,
.tag-row,
.chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.section-link {
  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-btn {
  color: #00111a;
  background: linear-gradient(90deg, var(--cyan), #93c5fd);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: white;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  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(--cyan);
}

.quick-search-panel,
.section,
.toolbar,
.page-hero,
.detail-main,
.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  margin-top: -44px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 520px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.section-head h2,
.toolbar h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2 {
  margin: 0;
}

.quick-search-panel p,
.section-head p,
.toolbar p,
.page-hero p,
.detail-line,
.detail-content p,
.footer-brand p,
.category-panel em,
.movie-info p,
.rank-content p {
  color: var(--muted-strong);
  line-height: 1.75;
}

.quick-search {
  align-items: stretch;
}

.quick-search input {
  padding-right: 16px;
}

.section {
  padding: 64px 0 0;
}

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

.section-head h2,
.toolbar h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.toolbar p {
  margin: 8px 0 0;
}

.section-link {
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

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

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

.movie-card:hover .poster img {
  transform: scale(1.08);
  filter: saturate(1.15) brightness(1.04);
}

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: white;
  background: rgba(34, 211, 238, 0.82);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.28);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #00111a;
  background: rgba(103, 232, 249, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  padding: 15px;
}

.movie-info h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-info h2 a:hover,
.rank-content h2 a:hover,
.footer-grid a:hover {
  color: var(--cyan);
}

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

.movie-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta a,
.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.movie-meta a {
  color: var(--cyan);
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  font-size: 12px;
  font-weight: 700;
}

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

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

.category-panel {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.9)),
    var(--cover-image) center / cover;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
}

.category-glow {
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 90px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
}

.category-panel strong,
.category-panel em {
  position: relative;
}

.category-panel strong {
  font-size: 24px;
  font-weight: 900;
}

.category-panel em {
  margin-top: 10px;
  font-style: normal;
}

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

.rank-list.wide {
  grid-template-columns: 1fr;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 86px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-card);
  padding: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #00111a;
  background: linear-gradient(135deg, var(--yellow), #67e8f9);
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.rank-content p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-main,
.detail-main {
  padding-top: 48px;
  padding-bottom: 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 48px;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.28), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.page-hero.slim {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero h1 {
  margin-top: 20px;
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 740px;
  font-size: 18px;
}

.toolbar {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-input {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
  color: var(--muted-strong);
  font-weight: 800;
}

.filter-input input {
  padding-right: 16px;
}

.search-toolbar {
  flex-wrap: wrap;
  align-items: center;
}

.chip-row {
  width: 100%;
}

.chip-row button {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(34, 211, 238, 0.08);
  padding: 9px 13px;
  font-weight: 800;
}

.chip-row button:hover,
.chip-row button.active {
  color: #00111a;
  background: var(--cyan);
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 22px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 34px;
  align-items: end;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.23), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.74));
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin-top: 20px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 740px;
  font-size: 20px;
  font-weight: 800;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.12);
}

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

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

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

.detail-cover span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 999px;
  color: #00111a;
  background: var(--cyan);
  font-weight: 900;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.js-player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  border: 0;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.82));
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #93c5fd);
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
}

.player-overlay strong {
  max-width: min(80%, 680px);
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 900;
}

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

.detail-content article {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: var(--bg-card);
}

.detail-content h2 {
  font-size: 26px;
  font-weight: 900;
}

.detail-content p {
  margin-bottom: 0;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 80px;
  padding: 42px 0 30px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

[data-movie-card].hidden {
  display: none;
}

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

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

  .mobile-toggle {
    display: block;
  }

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

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

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

  .hero {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel,
  .toolbar,
  .section-head,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-search-panel,
  .section-head,
  .toolbar {
    align-items: stretch;
  }

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

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

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

  .detail-cover {
    width: min(320px, 100%);
  }
}

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

  .brand {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 620px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.02em;
  }

  .hero-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .quick-search-panel {
    margin-top: -26px;
    padding: 18px;
  }

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

  .section {
    padding-top: 44px;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 70px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h2 {
    font-size: 15px;
  }

  .detail-hero,
  .page-hero,
  .detail-content article {
    padding: 22px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}
