:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #ea580c;
  --orange-soft: #fed7aa;
  --yellow: #facc15;
  --slate: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.16), 0 8px 10px -6px rgba(15, 23, 42, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate);
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 45%, #f9fafb 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-sm);
}

.nav-shell {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand {
  font-size: 20px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #ea580c);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.05);
  box-shadow: 0 16px 28px rgba(220, 38, 38, 0.30);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.brand-mark svg path + path {
  fill: #ffffff;
}

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

.nav-links a,
.mobile-nav a {
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #4b5563;
}

.mobile-nav {
  padding: 8px 18px 14px;
  border-top: 1px solid #f3f4f6;
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--red);
  background: #fef2f2;
}

main {
  min-height: 60vh;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 52%, #b91c1c 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.22), transparent 28%), rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.hero-slides {
  position: relative;
  min-height: 560px;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  filter: blur(10px) saturate(1.25);
  transform: scale(1.04);
}

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

.hero-content {
  position: relative;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 64px 24px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
}

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

.hero-pill,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pill {
  width: max-content;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero-pill span + span::before {
  content: "·";
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.75);
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h1 span,
.page-hero h1 span {
  background: linear-gradient(90deg, #fde047, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

.tag-row {
  margin-top: 22px;
}

.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.detail-title-row,
.section-head,
.filter-bar,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.btn-primary {
  color: var(--red);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.detail-card .btn-primary,
.page-hero .btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-search {
  max-width: 620px;
  margin-top: 26px;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
  width: 104px;
  border: 0;
  font-weight: 800;
  color: var(--red);
  background: #ffffff;
  cursor: pointer;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.35);
  transform: rotate(2deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-poster:hover {
  transform: rotate(0) scale(1.03);
  box-shadow: 0 35px 75px rgba(15, 23, 42, 0.42);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xl);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  width: min(1280px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.hero-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: min(690px, 68vw);
}

.hero-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.86);
}

.hero-mini.is-active,
.hero-mini:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.hero-mini img {
  width: 38px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.hero-mini span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
}

.home-section,
.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.feature-band {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  color: var(--red);
  font-weight: 800;
}

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

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover .poster-wrap {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.22), transparent);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.year-badge {
  right: 10px;
  background: var(--red);
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 50px;
  height: 50px;
  padding-left: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px;
  color: #ffffff;
}

.poster-info strong,
.card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-info strong {
  font-size: 15px;
  line-height: 1.35;
}

.poster-info small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
}

.card-title {
  margin-top: 10px;
  min-height: 42px;
  font-weight: 800;
  line-height: 1.35;
}

.card-meta,
.card-tags {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-tags {
  color: #9ca3af;
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(254, 202, 202, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: var(--shadow-xl);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
  color: var(--red);
}

.category-tile span {
  color: #4b5563;
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 32px;
}

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

.rank-row,
.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rank-row:hover,
.compact-card:hover {
  transform: translateY(-2px);
  background: #fff7ed;
  box-shadow: var(--shadow-md);
}

.rank-row span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
}

.rank-row strong,
.compact-card strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em,
.compact-card small {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.compact-card img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

.compact-card span {
  min-width: 0;
}

.compact-card small {
  display: block;
  margin-top: 5px;
}

.page-hero {
  position: relative;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 10%, rgba(255, 255, 255, 0.24), transparent 30%), rgba(0, 0, 0, 0.12);
}

.page-hero > div {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.small-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.page-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.categories-wrap {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
  border: 1px solid #f3f4f6;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.category-overview-head {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 24px;
}

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

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

.filter-section {
  padding-top: 40px;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid #f3f4f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 0 14px;
  background: #ffffff;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px #fee2e2;
}

.filter-bar input {
  flex: 1.5;
}

.filter-bar select {
  flex: 0.8;
}

.large-filter input {
  flex: 2;
}

.related-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.related-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--red);
  background: #fef2f2;
  font-weight: 800;
}

.detail-wrap {
  padding-top: 28px;
}

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

.breadcrumb a {
  color: var(--red);
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 32px;
}

.detail-main {
  min-width: 0;
}

.player-panel {
  margin-bottom: 24px;
}

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

.player-shell video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.82;
}

.player-cover span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  padding-left: 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: var(--red);
  background: rgba(255, 255, 255, 0.94);
  font-size: 24px;
  box-shadow: var(--shadow-xl);
}

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

.detail-card,
.side-card {
  border: 1px solid #f3f4f6;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.detail-card {
  padding: 28px;
}

.detail-title-row {
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-title-row h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-title-row p {
  margin: 0;
  color: var(--muted);
}

.summary-block {
  padding: 24px 0;
  border-top: 1px solid #f3f4f6;
}

.summary-block h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.summary-block p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  white-space: pre-line;
}

.highlight-block p {
  padding-left: 16px;
  border-left: 4px solid var(--red);
  font-size: 18px;
  font-style: italic;
}

.review-block p {
  padding: 18px;
  border-radius: 16px;
  background: #f9fafb;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-card {
  padding: 20px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
}

.poster-side strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.poster-side span {
  color: var(--muted);
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1e293b 55%, #111827);
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  margin: 14px 0 0;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: #f87171;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(75, 85, 99, 0.8);
  color: #9ca3af;
  flex-wrap: wrap;
}

[hidden] {
  display: none !important;
}

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

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .hero-rail {
    display: none;
  }
}

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

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

  .hero,
  .hero-slides,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 46px;
    padding-bottom: 92px;
  }

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

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

  .category-grid,
  .split-section,
  .detail-grid,
  .footer-grid,
  .category-overview-head {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .detail-title-row {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (max-width: 640px) {
  .nav-shell {
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 16px;
  }

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

  .hero-search button {
    height: 48px;
  }

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

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

  .home-section,
  .detail-wrap {
    padding: 40px 16px;
  }

  .page-hero > div {
    padding: 46px 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-card {
    padding: 20px;
  }

  .player-cover span {
    width: 66px;
    height: 66px;
  }
}
