:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --text: #2f1c0a;
  --muted: #8a5a24;
  --primary: #b45309;
  --primary-dark: #7c2d12;
  --primary-soft: #f59e0b;
  --border: rgba(180, 83, 9, 0.18);
  --shadow: 0 20px 50px rgba(120, 53, 15, 0.14);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.30), transparent 36rem),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 48%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 251, 235, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #b45309 65%, #7c2d12);
  box-shadow: 0 14px 30px rgba(180, 83, 9, 0.28);
}

.brand-text {
  display: grid;
  gap: 0;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  color: #5f3712;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-dark);
  background: rgba(245, 158, 11, 0.16);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  padding: 4px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input,
.hero-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.header-search input {
  padding: 8px 10px 8px 14px;
  min-width: 0;
}

.header-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.24);
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.16);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-dark);
  border-radius: 99px;
}

.hero-section {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(115deg, rgba(124, 45, 18, 0.94), rgba(180, 83, 9, 0.76) 44%, rgba(251, 191, 36, 0.40)),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.24), transparent 18rem);
}

.hero-orb {
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  filter: blur(20px);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.26);
}

.hero-orb-one {
  top: 70px;
  left: -120px;
}

.hero-orb-two {
  right: -160px;
  bottom: -80px;
  background: rgba(255, 237, 213, 0.24);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.72fr);
  gap: 44px;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 96px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-media {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 237, 213, 0.28), rgba(180, 83, 9, 0.18)),
    radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.35), transparent 18rem);
  box-shadow: 0 34px 80px rgba(67, 20, 7, 0.32);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(67, 20, 7, 0.72), rgba(67, 20, 7, 0.08) 58%, rgba(67, 20, 7, 0.35)),
    linear-gradient(0deg, rgba(67, 20, 7, 0.72), transparent 55%);
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.image-missing {
  display: none;
}

.hero-copy {
  color: #fff7ed;
  text-shadow: 0 3px 18px rgba(67, 20, 7, 0.25);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fef3c7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 251, 235, 0.90);
  font-size: 17px;
}

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

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  color: var(--primary-dark);
  font-weight: 900;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 34px rgba(120, 53, 15, 0.32);
}

.btn-ghost {
  color: #fff7ed;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
}

.btn-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: #fff7ed;
}

.quick-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
}

.hero-search input,
.search-page-form input {
  padding: 12px 16px;
}

.hero-search button,
.search-page-form button {
  padding: 0 22px;
}

.quick-stats {
  display: flex;
  gap: 12px;
}

.quick-stats div {
  min-width: 104px;
  padding: 12px 16px;
  text-align: center;
  border-radius: 20px;
  background: #fffbeb;
}

.quick-stats strong {
  display: block;
  color: var(--primary-dark);
  font-size: 24px;
  line-height: 1;
}

.quick-stats span {
  color: var(--muted);
  font-size: 12px;
}

.page-main {
  padding: 46px 0 70px;
}

.section-block {
  margin-top: 48px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

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

.text-link {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(254, 243, 199, 0.88)),
    radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.25), transparent 10rem);
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.10);
}

.category-card {
  min-height: 170px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(120, 53, 15, 0.16);
}

.category-card span,
.category-title span {
  display: inline-flex;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.category-card strong,
.category-title strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.15;
}

.category-card small,
.category-card em {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(120, 53, 15, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 256px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.34), rgba(124, 45, 18, 0.76)),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.34), transparent 10rem);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(67, 20, 7, 0.62));
  pointer-events: none;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(124, 45, 18, 0.82);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-meta a {
  color: var(--primary-dark);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #6b4423;
  font-size: 14px;
}

.tag-list span {
  color: var(--primary-dark);
  background: rgba(245, 158, 11, 0.14);
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.rank-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.rank-panel-head span {
  padding: 4px 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  background: var(--primary);
}

.rank-panel-head h2 {
  margin: 0;
  font-size: 24px;
}

.rank-panel-head a {
  margin-left: auto;
  color: var(--primary-dark);
  font-weight: 900;
}

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

.rank-row,
.rank-table-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fffbeb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover,
.rank-table-row:hover {
  background: #fef3c7;
  transform: translateX(2px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.rank-row strong,
.rank-table-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row small,
.rank-table-row em,
.rank-table-row small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 56px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(124, 45, 18, 0.94), rgba(180, 83, 9, 0.76)),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.20), transparent 18rem);
  color: #fff7ed;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.06em;
  line-height: 1;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 251, 235, 0.88);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 14px 34px rgba(120, 53, 15, 0.08);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: 16px;
  background: #fffbeb;
}

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

.category-overview-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card p {
  color: var(--muted);
}

.category-count {
  display: inline-flex;
  margin: 8px 0 14px;
  padding: 6px 12px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
  background: var(--primary);
}

.category-overview-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.category-overview-card li {
  overflow: hidden;
  color: #6b4423;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-main {
  padding-top: 30px;
}

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

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: var(--shadow);
}

.detail-poster {
  min-height: 440px;
  border-radius: 26px;
}

.detail-poster .poster-img {
  height: 440px;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.detail-info .eyebrow {
  color: var(--primary);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.lead-text {
  max-width: 820px;
  margin: 18px 0 0;
  color: #6b4423;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 18px;
}

.detail-meta span {
  padding: 8px 12px;
  color: var(--primary-dark);
  font-weight: 800;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
}

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

.player-section,
.content-section {
  margin-top: 34px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.22), transparent 20rem),
    linear-gradient(135deg, #1c0f05, #43200a);
  box-shadow: 0 28px 72px rgba(67, 20, 7, 0.26);
}

.movie-video {
  width: 100%;
  height: 520px;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff7ed;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

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

.play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  margin: 0;
  color: #fde68a;
  text-align: center;
}

.detail-copy {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.08);
}

.detail-copy h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-copy h2:not(:first-child) {
  margin-top: 28px;
}

.detail-copy p {
  margin: 0;
  color: #5f3712;
  font-size: 16px;
}

.detail-copy dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.detail-copy dt {
  color: var(--muted);
  font-weight: 900;
}

.detail-copy dd {
  margin: 0;
}

.movie-card--compact .poster {
  min-height: 196px;
}

.movie-card--compact .poster-img {
  height: 218px;
}

.movie-card--compact h3 {
  font-size: 17px;
}

.rank-table-row {
  grid-template-columns: 58px minmax(0, 1fr) auto;
}

.rank-table-row em {
  grid-column: 2;
}

.rank-table-row small {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  font-weight: 900;
}

.search-page-form {
  max-width: 680px;
  margin-top: 26px;
}

.search-page-form button {
  min-height: 44px;
}

.empty-note {
  display: none;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 20px;
  background: #fffbeb;
}

.empty-note.is-visible {
  display: block;
}

.index-list {
  display: grid;
  gap: 24px;
}

.index-group {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.index-group h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.index-group ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.index-group a {
  display: grid;
  gap: 2px;
  color: var(--primary-dark);
  font-weight: 800;
}

.index-group span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.site-footer {
  margin-top: 70px;
  padding: 44px 0;
  color: #fef3c7;
  background: linear-gradient(135deg, #431407, #7c2d12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 420px;
  color: rgba(254, 243, 199, 0.78);
}

.site-footer h3 {
  margin: 0 0 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-media {
    min-height: 360px;
  }

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

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 780px) {
  .nav-wrap {
    min-height: 66px;
  }

  .brand-text small {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 251, 235, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .main-nav {
    display: flex;
  }

  .nav-link {
    justify-content: center;
  }

  .hero-section {
    min-height: 720px;
  }

  .hero-slide {
    padding-top: 48px;
  }

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

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

  .quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-search,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search button,
  .search-page-form button {
    min-height: 44px;
  }

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

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    max-width: 360px;
  }

  .video-shell,
  .movie-video {
    min-height: 320px;
    height: 320px;
  }

  .rank-table-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-table-row small {
    grid-column: 2;
    grid-row: auto;
  }

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

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

  .hero-section {
    min-height: 760px;
  }

  .hero-media,
  .hero-img {
    min-height: 280px;
  }

  .movie-grid,
  .category-grid,
  .overview-grid,
  .index-group ul {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .poster-img {
    height: 250px;
  }

  .detail-copy {
    padding: 22px;
  }
}
