:root {
  --rain-50: #f8fafc;
  --rain-100: #eef2f7;
  --rain-200: #dbe4ef;
  --rain-300: #b8c7d9;
  --rain-400: #8ba0b7;
  --rain-500: #667d97;
  --rain-600: #4c627a;
  --rain-700: #37495e;
  --rain-800: #243447;
  --rain-900: #142033;
  --mist-50: #eefdf8;
  --mist-100: #d5f7ed;
  --mist-200: #acebdc;
  --mist-300: #79ddc7;
  --mist-400: #45c6ad;
  --mist-500: #25a991;
  --mist-600: #168875;
  --mist-700: #126c60;
  --mist-800: #11574f;
  --mist-900: #0f4843;
  --gold: #facc15;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 20px 45px rgba(20, 32, 51, 0.12);
  --soft-shadow: 0 10px 28px rgba(20, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--rain-800);
  background: var(--rain-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--rain-200);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(20, 32, 51, 0.06);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
}

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

.brand-mark,
.footer-logo span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--mist-500), var(--mist-800));
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(22, 136, 117, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-text strong {
  color: var(--rain-900);
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
}

.brand-text small {
  color: var(--rain-500);
  font-size: 12px;
}

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

.nav-link {
  color: var(--rain-700);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--mist-700);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--rain-100);
  border-radius: 999px;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--rain-700);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

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

.mobile-nav .nav-link {
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
  background: var(--mist-50);
}

.hero-carousel {
  position: relative;
  height: min(80vh, 760px);
  min-height: 540px;
  overflow: hidden;
  background: var(--rain-900);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding: 0 0 96px;
  color: var(--white);
}

.hero-kicker,
.page-hero span,
.section-heading span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.6vw, 19px);
}

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

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-light {
  color: var(--rain-900);
  background: var(--white);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.btn-light:hover {
  background: var(--mist-100);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  bottom: 34px;
  z-index: 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: calc(50% - 92px);
}

.hero-control.next {
  right: calc(50% - 92px);
}

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

.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 28px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: -44px auto 0;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--rain-200);
  border-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 6;
}

.search-strip h2 {
  margin: 0 0 8px;
  color: var(--rain-900);
  font-size: 26px;
}

.search-strip p {
  margin: 0;
  color: var(--rain-600);
}

.home-search-form {
  display: flex;
  overflow: hidden;
  background: var(--rain-100);
  border: 1px solid var(--rain-200);
  border-radius: 999px;
}

.home-search-form input {
  min-width: 0;
  flex: 1;
  padding: 0 20px;
  background: transparent;
  border: 0;
  outline: 0;
}

.home-search-form button {
  padding: 0 26px;
  color: var(--white);
  font-weight: 800;
  background: var(--mist-600);
  border: 0;
  cursor: pointer;
}

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

.white-block {
  width: 100%;
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  background: var(--white);
}

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

.section-heading h2 {
  margin: 2px 0 0;
  color: var(--rain-900);
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
}

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

.section-heading.dark h2,
.section-heading.dark a {
  color: var(--white);
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--rain-100);
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 10;
}

.movie-card.editor {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.poster-link img,
.wide-poster img,
.category-cover img,
.category-tile img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.wide-card:hover .wide-poster img,
.category-overview-card:hover .category-cover img,
.category-tile:hover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(22, 136, 117, 0.86);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

.movie-card-body h2,
.wide-body h2,
.category-overview-card h2 {
  margin: 0 0 8px;
  color: var(--rain-900);
  font-size: 17px;
  line-height: 1.35;
}

.movie-card.editor .movie-card-body h2,
.movie-card.editor .movie-card-body p,
.movie-card.editor .meta-line {
  color: var(--white);
}

.movie-card-body h2 a:hover,
.wide-body h2 a:hover,
.category-overview-card h2 a:hover {
  color: var(--mist-700);
}

.movie-card-body p,
.wide-body p,
.category-overview-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--rain-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-line {
  color: var(--rain-500);
  font-size: 12px;
}

.meta-line span:not(:last-child)::after {
  margin-left: 10px;
  color: var(--rain-300);
  content: "·";
}

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

.tag-row span {
  padding: 4px 8px;
  color: var(--mist-700);
  font-size: 12px;
  background: var(--mist-50);
  border-radius: 999px;
}

.horizontal-row {
  display: grid;
  grid-auto-columns: minmax(220px, 270px);
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  color: var(--white);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.category-tile::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 32, 51, 0.9), rgba(20, 32, 51, 0.18));
  content: "";
}

.category-tile span,
.category-tile p {
  position: absolute;
  z-index: 2;
  right: 18px;
  left: 18px;
}

.category-tile span {
  bottom: 70px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  bottom: 18px;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-section,
.accent-block {
  background: linear-gradient(135deg, var(--mist-600), var(--mist-900));
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-list.full .rank-item {
  color: var(--rain-800);
  background: var(--white);
  border-color: var(--rain-200);
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.2);
}

.rank-list.full .rank-item:hover {
  background: var(--mist-50);
}

.rank-num {
  color: var(--gold);
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

.rank-item img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  background: var(--rain-100);
  border-radius: 10px;
}

.rank-title {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.rank-list.full .rank-meta {
  color: var(--rain-500);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
}

.wide-poster {
  display: block;
  min-height: 210px;
  overflow: hidden;
  background: var(--rain-100);
}

.wide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  min-height: 320px;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
  color: var(--white);
  background: linear-gradient(135deg, rgba(20, 32, 51, 0.94), rgba(18, 108, 96, 0.9)), var(--rain-900);
}

.page-hero > div {
  max-width: 820px;
}

.page-hero h1 {
  margin: 10px 0 16px;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 160px 180px;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--rain-700);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  color: var(--rain-800);
  background: var(--rain-50);
  border: 1px solid var(--rain-200);
  border-radius: 14px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--mist-400);
  box-shadow: 0 0 0 4px rgba(37, 169, 145, 0.12);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.category-cover {
  display: block;
  min-height: 220px;
  overflow: hidden;
  background: var(--rain-100);
  border-radius: 18px;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-links a {
  padding: 5px 9px;
  color: var(--mist-700);
  font-size: 12px;
  background: var(--mist-50);
  border-radius: 999px;
}

.detail-main {
  background: var(--rain-50);
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: var(--white);
  background: var(--rain-900);
}

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

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 32, 51, 1), rgba(20, 32, 51, 0.62), rgba(20, 32, 51, 0.32));
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 80px 0 70px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--rain-100);
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.05;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.detail-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -48px auto 0;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--black);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(20, 32, 51, 0.28);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: var(--black);
  display: block;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--white);
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12));
  border: 0;
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.player-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding-left: 6px;
  font-size: 34px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.player-overlay strong {
  max-width: min(80%, 720px);
  font-size: 22px;
}

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

.content-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--rain-200);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.content-card:first-child {
  grid-column: 1 / -1;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--rain-900);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--rain-700);
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.info-list dt {
  color: var(--rain-500);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--rain-800);
}

.site-footer {
  color: var(--rain-100);
  background: var(--rain-900);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 40px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 420px;
  color: var(--rain-300);
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 16px;
}

.footer-col a {
  color: var(--rain-300);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--mist-300);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  color: var(--rain-400);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1180px) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .hero-carousel {
    min-height: 560px;
  }

  .search-strip,
  .filter-panel,
  .footer-inner,
  .detail-inner,
  .detail-content,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .search-strip {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

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

  .rank-list.compact,
  .wide-grid {
    grid-template-columns: 1fr;
  }

  .detail-inner {
    align-items: start;
    padding-top: 42px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .detail-hero,
  .detail-inner {
    min-height: auto;
  }

  .player-section {
    margin-top: 0;
    width: 100%;
  }

  .player-shell {
    border-radius: 0;
  }
}

@media (max-width: 620px) {
  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero-content {
    padding-bottom: 88px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-control.prev {
    left: calc(50% - 78px);
  }

  .hero-control.next {
    right: calc(50% - 78px);
  }

  .home-search-form {
    border-radius: 20px;
    flex-direction: column;
  }

  .home-search-form input,
  .home-search-form button {
    min-height: 46px;
  }

  .movie-grid,
  .large-grid,
  .catalog-grid,
  .editor-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .wide-card {
    grid-template-columns: 1fr;
  }

  .wide-poster,
  .category-cover {
    min-height: 260px;
  }

  .rank-item {
    grid-template-columns: 40px 52px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .section-wrap,
  .rank-inner {
    padding: 48px 0;
  }
}
