:root {
  --page: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --soft: #e5e7eb;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-soft: #d1fae5;
  --teal: #0f766e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #f8fafc 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #475569;
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 21px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  color: var(--emerald);
  background: #e2e8f0;
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
}

.header-search,
.mobile-nav {
  display: none;
  border-top: 1px solid #e2e8f0;
}

.header-search.is-open,
.mobile-nav.is-open {
  display: block;
}

.header-search-form {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  display: flex;
  gap: 12px;
}

.header-search-form input,
.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search-form input:focus,
.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.header-search-form button,
.search-box button {
  min-width: 92px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 750;
}

.mobile-nav {
  padding: 10px 16px 18px;
  background: #ffffff;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-image,
.page-hero > img,
.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 42%, rgba(16, 185, 129, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.76) 44%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.82));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-copy {
  width: min(620px, 100%);
  color: #ffffff;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.22);
  backdrop-filter: blur(10px);
  font-weight: 750;
  font-size: 14px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  width: min(560px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-line span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
}

.tag-line span {
  color: var(--emerald-dark);
  background: #ecfdf5;
  padding: 5px 9px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  padding: 0 22px;
  box-shadow: 0 18px 32px rgba(5, 150, 105, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 0 22px;
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  width: min(330px, 28vw);
  aspect-ratio: 3 / 4.25;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster span,
.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
}

.hero-poster span {
  width: 76px;
  height: 76px;
  font-size: 30px;
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  transform: translateX(-50%);
  scrollbar-width: none;
}

.hero-thumbs::-webkit-scrollbar {
  display: none;
}

.hero-thumb {
  min-width: 178px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(15, 23, 42, 0.52);
  padding: 8px;
  backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.2s ease, border 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: rgba(167, 243, 208, 0.7);
  background: rgba(5, 150, 105, 0.38);
  transform: translateY(-2px);
}

.hero-thumb img {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}

.section {
  padding: 64px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  color: var(--emerald);
  background: var(--emerald-soft);
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4.18;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.68));
  opacity: 0.82;
}

.card-badge,
.card-score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.card-badge {
  left: 12px;
  top: 12px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  padding: 6px 10px;
}

.card-score {
  right: 12px;
  top: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.74);
  padding: 6px 10px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  color: #111827;
  background: #fbbf24;
  padding: 6px 10px;
}

.card-play {
  width: 56px;
  height: 56px;
  z-index: 3;
  opacity: 0;
  font-size: 22px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--emerald);
}

.movie-card-body p {
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 12px;
}

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

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

.compact-card .movie-card-body p {
  min-height: 38px;
  font-size: 13px;
}

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

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

.category-tile {
  min-height: 190px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.65s ease;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.9));
}

.category-tile div {
  position: relative;
  z-index: 2;
  padding: 22px;
  color: #ffffff;
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  font-size: 14px;
}

.genre-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.genre-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.genre-chip:hover {
  transform: translateY(-2px);
  background: #d1fae5;
}

.page-hero,
.detail-hero {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  background: #020617;
}

.page-hero-shade,
.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(16, 185, 129, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.4));
}

.page-hero-content {
  position: relative;
  z-index: 2;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.page-hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero-content p {
  max-width: 700px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(140px, 0.7fr));
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-search {
  min-width: 0;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  border-radius: 20px;
  background: #ffffff;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.ranking-row img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-title {
  min-width: 0;
  font-size: 18px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.search-section {
  min-height: 480px;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-empty {
  padding: 44px 20px;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  font-weight: 800;
}

.pagination a.is-active,
.pagination a:hover {
  color: #ffffff;
  background: var(--emerald);
}

.detail-hero {
  min-height: 560px;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  color: #ffffff;
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.25;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
  gap: 26px;
  align-items: start;
}

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

.player-section,
.content-block,
.side-card {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.player-section {
  overflow: hidden;
}

.player-section h2,
.content-block h2,
.side-card h2 {
  margin: 0;
  padding: 22px 24px;
  font-size: 24px;
  letter-spacing: -0.03em;
  border-bottom: 1px solid #e2e8f0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.74));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
}

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

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-block {
  margin-top: 24px;
}

.content-block p {
  margin: 0;
  padding: 24px;
  color: #334155;
  font-size: 16px;
  line-height: 1.95;
}

.side-card {
  position: sticky;
  top: 96px;
}

.side-card dl {
  margin: 0;
  padding: 12px 24px 24px;
}

.side-card dt {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.side-card dd {
  margin: 4px 0 0;
  color: #0f172a;
  line-height: 1.7;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #475569;
  background: #ffffff;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--emerald);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
}

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

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

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

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

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

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

  .mobile-menu-button {
    display: inline-block;
  }

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

  .hero-content {
    min-height: 620px;
    align-items: center;
  }

  .hero-poster {
    display: none;
  }

  .hero-copy h1,
  .detail-copy h1 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .hero-thumbs {
    bottom: 18px;
  }

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

  .detail-hero-content {
    grid-template-columns: 1fr;
    padding: 50px 0;
  }

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

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

  .side-card {
    position: static;
  }

  .ranking-row {
    grid-template-columns: 44px 58px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 3;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 560px) {
  .container,
  .header-inner,
  .header-search-form,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 19px;
  }

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

  .section {
    padding: 44px 0;
  }

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

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

  .filter-panel,
  .search-box {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .header-search-form {
    flex-direction: column;
  }

  .header-search-form button,
  .search-box button {
    min-height: 44px;
  }

  .detail-hero,
  .detail-hero-content {
    min-height: auto;
  }

  .detail-hero-content {
    gap: 24px;
  }
}
