:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --rose-500: #f43f5e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 14px 36px rgba(120, 53, 15, 0.14);
  --shadow-strong: 0 24px 70px rgba(120, 53, 15, 0.24);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--amber-50), #fff7ed 45%, #fff1f2);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.12);
}

.nav-shell {
  height: 76px;
  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;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

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

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

.nav-link {
  position: relative;
  font-weight: 700;
  color: var(--gray-700);
  padding: 10px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  transform: scaleX(0);
  transition: transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-700);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-700);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 0 16px 16px;
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  color: var(--gray-700);
}

.mobile-link.active,
.mobile-link:hover {
  background: var(--amber-100);
  color: var(--amber-700);
}

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(120deg, #b45309, #f97316 48%, #f43f5e);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.32), transparent 24%),
    radial-gradient(circle at 85% 25%, rgba(255, 237, 213, 0.26), transparent 25%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.08));
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: grid;
  align-items: center;
}

.hero-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 48px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: #ffedd5;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 19px;
  line-height: 1.85;
}

.hero-actions,
.cta-inner .primary-btn {
  margin-top: 32px;
}

.hero-actions,
.detail-copy .primary-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.rank-action,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.rank-action,
.search-box button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 14px 30px rgba(194, 65, 12, 0.28);
}

.primary-btn:hover,
.rank-action:hover,
.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(194, 65, 12, 0.34);
}

.ghost-btn {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
  color: var(--amber-700);
  background: #ffffff;
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(69, 26, 3, 0.42);
  aspect-ratio: 4 / 5;
  transform: rotate(2deg);
}

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

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-600);
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 54px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 36px;
  background: #ffffff;
}

.search-strip {
  margin-top: -46px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-strong);
}

.search-strip h2,
.search-strip p {
  margin: 0;
}

.search-strip h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.search-strip p {
  color: var(--gray-600);
  line-height: 1.7;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input,
.tool-row input,
.tool-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  color: var(--gray-800);
  outline: none;
  box-shadow: 0 8px 20px rgba(146, 64, 14, 0.08);
}

.search-box input:focus,
.tool-row input:focus,
.tool-row select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.section-heading {
  text-align: center;
  margin-bottom: 38px;
}

.section-heading .spark {
  display: inline-block;
  color: var(--amber-500);
  font-size: 32px;
  margin-bottom: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  color: var(--gray-800);
}

.section-heading p {
  margin: 12px auto 0;
  color: var(--gray-600);
  max-width: 640px;
  line-height: 1.75;
}

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

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

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

.movie-card {
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #fed7aa);
}

.movie-card-compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 44px;
  background: rgba(17, 24, 39, 0);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  background: rgba(17, 24, 39, 0.32);
}

.corner-label {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body {
  padding: 18px;
}

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

.card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-body h3 a:hover {
  color: var(--amber-700);
}

.card-meta,
.card-desc,
.rank-info p {
  color: var(--gray-600);
}

.card-meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  line-height: 1.65;
  font-size: 14px;
}

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

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

.rating {
  color: #ca8a04;
  font-weight: 800;
}

.year {
  color: var(--gray-500);
  font-size: 13px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

.large-tags .tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
}

.warm-band {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.72), rgba(255, 237, 213, 0.72));
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.category-tile img,
.tile-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.tile-overlay {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.78));
}

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

.category-tile strong {
  font-size: 24px;
  margin-bottom: 8px;
}

.category-tile em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.tool-row {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 12px;
  margin-bottom: 28px;
}

.wide-tools {
  grid-template-columns: 1fr 180px 160px 160px;
}

.sticky-tools {
  position: sticky;
  top: 90px;
  z-index: 9;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 251, 235, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.cta-band,
.page-hero {
  background: linear-gradient(120deg, var(--amber-600), var(--orange-600) 55%, var(--rose-500));
  color: #ffffff;
}

.cta-inner {
  text-align: center;
  padding: 66px 0;
}

.cta-inner h2,
.cta-inner p {
  margin: 0;
}

.cta-inner h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.cta-inner p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3), transparent 26%),
    radial-gradient(circle at 85% 15%, rgba(255, 237, 213, 0.3), transparent 28%),
    rgba(17, 24, 39, 0.18);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero p:last-child {
  max-width: 720px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  font-size: 18px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.overview-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.overview-card h2 {
  margin: 0 0 12px;
}

.overview-card p {
  margin: 0 0 18px;
  color: var(--gray-600);
  line-height: 1.7;
}

.overview-links {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.overview-links a {
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-links a:hover,
.text-link:hover {
  color: var(--amber-700);
}

.text-link {
  color: var(--amber-700);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.rank-num {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  font-size: 22px;
  font-weight: 900;
}

.rank-thumb {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--amber-100);
}

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

.rank-info h3,
.rank-info p {
  margin: 0;
}

.rank-info h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.rank-info p {
  line-height: 1.7;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: #ffffff;
  background: var(--gray-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.38;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.52));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 44px;
  align-items: center;
  min-height: 560px;
  padding: 48px 0;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
  aspect-ratio: 3 / 4;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-meta,
.detail-one-line {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

.detail-meta {
  margin: 18px 0 12px;
}

.detail-rating {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-rating span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.detail-one-line {
  max-width: 820px;
  font-size: 18px;
}

.player-section {
  padding: 48px 0 12px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.24), rgba(17, 24, 39, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-600);
  background: rgba(255, 255, 255, 0.94);
  font-size: 32px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.detail-main {
  padding: 42px 0 24px;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.tab-btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  background: transparent;
  color: var(--gray-600);
  font-weight: 800;
  cursor: pointer;
}

.tab-btn.active,
.tab-btn:hover {
  color: var(--amber-700);
  background: var(--amber-50);
}

.tab-panel {
  display: none;
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.tab-panel.active {
  display: block;
}

.tab-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.tab-panel p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.9;
  font-size: 16px;
}

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

.info-grid p {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: var(--amber-50);
}

.info-grid span {
  color: var(--gray-500);
  font-size: 13px;
}

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

.site-footer {
  margin-top: 48px;
  color: #fffbeb;
  background: linear-gradient(135deg, #78350f, #9a3412);
}

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

.site-footer p {
  color: #fde68a;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

.footer-links a {
  color: #fef3c7;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(253, 230, 138, 0.24);
  text-align: center;
  padding: 18px;
  color: #fde68a;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr 320px;
    gap: 32px;
  }

  .wide-tools,
  .tool-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

  .brand-name {
    font-size: 20px;
  }

  .hero-section,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-poster {
    width: min(320px, 78vw);
    margin: 0 auto;
  }

  .hero-dots {
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
  }

  .search-strip {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .search-box {
    flex-direction: column;
  }

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .detail-poster {
    width: min(300px, 76vw);
    margin: 0 auto;
  }

  .breadcrumb,
  .detail-copy .primary-btn,
  .detail-rating,
  .large-tags {
    justify-content: center;
  }

  .rank-row {
    grid-template-columns: 54px 76px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
  }

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

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

  .nav-shell {
    height: 66px;
  }

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

  .hero-desc,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .tool-row,
  .wide-tools {
    grid-template-columns: 1fr;
  }

  .sticky-tools {
    top: 76px;
  }

  .rank-row {
    grid-template-columns: 46px 70px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 17px;
  }

  .rank-info h3 {
    font-size: 16px;
  }

  .rank-info p {
    display: none;
  }

  .player-box {
    border-radius: 18px;
  }

  .tab-panel {
    padding: 22px;
  }
}
