:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.82);
  --surface-strong: #0f172a;
  --surface-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f97316;
  --accent-2: #ef4444;
  --accent-3: #facc15;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

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

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.18);
}

.header-search,
.mobile-search,
.big-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.search-controls input,
.search-controls select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.84);
  outline: none;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.18);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 88vw);
  display: none;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.search-panel.open {
  display: block;
}

.search-suggestion {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-suggestion img {
  width: 52px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #111827;
}

.search-suggestion strong {
  display: block;
  margin-bottom: 4px;
}

.search-suggestion span {
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-search input {
  width: 100%;
  padding: 12px 14px;
}

main {
  min-height: 65vh;
}

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
  filter: saturate(1.08);
}

.hero-shade,
.detail-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
  padding: 90px 0 70px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  color: #fde68a;
  background: rgba(249, 115, 22, 0.14);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-text h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.hero-text p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

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

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 38px rgba(239, 68, 68, 0.26);
}

.ghost-button,
.mini-button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover,
.mini-button:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover,
.top-rank-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  background: #111827;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.35);
}

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

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.search-hero-panel,
.page-hero {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(239, 68, 68, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  align-items: center;
  gap: 28px;
  margin-top: -38px;
  padding: 30px;
  position: relative;
  z-index: 5;
}

.search-hero-copy h2,
.section-heading h2,
.panel-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-hero-copy h2,
.section-heading h2,
.panel-head h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.search-hero-copy p,
.page-hero p {
  color: var(--soft);
  line-height: 1.8;
}

.big-search input {
  flex: 1;
  min-height: 54px;
  padding: 0 18px;
}

.big-search button {
  min-height: 54px;
  padding-inline: 26px;
}

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

.section-more {
  color: #fed7aa;
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 60%),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  display: block;
}

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

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

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

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.94);
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.28);
}

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

.movie-meta-line {
  margin-bottom: 8px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 72px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.card-foot a {
  color: #fed7aa;
  font-weight: 800;
}

.rank-panel,
.detail-side-card,
.detail-article,
.search-page-box,
.ranking-list-section {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 24px;
}

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

.rank-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.6);
}

.rank-no {
  color: #f97316;
  font-weight: 950;
}

.rank-list a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 36px auto 0;
  padding: 54px;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

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

.category-card-large {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card-large a {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 220px;
  padding: 18px;
}

.category-card-large img {
  width: 160px;
  height: 184px;
  border-radius: 20px;
  object-fit: cover;
  background: #111827;
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.filter-bar {
  margin-bottom: 24px;
}

.filter-bar input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
}

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

.top-rank-card {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(2, 6, 23, 0.94) 100%);
}

.top-rank-card div,
.top-rank-no {
  position: absolute;
  z-index: 2;
}

.top-rank-no {
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 28px;
  font-weight: 950;
}

.top-rank-card div {
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.top-rank-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.top-rank-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.ranking-list-section {
  padding: 22px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 54px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row-poster img {
  width: 86px;
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.search-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 150px 150px;
  gap: 12px;
  margin-bottom: 22px;
}

.search-controls input,
.search-controls select {
  min-height: 52px;
  padding: 0 16px;
}

.search-result-title {
  margin-bottom: 18px;
  color: #fed7aa;
  font-weight: 900;
}

.search-empty {
  grid-column: 1 / -1;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  padding: 34px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.52);
  text-align: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

.detail-bg {
  filter: blur(4px) saturate(1.1);
  transform: scale(1.04);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 62px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
  color: var(--soft);
  font-size: 14px;
}

.breadcrumb a {
  color: #fed7aa;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
}

.detail-line {
  max-width: 820px;
  margin: 22px 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.player-section {
  padding-top: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), rgba(2, 6, 23, 0.42));
}

.player-cover-button span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 22px 60px rgba(249, 115, 22, 0.34);
  font-size: 34px;
}

.player-shell.is-playing .player-cover-button {
  display: none;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: none;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 13px;
}

.player-status.open {
  display: block;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.detail-article,
.detail-side-card,
.search-page-box {
  padding: 28px;
}

.detail-article h2,
.detail-side-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.detail-article p {
  margin: 0 0 26px;
  color: var(--soft);
  line-height: 2;
  font-size: 16px;
}

.detail-side-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.detail-side-card dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-side-card dd {
  margin: -10px 0 0;
  color: #fff;
  font-weight: 800;
}

.full {
  width: 100%;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.78);
}

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

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

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

.footer-links a {
  color: #fed7aa;
  font-weight: 800;
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

  .hero-content,
  .split-layout,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

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

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

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

  .search-hero-panel,
  .footer-inner,
  .detail-grid,
  .category-card-large a,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .big-search,
  .mobile-search {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .search-controls {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 24px;
  }

  .detail-grid {
    align-items: start;
  }

  .detail-poster {
    width: min(240px, 80vw);
  }

  .ranking-row-poster img,
  .category-card-large img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .page-actions {
    display: grid;
  }

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