:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.74);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(34, 211, 238, 0.26);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --yellow: #f59e0b;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 36rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

.header-inner,
.section-inner,
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.45);
}

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

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

.nav-link,
.nav-dropdown > button,
.nav-dropdown-panel a,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link,
.nav-dropdown > button {
  padding: 10px 15px;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown:hover > button {
  color: #fff;
  background: rgba(34, 211, 238, 0.14);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  right: 0;
  top: 48px;
  width: 420px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.nav-dropdown-panel a:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.14);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
}

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

.hero-shell {
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--line-strong);
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.18) brightness(0.58);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(710px, 100%);
  padding: 92px 64px 170px;
}

.eyebrow {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
  margin: 0 0 22px;
  background: linear-gradient(120deg, #fff, #cffafe 46%, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
  margin: 0 0 24px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.tag-row span,
.tag-row a {
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.hero-actions,
.detail-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: 800;
  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(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
  color: #dbeafe;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.64);
}

.hero-controls {
  position: absolute;
  left: 64px;
  bottom: 105px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  font-size: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-strong);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 7px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--cyan);
}

.hero-search-card {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 30px;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.search-form,
.inline-search {
  display: flex;
  gap: 10px;
}

.search-form input,
.inline-search input {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid var(--line);
  outline: none;
}

.search-form input:focus,
.inline-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-form button,
.inline-search button {
  min-width: 96px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-links a,
.filter-pills button {
  color: #cbd5e1;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.46);
  cursor: pointer;
}

.quick-links a:hover,
.filter-pills button:hover,
.filter-pills button.active {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.16);
}

.content-section {
  padding: 58px 0;
}

.section-gradient {
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.44), transparent);
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
}

.two-column-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.34);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: 0 24px 62px rgba(8, 145, 178, 0.18);
}

.card-poster,
.large-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.card-poster-wide {
  width: 150px;
  aspect-ratio: 4 / 5;
  flex: 0 0 auto;
}

.card-poster img,
.large-poster img,
.category-preview img,
.detail-poster img,
.ranking-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-poster::after,
.large-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.86));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(34, 211, 238, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.25s ease;
}

.play-badge-large {
  width: 62px;
  height: 62px;
  font-size: 22px;
}

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

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
}

.card-body,
.large-content {
  padding: 16px;
}

.card-body h3,
.large-content h3 {
  color: #fff;
  margin: 0 0 9px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.large-content h3 {
  font-size: 32px;
  letter-spacing: -0.04em;
  -webkit-line-clamp: 2;
}

.card-body p,
.large-content p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.large-content p {
  font-size: 15px;
  -webkit-line-clamp: 3;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
}

.card-meta span:last-child {
  color: var(--cyan);
}

.movie-card-horizontal {
  display: flex;
  min-height: 196px;
}

.movie-card-horizontal .card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.movie-card-large {
  display: grid;
  grid-template-columns: 44% 1fr;
  min-height: 360px;
}

.large-poster {
  aspect-ratio: auto;
  height: 100%;
}

.ranking-panel,
.detail-side,
.detail-article,
.category-card,
.toolbar {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.22);
}

.ranking-panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.panel-head a {
  color: var(--cyan);
  font-weight: 700;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 30px 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-row:hover {
  background: rgba(34, 211, 238, 0.1);
}

.rank-row img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-num {
  color: var(--cyan);
  font-weight: 900;
  font-size: 18px;
}

.rank-title {
  color: #e2e8f0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  color: var(--yellow);
  font-weight: 900;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.06)),
    rgba(15, 23, 42, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.36);
}

.category-tile span,
.category-card-body span {
  color: var(--cyan);
  font-weight: 800;
  margin-bottom: 8px;
}

.category-tile strong,
.category-card-body h2 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 8px;
}

.category-tile p,
.category-card-body p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 54px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(15, 23, 42, 0));
  border-bottom: 1px solid var(--line);
}

.slim-hero h1,
.category-hero h1 {
  max-width: 840px;
}

.slim-hero p,
.category-hero p {
  max-width: 820px;
  color: #cbd5e1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

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

.category-card {
  overflow: hidden;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: #0f172a;
}

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  margin-bottom: 26px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  display: none;
  color: var(--muted);
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

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

.ranking-card {
  min-height: auto;
  border-radius: 22px;
}

.ranking-link {
  display: grid;
  grid-template-columns: 54px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.ranking-link img {
  width: 86px;
  height: 116px;
  border-radius: 14px;
}

.ranking-link h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.ranking-link p {
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.6;
}

.ranking-link strong {
  color: var(--yellow);
  font-size: 24px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 70px;
  border-bottom: 1px solid var(--line);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.22;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.2);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.64));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 62px);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 48px rgba(34, 211, 238, 0.35);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}

.detail-article p {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 2;
  margin: 0 0 26px;
}

.detail-side ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-side li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-side span {
  color: var(--muted);
}

.detail-side strong {
  color: #fff;
  text-align: right;
}

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

.footer-inner {
  padding-top: 38px;
  padding-bottom: 38px;
  display: grid;
  gap: 14px;
}

.footer-inner p {
  color: var(--muted);
  max-width: 720px;
  margin: 0;
  line-height: 1.7;
}

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

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

[data-hidden="true"] {
  display: none !important;
}

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

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

  .two-column-feature,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner,
  .section-inner,
  .footer-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line-strong);
  }

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

  .nav-dropdown-panel {
    position: static;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 8px;
    grid-template-columns: 1fr;
    display: none;
  }

  .nav-dropdown:focus-within .nav-dropdown-panel,
  .nav-dropdown:hover .nav-dropdown-panel {
    display: grid;
  }

  .hero {
    padding: 18px 12px 0;
  }

  .hero-shell {
    min-height: 760px;
    border-radius: 24px;
  }

  .hero-copy {
    padding: 54px 24px 250px;
  }

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

  .hero-controls {
    left: 24px;
    bottom: 186px;
  }

  .hero-search-card {
    left: 16px;
    right: 16px;
    bottom: 18px;
    grid-template-columns: 1fr;
  }

  .quick-links {
    justify-content: flex-start;
  }

  .search-form,
  .inline-search,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .movie-card-horizontal,
  .movie-card-large {
    display: block;
  }

  .card-poster-wide {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .large-poster {
    aspect-ratio: 16 / 10;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .ranking-link {
    grid-template-columns: 42px 72px 1fr;
  }

  .ranking-link strong {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 17px;
  }

  .content-section {
    padding: 42px 0;
  }

  .section-heading {
    display: block;
  }

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

  .page-hero {
    padding: 62px 0 38px;
  }

  .detail-hero {
    padding: 34px 0 46px;
  }
}
