:root {
  --primary-50: #e6f1ff;
  --primary-100: #cfe5ff;
  --primary-600: #005bb3;
  --primary-700: #004a91;
  --secondary-50: #f0f9ff;
  --secondary-600: #0284c7;
  --accent-400: #facc15;
  --accent-500: #eab308;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --white: #ffffff;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 22px 55px rgba(15, 23, 42, 0.22);
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--neutral-200);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.06);
}

.nav-bar {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 91, 179, 0.24);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand-text small {
  color: var(--neutral-500);
  font-size: 12px;
  white-space: nowrap;
}

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

.nav-links a,
.mobile-links a {
  color: var(--neutral-700);
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-links a:hover,
.mobile-links a.is-active {
  color: var(--primary-600);
  border-color: var(--primary-600);
}

.search-form,
.mobile-search,
.hero-search-card form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.mobile-search input,
.hero-search-card input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  background: var(--white);
  color: var(--neutral-900);
  min-width: 0;
}

.search-form input:focus,
.mobile-search input:focus,
.hero-search-card input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(0, 91, 179, 0.12);
}

.search-form button,
.mobile-search button,
.hero-search-card button,
.primary-btn,
.rank-action {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(0, 91, 179, 0.22);
}

.search-form button:hover,
.mobile-search button:hover,
.hero-search-card button:hover,
.primary-btn:hover,
.rank-action:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 11px 18px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 91, 179, 0.16);
  font-weight: 800;
}

.ghost-btn:hover,
.section-link:hover {
  color: var(--white);
  background: var(--primary-600);
  border-color: var(--primary-600);
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--neutral-100);
  color: var(--neutral-800);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  padding: 16px;
  background: rgba(255, 255, 255, 0.98);
}

.mobile-panel.is-open {
  display: block;
  animation: slideDown 0.24s ease;
}

.mobile-search input {
  flex: 1;
}

.mobile-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--neutral-900);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.12)), var(--hero-bg);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  min-height: 590px;
  display: flex;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 80px;
}

.hero-copy {
  width: min(720px, 100%);
  color: var(--white);
  animation: fadeIn 0.5s ease;
}

.hero-kicker,
.page-hero span,
.section-head span {
  display: inline-flex;
  color: var(--accent-400);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  max-width: 680px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

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

.hero-arrow {
  position: absolute;
  top: 45%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  z-index: 4;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

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

.hero-search-card {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-strong);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.hero-search-card h1 {
  margin: 0 0 4px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.12;
}

.hero-search-card p {
  margin: 0;
  color: var(--neutral-500);
}

.hero-search-card form input {
  flex: 1;
}

.hero-category-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-category-row a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 800;
}

.hero-category-row a:hover {
  color: var(--white);
  background: var(--primary-600);
}

.content-section {
  padding: 64px 0;
}

.white-section {
  background: var(--white);
}

.soft-section {
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

.dark-section {
  color: var(--white);
  background: var(--neutral-900);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--neutral-500);
  max-width: 650px;
}

.dark-section .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

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

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

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

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

.dark-section .movie-card {
  color: var(--neutral-900);
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 91, 179, 0.22);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 91, 179, 0.9);
  font-size: 13px;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--neutral-900);
  background: var(--accent-400);
  font-weight: 900;
}

.card-body {
  padding: 17px;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--neutral-500);
  font-size: 13px;
  font-weight: 700;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--primary-600);
}

.card-text {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--neutral-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-foot span {
  color: var(--accent-500);
  font-weight: 900;
}

.card-foot a {
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 900;
}

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

.tag-row span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 800;
}

.large-tags span {
  font-size: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.movie-card.compact .card-body {
  padding: 14px;
}

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

.movie-card.compact .card-text {
  min-height: 42px;
  font-size: 14px;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 280px;
}

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

.category-tile {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--white);
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.18)), var(--tile-bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}

.category-tile:hover {
  transform: translateY(-4px);
}

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

.category-tile strong {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--neutral-900), #062a50 70%);
  padding: 96px 0;
}

.category-hero,
.detail-hero {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.24)), var(--page-bg);
  background-size: cover;
  background-position: center;
}

.slim-hero {
  padding: 78px 0;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
}

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

.category-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-soft);
  background: var(--white);
}

.category-panel-main {
  display: block;
  min-height: 210px;
  padding: 28px;
  color: var(--white);
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.18)), var(--tile-bg);
  background-size: cover;
  background-position: center;
}

.category-panel-main span {
  color: var(--accent-400);
  font-weight: 900;
}

.category-panel-main h2 {
  margin: 10px 0;
  font-size: 30px;
}

.category-panel-main p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

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

.category-panel-links a {
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-panel-links a:hover {
  color: var(--white);
  background: var(--primary-600);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  flex: 1;
  color: var(--neutral-700);
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  color: var(--primary-700);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--primary-50);
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info h2 a:hover {
  color: var(--primary-600);
}

.rank-info p {
  margin: 0 0 9px;
  color: var(--neutral-600);
}

.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-info div span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  color: var(--white);
  padding: 70px 0;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.2)), var(--detail-bg);
  background-size: cover;
  background-position: center;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-strong);
}

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

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

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

.player-section {
  background: #0b0b0f;
  padding: 36px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-strong);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(0, 91, 179, 0.45), rgba(0, 0, 0, 0.72));
  text-align: center;
}

.player-button span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-700);
  background: var(--white);
  font-size: 30px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.player-button strong {
  font-size: 20px;
}

.player-shell.is-playing .player-button {
  opacity: 0;
  pointer-events: none;
}

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

.detail-article,
.side-panel {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-article {
  padding: 30px;
}

.detail-article h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--neutral-700);
  font-size: 17px;
}

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

.info-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--neutral-50);
}

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

.info-list dd {
  margin: 0;
}

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

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

.side-list a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
  background: var(--neutral-50);
}

.side-list a:hover {
  color: var(--white);
  background: var(--primary-600);
}

.side-list small {
  color: var(--neutral-500);
}

.side-list a:hover small {
  color: rgba(255, 255, 255, 0.72);
}

.search-results {
  padding: 70px 0;
  background: var(--white);
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: var(--neutral-900);
}

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

.footer-grid strong,
.footer-grid h2 {
  display: block;
  margin: 0 0 12px;
  color: var(--white);
  font-size: 20px;
}

.footer-grid p {
  margin: 0;
  max-width: 430px;
}

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

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

.footer-links a:hover {
  color: var(--white);
  background: var(--primary-600);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .nav-links,
  .search-form {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

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

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

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

  .brand {
    min-width: 0;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    min-height: 610px;
    align-items: flex-start;
    padding-top: 76px;
  }

  .hero-search-card {
    bottom: 18px;
  }

  .hero-dots {
    bottom: 180px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .rank-row {
    grid-template-columns: 34px 72px 1fr;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

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

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

  .side-panel {
    position: static;
  }
}

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

  .hero-copy h2,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-search-card form,
  .mobile-search {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search-card input,
  .hero-search-card button,
  .mobile-search input,
  .mobile-search button {
    width: 100%;
  }
}
