:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-2: #1e293b;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #dc2626;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
  transition: transform 0.25s ease;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 15px;
  flex: 1;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #fb923c;
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
  color: #fff;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(249, 115, 22, 0.8);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button {
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.24);
}

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel a {
  color: #e2e8f0;
  font-weight: 600;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

.mobile-search input {
  min-width: 0;
  padding: 10px 12px;
}

.mobile-search button {
  padding: 10px 16px;
}

.hero-carousel {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 35%, rgba(249, 115, 22, 0.32), transparent 30%),
    linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.44) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding-top: 20px;
}

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

.hero-kickers span,
.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  font-size: 13px;
}

.hero-kickers span:first-child {
  color: #fff;
  background: var(--orange);
  border-color: transparent;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.ghost-button {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.32);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  cursor: pointer;
  font-size: 34px;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.88);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--orange);
}

.hero-category-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  display: flex;
  gap: 10px;
  justify-content: center;
  transform: translateX(-50%);
}

.hero-category-strip a {
  padding: 9px 14px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-category-strip a:hover {
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.7);
}

.content-section,
.category-section,
.search-section,
.detail-section {
  padding: 64px 0;
}

.section-slate {
  background: rgba(15, 23, 42, 0.62);
}

.section-dark {
  background: rgba(2, 6, 23, 0.72);
}

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

.section-heading h2,
.page-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted-2);
}

.section-heading a {
  color: #fb923c;
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(249, 115, 22, 0.44);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 58%);
  opacity: 0.8;
  transition: opacity 0.25s ease;
}

.movie-card a:hover .movie-cover::after {
  opacity: 0.95;
}

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

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

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 4px 8px;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 10px;
  background: var(--orange);
}

.year-badge {
  left: 10px;
  background: rgba(15, 23, 42, 0.88);
}

.rank-badge {
  left: 10px;
  top: auto;
  bottom: 10px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.hover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-row span {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

.category-grid,
.category-panels {
  display: grid;
  gap: 22px;
}

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

.category-tile,
.category-panel {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.5);
}

.category-tile img,
.category-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.category-tile span,
.category-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.78), rgba(15, 23, 42, 0.78));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-tile strong {
  margin-top: 78px;
  color: #fff;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.category-tile em {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

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

.category-panel {
  min-height: 210px;
  display: flex;
  align-items: end;
  padding: 24px;
}

.category-panel div {
  position: relative;
  z-index: 2;
}

.category-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
}

.category-panel p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  padding: 56px 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.55));
  border-bottom: 1px solid var(--line);
}

.category-page-hero {
  background:
    radial-gradient(circle at 16% 22%, rgba(249, 115, 22, 0.25), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(88, 28, 135, 0.42));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted-2);
  font-size: 14px;
}

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

.breadcrumb strong {
  color: #fff;
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.search-panel button {
  min-height: 48px;
  padding: 0 24px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 58px 20px;
  text-align: center;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 54px 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
  transform: translateX(4px);
  border-color: rgba(249, 115, 22, 0.52);
}

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

.rank-row img {
  width: 150px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text strong,
.rank-text em,
.rank-text small {
  display: block;
}

.rank-text strong {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.rank-text em {
  display: -webkit-box;
  margin: 4px 0;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-sidebar,
.side-card,
.detail-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rank-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 20px;
}

.rank-sidebar h2,
.side-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.compact-list,
.rank-sidebar {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: #fff;
}

.compact-card img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 10px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.compact-card em {
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.24), rgba(2, 6, 23, 0.58));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 999px;
  box-shadow: 0 18px 48px rgba(249, 115, 22, 0.42);
  font-size: 34px;
}

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

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
}

.detail-meta span {
  padding: 5px 10px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
}

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

.detail-card section {
  margin-top: 24px;
}

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

.detail-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.side-card {
  position: sticky;
  top: 90px;
  padding: 18px;
}

.side-poster {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 18px;
  border-radius: 14px;
}

.related-section {
  padding-bottom: 0;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
}

.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
  justify-content: end;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

  .nav-toggle {
    display: inline-flex;
  }

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

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

  .detail-side,
  .rank-sidebar,
  .side-card {
    position: static;
  }
}

@media (max-width: 780px) {
  .site-header-inner {
    height: 62px;
  }

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

  .hero-carousel {
    height: 620px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-category-strip {
    width: calc(100% - 32px);
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

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

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

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

  .rank-row a {
    grid-template-columns: 46px 110px minmax(0, 1fr);
  }

  .rank-row img {
    width: 110px;
    height: 74px;
  }

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

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

@media (max-width: 540px) {
  .container,
  .site-header-inner,
  .mobile-panel,
  .footer-inner,
  .footer-copy {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel {
    height: 560px;
  }

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

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

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

  .movie-cover {
    aspect-ratio: 16 / 9;
  }

  .rank-row a {
    grid-template-columns: 42px 88px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    width: 88px;
    height: 62px;
  }

  .rank-text em {
    display: none;
  }

  .detail-card {
    padding: 20px;
  }

  .compact-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .compact-card img {
    width: 86px;
    height: 58px;
  }
}
