:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-soft: #111827;
  --line: rgba(51, 65, 85, 0.86);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --teal: #14b8a6;
  --teal-bright: #2dd4bf;
  --purple: #7c3aed;
  --orange: #f97316;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
  --radius: 1.2rem;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 16% 4%, rgba(20, 184, 166, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(124, 58, 237, 0.22), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  box-shadow: 0 16px 40px rgba(20, 184, 166, 0.28);
}

.brand-text {
  font-size: 1.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 0.5rem;
}

.nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--teal-bright);
}

.header-search {
  margin-left: auto;
  width: min(360px, 35vw);
  display: flex;
  align-items: center;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.header-search input,
.hero-search input,
.filter-bar input,
.mobile-panel input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: none;
  background: transparent;
}

.header-search input {
  padding: 0.72rem 0.95rem;
}

.header-search button,
.hero-search button,
.mobile-panel button {
  border: 0;
  color: white;
  background: var(--teal);
  padding: 0.72rem 1rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.7);
}

.menu-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 4px auto;
  background: white;
}

.mobile-panel {
  display: none;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.open {
  display: grid;
  gap: 0.85rem;
}

.mobile-panel a {
  color: var(--muted-strong);
  font-weight: 700;
}

.mobile-panel form {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 999px;
}

.mobile-panel input {
  padding: 0.7rem 0.9rem;
}

.hero-carousel {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
}

.hero-slides {
  position: relative;
  min-height: 76vh;
}

.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-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.12) contrast(1.05);
}

.hero-gradient,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.96) 100%),
    radial-gradient(circle at 62% 25%, rgba(20, 184, 166, 0.22), transparent 24rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), #020617 96%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 2rem));
  min-height: 76vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
  padding: 6rem 28rem 8rem 0;
}

.hero-kicker {
  margin-bottom: 1rem;
  color: var(--teal-bright);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-banner h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-content p,
.page-banner p,
.detail-copy p {
  max-width: 700px;
  margin: 1.3rem 0 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.meta-line span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(20, 184, 166, 0.1);
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
}

.primary-btn,
.ghost-btn,
.text-btn,
.rank-play,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--teal), #0f766e);
  padding: 0.92rem 1.35rem;
  box-shadow: 0 18px 46px rgba(20, 184, 166, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: var(--text);
  background: rgba(15, 23, 42, 0.55);
  padding: 0.9rem 1.25rem;
}

.text-btn,
.section-more {
  color: var(--teal-bright);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-play:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: absolute;
  z-index: 3;
  right: max(2rem, calc((100vw - var(--max)) / 2));
  top: 50%;
  width: min(330px, 26vw);
  aspect-ratio: 3 / 4;
  transform: translateY(-50%);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.8rem;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

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

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 5;
  width: min(var(--max), calc(100% - 2rem));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-search {
  width: min(620px, 100%);
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

.hero-search input {
  padding: 1rem 1.1rem;
}

.hero-search button {
  padding-inline: 1.25rem;
}

.hero-dots {
  display: flex;
  gap: 0.6rem;
}

.hero-dot {
  width: 0.72rem;
  height: 0.72rem;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.hero-dot.active {
  width: 2.2rem;
  background: var(--teal-bright);
}

.hero-thumbs {
  position: absolute;
  right: max(2rem, calc((100vw - var(--max)) / 2));
  bottom: 2rem;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 64px);
  gap: 0.6rem;
}

.hero-thumb {
  position: relative;
  height: 78px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.8rem;
  opacity: 0.62;
}

.hero-thumb.active {
  border-color: var(--teal-bright);
  opacity: 1;
}

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

.hero-thumb span {
  position: absolute;
  inset-inline: 0.3rem;
  bottom: 0.25rem;
  overflow: hidden;
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-block {
  padding: 4.8rem 0;
}

.tight-top {
  padding-top: 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.46);
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.16), rgba(15, 23, 42, 0.72));
}

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

.poster-link img,
.compact-card img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.82));
}

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
}

.poster-play {
  right: 0.8rem;
  bottom: 0.8rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: white;
  background: rgba(20, 184, 166, 0.88);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.3);
}

.rank-badge {
  top: 0.75rem;
  left: 0.75rem;
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.75rem;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--purple));
}

.card-body {
  padding: 1rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-bottom: 0.72rem;
}

.meta-line span {
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  padding: 0.25rem 0.52rem;
  font-size: 0.72rem;
}

.card-body h3 {
  margin: 0;
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.1rem;
  margin: 0.6rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 0.78rem;
}

.tag-row span {
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
}

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

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

.category-card {
  min-height: 135px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: var(--radius);
  padding: 1.2rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.22), transparent 10rem),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.46);
}

.category-card strong {
  font-size: 1.25rem;
}

.category-card span {
  color: var(--muted);
  line-height: 1.65;
}

.rank-panel,
.player-card,
.story-panel,
.category-overview-card {
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 1.2rem;
}

.rank-head,
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rank-head span,
.overview-head h2 {
  color: white;
  font-size: 1.2rem;
  font-weight: 850;
}

.rank-head a,
.overview-head a {
  color: var(--teal-bright);
  font-weight: 800;
}

.rank-panel ol {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-panel li a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem;
  border-radius: 0.8rem;
  background: rgba(2, 6, 23, 0.38);
}

.rank-panel b {
  color: var(--teal-bright);
}

.rank-panel span {
  overflow: hidden;
  color: var(--muted-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-panel em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.page-banner {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(51, 65, 85, 0.84);
  padding: 5.5rem 0 4.2rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.2), transparent 20rem),
    radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.18), transparent 22rem),
    rgba(2, 6, 23, 0.65);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--teal-bright);
}

.overview-list {
  display: grid;
  gap: 1.2rem;
}

.category-overview-card {
  padding: 1.25rem;
}

.overview-head {
  align-items: flex-start;
}

.overview-head h2 {
  margin: 0;
}

.overview-head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.compact-card {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.compact-card img {
  aspect-ratio: 3 / 4;
  border-radius: 0.85rem;
  background: #111827;
}

.compact-card span {
  overflow: hidden;
  color: white;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 999px;
  padding: 0.5rem 0.65rem 0.5rem 1.1rem;
  background: rgba(15, 23, 42, 0.76);
}

.filter-bar input {
  min-height: 2.8rem;
}

.filter-bar span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
  padding-right: 0.85rem;
}

.search-main {
  border-radius: 1.2rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 96px 3.6rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.9rem;
}

.rank-number {
  color: var(--teal-bright);
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
}

.rank-info h2 {
  margin: 0;
  font-size: 1.25rem;
}

.rank-info p {
  display: -webkit-box;
  margin: 0.45rem 0 0.7rem;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-play {
  color: white;
  background: var(--teal);
  padding: 0.65rem 1rem;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: 4.5rem 0;
}

.detail-wrap {
  position: relative;
  z-index: 2;
}

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

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.6rem;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(2.4rem, 5vw, 5rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 1.7rem;
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.85rem;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at 50% 45%, rgba(20, 184, 166, 0.18), transparent 20rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.7));
  cursor: pointer;
}

.video-shell.is-playing .play-overlay {
  display: none;
}

.play-circle {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.9);
  box-shadow: 0 18px 46px rgba(20, 184, 166, 0.34);
  font-size: 1.7rem;
}

.play-overlay strong {
  font-size: 1.15rem;
}

.player-caption {
  padding: 1.25rem;
}

.player-caption h2 {
  margin: 0;
  font-size: 1.35rem;
}

.player-caption p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.story-panel {
  padding: 1.4rem;
}

.story-panel h2 {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
}

.story-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.86);
  padding: 3rem 0 2rem;
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 2rem;
}

.footer-brand {
  color: white;
  font-size: 1.2rem;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1rem;
}

.footer-links a {
  color: var(--muted-strong);
}

.copyright {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.8rem auto 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.movie-card.hidden-by-filter,
.rank-row.hidden-by-filter {
  display: none;
}

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

  .hero-content {
    padding-right: 22rem;
  }

  .hero-poster {
    width: 280px;
  }

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

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

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

  .hero-content {
    padding: 6rem 0 8rem;
  }

  .hero-bottom {
    align-items: stretch;
    flex-direction: column;
  }

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

  .two-column,
  .detail-layout,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .hero-carousel,
  .hero-slides,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content h1,
  .page-banner h1,
  .detail-copy h1 {
    letter-spacing: -0.05em;
  }

  .section-block {
    padding: 3.2rem 0;
  }

  .section-heading,
  .filter-bar,
  .rank-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    border-radius: 1rem;
  }

  .filter-bar span {
    padding: 0 0 0.4rem;
  }

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

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

  .rank-number {
    position: absolute;
    margin: 0.5rem;
    font-size: 1.3rem;
    text-shadow: 0 2px 8px black;
  }

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

  .page-banner {
    padding: 4rem 0 3rem;
  }
}

@media (max-width: 440px) {
  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .hero-search {
    border-radius: 1rem;
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }
}
