:root {
  --color-bg: #fff7ed;
  --color-bg-soft: #fffbeb;
  --color-card: #ffffff;
  --color-ink: #1f2937;
  --color-muted: #6b7280;
  --color-line: #fed7aa;
  --color-orange: #f97316;
  --color-orange-dark: #ea580c;
  --color-amber: #f59e0b;
  --color-yellow: #facc15;
  --color-blue: #0284c7;
  --shadow-soft: 0 18px 50px rgba(124, 45, 18, 0.14);
  --shadow-card: 0 14px 35px rgba(31, 41, 55, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-ink);
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 48%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.narrow-container {
  width: min(820px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(254, 215, 170, 0.75);
  box-shadow: 0 10px 30px rgba(124, 45, 18, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 1.34rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--color-orange-dark), var(--color-amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 0.74rem;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--color-orange-dark);
  background: #ffedd5;
}

.mobile-menu-button {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #7c2d12;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid #fed7aa;
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 32%),
              linear-gradient(135deg, #f97316 0%, #f59e0b 52%, #facc15 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 1px, transparent 1px);
  background-size: 26px 26px;
}

.hero-shell {
  position: relative;
  z-index: 1;
  padding: 72px 0 58px;
}

.hero-slide {
  display: none;
  min-height: 500px;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  align-items: center;
  gap: 44px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-media {
  position: relative;
  isolation: isolate;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 28px -24px -24px 24px;
  z-index: -1;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.20);
  filter: blur(1px);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: 0 35px 70px rgba(124, 45, 18, 0.35);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 8px 14px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-section .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(2.55rem, 6vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-tags,
.tag-row,
.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.side-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-actions,
.detail-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.center-actions {
  justify-content: center;
}

.button,
.search-panel button,
.advanced-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.search-panel button:hover,
.advanced-search button:hover {
  transform: translateY(-2px);
}

.button-primary,
.search-panel button,
.advanced-search button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
}

.button-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.button-light {
  color: #9a3412;
  background: #ffedd5;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 22px 0;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

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

.search-panel {
  max-width: 760px;
  margin: 26px auto 0;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(124, 45, 18, 0.16);
}

.search-panel input,
.advanced-search input,
.advanced-search select,
.local-filter {
  width: 100%;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  outline: none;
  color: #1f2937;
  background: #ffffff;
}

.search-panel input {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  background: transparent;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.hero-stats span {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-stats strong {
  font-size: 1.1rem;
}

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

.warm-section {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.9), rgba(255, 251, 235, 0.9));
}

.blue-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.section-more,
.text-link {
  color: var(--color-orange-dark);
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--color-card);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fdba74;
  box-shadow: var(--shadow-soft);
}

.poster-link,
.poster-shell {
  display: block;
}

.poster-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #111827;
}

.movie-card-compact .poster-shell {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-shell img {
  transform: scale(1.06);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-radius: 999px;
  font-size: 0.78rem;
  box-shadow: 0 10px 20px rgba(127, 29, 29, 0.24);
}

.movie-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0 8px;
  font-size: 1.14rem;
  line-height: 1.35;
}

.movie-card p {
  flex: 1;
  margin: 0 0 14px;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact p {
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-bottom: 14px;
}

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

.category-tile {
  min-height: 126px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #9a3412;
  background: linear-gradient(135deg, #ffffff, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.category-tile span {
  font-weight: 900;
  font-size: 1.12rem;
}

.category-tile strong {
  color: var(--color-orange-dark);
  font-size: 2rem;
  line-height: 1;
  margin: 8px 0 2px;
}

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.category-card img,
.category-card-overlay {
  position: absolute;
  inset: 0;
}

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

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

.category-card-overlay {
  background: linear-gradient(180deg, transparent 10%, rgba(15, 23, 42, 0.86) 100%);
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 1.45rem;
}

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

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
}

.mini-item img {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-item strong,
.mini-item small {
  display: block;
}

.mini-item small {
  color: var(--color-muted);
}

.page-hero {
  padding: 72px 0;
  text-align: center;
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.24), transparent 35%),
              linear-gradient(180deg, #fff7ed, #ffffff);
}

.page-hero h1 {
  color: #1f2937;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
}

.page-hero p {
  max-width: 820px;
  margin: 18px auto 0;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.toolbar label {
  flex: 1;
  display: grid;
  gap: 8px;
  color: var(--color-muted);
  font-weight: 800;
}

.local-filter {
  min-height: 44px;
  padding: 0 16px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pager a,
.pager span,
.pager strong {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #fed7aa;
}

.pager strong {
  color: #ffffff;
  background: var(--color-orange);
  border-color: var(--color-orange);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(31, 41, 55, 0.06);
}

.rank-row > strong {
  color: var(--color-orange-dark);
  font-size: 1.35rem;
}

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

.rank-row b,
.rank-row small {
  display: block;
}

.rank-row small {
  color: var(--color-muted);
}

.rank-row em {
  color: #9a3412;
  font-style: normal;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #7c2d12, #f97316 48%, #f59e0b);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1px, transparent 1px);
  background-size: 28px 28px;
}

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 60px rgba(67, 20, 7, 0.38);
}

.detail-intro .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.detail-one-line {
  max-width: 850px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.22rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta-grid span {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.14);
}

.detail-meta-grid b {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.detail-main,
.detail-sidebar {
  display: grid;
  gap: 22px;
}

.player-card,
.text-panel,
.side-card,
.prev-next {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.player-card {
  position: relative;
  overflow: hidden;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  border-radius: 50%;
  box-shadow: 0 22px 45px rgba(249, 115, 22, 0.34);
}

.play-overlay strong {
  font-size: 1.25rem;
}

.player-status {
  margin: 0;
  padding: 12px 16px;
  color: var(--color-muted);
  background: #fff7ed;
  font-size: 0.9rem;
}

.text-panel,
.side-card,
.prev-next {
  padding: 22px;
}

.text-panel h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.text-panel p {
  margin: 0;
  color: #4b5563;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.prev-next a {
  color: var(--color-orange-dark);
  font-weight: 900;
}

.side-card .search-panel {
  margin: 0;
  grid-template-columns: 1fr;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.side-card .search-panel button {
  width: 100%;
}

.advanced-search {
  max-width: 980px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(130px, 0.5fr)) auto;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.advanced-search input,
.advanced-search select {
  min-height: 46px;
  padding: 0 14px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  text-align: center;
  color: var(--color-muted);
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
}

.sitemap-list {
  columns: 3;
  gap: 32px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
}

.sitemap-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
  padding: 48px 0;
}

.site-footer h2 {
  color: #fdba74;
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.site-footer p,
.site-footer a {
  display: block;
  color: #d1d5db;
  margin: 6px 0;
}

.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: #9ca3af;
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .brand-copy small {
    display: none;
  }

  .hero-slide,
  .detail-hero-inner,
  .split-showcase {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    min-height: auto;
  }

  .detail-poster {
    max-width: 290px;
    margin: 0 auto;
  }

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

  .advanced-search {
    grid-template-columns: 1fr 1fr;
    border-radius: var(--radius-lg);
  }

  .advanced-search input,
  .advanced-search button {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 1.08rem;
  }

  .hero-shell {
    padding: 42px 0;
  }

  .hero-media img {
    border-width: 4px;
    border-radius: 20px;
  }

  .search-panel {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .category-tile-grid,
  .category-card-grid,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .section-header,
  .toolbar,
  .prev-next {
    align-items: stretch;
    flex-direction: column;
  }

  .category-card {
    min-height: 190px;
  }

  .rank-row {
    grid-template-columns: 42px 60px 1fr;
  }

  .rank-row em {
    grid-column: 3;
  }

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

  .advanced-search {
    grid-template-columns: 1fr;
  }

  .sitemap-list {
    columns: 1;
  }

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