:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-soft: #0d111c;
  --panel: #111827;
  --panel-soft: rgba(17, 24, 39, 0.72);
  --panel-hover: rgba(31, 41, 55, 0.82);
  --text: #f9fafb;
  --muted: #a8b3c7;
  --dim: #6b7280;
  --line: rgba(148, 163, 184, 0.18);
  --red: #dc2626;
  --red-bright: #ef4444;
  --orange: #f97316;
  --yellow: #facc15;
  --blue: #60a5fa;
  --green: #34d399;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.14), transparent 28rem),
    linear-gradient(180deg, #0b1020 0%, #05070d 42%, #0b1020 100%);
  color: var(--text);
  line-height: 1.6;
}

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

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

img.is-broken {
  opacity: 0;
}

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;
  border-bottom: 1px solid rgba(75, 85, 99, 0.72);
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark,
.footer-logo span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.35);
}

.brand-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ef4444, #f97316, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-panel a {
  color: #d1d5db;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: #fff;
}

.desktop-nav a:hover {
  transform: translateY(-1px) scale(1.04);
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(270px, 25vw);
}

.top-search input,
.mobile-search input,
.inline-filter input {
  width: 100%;
  border: 1px solid rgba(107, 114, 128, 0.82);
  border-radius: 999px;
  outline: none;
  background: rgba(55, 65, 81, 0.86);
  color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input {
  padding: 10px 44px 10px 18px;
}

.top-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus {
  border-color: rgba(239, 68, 68, 0.95);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
  background: rgba(31, 41, 55, 0.96);
}

.top-search button {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #d1d5db;
  background: transparent;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: #fff;
  background: rgba(31, 41, 55, 0.82);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

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

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mobile-panel a {
  border-radius: 12px;
  padding: 9px 12px;
  text-align: center;
  background: rgba(31, 41, 55, 0.72);
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #05070d;
}

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

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

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

.hero-slide::before,
.poster-frame::before,
.mini-cover::before,
.wide-cover::before,
.rank-cover::before,
.detail-poster::before,
.category-covers span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.28), rgba(249, 115, 22, 0.16), rgba(15, 23, 42, 0.66));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #05070d 0%, rgba(5, 7, 13, 0.74) 38%, rgba(5, 7, 13, 0.16) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 62%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: 24px;
  bottom: 12%;
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.22);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  color: #fff;
  text-wrap: balance;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #d1d5db;
  font-size: clamp(16px, 2.2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta,
.wide-meta,
.rank-meta,
.mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-bottom: 24px;
  font-weight: 700;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.28);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 8%;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--red-bright);
}

.category-strip {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(5, 7, 13, 0.76);
  backdrop-filter: blur(16px);
}

.category-strip-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar,
.mini-scroll::-webkit-scrollbar {
  display: none;
}

.category-strip a {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  color: #d1d5db;
  background: rgba(17, 24, 39, 0.8);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-strip a:hover {
  color: #fff;
  border-color: rgba(239, 68, 68, 0.75);
  transform: translateY(-2px);
}

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

.page-stack {
  padding: 56px 0;
}

.page-stack > * + * {
  margin-top: 68px;
}

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

.section-head h2,
.page-hero h1,
.article-panel h2 {
  margin: 8px 0 0;
  color: #fff;
  line-height: 1.15;
}

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

.section-head a {
  color: #f87171;
  font-weight: 750;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(17, 24, 39, 0.86));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.68);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-frame,
.mini-cover,
.wide-cover,
.rank-cover,
.detail-poster,
.category-covers span {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
}

.poster-frame {
  display: block;
  aspect-ratio: 16 / 10;
}

.poster-frame img,
.mini-cover img,
.wide-cover img,
.rank-cover img,
.detail-poster img,
.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-frame img,
.mini-card:hover img,
.wide-card:hover img,
.rank-item:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

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

.card-category,
.card-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  left: 10px;
  top: 10px;
  background: rgba(220, 38, 38, 0.92);
}

.card-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.74);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  min-height: 48px;
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.4;
}

.card-body h2 a:hover,
.wide-info h2 a:hover,
.rank-info h2 a:hover,
.mini-card:hover .mini-title {
  color: #f87171;
}

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

.card-meta,
.rank-meta,
.wide-meta,
.mini-meta {
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 3px 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
}

.scroll-panel,
.feature-panel {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 26px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.14), rgba(126, 34, 206, 0.12), rgba(17, 24, 39, 0.86));
}

.feature-panel {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.18), rgba(154, 52, 18, 0.12), rgba(17, 24, 39, 0.82));
}

.mini-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.mini-card {
  flex: 0 0 218px;
}

.mini-cover {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  margin-bottom: 10px;
}

.mini-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 132px 1fr;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(17, 24, 39, 0.76);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(31, 41, 55, 0.82);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-cover {
  display: block;
  height: 82px;
  border-radius: 12px;
}

.rank-info h2,
.wide-info h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 18px;
}

.rank-info p,
.wide-info p {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.inner-page {
  min-height: 70vh;
}

.page-hero {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 30px;
  padding: 42px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.32), rgba(17, 24, 39, 0.84) 52%, rgba(124, 45, 18, 0.22));
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fca5a5;
}

.inline-filter {
  max-width: 620px;
  margin-top: 28px;
}

.large-filter {
  max-width: 760px;
}

.inline-filter input {
  padding: 14px 18px;
}

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

.category-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.82);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.55);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 112px;
}

.category-covers span {
  min-height: 112px;
}

.category-card-body {
  padding: 20px;
}

.category-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
}

.category-card p {
  min-height: 72px;
  margin: 0 0 14px;
  color: var(--muted);
}

.category-card-body span {
  color: #f87171;
  font-weight: 800;
}

.empty-state {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 32px;
  color: #cbd5e1;
  text-align: center;
  background: rgba(17, 24, 39, 0.76);
}

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

.detail-page {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), transparent 46rem);
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  filter: blur(2px);
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #05070d 0%, rgba(5, 7, 13, 0.88) 46%, rgba(5, 7, 13, 0.45) 100%);
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: center;
  min-height: 620px;
  padding: 60px 0;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 16px 0 16px;
  color: #fff;
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
}

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

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  scroll-margin-top: 90px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.38);
  font-size: 34px;
  transform: translateX(3px);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
}

.player-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  pointer-events: none;
}

.player-caption strong,
.player-caption span {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.article-panel {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 26px;
  padding: 34px;
  background: rgba(17, 24, 39, 0.78);
}

.article-panel h2 {
  font-size: 28px;
}

.article-panel p {
  color: #d1d5db;
  font-size: 17px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.info-grid div {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.62);
}

.info-grid strong,
.info-grid span {
  display: block;
}

.info-grid strong {
  color: #fca5a5;
  font-size: 13px;
}

.info-grid span {
  margin-top: 5px;
  color: #fff;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.88), #030712);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
  padding: 46px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 460px;
  color: var(--muted);
}

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

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

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px 16px;
  color: var(--dim);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 12px;
  }

  .top-search {
    width: 220px;
  }

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

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

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

@media (max-width: 900px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slider {
    min-height: 76vh;
  }

  .hero-content {
    bottom: 16%;
  }

  .hero-dots {
    left: max(24px, calc((100vw - 1180px) / 2));
    right: auto;
    bottom: 7%;
  }

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

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

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 36px;
  }

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

  .detail-hero,
  .detail-grid {
    min-height: auto;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    width: min(100% - 22px, 1180px);
  }

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

  .mobile-panel nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    left: 18px;
    right: 18px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

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

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

  .page-stack {
    padding: 36px 0;
  }

  .page-stack > * + * {
    margin-top: 42px;
  }

  .page-hero,
  .article-panel,
  .scroll-panel,
  .feature-panel {
    border-radius: 22px;
    padding: 24px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    min-height: 44px;
    font-size: 15px;
  }

  .card-body p {
    min-height: 40px;
    font-size: 13px;
  }

  .rank-item {
    grid-template-columns: 40px 96px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 18px;
  }

  .rank-cover {
    height: 64px;
  }

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

  .rank-info p,
  .rank-meta span:nth-child(3) {
    display: none;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .player-caption {
    align-items: flex-start;
    flex-direction: column;
  }
}
