:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.58);
  --panel-solid: #1e293b;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(250, 204, 21, 0.18);
  --gold: #facc15;
  --gold-strong: #f59e0b;
  --blue: #1e3a8a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.13), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.28), transparent 34rem),
    linear-gradient(135deg, #0f172a 0%, #172554 48%, #020617 100%);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.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;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.4);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--gold), #fde68a, var(--gold-strong));
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--muted-strong);
  transition: color 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--gold);
}

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

.header-search input,
.mobile-nav input,
.wide-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid rgba(250, 204, 21, 0.28);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.wide-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.10);
  background: rgba(15, 23, 42, 0.92);
}

.header-search input {
  width: 240px;
  padding: 10px 14px;
  border-radius: 999px;
}

.header-search button,
.mobile-nav button,
.wide-search button,
.primary-button {
  border: 0;
  cursor: pointer;
  color: #0f172a;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.header-search button:hover,
.mobile-nav button:hover,
.wide-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.header-search button {
  padding: 10px 16px;
  border-radius: 999px;
}

.mobile-menu-button {
  display: none;
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--gold);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  border-radius: 999px;
}

.mobile-nav button {
  padding: 11px 16px;
  border-radius: 999px;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #334155, #111827);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 36%, rgba(15, 23, 42, 0.34) 72%),
    linear-gradient(0deg, #0f172a 0%, transparent 45%);
}

.hero-content {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  padding-top: 50px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-label span,
.section-kicker {
  font-size: 0.82rem;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(2.8rem, 6vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 1.15rem;
  line-height: 1.85;
}

.hero-meta,
.detail-chips,
.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-chips span {
  padding: 8px 13px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
}

.ghost-button {
  color: var(--text);
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: rgba(15, 23, 42, 0.54);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.ghost-button:hover {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.09);
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  height: 500px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster span,
.play-mark {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  border-radius: 999px;
  box-shadow: 0 0 36px rgba(250, 204, 21, 0.42);
}

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

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

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

.quick-search-panel,
.page-hero,
.filter-panel,
.detail-info-card,
.player-card,
.poster-panel,
.side-panel,
.ranking-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: center;
  margin-top: -42px;
  padding: 32px;
  position: relative;
  z-index: 5;
}

.quick-search-panel h2,
.page-hero h1,
.section-heading h2,
.detail-info-card h1 {
  margin: 8px 0 10px;
  letter-spacing: -0.04em;
}

.quick-search-panel p,
.page-hero p,
.movie-card-body p,
.site-footer p,
.detail-info-card p,
.poster-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.wide-search {
  display: flex;
  gap: 10px;
}

.wide-search input {
  min-width: 0;
  flex: 1;
  padding: 15px 18px;
  border-radius: 999px;
}

.wide-search button {
  padding: 0 24px;
  border-radius: 999px;
}

.section-block {
  padding: 72px 0 0;
}

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

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.section-heading a {
  color: var(--gold);
  font-weight: 800;
}

.section-heading.compact {
  align-items: center;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(250, 204, 21, 0.10);
  border-radius: var(--radius-md);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(30, 41, 59, 0.66);
  box-shadow: 0 22px 46px rgba(250, 204, 21, 0.10);
}

.movie-card-poster {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.20), rgba(30, 64, 175, 0.22));
}

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

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

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

.play-mark {
  z-index: 2;
  width: 52px;
  height: 52px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card-link:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.duration-badge,
.category-badge {
  position: absolute;
  z-index: 3;
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 10px;
  top: 10px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
}

.category-badge {
  left: 10px;
  bottom: 10px;
  color: #0f172a;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.92);
}

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

.movie-card-body h3 {
  margin: 0 0 10px;
  min-height: 2.7em;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.movie-card-link:hover h3 {
  color: var(--gold);
}

.movie-card-body p {
  min-height: 3.5em;
  margin: 0 0 14px;
  font-size: 0.93rem;
}

.movie-card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 0.82rem;
}

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

.tag-row span {
  padding: 5px 9px;
  color: var(--gold);
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.12);
  border-radius: 999px;
}

.category-band {
  margin-top: 72px;
  padding-bottom: 72px;
  background: rgba(30, 41, 59, 0.25);
}

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

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

.category-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 26px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.82));
  border: 1px solid rgba(250, 204, 21, 0.12);
  border-radius: var(--radius-md);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.46);
  box-shadow: 0 18px 42px rgba(250, 204, 21, 0.09);
}

.category-icon {
  font-size: 2.4rem;
}

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

.category-card em {
  color: var(--gold);
  font-style: normal;
  font-weight: 800;
}

.category-card small {
  color: var(--muted);
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: 30px;
  padding-top: 72px;
}

.list-stack {
  display: grid;
  gap: 16px;
}

.movie-card-list .movie-card-link {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-list .movie-card-poster {
  height: 170px;
}

.movie-card-list .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.movie-card-kicker {
  min-height: 0 !important;
  margin-bottom: 4px !important;
  color: var(--gold) !important;
  font-size: 0.78rem !important;
  font-weight: 800;
}

.ranking-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 100px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.36);
  border-radius: 14px;
  transition: background 0.25s ease;
}

.ranking-row:hover {
  background: rgba(250, 204, 21, 0.10);
}

.ranking-row span,
.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  border-radius: 999px;
}

.ranking-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row em,
.ranking-page-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.page-hero {
  margin-top: 34px;
  padding: 44px;
}

.small-page-hero h1 {
  margin-top: 12px;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--gold);
}

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: var(--muted);
}

.page-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(250, 204, 21, 0.10);
  border: 1px solid rgba(250, 204, 21, 0.20);
  border-radius: 999px;
}

.page-stat strong {
  color: var(--gold);
  font-size: 1.6rem;
}

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

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 180px;
  gap: 16px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
}

.filter-count {
  color: var(--muted);
}

.ranking-page {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.ranking-page-row {
  display: grid;
  grid-template-columns: 52px 86px minmax(0, 1fr) minmax(120px, auto) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(30, 41, 59, 0.46);
  border: 1px solid rgba(250, 204, 21, 0.10);
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.ranking-page-row:hover {
  transform: translateX(4px);
  border-color: rgba(250, 204, 21, 0.42);
}

.ranking-page-row img {
  width: 86px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.12);
}

.ranking-page-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-page-row b {
  color: var(--gold);
}

.detail-layout {
  padding-top: 32px;
}

.detail-breadcrumb {
  margin-bottom: 16px;
}

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

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--text);
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.58));
  border: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: #0f172a;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  border-radius: 999px;
  box-shadow: 0 0 46px rgba(250, 204, 21, 0.45);
}

.player-overlay strong {
  font-size: 1.15rem;
}

.detail-info-card {
  margin-top: 20px;
  padding: 30px;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.detail-info-card h1 {
  font-size: clamp(2rem, 5vw, 3.9rem);
  line-height: 1.1;
}

.compact-button {
  min-height: 40px;
  padding: 0 16px;
  flex-shrink: 0;
}

.detail-tags {
  margin: 18px 0;
}

.detail-info-card blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  color: var(--gold);
  font-size: 1.08rem;
  line-height: 1.75;
  background: rgba(250, 204, 21, 0.08);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
}

.detail-info-card h2 {
  margin: 26px 0 10px;
  font-size: 1.28rem;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.poster-panel,
.side-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(250, 204, 21, 0.12);
  border-radius: 20px;
}

.poster-panel h2 {
  margin: 16px 0 6px;
}

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

.side-related {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.25s ease;
}

.side-related:hover {
  background: rgba(250, 204, 21, 0.08);
}

.side-related img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.12);
}

.side-related strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
}

.side-related em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: var(--muted);
  transition: color 0.25s ease;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 18px;
  color: #64748b;
  border-top: 1px solid rgba(250, 204, 21, 0.10);
}

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 50px;
  color: var(--muted);
  text-align: center;
  background: rgba(30, 41, 59, 0.42);
  border: 1px dashed rgba(250, 204, 21, 0.24);
  border-radius: var(--radius-md);
}

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

  .header-search input {
    width: 190px;
  }

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

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

  .detail-side {
    position: static;
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 86px;
    padding-bottom: 80px;
  }

  .hero-poster {
    width: min(280px, 74vw);
    height: 360px;
    justify-self: start;
    transform: none;
  }

  .quick-search-panel,
  .split-section,
  .footer-grid,
  .filter-controls {
    grid-template-columns: 1fr;
  }

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

  .ranking-panel {
    position: static;
  }

  .ranking-page-row {
    grid-template-columns: 42px 70px minmax(0, 1fr);
  }

  .ranking-page-row em,
  .ranking-page-row b {
    display: none;
  }

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

  .detail-title-row {
    display: block;
  }

  .compact-button {
    margin-top: 14px;
  }
}

@media (max-width: 580px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

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

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .hero-actions,
  .wide-search,
  .footer-bottom {
    flex-direction: column;
  }

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

  .quick-search-panel,
  .page-hero,
  .filter-panel,
  .detail-info-card {
    padding: 22px;
    border-radius: 22px;
  }

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

  .movie-card-list .movie-card-link {
    grid-template-columns: 1fr;
  }

  .movie-card-list .movie-card-poster {
    height: 220px;
  }

  .ranking-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ranking-row em {
    display: none;
  }

  .side-related {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}
