/* ══════════════════════════════════════════════
   FilmFinder  |  style.css
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --p:      #6366f1;
  --p2:     #818cf8;
  --pink:   #ec4899;
  --cyan:   #06b6d4;
  --gold:   #f59e0b;
  --green:  #10b981;
  --red:    #ef4444;

  --bg:     #09090b;
  --bg2:    #111116;
  --bg3:    #18181e;
  --bg4:    #232329;
  --text:   #f4f4f5;
  --text2:  #a1a1aa;
  --text3:  #52525b;
  --border: rgba(255,255,255,0.07);
  --radius: 10px;
  --font:   'Inter', system-ui, sans-serif;
  --trans:  all .22s cubic-bezier(.4,0,.2,1);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }
select { font-family: var(--font); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

.hidden { display: none !important; }

/* ══════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(9,9,11,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 20px; height: 60px;
  display: flex; align-items: center; gap: 16px;
}

.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 1.1rem; font-weight: 800;
  color: var(--text); flex-shrink: 0;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .8; }
.logo-svg { color: var(--p); flex-shrink: 0; }

.nav-tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  font-size: .82rem; font-weight: 600; color: var(--text2);
  transition: var(--trans); white-space: nowrap; flex-shrink: 0;
}
.nav-tab svg { opacity: .7; }
.nav-tab:hover { color: var(--text); background: var(--bg3); }
.nav-tab.active { color: var(--text); background: rgba(99,102,241,.15); }
.nav-tab.active svg { opacity: 1; color: var(--p); }

.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Inline search */
.nav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 0 12px; height: 36px;
  transition: var(--trans); width: 200px;
}
.nav-search:focus-within { border-color: var(--p); width: 260px; }
.nav-search .ns-icon { color: var(--text3); flex-shrink: 0; }
.nav-search input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: .85rem; width: 100%;
}
.nav-search input::placeholder { color: var(--text3); }
.ns-clear {
  display: flex; align-items: center;
  color: var(--text3); padding: 2px; border-radius: 4px;
  transition: color .15s;
}
.ns-clear:hover { color: var(--text); }

/* Icon buttons */
.nav-icon-btn {
  position: relative;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans);
}
.nav-icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,.15); }

/* Notification badge */
.nb {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--pink); color: #fff;
  font-size: .65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}
.nb[data-count="0"] { display: none; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 4px;
  width: 36px; height: 36px; border-radius: 8px;
  align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
}
.hamburger span { display: block; width: 16px; height: 1.5px; background: var(--text2); border-radius: 1px; transition: var(--trans); }
.hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile tabs */
.mobile-tabs {
  display: flex; overflow-x: auto; gap: 4px;
  padding: 8px 16px; border-top: 1px solid var(--border);
}
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tabs .nav-tab { padding: 7px 14px; }

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 560px; max-height: 680px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  transform: scale(1.06);
  transition: background-image .8s ease;
}

.hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,11,.2) 0%,
    rgba(9,9,11,.1) 30%,
    rgba(9,9,11,.7) 70%,
    rgba(9,9,11,1)  100%
  );
}

.hero-body {
  position: relative; z-index: 2;
  width: 100%; max-width: 1400px; margin: 0 auto;
  padding: 0 24px 48px;
  animation: fadeUp .6s ease both;
}

.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-badge {
  padding: 4px 10px; border-radius: 6px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(255,255,255,.1); backdrop-filter: blur(6px);
}
.hero-badge.featured { background: var(--p); color: #fff; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.05;
  margin-bottom: 12px; max-width: 700px;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.hero-meta {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.hero-rating {
  display: flex; align-items: center; gap: 5px;
  font-size: 1rem; font-weight: 700; color: var(--gold);
}
.hero-rating svg { fill: var(--gold); stroke: none; }
.hero-year, .hero-lang {
  font-size: .85rem; color: var(--text2); font-weight: 500;
}
.hero-genres { display: flex; gap: 6px; }
.hero-genre-tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 600;
  background: rgba(255,255,255,.1); color: var(--text2);
  border: 1px solid rgba(255,255,255,.1);
}

.hero-overview {
  font-size: .95rem; color: rgba(255,255,255,.75);
  max-width: 580px; line-height: 1.65;
  margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.hero-actions { display: flex; gap: 10px; }

.hero-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  font-weight: 700; font-size: .9rem;
  transition: var(--trans);
}
.hero-btn-primary {
  background: var(--p); color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,.4);
}
.hero-btn-primary:hover { background: var(--p2); transform: translateY(-2px); }
.hero-btn-secondary {
  background: rgba(255,255,255,.1); color: var(--text);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
}
.hero-btn-secondary:hover { background: rgba(255,255,255,.18); }
.hero-btn.active-fav { background: var(--pink); color: #fff; border-color: transparent; }
.hero-btn.active-wl  { background: rgba(6,182,212,.2); color: var(--cyan); border-color: rgba(6,182,212,.3); }

/* ══════════════════════════════════════════════
   CONTROLS STRIP
══════════════════════════════════════════════ */
.controls-strip {
  position: sticky; top: 60px; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px;
  background: rgba(9,9,11,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.controls-strip::-webkit-scrollbar { display: none; }

.genre-chips { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.genre-chips::-webkit-scrollbar { display: none; }

.genre-chip {
  padding: 5px 14px; border-radius: 20px; flex-shrink: 0;
  font-size: .78rem; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans);
}
.genre-chip:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.genre-chip.active { background: var(--p); color: #fff; border-color: transparent; }

.sort-wrap {
  display: flex; align-items: center; gap: 7px;
  flex-shrink: 0; color: var(--text3);
}
.sort-select {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px;
  padding: 5px 10px; font-size: .78rem; font-weight: 600;
  outline: none; cursor: pointer; transition: var(--trans);
}
.sort-select:hover { border-color: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════
   LOADER
══════════════════════════════════════════════ */
.loader {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px;
  min-height: 400px;
}
.loader-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(99,102,241,.15);
  border-top-color: var(--p);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { color: var(--text3); font-size: .88rem; }

/* ══════════════════════════════════════════════
   MAIN / SECTION HEADER
══════════════════════════════════════════════ */
main {
  max-width: 1400px; margin: 0 auto;
  padding: 28px 24px 60px;
}

.section-row {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 20px;
}
.section-title {
  font-size: 1.3rem; font-weight: 800;
}
.result-count {
  font-size: .82rem; color: var(--text3); font-weight: 500;
}

/* ══════════════════════════════════════════════
   MOVIE GRID + CARDS
══════════════════════════════════════════════ */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
}

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--trans);
  animation: fadeUp .4s ease both;
  position: relative;
}
.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
}

/* poster */
.mc-poster {
  position: relative; width: 100%;
  aspect-ratio: 2/3; overflow: hidden;
  background: var(--bg3);
}
.mc-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.movie-card:hover .mc-poster img { transform: scale(1.06); }

/* rating pill */
.mc-rating {
  position: absolute; top: 8px; left: 8px;
  display: flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  font-size: .72rem; font-weight: 700; color: var(--gold);
}
.mc-rating svg { fill: var(--gold); stroke: none; }
.mc-rating.high { color: var(--green); }
.mc-rating.high svg { fill: var(--green); }
.mc-rating.low  { color: var(--red); }
.mc-rating.low  svg { fill: var(--red); }

/* card actions (heart + bookmark) — visible on hover */
.mc-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(8px);
  transition: var(--trans);
}
.movie-card:hover .mc-actions { opacity: 1; transform: none; }
.mc-action-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  color: var(--text2); transition: var(--trans);
  border: 1px solid rgba(255,255,255,.1);
}
.mc-action-btn:hover { color: var(--text); background: rgba(0,0,0,.9); }
.mc-action-btn.is-fav { color: var(--pink); }
.mc-action-btn.is-wl  { color: var(--cyan); }

/* hover info overlay */
.mc-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, transparent 100%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.movie-card:hover .mc-overlay { opacity: 1; }
.mc-overlay-year {
  font-size: .7rem; color: var(--text2); font-weight: 500; margin-bottom: 2px;
}
.mc-overlay-title {
  font-size: .82rem; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* card info below poster */
.mc-info { padding: 10px 10px 12px; }
.mc-title {
  font-size: .85rem; font-weight: 700; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.3;
}
.mc-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--text3); font-weight: 500;
}

/* ── No results ─────────────────────────────── */
.no-results {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 80px 20px; color: var(--text3); text-align: center;
}
.no-results h3 { font-size: 1.1rem; font-weight: 700; color: var(--text2); }
.no-results p  { font-size: .88rem; }

/* ── Load More ──────────────────────────────── */
.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: .88rem; font-weight: 700;
  transition: var(--trans);
}
.load-more-btn:hover { color: var(--text); border-color: rgba(255,255,255,.2); transform: translateY(-2px); }

/* ══════════════════════════════════════════════
   MODAL BASE
══════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }

.modal-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(10px);
}

.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .3s cubic-bezier(.34,1.56,.64,1) both;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
@keyframes modalIn {
  from { opacity:0; transform:scale(.92) translateY(16px); }
  to   { opacity:1; transform:none; }
}

.modal-topbar {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  position: sticky; top: 0; background: var(--bg2); z-index: 5;
  border-radius: 16px 16px 0 0;
}
.modal-topbar > *:first-child { margin-right: auto; }

.modal-icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans);
}
.modal-icon-btn:hover { color: var(--text); }
.modal-icon-btn.is-fav { color: var(--pink); border-color: rgba(236,72,153,.3); }
.modal-icon-btn.is-wl  { color: var(--cyan); border-color: rgba(6,182,212,.3);  }

.modal-close {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); transition: var(--trans);
}
.modal-close:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

/* ── Detail modal ─────────────────────────── */
.detail-box { width: min(780px, 100%); }

.detail-backdrop {
  width: 100%; aspect-ratio: 16/7;
  background-size: cover; background-position: center;
  position: relative;
}
.detail-backdrop-grad {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
  background: linear-gradient(to top, var(--bg2), transparent);
}

.detail-body { padding: 0 24px 28px; }

.detail-poster-row {
  display: flex; gap: 20px; margin-top: -60px; margin-bottom: 20px;
  align-items: flex-end;
}
.detail-poster {
  width: 110px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden;
  border: 3px solid var(--bg2);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.detail-poster img { width: 100%; display: block; }

.detail-title-block { flex: 1; padding-bottom: 6px; }
.detail-title {
  font-size: 1.5rem; font-weight: 900; line-height: 1.15;
  margin-bottom: 8px;
}
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.dm-rating {
  display: flex; align-items: center; gap: 5px;
  font-size: .9rem; font-weight: 700; color: var(--gold);
}
.dm-rating svg { fill: var(--gold); stroke: none; }
.dm-votes { font-size: .78rem; color: var(--text3); }
.dm-pill {
  padding: 3px 10px; border-radius: 6px;
  background: var(--bg4); font-size: .75rem; font-weight: 600; color: var(--text2);
}

.detail-overview {
  font-size: .9rem; color: var(--text2); line-height: 1.75; margin: 16px 0;
}

.detail-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
  gap: 12px; margin-bottom: 20px;
}
.di-item { background: var(--bg3); border-radius: 8px; padding: 12px; }
.di-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 4px; }
.di-val   { font-size: .88rem; font-weight: 600; }

.detail-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.detail-genre {
  padding: 4px 12px; border-radius: 20px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25);
  font-size: .75rem; font-weight: 600; color: var(--p2);
}

/* Cast */
.cast-section { margin-bottom: 8px; }
.cast-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 10px; }
.cast-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.cast-row::-webkit-scrollbar { display: none; }
.cast-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0; width: 72px; text-align: center;
}
.cast-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg4); overflow: hidden; flex-shrink: 0;
  border: 2px solid var(--border);
}
.cast-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-name  { font-size: .68rem; font-weight: 600; line-height: 1.2; color: var(--text); }
.cast-role  { font-size: .62rem; color: var(--text3); }

/* ── List modal ────────────────────────────── */
.list-box { width: min(900px, 100%); }
.modal-list-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 800;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: 14px;
  padding: 16px;
}

.list-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 60px 20px; color: var(--text3); text-align: center;
}
.list-empty p { font-size: .88rem; }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast-wrap {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  background: var(--bg4); color: var(--text);
  padding: 10px 18px; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  box-shadow: 0 4px 24px rgba(0,0,0,.6);
  border: 1px solid var(--border);
  animation: toastIn .25s ease;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.toast svg { flex-shrink: 0; }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateY(8px); } }

/* ══════════════════════════════════════════════
   SCROLL TOP
══════════════════════════════════════════════ */
.scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--p); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: var(--trans);
}
.scroll-top.show { opacity: 1; visibility: visible; pointer-events: all; }
.scroll-top:hover { transform: translateY(-3px); }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 20px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: .95rem; font-weight: 800; color: var(--p);
}
.footer p { font-size: .78rem; color: var(--text3); }
.footer a { color: var(--p2); transition: color .15s; }
.footer a:hover { color: var(--p); }

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:none; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-tabs { display: none; }
  .hamburger { display: flex; }
  .nav-search { width: 160px; }
  .nav-search:focus-within { width: 190px; }
  .hero { min-height: 440px; }
  .hero-title { font-size: 2rem; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 0 12px; gap: 8px; }
  .nav-search { width: 130px; }
  .nav-search:focus-within { width: 150px; }
  .hero { min-height: 380px; }
  .hero-body { padding: 0 16px 36px; }
  .hero-overview { display: none; }
  .controls-strip { padding: 8px 12px; }
  main { padding: 20px 12px 48px; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; }
  .detail-box { border-radius: 12px; }
  .detail-poster-row { flex-direction: column; align-items: flex-start; margin-top: -30px; }
  .detail-poster { width: 80px; }
  .detail-title { font-size: 1.2rem; }
  .list-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; }
}

@media (max-width: 400px) {
  .movie-grid { grid-template-columns: repeat(2, 1fr); }
}
