:root {
  color-scheme: light;
  --bg: #f7f1ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --ink: #1f1733;
  --muted: #6f6680;
  --line: rgba(116, 79, 160, 0.16);
  --purple: #7c3aed;
  --pink: #db2777;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(72, 42, 121, 0.14);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(240, 147, 251, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(79, 172, 254, 0.24), transparent 36rem),
    linear-gradient(135deg, #fff7fb 0%, #f6f0ff 45%, #edf8ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.nebula-gradient,
.btn-primary,
.brand-mark {
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card-hover {
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 80px rgba(82, 53, 134, 0.24);
}

.text-gradient {
  background-image: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 40px rgba(73, 44, 118, 0.08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.32);
}

.brand-text {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.header-search {
  flex: 1;
  display: flex;
  min-width: 220px;
  max-width: 430px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  overflow: hidden;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 14px 12px 20px;
  color: var(--ink);
}

.header-search button,
.big-search button {
  border: 0;
  cursor: pointer;
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--purple);
  background: rgba(147, 51, 234, 0.08);
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-weight: 700;
  color: #4a3d5f;
}

.site-nav a {
  padding: 10px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--purple);
  border-color: var(--purple);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.home-page {
  width: 100%;
}

.home-page > .content-section,
.home-page > .quick-panel {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  position: relative;
  height: min(720px, 72vh);
  min-height: 540px;
  overflow: hidden;
  color: #fff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: -24px;
  background-position: center;
  background-size: cover;
  filter: blur(12px) brightness(0.72);
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.42), transparent 34rem),
    linear-gradient(180deg, rgba(12, 8, 28, 0.26), rgba(10, 6, 24, 0.72) 60%, rgba(10, 6, 24, 0.92));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 42px;
  align-items: end;
  padding: 120px 0 84px;
}

.hero-copy {
  width: min(720px, 100%);
  padding: clamp(24px, 4vw, 42px);
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffef8a;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.eyebrow span:last-child {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero p,
.detail-one-line,
.page-hero p {
  max-width: 740px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #efe8ff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 13px;
  font-weight: 800;
}

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

.btn-primary,
.btn-ghost,
.section-more,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  box-shadow: 0 16px 38px rgba(124, 58, 237, 0.34);
}

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

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #dec7ff, #bae6fd);
}

.hero-poster span,
.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: #fff;
}

.quick-panel {
  margin-top: -32px;
  position: relative;
  z-index: 5;
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: center;
  gap: 26px;
}

.quick-panel h2,
.section-head h2,
.category-card h2,
.detail-article h2,
.side-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 950;
}

.quick-panel p,
.category-card p,
.detail-article p,
.side-panel dd {
  color: var(--muted);
  line-height: 1.8;
}

.big-search {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 16px 20px;
}

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

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

.section-head .section-kicker,
.page-hero .section-kicker,
.detail-copy .section-kicker {
  color: var(--purple);
}

.section-more,
.inline-link {
  color: var(--purple);
  background: rgba(147, 51, 234, 0.1);
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 42px rgba(89, 60, 133, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e9d5ff, #bfdbfe);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.52s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.56));
  opacity: 0.76;
}

.play-float {
  width: 44px;
  height: 44px;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
}

.region-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.movie-body strong {
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-body strong {
  color: var(--purple);
}

.meta-line {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.movie-body p {
  margin: 0;
  color: #5e526e;
  font-size: 14px;
  line-height: 1.7;
}

.movie-body .tag-row span {
  color: var(--purple);
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.12);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  color: #fff;
  box-shadow: 0 24px 56px rgba(75, 48, 112, 0.18);
}

.category-tile-bg,
.category-tile-shade {
  position: absolute;
  inset: 0;
}

.category-tile-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 0.32s ease;
}

.category-tile:hover .category-tile-bg {
  transform: scale(1.1);
}

.category-tile-shade {
  background: linear-gradient(180deg, rgba(25, 12, 44, 0.12), rgba(25, 12, 44, 0.82));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  font-size: 24px;
  font-weight: 950;
}

.category-tile em {
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
  font-size: 14px;
}

.inner-page {
  padding: 28px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  margin: 16px 0 32px;
  color: #fff;
  background: #2d1558;
}

.compact-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(219, 39, 119, 0.46), transparent 24rem),
    radial-gradient(circle at 84% 24%, rgba(37, 99, 235, 0.44), transparent 25rem),
    linear-gradient(135deg, #27124a, #6d28d9 54%, #0ea5e9);
}

.page-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px);
}

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

.category-card {
  overflow: hidden;
  border-radius: 28px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.category-cover {
  position: relative;
  min-height: 260px;
  background-size: cover;
  background-position: center;
}

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
}

.category-cover span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
  font-weight: 950;
  font-size: 24px;
}

.category-card-body {
  padding: 24px;
}

.category-card ul {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.category-card li a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #4b415e;
}

.category-card li a:hover {
  color: var(--purple);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 30px;
}

.library-panel {
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(130px, 170px));
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.empty-state {
  margin: 28px 0 0;
  padding: 28px;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 120px 64px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 18px;
  border-radius: 24px;
  padding: 14px;
}

.rank-poster img {
  width: 120px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, #e9d5ff, #bfdbfe);
}

.rank-number {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 950;
}

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

.rank-info p {
  margin: 0 0 8px;
  color: #5e526e;
  line-height: 1.7;
}

.rank-score {
  text-align: center;
  color: var(--purple);
}

.rank-score span {
  display: block;
  font-size: 28px;
  font-weight: 950;
}

.rank-score em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.detail-page {
  padding-bottom: 70px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 36px;
  color: #fff;
  background: #160c2a;
}

.detail-backdrop {
  position: absolute;
  inset: -22px;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.62);
  transform: scale(1.06);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(147, 51, 234, 0.42), transparent 28rem),
    linear-gradient(90deg, rgba(13, 9, 29, 0.92), rgba(13, 9, 29, 0.58));
}

.detail-inner {
  position: relative;
  z-index: 1;
  min-height: 560px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: clamp(26px, 5vw, 58px);
  padding: clamp(26px, 6vw, 66px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #e9d5ff, #bfdbfe);
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.player-section {
  border-radius: 30px;
  margin: 28px 0;
  padding: clamp(18px, 3vw, 28px);
}

.slim-head {
  margin-bottom: 18px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #05030a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05030a;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(13, 7, 27, 0.12), rgba(13, 7, 27, 0.58));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.42);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-bottom: 26px;
}

.detail-article,
.side-panel,
.prev-next {
  border-radius: 28px;
  padding: clamp(22px, 3vw, 30px);
}

.detail-article h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

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

.side-panel dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 18px 0 0;
}

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

.side-panel dd {
  margin: 0;
}

.side-panel a:hover {
  color: var(--purple);
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 10px;
}

.prev-next a {
  display: block;
  padding: 18px;
  border-radius: 20px;
  background: rgba(147, 51, 234, 0.08);
}

.prev-next span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.prev-next strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.site-footer {
  margin-top: 50px;
  padding: 46px 0;
  background: rgba(255, 255, 255, 0.56);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.footer-brand {
  font-size: 28px;
  font-weight: 950;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--purple);
  font-weight: 800;
}

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

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

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

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

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

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    display: none;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

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

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 6px;
  }

  .site-nav.is-open,
  .header-search.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 4px;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    align-items: end;
    padding-top: 88px;
    padding-bottom: 90px;
  }

  .hero-poster {
    width: min(240px, 62vw);
    justify-self: start;
  }

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

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

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

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

  .rank-score {
    grid-column: 2 / 4;
    text-align: left;
  }

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

@media (max-width: 640px) {
  .page-shell,
  .home-page > .content-section,
  .home-page > .quick-panel,
  .hero-inner,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1200px);
  }

  .hero-copy {
    padding: 22px;
    border-radius: 24px;
  }

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

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

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

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

  .category-cover {
    min-height: 190px;
  }

  .filter-panel,
  .library-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    position: absolute;
    margin: 8px;
  }

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

  .prev-next {
    grid-template-columns: 1fr;
  }

  .big-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .big-search button {
    min-height: 48px;
  }
}
