* {
  box-sizing: border-box;
}

:root {
  --bg: #07090f;
  --bg-soft: #111827;
  --panel: rgba(31, 41, 55, 0.72);
  --panel-strong: #1f2937;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #9ca3af;
  --amber: #f59e0b;
  --amber-2: #f97316;
  --red: #7f1d1d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(127, 29, 29, 0.26), transparent 34rem),
    linear-gradient(180deg, #111827 0%, #0b1120 42%, #000000 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.96), rgba(154, 52, 18, 0.94), rgba(31, 41, 55, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #1f1300;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.34);
}

.brand-mark.small {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.brand-text {
  font-size: 1.34rem;
  background: linear-gradient(90deg, #fcd34d, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fcd34d;
  transform: translateY(-1px);
}

.nav-search,
.mobile-search,
.big-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search input,
.mobile-search input {
  width: 190px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 9px 38px 9px 16px;
  outline: none;
  transition: width 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.nav-search input:focus {
  width: 260px;
  border-color: rgba(252, 211, 77, 0.8);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.nav-search button {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #fcd34d;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-search {
  gap: 10px;
}

.mobile-search input {
  width: 100%;
}

.mobile-search button,
.big-search button,
.primary-button {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.mobile-search button:hover,
.big-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.38);
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #0b0f17;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.72) 42%, rgba(3, 7, 18, 0.24) 72%, rgba(3, 7, 18, 0.78) 100%),
    linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0) 40%);
}

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

.hero-tags,
.movie-tags,
.detail-tags,
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-tags a,
.genre-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.22);
  padding: 5px 11px;
  font-size: 0.82rem;
}

.hero-content h1,
.page-hero h1,
.detail-title-row h1 {
  margin: 16px 0 14px;
  font-size: clamp(2.35rem, 5.2vw, 5.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-title-row p {
  margin: 0;
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #f9fafb;
  margin-bottom: 16px;
}

.hero-meta span:first-child {
  color: #fcd34d;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 20px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.quick-search-panel,
.page-shell,
.footer-inner,
.detail-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel h2,
.content-section h2,
.detail-sidebar h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.quick-search-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.big-search {
  gap: 12px;
}

.big-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 14px 18px;
  outline: none;
}

.big-search input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.page-shell {
  padding: 58px 0;
}

.content-section {
  margin-bottom: 66px;
}

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

.section-heading p {
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
}

.simple-heading {
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #fcd34d;
  font-size: 0.78rem;
  font-weight: 800;
}

.section-more {
  color: #fcd34d;
  font-weight: 700;
  transition: color 0.2s ease;
}

.section-more:hover {
  color: #fb923c;
}

.section-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.section-tools input,
.section-tools select {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(31, 41, 55, 0.82);
  color: white;
  padding: 12px 14px;
  outline: none;
}

.section-tools input {
  min-width: 280px;
  flex: 1;
}

.section-tools input:focus,
.section-tools select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.26s ease, box-shadow 0.26s ease, background 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  background: rgba(55, 65, 81, 0.96);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.compact-card .movie-cover {
  aspect-ratio: 2 / 3;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent 55%);
  opacity: 0.28;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-mask {
  opacity: 1;
}

.score-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  font-size: 0.76rem;
}

.score-pill {
  right: 10px;
  background: var(--amber);
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  background: rgba(220, 38, 38, 0.92);
}

.cover-summary {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: white;
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.movie-card-body h3 {
  margin: 0 0 9px;
  color: white;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #fcd34d;
}

.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.movie-tags {
  margin-top: 10px;
}

.movie-tags span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

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

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(31, 41, 55, 0.82);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  background: rgba(55, 65, 81, 0.92);
}

.mini-card img {
  width: 78px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card p,
.mini-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.mini-rank {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: white;
  font-weight: 800;
}

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

.category-card {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(127, 29, 29, 0.16)),
    rgba(31, 41, 55, 0.78);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
}

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

.category-card strong {
  margin: 12px 0;
  font-size: 2.8rem;
  line-height: 1;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.page-hero {
  position: relative;
  min-height: 330px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(127, 29, 29, 0.78), rgba(17, 24, 39, 0.95));
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.page-hero h1 {
  margin-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #06080d;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.04);
  opacity: 0.42;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.42)),
    linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0.14) 55%);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 38px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #d1d5db;
  margin-bottom: 24px;
}

.breadcrumb a:hover {
  color: #fcd34d;
}

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

.detail-poster {
  width: 220px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail-shell {
  padding-top: 38px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.detail-main,
.detail-sidebar {
  min-width: 0;
}

.player-card,
.info-panel,
.sticky-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(31, 41, 55, 0.78);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  background: black;
  aspect-ratio: 16 / 9;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: block;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 16px 44px rgba(245, 158, 11, 0.42);
  font-size: 2rem;
  padding-left: 4px;
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

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

.info-panel {
  padding: 24px;
  margin-top: 22px;
}

.info-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
}

.meta-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.meta-panel dl div {
  display: grid;
  gap: 4px;
}

.meta-panel dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.meta-panel dd {
  margin: 0;
  color: white;
  line-height: 1.6;
}

.meta-panel dd a {
  color: #fcd34d;
}

.detail-tags,
.genre-tags {
  margin-top: 14px;
}

.sticky-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.sticky-panel h2 {
  margin-bottom: 18px;
}

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

.search-page .big-search {
  max-width: 820px;
  margin-bottom: 28px;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 60px 18px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: rgba(31, 41, 55, 0.62);
}

.site-footer {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), #000000);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  padding: 54px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p,
.footer-grid li,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

.footer-grid h3 {
  color: white;
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-grid a:hover {
  color: #fcd34d;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.9rem;
}

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

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

  .desktop-nav a:nth-of-type(n + 7) {
    display: none;
  }

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

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

  .sticky-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-carousel {
    height: 66vh;
    min-height: 520px;
  }

  .hero-content {
    left: 22px;
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel,
  .footer-grid,
  .detail-title-row,
  .ranking-columns {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 180px;
  }

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

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

  .brand-text {
    font-size: 1.05rem;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-title-row h1 {
    font-size: 2.35rem;
  }

  .hero-content p {
    font-size: 0.98rem;
  }

  .quick-search-panel {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .big-search {
    flex-direction: column;
    align-items: stretch;
  }

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

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

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

  .movie-meta-line {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .detail-poster {
    width: 150px;
  }

  .meta-panel dl {
    grid-template-columns: 1fr;
  }
}
