:root {
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --pink: #ec4899;
  --orange: #f97316;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #ffe4e6;
  --paper: #ffffff;
  --soft: #fff1f2;
  --shadow: 0 22px 60px rgba(190, 18, 60, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 8rem, rgba(249, 115, 22, 0.12), transparent 30rem),
    linear-gradient(180deg, #fff7f8 0%, #ffffff 34%, #fff7ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.header-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--rose-dark);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  color: #fff;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.desktop-nav a,
.mobile-nav a {
  color: #4b5563;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.search-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.search-form input,
.quick-search-panel input,
.catalog-controls input,
.catalog-controls select {
  border: 1px solid rgba(244, 63, 94, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.72rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, width 0.25s ease;
}

.search-form input {
  width: 13rem;
}

.search-form input:focus,
.quick-search-panel input:focus,
.catalog-controls input:focus,
.catalog-controls select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.search-form button,
.quick-search-panel button,
.primary-btn,
.more-link {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  padding: 0.75rem 1.15rem;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 14px 28px rgba(244, 63, 94, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover,
.quick-search-panel button:hover,
.primary-btn:hover,
.more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(244, 63, 94, 0.34);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--rose);
  padding: 0.7rem 1rem;
  font-weight: 800;
}

.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  border-top: 1px solid rgba(254, 205, 211, 0.7);
  background: rgba(255, 255, 255, 0.96);
  transition: max-height 0.25s ease;
}

body.nav-open .mobile-nav {
  max-height: 32rem;
  padding-bottom: 1rem;
}

.mobile-nav a {
  display: block;
  padding: 0.8rem 0;
}

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 1.2rem;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.52fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 4.8rem);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.76) 40%, rgba(17, 24, 39, 0.22) 100%),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease;
}

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

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-head span,
.page-hero span,
.category-block-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0.85rem 0 0.45rem;
  font-size: clamp(2.2rem, 5vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 1.2rem 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 3.3rem);
  line-height: 1.05;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #be123c;
  background: rgba(255, 241, 242, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.ghost-btn {
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-weight: 900;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-cover {
  position: relative;
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 2 / 3;
  justify-self: end;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-cover:hover {
  transform: rotate(0) scale(1.02);
}

.hero-cover span,
.score-badge,
.detail-poster span {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  min-width: 3rem;
  height: 2.25rem;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.hero-dots {
  position: absolute;
  left: clamp(2rem, 5vw, 4.8rem);
  bottom: 2rem;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 2.6rem;
  height: 0.38rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  border: 1px solid rgba(254, 205, 211, 0.75);
  border-radius: 18px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-thumb:hover {
  border-color: var(--rose);
  transform: translateY(-3px);
}

.hero-thumb img {
  width: 3rem;
  height: 4rem;
  border-radius: 12px;
  flex: 0 0 auto;
}

.hero-thumb span {
  overflow: hidden;
  color: #374151;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-search-panel {
  max-width: 960px;
  margin: 1.2rem auto 0;
  padding: 0 1rem;
}

.quick-search-panel form {
  display: flex;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(254, 205, 211, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.quick-search-panel input {
  flex: 1;
  min-width: 0;
}

.page-section,
.category-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.tint-section {
  max-width: none;
  padding-left: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  padding-right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.85), rgba(255, 247, 237, 0.9));
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.section-head h2,
.category-block-head h2,
.content-card h2,
.side-card h2 {
  margin: 0.3rem 0 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  letter-spacing: -0.04em;
}

.section-head p,
.category-block-head p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.7;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(254, 205, 211, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(244, 63, 94, 0.55);
  transform: translateY(-6px);
  box-shadow: 0 24px 42px rgba(244, 63, 94, 0.16);
}

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

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

.poster-wrap img {
  transition: transform 0.35s ease;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--rose);
  font-size: 0.75rem;
  font-weight: 900;
}

.card-content strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 1.05rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-content em,
.rank-info em,
.side-list em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact .card-content {
  padding: 0.85rem;
}

.movie-card.compact .tag-row {
  display: none;
}

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

.category-tile {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(254, 205, 211, 0.9);
  border-radius: 24px;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.16), transparent 56%),
    linear-gradient(135deg, #fff, #fff1f2);
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.09);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  border-color: var(--rose);
  transform: translateY(-5px);
}

.category-tile span {
  color: var(--rose);
  font-size: 1.4rem;
  font-weight: 900;
}

.category-tile strong {
  color: #475569;
  line-height: 1.7;
}

.split-section {
  display: block;
}

.rank-list {
  display: grid;
  gap: 0.9rem;
}

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

.full-rank {
  grid-template-columns: 1fr;
}

.rank-item {
  display: grid;
  grid-template-columns: 3rem 4.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(254, 205, 211, 0.9);
  border-radius: 22px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  border-color: var(--rose);
  transform: translateX(5px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-weight: 900;
}

.rank-item img {
  width: 4.6rem;
  height: 6.2rem;
  border-radius: 14px;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.rank-info strong {
  overflow: hidden;
  color: #111827;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info span {
  overflow: hidden;
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--orange);
  font-size: 1.3rem;
  font-weight: 900;
}

.more-link {
  display: inline-flex;
  margin-top: 1.4rem;
}

.page-hero {
  position: relative;
  max-width: 1280px;
  margin: 2rem auto 0;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(2.2rem, 5vw, 4.5rem);
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.26), transparent 18rem),
    linear-gradient(135deg, #881337, #e11d48 56%, #fb923c);
  box-shadow: var(--shadow);
}

.page-hero.slim-hero {
  margin-top: 2rem;
}

.page-hero span {
  color: #ffe4e6;
}

.page-hero p {
  max-width: 760px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 800;
}

.crumbs a:hover {
  color: #fff;
}

.catalog-section {
  padding-top: 2rem;
}

.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1.4rem;
  padding: 1rem;
  border: 1px solid rgba(254, 205, 211, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.08);
}

.catalog-controls input {
  flex: 1 1 20rem;
}

.catalog-controls select {
  min-width: 12rem;
}

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

.category-block {
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.category-block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.3rem;
}

.category-block-head a {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  color: var(--rose-dark);
  background: #ffe4e6;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.32)),
    var(--detail-bg);
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.detail-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 1rem;
  display: grid;
  grid-template-columns: minmax(14rem, 320px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.detail-copy {
  max-width: 820px;
}

.detail-copy .crumbs {
  margin-top: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.detail-meta span {
  border-radius: 999px;
  padding: 0.48rem 0.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.9);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.4rem;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 1.2rem;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid rgba(254, 205, 211, 0.88);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.09);
}

.player-card {
  padding: 0.8rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #020617;
}

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.66));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-shell.is-playing .play-mask {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.45);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.28rem;
  border-top: 0.9rem solid transparent;
  border-bottom: 0.9rem solid transparent;
  border-left: 1.35rem solid #fff;
}

.play-mask strong {
  font-size: 1.1rem;
}

.content-card,
.side-card {
  padding: 1.4rem;
}

.content-card p {
  margin: 0.8rem 0 0;
  color: #475569;
  line-height: 2;
  font-size: 1.02rem;
}

.side-card dl {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem 0.8rem;
  margin: 1rem 0 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.side-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.side-list a {
  display: grid;
  grid-template-columns: 4.1rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.side-list img {
  width: 4.1rem;
  height: 5.6rem;
  border-radius: 14px;
}

.side-list span {
  min-width: 0;
}

.side-list strong {
  display: block;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-list em {
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(254, 205, 211, 0.88);
  background: rgba(255, 255, 255, 0.8);
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-shell strong {
  color: var(--rose-dark);
  font-size: 1.15rem;
}

.footer-shell p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #4b5563;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--rose);
}

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

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

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

  .mobile-nav {
    display: block;
  }

  .search-form {
    margin-left: auto;
  }

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

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

@media (max-width: 900px) {
  .header-shell {
    flex-wrap: wrap;
  }

  .search-form {
    order: 3;
    width: 100%;
  }

  .search-form input {
    width: 100%;
    flex: 1;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .hero-cover {
    justify-self: start;
    width: 180px;
    grid-row: 1;
  }

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

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

  .home-rank {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(100%, 260px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 1rem;
  }

  .hero-carousel {
    min-height: 760px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 1.2rem;
  }

  .hero-dots {
    left: 1.2rem;
    bottom: 1rem;
  }

  .hero-actions,
  .quick-search-panel form,
  .footer-shell,
  .category-block-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-strip,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: block;
  }

  .rank-item {
    grid-template-columns: 2.6rem 3.8rem minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 1 / -1;
  }

  .rank-item img {
    width: 3.8rem;
    height: 5.2rem;
  }

  .page-section,
  .category-block {
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }

  .page-hero {
    margin: 1rem;
    padding: 2rem 1.1rem;
    border-radius: 24px;
  }

  .catalog-controls input,
  .catalog-controls select {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }
}
