/* ═══════════════════════════════════════════════════
   MovieMind — Midnight Cinema
   ═══════════════════════════════════════════════════ */

/* fonts loaded via <link> in HTML — no render-blocking @import */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces — deep space blue-black */
  --bg:  #070810;
  --s1:  #0C0E1C;
  --s2:  #111428;
  --s3:  #181B32;
  --s4:  #20233E;

  /* Text — crisp cool white */
  --t1:  #EEF0FF;
  --t2:  rgba(238,240,255,0.55);
  --t3:  rgba(238,240,255,0.28);
  --t4:  rgba(238,240,255,0.10);

  /* Borders */
  --b1:  rgba(238,240,255,0.07);
  --b2:  rgba(238,240,255,0.16);

  /* Glass */
  --glass:    rgba(12,14,28,0.90);
  --glass-hv: rgba(17,20,40,0.96);

  /* Accent — electric indigo-blue */
  --accent:     #5C7CFA;
  --accent-hov: #4A6AEF;

  /* Accent RGB for rgba() usage */
  --accent-r: 92;
  --accent-g: 124;
  --accent-b: 250;

  /* Error */
  --danger: #FF4D6D;

  /* Radius */
  --r4:  4px;
  --r8:  8px;
  --r12: 12px;
  --r16: 16px;
  --r20: 20px;
  --r-pill: 999px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --t: 220ms;
}

/* ── Base ──────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--t1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont,
    'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ── Film grain overlay ────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 8s steps(10) infinite;
}

/* ── Header / Nav ──────────────────────────────────── */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 52px;
  /* Always translucent glass — no scroll toggle */
  background: rgba(13,10,8,0.80);
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  border-bottom: 0.5px solid var(--b1);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { font-size: 18px; line-height: 1; }
.logo-text {
  font-size: 17px;
  font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.01em;
  color: var(--t1);
}
.logo-text span { color: var(--accent); }

/* Nav tabs */
.main-nav { display: flex; gap: 2px; }

.nav-tab {
  padding: 6px 14px;
  border: none;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--t2);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
  letter-spacing: -0.01em;
}
.nav-tab:hover { color: var(--t1); }
.nav-tab.active {
  background: rgba(92,124,250,0.14);
  color: var(--accent);
  font-weight: 600;
}

/* Auth */
.header-auth-area { display: flex; align-items: center; gap: 10px; }
.header-auth-btn {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b2);
  background: transparent;
  color: var(--t2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.header-auth-btn:hover {
  color: var(--t1);
  border-color: var(--b2);
  background: rgba(255,255,255,0.08);
}

.header-user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
  border: 0.5px solid var(--b1);
}
.header-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.header-username { font-size: 13px; font-weight: 500; color: var(--t1); }
.header-logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--t3); font-size: 14px;
  padding: 2px; display: flex;
  transition: color var(--t);
}
.header-logout-btn:hover { color: var(--t2); }

.tagline {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t3);
  font-weight: 500;
}

/* ── Views ─────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  max-height: 920px;
  overflow: hidden;
  background: #000;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 15%;
  transition: opacity 1.2s var(--ease-out);
}

/* Pure black vignette — very Apple, very cinematic */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #000 0%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0.0) 72%),
    linear-gradient(to right, rgba(0,0,0,0.72) 0%, transparent 52%);
  z-index: 1;
  pointer-events: none;
}

.hero-side { display: none; } /* handled by ::after */

.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 0 72px 96px;
  max-width: 640px;
}

.hero-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.hero-genre-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-genre-pill {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  background: rgba(255,255,255,0.10);
  color: var(--t2);
  border: 0.5px solid var(--b1);
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(3rem, 6.5vw, 6rem);
  font-weight: 900;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 14px;
  color: var(--t1);
}

.hero-meta-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--t2);
  margin-bottom: 14px;
  font-weight: 400;
}
.hero-meta-line .sep { opacity: 0.3; }
.hero-rating { color: var(--t1); font-weight: 600; }

.hero-overview {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

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

.hero-btn {
  padding: 11px 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.18s var(--ease);
  display: flex; align-items: center; gap: 7px;
}
.hero-btn-primary {
  background: var(--accent);
  color: #0D0A08;
  letter-spacing: 0;
}
.hero-btn-primary:hover {
  background: var(--accent-hov);
  transform: scale(0.98);
}
.hero-btn-secondary {
  background: rgba(245,237,214,0.10);
  color: var(--t1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid var(--b2);
}
.hero-btn-secondary:hover {
  background: rgba(245,237,214,0.18);
  transform: scale(0.98);
}

/* Hero dots */
.hero-dots {
  position: absolute;
  bottom: 36px; right: 72px;
  z-index: 3;
  display: flex; gap: 5px; align-items: center;
}
.hero-dot {
  width: 5px; height: 5px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.35s var(--ease);
}
.hero-dot.active { background: var(--t1); width: 20px; }
.hero-dot:hover { background: rgba(255,255,255,0.5); }

/* ── Main wrapper ──────────────────────────────────── */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* ── Search panel ──────────────────────────────────── */
.search-panel {
  max-width: 620px;
  margin: -52px auto 0;
  padding: 28px 28px 24px;
  background: var(--glass);
  backdrop-filter: saturate(140%) blur(32px);
  -webkit-backdrop-filter: saturate(140%) blur(32px);
  border: 0.5px solid var(--b2);
  border-radius: var(--r20);
  position: relative;
  z-index: 10;
  box-shadow: 0 24px 72px rgba(0,0,0,0.6), 0 0 0 0.5px var(--b1);
}

.panel-title {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--t1);
}
.panel-sub {
  font-size: 13px;
  color: var(--t2);
  margin-bottom: 18px;
  font-weight: 400;
}

/* Search input */
.search-wrapper { position: relative; margin-bottom: 14px; }
.search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border-radius: var(--r12);
  border: 0.5px solid var(--b1);
  background: rgba(255,255,255,0.06);
  color: var(--t1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t), background var(--t);
  font-weight: 400;
}
.search-input:focus {
  border-color: var(--b2);
  background: rgba(255,255,255,0.09);
}
.search-input::placeholder { color: var(--t3); }

.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--t3); pointer-events: none; display: flex;
}

/* Suggestions */
.suggestions {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--s2);
  border: 0.5px solid var(--b2);
  border-radius: var(--r16);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
  display: none;
  overflow: hidden;
}
.suggestions.open { display: block; }

.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t);
  border-bottom: 0.5px solid var(--b1);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover, .suggestion-item.focused { background: rgba(255,255,255,0.06); }

.suggestion-thumb {
  width: 34px; height: 48px;
  border-radius: var(--r8);
  object-fit: cover;
  background: var(--s3);
  flex: none;
}
.suggestion-thumb-placeholder {
  width: 34px; height: 48px;
  border-radius: var(--r8);
  background: var(--s3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex: none;
}
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-title {
  font-size: 13px; font-weight: 600; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--t1);
}
.suggestion-meta { font-size: 11px; color: var(--t3); margin-top: 2px; }
.suggestion-rating { font-size: 12px; color: var(--t2); font-weight: 600; white-space: nowrap; }

/* Selected chips */
.selected-movies { display: flex; flex-wrap: wrap; gap: 7px; }
.empty-hint { font-size: 13px; color: var(--t3); padding: 2px 0; }

.selected-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid var(--b1);
  border-radius: var(--r-pill);
  font-size: 12px;
}
.chip-title { font-weight: 600; color: var(--t1); letter-spacing: -0.01em; }
.chip-year { color: var(--t3); font-size: 11px; }
.chip-stars { display: flex; gap: 1px; }
.star { color: var(--t4); cursor: pointer; font-size: 13px; transition: color var(--t); }
.star:hover, .star.active { color: #FFD60A; } /* iOS yellow */
.chip-remove {
  background: none; border: none; cursor: pointer;
  color: var(--t3); display: flex;
  padding: 2px; border-radius: 50%;
  transition: color var(--t);
}
.chip-remove:hover { color: var(--t2); }

/* Recommend button */
.recommend-btn {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  border-radius: var(--r12);
  border: none;
  background: var(--accent);
  color: #0D0A08;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: -0.01em;
}
.recommend-btn:not(:disabled):hover {
  background: var(--accent-hov);
  transform: scale(0.99);
}
.recommend-btn:disabled {
  opacity: 0.22; cursor: not-allowed; transform: none;
}

/* ── Discovery rows ─────────────────────────────────── */
.discovery-section { padding: 52px 0 0; }
.discovery-row {
  margin-bottom: 56px;
  content-visibility: auto;
  contain-intrinsic-block-size: 320px;
}

.discovery-title {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.02em;
  padding: 0 72px 0 calc(72px + 16px);
  margin-bottom: 20px;
  color: var(--t1);
  position: relative;
  display: flex; align-items: baseline; gap: 14px;
}
.discovery-title::before {
  content: '';
  position: absolute;
  left: 72px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 72%;
  background: var(--accent);
  border-radius: 3px;
}
.discovery-title-sub {
  font-size: 13px; color: var(--t3);
  font-family: 'Inter', sans-serif;
  font-weight: 400; letter-spacing: 0;
}

/* Ranked list style for "All-Time Best" */
.ranked-list {
  padding: 0 72px;
  display: flex; flex-direction: column; gap: 2px;
}
.ranked-item {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--b1);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--r8);
  padding: 10px 12px;
}
.ranked-item:hover { background: rgba(238,240,255,0.03); }
.ranked-num {
  font-size: 28px; font-weight: 900;
  color: var(--b2); min-width: 42px;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.04em; line-height: 1; text-align: right;
}
.ranked-item:hover .ranked-num { color: var(--accent); }
.ranked-poster {
  width: 44px; aspect-ratio: 2/3;
  border-radius: var(--r4); object-fit: cover; flex: none;
  background: var(--s2);
}
.ranked-info { flex: 1; min-width: 0; }
.ranked-title {
  font-size: 14px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ranked-meta { font-size: 12px; color: var(--t3); margin-top: 2px; }
.ranked-rating { color: var(--accent); font-weight: 700; font-size: 13px; flex: none; }
.ranked-row { display: block; } /* no flex-scroll — ranked list is vertical */

.scroll-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 72px 20px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent);
}
.scroll-row::-webkit-scrollbar { display: none; }

/* ── Movie Cards ─────────────────────────────────────── */
.movie-card {
  flex: none;
  width: 176px;
  cursor: pointer;
  border-radius: 0;
  overflow: visible;           /* card-info below poster stays visible */
  scroll-snap-align: start;
  position: relative;
  transition: transform 0.38s cubic-bezier(0.23, 1, 0.32, 1),
              z-index 0s 0.38s;
  will-change: transform;
}

/* Scoped hover transforms */
.scroll-row .movie-card:hover,
.browse-scroll-row .movie-card:hover {
  transform: perspective(560px) rotateY(-5deg) translateY(-10px);
  z-index: 4;
  transition: transform 0.38s cubic-bezier(0.23, 1, 0.32, 1);
}
.results-grid .movie-card:hover,
.browse-results-grid .movie-card:hover {
  transform: translateY(-8px);
  z-index: 4;
  transition: transform 0.28s var(--ease);
}
.profile-grid .movie-card:hover {
  transform: translateY(-3px);
}

.card-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--s2);
  border-radius: var(--r12);
  overflow: hidden;
  /* Amber outline ring on hover (outline ignores overflow:hidden) */
  outline: 1.5px solid transparent;
  outline-offset: -1px;
  transition: outline-color 0.3s var(--ease);
}
.movie-card:hover .card-poster-wrap {
  outline-color: rgba(92,124,250,0.55);
}
.card-poster {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.4s var(--ease);
}
.movie-card:hover .card-poster { transform: scale(1.04); }

.card-poster-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; background: var(--s2); color: var(--t3);
}

/* Rating pip — amber, always visible */
.card-rating-pip {
  position: absolute;
  top: 8px; right: 8px; z-index: 2;
  background: rgba(13,10,8,0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--accent);
  font-size: 10px; font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Hover overlay — now just the add button */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(13,10,8,0.90) 0%,
    rgba(13,10,8,0.15) 52%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 10px;
  pointer-events: none;
}
.movie-card:hover .card-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}
.card-hover-add {
  width: 100%;
  padding: 7px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--r8);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: background 0.15s;
}
.card-hover-add:hover { background: var(--accent-hov); }

/* Always-visible info below poster */
.card-info {
  padding: 9px 2px 4px;
}
.card-title-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-year-text {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
  letter-spacing: 0.01em;
}

/* Profile card body — always visible metadata */
.card-body { padding: 9px 4px 4px; }
.card-title {
  font-size: 12px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 3px;
}
.card-meta {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--t3); margin-bottom: 6px;
}
.card-rating { color: var(--accent); font-weight: 700; }
.card-genres { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.genre-tag {
  padding: 2px 6px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 500;
  background: rgba(245,237,214,0.05);
  border: 0.5px solid var(--b1);
  color: var(--t3);
}
.profile-card-stars {
  display: flex; gap: 2px; margin-bottom: 5px;
}
.profile-card-remove {
  position: absolute; top: 7px; left: 7px; z-index: 4;
  background: rgba(13,10,8,0.78);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: none; color: var(--t2); cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 300;
  transition: all var(--t);
  opacity: 0;
}
.movie-card:hover .profile-card-remove { opacity: 1; }
.profile-card-remove:hover { color: var(--danger); }
.profile-status-badge {
  display: inline-block; margin-bottom: 5px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
}
.badge-watched {
  background: rgba(48,209,88,0.12); color: #30d158;
  border: 0.5px solid rgba(48,209,88,0.25);
}
.badge-watchlist {
  background: rgba(92,124,250,0.12); color: var(--accent);
  border: 0.5px solid rgba(92,124,250,0.25);
}

/* ── Results grid — 12-col editorial layout ─────────── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 16px;
  padding: 0 72px;
  align-items: start;
}
.results-grid .movie-card { width: 100%; scroll-snap-align: none; grid-column: span 3; }
.results-grid .movie-card-featured  { grid-column: 1 / -1; }
.results-grid .movie-card-landscape { grid-column: span 6; width: 100%; }

/* ── Landscape card ──────────────────────────────────── */
.movie-card-landscape {
  display: flex;
  flex-direction: row;
  height: 240px;
  overflow: hidden;
  border-radius: var(--r16);
  background: var(--s2);
  border: 0.5px solid var(--b1);
  cursor: pointer;
  transition: transform 0.28s var(--ease), border-color 0.2s, box-shadow 0.28s;
  animation: scaleIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
  scroll-snap-align: none;
  width: 100%;
  position: relative;
}
.movie-card-landscape:hover {
  transform: translateY(-6px);
  border-color: rgba(92,124,250,0.35);
  box-shadow: 0 18px 40px rgba(92,124,250,0.18);
}
.landscape-poster-wrap {
  width: 160px; flex: none;
  position: relative; overflow: hidden;
}
.landscape-poster-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s var(--ease);
}
.movie-card-landscape:hover .landscape-poster-wrap img { transform: scale(1.06); }
.landscape-info {
  flex: 1; min-width: 0;
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.landscape-eyebrow {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.landscape-genre {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); font-weight: 700;
}
.landscape-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; font-weight: 800;
  color: var(--t1); line-height: 1.2;
  letter-spacing: -0.02em;
}
.landscape-meta {
  display: flex; gap: 8px; font-size: 12px; color: var(--t3);
}
.landscape-rating { color: var(--accent); font-weight: 600; font-size: 12px; }
.landscape-overview {
  font-size: 12px; color: var(--t2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.landscape-add-btn {
  align-self: flex-start;
  padding: 7px 16px; border-radius: var(--r-pill);
  background: rgba(92,124,250,0.12);
  border: 0.5px solid rgba(92,124,250,0.3);
  color: var(--accent); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; margin-top: auto;
  transition: all 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
.landscape-add-btn:hover { background: var(--accent); color: #fff; }

@media (max-width: 900px) {
  .results-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .results-grid .movie-card { grid-column: span 2; }
  .results-grid .movie-card-landscape { grid-column: span 4; height: 180px; }
  .landscape-poster-wrap { width: 120px; }
}
@media (max-width: 600px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; }
  .results-grid .movie-card { grid-column: span 1; }
  .results-grid .movie-card-landscape { grid-column: span 2; height: 160px; }
  .landscape-poster-wrap { width: 100px; }
  .landscape-title { font-size: 1rem; }
  .landscape-overview { -webkit-line-clamp: 2; }
}

/* ── Results panel ──────────────────────────────────── */
.results-panel { padding: 32px 0 0; }
.results-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0 72px 20px;
}

.back-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent;
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
}
.back-btn:hover { border-color: var(--b2); color: var(--t1); background: rgba(255,255,255,0.06); }

.tabs { display: flex; gap: 3px; padding: 0 72px 20px; }
.tab {
  padding: 6px 16px;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  color: var(--t2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
  letter-spacing: -0.01em;
}
.tab:hover { background: rgba(255,255,255,0.06); color: var(--t1); }
.tab.active {
  background: rgba(255,255,255,0.10);
  color: var(--t1);
  font-weight: 600;
}

.loading-state {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 60px;
  color: var(--t2); font-size: 13px;
}
.spinner {
  width: 18px; height: 18px;
  border: 1.5px solid var(--b1);
  border-top-color: var(--t2);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.load-more-btn {
  display: block;
  margin: 28px auto 0;
  padding: 10px 28px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent;
  color: var(--t2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
}
.load-more-btn:hover { border-color: var(--b2); color: var(--t1); background: rgba(255,255,255,0.06); }

/* ── Movie detail modal ─────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  z-index: 500;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal[style*="block"] { display: block !important; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 0;
}

.modal-card {
  position: relative; z-index: 1;
  max-width: 860px;
  margin: 52px auto 40px;
  border-radius: var(--r20);
  background: var(--s2);
  border: 0.5px solid var(--b1);
  box-shadow: 0 48px 120px rgba(0,0,0,0.85);
  overflow: hidden;
}

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 30px; height: 30px;
  border-radius: 50%; border: none;
  background: rgba(60,60,62,0.9);
  color: var(--t2); font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
  backdrop-filter: blur(8px);
}
.modal-close:hover { background: rgba(80,80,84,0.95); color: var(--t1); }

.modal-backdrop-img {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center 20%;
  position: relative;
}
.modal-backdrop-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26,21,16,0.0) 0%, rgba(26,21,16,1) 100%);
}

.modal-body { padding: 0 0 32px; }

.modal-poster-row {
  display: flex; gap: 24px;
  padding: 24px 28px;
  margin-top: -80px;
  position: relative; z-index: 2;
}
.modal-poster {
  width: 140px; flex: none;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--r12);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7);
}
.modal-poster-placeholder {
  width: 140px; aspect-ratio: 2/3;
  background: var(--s3); border-radius: var(--r12);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; flex: none;
}

.modal-info { flex: 1; min-width: 0; padding-top: 48px; }

.modal-title {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--t1);
}

.modal-meta {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--t2);
  margin-bottom: 10px; flex-wrap: wrap;
  font-weight: 400;
}
.dot { color: var(--t4); }
.modal-rating-badge { color: var(--t1); font-weight: 600; }
.modal-runtime { color: var(--t2); }

.modal-scores {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.score-badge {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r8);
  font-size: 11px; font-weight: 700;
}
.score-logo { font-size: 10px; font-weight: 700; opacity: 0.75; }
.score-imdb { background: rgba(245,197,24,0.12); color: #FFD60A; border: 0.5px solid rgba(245,197,24,0.2); }
.score-rt   { background: rgba(255,80,50,0.10);  color: #FF6B47; border: 0.5px solid rgba(255,80,50,0.18); }
.score-mc   { background: rgba(255,255,255,0.06); color: var(--t2); border: 0.5px solid var(--b1); }

.modal-tagline {
  font-size: 13px; color: var(--t2); font-style: italic;
  margin-bottom: 10px; font-weight: 400;
}
.modal-genres { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-genre-tag {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid var(--b1);
  color: var(--t2);
  letter-spacing: -0.01em;
}

.modal-actions { margin-top: 4px; }
.modal-add-btn {
  padding: 9px 20px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--t1);
  color: #000;
  font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  letter-spacing: -0.02em;
  transition: all 0.18s var(--ease);
}
.modal-add-btn:not(:disabled):hover {
  background: rgba(255,255,255,0.88);
  transform: scale(0.98);
}
.modal-add-btn:disabled {
  background: rgba(255,255,255,0.10);
  color: var(--t2);
  cursor: default; transform: none;
}

.modal-overview {
  font-size: 14px; line-height: 1.7;
  color: var(--t2);
  padding: 0 28px 22px;
  font-weight: 400;
}

/* Cast */
.modal-cast-section {
  padding: 22px 28px;
  border-top: 0.5px solid var(--b1);
}
.modal-crew-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.crew-item { display: flex; flex-direction: column; gap: 2px; }
.crew-role {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--t3); font-weight: 600;
}
.crew-name { font-size: 13px; font-weight: 600; color: var(--t1); letter-spacing: -0.02em; }

.modal-section-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--t3);
  font-weight: 600; margin-bottom: 12px;
}

.cast-scroll {
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 6px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent);
  mask-image: linear-gradient(to right, black 85%, transparent);
}
.cast-scroll::-webkit-scrollbar { display: none; }
.cast-member {
  flex: none; width: 68px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.cast-photo {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover;
  background: var(--s3);
}
.cast-photo-placeholder {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--s3);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.cast-name { font-size: 10px; font-weight: 600; color: var(--t1); line-height: 1.3; letter-spacing: -0.01em; }
.cast-character { font-size: 9px; color: var(--t3); }

/* Gallery */
.modal-gallery {
  padding: 22px 28px;
  border-top: 0.5px solid var(--b1);
}
.gallery-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 6px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black 88%, transparent);
  mask-image: linear-gradient(to right, black 88%, transparent);
}
.gallery-scroll::-webkit-scrollbar { display: none; }
.gallery-still {
  flex: none; height: 112px; aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--r8);
  cursor: zoom-in;
  transition: transform 0.2s, opacity 0.2s;
  background: var(--s3);
}
.gallery-still:hover { transform: scale(1.03); opacity: 0.85; }

/* Trailer */
.modal-trailer {
  padding: 22px 28px 0;
  border-top: 0.5px solid var(--b1);
}
.modal-trailer iframe {
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--r12); border: none; background: #000;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 900;
  display: none; align-items: center; justify-content: center;
}
.gallery-lightbox.open { display: flex; }
.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(4px);
}
.lb-img {
  position: relative; z-index: 1;
  max-width: 90vw; max-height: 85vh;
  object-fit: contain;
  border-radius: var(--r12);
}
.lb-prev, .lb-next, .lb-close {
  position: absolute; z-index: 2;
  background: rgba(60,60,62,0.8);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--b1);
  color: var(--t1);
  border-radius: 50%; cursor: pointer;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: background var(--t);
}
.lb-prev:hover, .lb-next:hover, .lb-close:hover { background: rgba(80,80,84,0.9); }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 16px; right: 16px; font-size: 14px; width: 30px; height: 30px; }
.lb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: 12px; color: var(--t2);
  background: rgba(0,0,0,0.5); padding: 3px 10px; border-radius: var(--r-pill);
}

/* ── Browse view ────────────────────────────────────── */
.browse-main { padding: 52px 0 80px; }

.browse-hero { padding: 40px 72px 28px; }
.browse-search-wrap { position: relative; max-width: 480px; }
.browse-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--t3); pointer-events: none;
}
.browse-search-input {
  width: 100%;
  padding: 12px 40px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: rgba(255,255,255,0.06);
  color: var(--t1);
  font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color var(--t), background var(--t);
}
.browse-search-input:focus { border-color: var(--b2); background: rgba(255,255,255,0.09); }
.browse-search-input::placeholder { color: var(--t3); }
.browse-search-clear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--t2); cursor: pointer; font-size: 14px;
}

.genre-pills-wrap { padding: 0 72px 24px; }
.genre-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.genre-pill {
  padding: 6px 14px; border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent; color: var(--t2);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
}
.genre-pill:hover { border-color: var(--b2); color: var(--t1); background: rgba(255,255,255,0.06); }
.genre-pill.active { background: var(--accent); border-color: transparent; color: #000; font-weight: 600; }

.browse-row {
  margin-bottom: 36px;
  content-visibility: auto;
  contain-intrinsic-block-size: 260px;
}
.browse-row-header { padding: 0 72px; margin-bottom: 14px; }
.browse-row-title {
  font-size: 22px; font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0; color: var(--t1);
  position: relative;
  padding-left: 16px;
}
.browse-row-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 68%;
  background: var(--accent);
  border-radius: 3px;
}

.browse-scroll-row {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 4px 72px 14px; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent);
}
.browse-scroll-row::-webkit-scrollbar { display: none; }
.browse-scroll-row .movie-card { scroll-snap-align: start; }

.browse-grid-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 72px 18px;
}
.browse-grid-title {
  font-size: 18px; font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0; color: var(--t1);
}
.browse-grid-back {
  background: none; border: 0.5px solid var(--b1);
  color: var(--t2); padding: 6px 14px;
  border-radius: var(--r-pill); font-size: 12px; cursor: pointer;
  font-family: inherit; transition: all var(--t);
}
.browse-grid-back:hover { border-color: var(--b2); color: var(--t1); }
.browse-results-grid { padding: 0 72px; }

/* ── Auth modal ─────────────────────────────────────── */
.auth-modal-card {
  max-width: 400px !important;
  border-radius: var(--r20) !important;
}
.auth-modal-body { padding: 36px 32px; }
.auth-modal-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.04em;
  color: var(--t1); margin-bottom: 22px; text-align: center;
}
.auth-tabs {
  display: flex; gap: 3px; margin-bottom: 24px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r8); padding: 3px;
}
.auth-tab {
  flex: 1; padding: 7px; border-radius: var(--r8);
  border: none; background: transparent;
  color: var(--t2); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all var(--t);
}
.auth-tab.active {
  background: rgba(255,255,255,0.10);
  color: var(--t1); font-weight: 600;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-label { font-size: 12px; font-weight: 600; color: var(--t2); letter-spacing: 0.01em; }
.auth-input {
  padding: 10px 12px; border-radius: var(--r8);
  border: 0.5px solid var(--b1);
  background: rgba(255,255,255,0.05);
  color: var(--t1); font-size: 14px;
  font-family: inherit; outline: none;
  transition: border-color var(--t), background var(--t);
}
.auth-input:focus { border-color: var(--b2); background: rgba(255,255,255,0.08); }
.auth-input::placeholder { color: var(--t3); }
.auth-error { font-size: 12px; color: var(--danger); min-height: 16px; }
.auth-submit-btn {
  padding: 11px; border-radius: var(--r12);
  border: none; background: var(--t1); color: #000;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.18s;
  margin-top: 2px; letter-spacing: -0.02em;
}
.auth-submit-btn:hover { background: rgba(255,255,255,0.88); transform: scale(0.99); }

/* ── Profile view ───────────────────────────────────── */
#viewProfile { padding-top: 52px; }
.profile-header {
  padding: 48px 72px 32px;
  border-bottom: 0.5px solid var(--b1);
  display: flex; align-items: flex-end; gap: 20px;
}
.profile-avatar-large {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff; flex: none;
}
.profile-info { flex: 1; }
.profile-username {
  font-size: 26px; font-weight: 800; letter-spacing: -0.04em;
  color: var(--t1); margin-bottom: 4px;
}
.profile-joined { font-size: 12px; color: var(--t3); }
.profile-stats { display: flex; gap: 24px; margin-top: 10px; }
.profile-stat { display: flex; flex-direction: column; gap: 1px; }
.profile-stat-num { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--t1); }
.profile-stat-label { font-size: 10px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }

.profile-filters { display: flex; gap: 3px; padding: 22px 72px 0; }
.profile-filter-btn {
  padding: 6px 16px; border-radius: var(--r-pill);
  border: none; background: transparent; color: var(--t2);
  font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all var(--t); font-weight: 500;
}
.profile-filter-btn.active {
  background: rgba(255,255,255,0.10); color: var(--t1); font-weight: 600;
}
.profile-filter-btn:hover { background: rgba(255,255,255,0.06); color: var(--t1); }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  padding: 22px 72px 80px;
}
.profile-movie-card { position: relative; cursor: pointer; border-radius: var(--r12); overflow: hidden; }
.profile-movie-card:hover .card-hover-overlay { opacity: 1; pointer-events: auto; }

.profile-movie-rating {
  position: absolute; top: 7px; right: 7px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  color: #FFD60A; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: var(--r-pill);
}
.profile-movie-remove {
  position: absolute; top: 7px; left: 7px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  border: none; color: var(--t2); cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; font-size: 12px;
  transition: all var(--t);
}
.profile-movie-card:hover .profile-movie-remove { display: flex; }
.profile-movie-remove:hover { color: var(--accent); }

.profile-movie-stars {
  display: flex; gap: 2px;
  position: absolute; bottom: 7px; left: 0; right: 0;
  justify-content: center; opacity: 0; transition: opacity var(--t);
}
.profile-movie-card:hover .profile-movie-stars { opacity: 1; }
.profile-star { color: rgba(255,255,255,0.25); font-size: 13px; cursor: pointer; transition: color var(--t); }
.profile-star.active, .profile-star:hover { color: #FFD60A; }

.profile-empty { grid-column: 1/-1; padding: 60px; text-align: center; color: var(--t2); font-size: 14px; }

/* ── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--s3);
  color: var(--t1);
  border: 0.5px solid var(--b2);
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 0; transition: all 0.25s var(--ease);
  pointer-events: none; z-index: 999; white-space: nowrap;
  backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Responsive ─────────────────────────────────────── */
/* ── Tablet ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .header-inner { padding: 0 28px; }
  .tagline { display: none; }

  .hero-content { padding: 0 40px 88px; }
  .hero-title { font-size: clamp(1.9rem, 3.8vw, 3rem); }

  .discovery-title { padding: 0 40px 0 calc(40px + 16px); }
  .discovery-title::before { left: 40px; }
  .scroll-row { padding-left: 40px; padding-right: 40px; }
  .results-grid { padding: 0 40px; }
  .results-header, .tabs { padding-left: 40px; padding-right: 40px; }

  .browse-hero, .genre-pills-wrap, .browse-row-header,
  .browse-grid-header, .browse-results-grid { padding-left: 40px; padding-right: 40px; }
  .browse-scroll-row { padding-left: 40px; padding-right: 40px; }

  .profile-header, .profile-filters, .profile-grid { padding-left: 40px; padding-right: 40px; }
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 768px) {
  /* Reduce expensive backdrop-filter on mobile for performance */
  .header {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .search-panel {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .modal-backdrop {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  /* Header */
  .header-inner { padding: 0 16px; gap: 8px; }
  .logo-text { font-size: 16px; }
  .logo-icon { font-size: 16px; }
  .nav-tab { padding: 5px 11px; font-size: 12px; }
  .header-auth-btn { padding: 5px 11px; font-size: 12px; }
  .header-username { display: none; }

  /* Hero */
  .hero { min-height: 520px; max-height: 640px; }
  .hero-content { padding: 0 20px 80px; max-width: 100%; }
  .hero-title { font-size: clamp(2rem, 9vw, 3.2rem); }
  .hero-overview { display: none; }
  .hero-genre-pills { display: none; }
  .hero-dots { right: 20px; bottom: 28px; }
  .hero-label { display: none; }
  .hero-btn { padding: 10px 18px; font-size: 13px; }

  /* Search panel */
  .search-panel {
    margin: -36px 16px 0;
    padding: 22px 20px 20px;
    border-radius: var(--r16);
  }
  .search-panel.no-hero { margin: 72px 16px 0; }
  .panel-title { font-size: 17px; }

  /* Discovery */
  .discovery-section { padding: 36px 0 0; }
  .discovery-title { padding: 0 20px 0 calc(20px + 14px); font-size: 18px; margin-bottom: 14px; }
  .discovery-title::before { left: 20px; }
  .scroll-row { padding: 4px 20px 16px; gap: 8px; }
  .movie-card { width: 126px; }

  /* Results */
  .results-grid {
    padding: 0 16px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
  }
  .results-header { padding: 0 16px 16px; flex-wrap: wrap; gap: 10px; }
  .tabs { padding: 0 16px 16px; }

  /* Browse */
  .browse-main { padding: 52px 0 60px; }
  .browse-hero { padding: 28px 20px 20px; }
  .genre-pills-wrap { padding: 0 20px 18px; }
  .browse-row-header { padding: 0 20px; }
  .browse-scroll-row { padding: 4px 20px 14px; gap: 8px; }
  .browse-scroll-row .movie-card { width: 126px; }
  .browse-grid-header { padding: 0 16px 16px; flex-wrap: wrap; gap: 8px; }
  .browse-results-grid { padding: 0 16px; }

  /* Profile */
  .profile-header { padding: 32px 20px 24px; flex-wrap: wrap; }
  .profile-filters { padding: 16px 20px 0; flex-wrap: wrap; }
  .profile-grid { padding: 16px 16px 60px; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
  .profile-username { font-size: 22px; }
  .profile-avatar-large { width: 60px; height: 60px; font-size: 22px; }

  /* Modal — full screen sheet */
  .modal { padding: 0; }
  .modal-card {
    margin: 0;
    border-radius: var(--r20) var(--r20) 0 0;
    min-height: 92dvh;
    margin-top: 8dvh;
  }
  .modal-backdrop-img { height: 220px; }
  .modal-poster-row { padding: 16px 20px; margin-top: -60px; gap: 16px; }
  .modal-poster { width: 96px; }
  .modal-info { padding-top: 20px; }
  .modal-title { font-size: 19px; }
  .modal-overview { padding: 0 20px 18px; font-size: 13px; }
  .modal-cast-section,
  .modal-gallery,
  .modal-trailer { padding-left: 20px; padding-right: 20px; padding-top: 18px; }
  .modal-poster-row { flex-direction: row; align-items: flex-start; }
}

/* ── Small mobile ────────────────────────────────── */
@media (max-width: 430px) {
  .hero-actions { gap: 8px; }
  .hero-btn { flex: 1; justify-content: center; padding: 10px 14px; }
  .main-nav { gap: 1px; }
  .nav-tab { padding: 5px 9px; }
  .movie-card { width: 110px; }
  .scroll-row .movie-card,
  .browse-scroll-row .movie-card { width: 110px; }
  .card-skeleton { width: 110px; }
}

/* ══════════════════════════════════════════════════
   ANIMATIONS & MOTION
   ══════════════════════════════════════════════════ */

/* ── Keyframes ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1);    }
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(3%,   2%); }
  30%  { transform: translate(-1%,  4%); }
  40%  { transform: translate(4%,  -1%); }
  50%  { transform: translate(-3%,  3%); }
  60%  { transform: translate(2%,  -4%); }
  70%  { transform: translate(-4%,  1%); }
  80%  { transform: translate(1%,  -2%); }
  90%  { transform: translate(-2%,  4%); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0);     }
}

/* ── View transitions ────────────────────────────── */
.view-enter {
  animation: fadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Modal animation ─────────────────────────────── */
.modal-backdrop {
  animation: fadeIn 0.22s var(--ease) both;
}
.modal-card {
  animation: modalIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Card entrance ───────────────────────────────── */
/* fill-mode:both means 'from' state applies before start (no opacity:0 base needed) */
.scroll-row .movie-card,
.browse-scroll-row .movie-card {
  animation: fadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.results-grid .movie-card,
.profile-grid .movie-card,
.browse-results-grid .movie-card {
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Card hover — outline ring handled on .card-poster-wrap ── */
.movie-card { will-change: transform; }

/* ── Hero text animation ─────────────────────────── */
#heroMeta {
  animation: heroTextIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#heroMeta.hero-text-change {
  animation: heroTextIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Section reveal on scroll ────────────────────── */
/* Sections are always visible; cards inside animate individually */
.discovery-row,
.browse-row {
  transition: opacity 0.4s var(--ease);
}
/* Subtle dimming while loading, revealed by .visible */
.discovery-row:not(.visible),
.browse-row:not(.visible) {
  opacity: 0.4;
}
.discovery-row.visible,
.browse-row.visible {
  opacity: 1;
}

/* ── Search panel entrance ───────────────────────── */
.search-panel {
  animation: fadeUp 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Skeleton shimmer ────────────────────────────── */
.card-skeleton {
  flex: none;
  width: 160px;
  border-radius: var(--r12);
  overflow: hidden;
  background: var(--s2);
}
.card-skeleton-poster {
  aspect-ratio: 2/3;
  background: linear-gradient(90deg,
    var(--s2) 25%,
    var(--s3) 50%,
    var(--s2) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ── Genre pill animation ────────────────────────── */
.genre-pill {
  animation: fadeIn 0.3s var(--ease) both;
}
.genre-pills .genre-pill:nth-child(n) {
  animation-delay: calc(var(--i, 0) * 30ms);
}

/* ── Smooth modal close ──────────────────────────── */
.modal.closing .modal-card {
  animation: modalIn 0.2s cubic-bezier(0.4, 0, 1, 1) reverse both;
}
.modal.closing .modal-backdrop {
  animation: fadeIn 0.2s var(--ease) reverse both;
}

/* ── Hero dot transition ─────────────────────────── */
.hero-dot {
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1),
              background 0.3s var(--ease);
}

/* ── Scroll row hover shadow ─────────────────────── */
.scroll-row:hover .movie-card:not(:hover) {
  opacity: 0.65;
  transition: opacity 0.3s var(--ease), transform 0.28s var(--ease);
}
.scroll-row .movie-card:hover,
.browse-scroll-row .movie-card:hover {
  opacity: 1;
}

/* ── Modal rec button ────────────────────────────── */
.modal-rec-btn {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b2);
  background: transparent;
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s var(--ease);
  margin-left: 8px;
}
.modal-rec-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--t1);
  border-color: var(--b2);
}

/* ── Smooth color transitions on interactive ─────── */
.nav-tab, .genre-pill, .tab, .hero-btn,
.recommend-btn, .modal-add-btn, .auth-submit-btn {
  transition-property: background, color, border-color,
                       transform, opacity, box-shadow;
  transition-duration: 0.18s;
  transition-timing-function: var(--ease);
}

/* ── Poster load fade-in — handled by .img-loaded class via JS ── */
.modal-poster {
  animation: scaleIn 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── Hero bg transition ──────────────────────────── */
.hero-bg {
  transition: opacity 1.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Page-level progress bar ─────────────────────── */
.page-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg,
    var(--accent) 0%,
    rgba(92,124,250,0.55) 100%
  );
  z-index: 9999;
  border-radius: 0 2px 2px 0;
  opacity: 0;
  pointer-events: none;
  will-change: width, opacity;
  /* width transition handled inline by JS for snappy control */
}
.page-progress.active { opacity: 1; }

/* ── Browse skeleton rows ────────────────────────── */
.browse-scroll-row .card-skeleton {
  width: 140px;
  flex: none;
}
@media (max-width: 768px) {
  .browse-scroll-row .card-skeleton { width: 120px; }
}
@media (max-width: 430px) {
  .browse-scroll-row .card-skeleton { width: 108px; }
}

/* ── Modal loading skeleton ──────────────────────── */
.modal-skeleton {
  padding: 0 0 32px;
  animation: fadeIn 0.25s var(--ease) both;
}
.modal-skeleton-backdrop {
  width: 100%; height: 280px;
  background: linear-gradient(90deg, var(--s2) 25%, var(--s3) 50%, var(--s2) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.modal-skeleton-body {
  display: flex; gap: 20px;
  padding: 20px 28px;
  margin-top: -56px; position: relative; z-index: 2;
}
.modal-skeleton-poster {
  width: 110px; aspect-ratio: 2/3; flex: none;
  border-radius: var(--r12);
  background: linear-gradient(90deg, var(--s3) 25%, var(--s4) 50%, var(--s3) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.modal-skeleton-lines { flex: 1; padding-top: 48px; display: flex; flex-direction: column; gap: 9px; }
.modal-skeleton-line {
  height: 13px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--s3) 25%, var(--s4) 50%, var(--s3) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.modal-skeleton-line:nth-child(1) { width: 65%; height: 22px; }
.modal-skeleton-line:nth-child(2) { width: 45%; }
.modal-skeleton-line:nth-child(3) { width: 80%; margin-top: 6px; }
.modal-skeleton-line:nth-child(4) { width: 70%; }

/* ── Image blur-up / fade-in ─────────────────────── */
.card-poster {
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.card-poster.img-loaded { opacity: 1; }

/* Also handles posters that load faster than animation starts */
@keyframes posterFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scroll row gradient mask (performance: only when has cards) ── */
.browse-scroll-row:not(:empty) {
  -webkit-mask-image: linear-gradient(
    to right, transparent, #000 52px, #000 calc(100% - 52px), transparent
  );
  mask-image: linear-gradient(
    to right, transparent, #000 52px, #000 calc(100% - 52px), transparent
  );
}

/* ── Suggestion items ────────────────────────────── */
.suggestion-item {
  transition: background 0.14s var(--ease);
}
.suggestion-item:first-child {
  border-radius: var(--r16) var(--r16) 0 0;
  overflow: hidden;
}
.suggestion-item:last-child {
  border-radius: 0 0 var(--r16) var(--r16);
  overflow: hidden;
}

/* ── Toast animate ───────────────────────────────── */
.toast {
  transition: opacity 0.25s cubic-bezier(0.16,1,0.3,1),
              transform 0.25s cubic-bezier(0.16,1,0.3,1);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════
   NEW FEATURES — Watchlist, Providers, Similar,
   Collection, Filter Bar, Advanced Search
   ═══════════════════════════════════════════════════ */

/* ── Watchlist button in modal ───────────────────── */
.modal-watchlist-btn {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b2);
  background: transparent;
  color: var(--t2);
  font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: all 0.18s var(--ease);
  margin-left: 6px;
  white-space: nowrap;
}
.modal-watchlist-btn:hover { background: rgba(255,255,255,0.08); color: var(--t1); border-color: rgba(255,255,255,0.3); }
.modal-watchlist-btn.is-watchlisted {
  background: rgba(255,255,255,0.08);
  color: var(--t1); border-color: rgba(255,255,255,0.25);
}
.modal-watchlist-btn.is-watched {
  background: rgba(48,209,88,0.12);
  color: #30d158; border-color: rgba(48,209,88,0.3);
}

/* ── Watchlist dot on cards ──────────────────────── */
.card-wl-dot {
  position: absolute; z-index: 4;
  top: 7px; left: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.55);
  pointer-events: none;
}
.card-wl-dot.is-watched { background: #30d158; }

/* ── Streaming providers section in modal ────────── */
.modal-providers {
  padding: 20px 28px;
  border-top: 0.5px solid var(--b1);
}
.modal-providers-rows { display: flex; flex-direction: column; gap: 10px; }
.providers-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.providers-row-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--t3);
  font-weight: 600; min-width: 40px; flex: none;
}
.provider-logo {
  width: 34px; height: 34px;
  border-radius: var(--r8);
  object-fit: cover;
  background: var(--s3);
  transition: transform 0.18s var(--ease), opacity 0.18s;
}
.provider-logo:hover { transform: scale(1.10); opacity: 0.85; }
.providers-more-link {
  font-size: 11px; color: var(--t3); text-decoration: none;
  margin-left: auto; padding: 3px 0;
  transition: color var(--t);
}
.providers-more-link:hover { color: var(--t2); }

/* ── Collection / franchise section ─────────────── */
.modal-collection {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px;
  border-top: 0.5px solid var(--b1);
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
}
.modal-collection:hover { background: rgba(255,255,255,0.04); }
.modal-collection-poster {
  width: 38px; aspect-ratio: 2/3;
  border-radius: var(--r4);
  object-fit: cover; flex: none;
  background: var(--s3);
}
.modal-collection-info { flex: 1; min-width: 0; }
.modal-collection-sub {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--t3); font-weight: 600;
}
.modal-collection-name {
  font-size: 14px; font-weight: 600; color: var(--t1);
  letter-spacing: -0.02em; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-collection-arrow { color: var(--t3); font-size: 18px; flex: none; }

/* ── More Like This (in modal) ───────────────────── */
.modal-similar {
  padding: 20px 0 4px;
  border-top: 0.5px solid var(--b1);
}
.modal-similar-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--t3);
  font-weight: 600; margin-bottom: 12px;
  padding: 0 28px;
}
.modal-similar-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 28px 14px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
  mask-image: linear-gradient(to right, #000 88%, transparent);
}
.modal-similar-row::-webkit-scrollbar { display: none; }
.modal-similar-row .movie-card {
  width: 100px !important; flex: none;
  /* override scroll-row animation for these small cards */
  animation: scaleIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── Recommendation filter bar ───────────────────── */
.filter-bar {
  padding: 0 72px 14px;
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
}
.filter-genre-pills {
  display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto;
}
.filter-genre-pill {
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent; color: var(--t2);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all var(--t);
  animation: fadeIn 0.2s var(--ease) both;
}
.filter-genre-pill:hover { border-color: var(--b2); color: var(--t1); background: rgba(255,255,255,0.06); }
.filter-genre-pill.active { background: var(--accent); border-color: transparent; color: #000; font-weight: 600; }

.filter-controls { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.filter-select {
  padding: 5px 28px 5px 11px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent;
  color: var(--t2); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color var(--t), color var(--t);
}
.filter-select:hover { border-color: var(--b2); color: var(--t1); }
.filter-select option { background: #1c1c1e; color: #fff; }

.filter-reset {
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent; color: var(--t3);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all var(--t);
}
.filter-reset:hover { border-color: var(--b2); color: var(--t2); }

.filter-results-count {
  font-size: 12px; color: var(--t3);
  padding: 0 72px 8px;
  transition: opacity 0.3s;
}

@media (max-width: 768px) {
  .filter-bar { padding: 0 16px 12px; }
  .filter-results-count { padding: 0 16px 6px; }
}

/* ── Advanced search panel in Browse ────────────── */
.browse-filter-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent; color: var(--t2);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all var(--t); margin-top: 12px;
}
.browse-filter-toggle:hover { border-color: var(--b2); color: var(--t1); }
.browse-filter-toggle.open { border-color: rgba(255,255,255,0.3); color: var(--t1); background: rgba(255,255,255,0.07); }

.browse-adv-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 14px;
  animation: fadeUp 0.22s var(--ease) both;
}
.browse-adv-filters .filter-select { min-width: 120px; }

.adv-filter-apply {
  padding: 5px 16px; border-radius: var(--r-pill);
  border: none; background: var(--t1); color: #000;
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all 0.18s var(--ease);
}
.adv-filter-apply:hover { background: rgba(255,255,255,0.88); transform: scale(0.98); }

.adv-filter-clear {
  padding: 5px 12px; border-radius: var(--r-pill);
  border: 0.5px solid var(--b1);
  background: transparent; color: var(--t3);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all var(--t);
}
.adv-filter-clear:hover { border-color: var(--b2); color: var(--t2); }

@media (max-width: 768px) {
  .browse-adv-filters .filter-select { min-width: 0; flex: 1; }
}

/* ── Profile: status toggle on cards ────────────── */
.profile-card-action {
  display: block; width: 100%;
  margin-top: 6px; padding: 5px 0;
  border-radius: var(--r8);
  border: 0.5px solid var(--b1);
  background: transparent; color: var(--t3);
  font-size: 11px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all var(--t); text-align: center;
}
.profile-card-action:hover { border-color: var(--b2); color: var(--t2); background: rgba(255,255,255,0.04); }
.profile-card-action.mark-watched:hover { color: #30d158; border-color: rgba(48,209,88,0.35); }

/* ═══════════════════════════════════════════════════
   NEW FEATURES — added with 6-feature drop
   ═══════════════════════════════════════════════════ */

/* ── Input mode tabs (By Movie / By Vibe / Watch Together) ── */
.input-mode-tabs {
  display: flex; gap: 4px;
  margin-bottom: 20px;
  background: var(--s2);
  border-radius: var(--r-pill);
  padding: 4px;
  border: 0.5px solid var(--b1);
}
.input-mode-tab {
  flex: 1; padding: 7px 14px;
  border-radius: var(--r-pill);
  border: none; background: transparent;
  color: var(--t3); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s var(--ease);
}
.input-mode-tab:hover  { color: var(--t2); }
.input-mode-tab.active { background: var(--s4); color: var(--t1); font-weight: 600; }

/* ── Vibe textarea ─────────────────────────────────── */
.vibe-textarea {
  width: 100%; min-height: 110px;
  background: var(--s2); color: var(--t1);
  border: 0.5px solid var(--b1);
  border-radius: var(--r12);
  padding: 16px 18px; resize: vertical;
  font-size: 15px; font-family: inherit; line-height: 1.6;
  transition: border-color 0.2s var(--ease), background 0.2s;
  outline: none;
}
.vibe-textarea::placeholder { color: var(--t3); }
.vibe-textarea:focus { border-color: var(--b2); background: var(--s3); }

.vibe-hint {
  font-size: 12px; color: var(--t3); margin-top: 8px;
  text-align: center; letter-spacing: 0.02em;
}

/* ── Watch Together columns ────────────────────────── */
.together-searches {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 6px;
}
.together-col-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--t3);
  font-weight: 700; margin-bottom: 8px;
}
.together-chips { min-height: 44px; }

@media (max-width: 600px) {
  .together-searches { grid-template-columns: 1fr; }
}

/* ── Swipe entry button ────────────────────────────── */
.swipe-entry-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px; padding: 8px 18px;
  border-radius: var(--r-pill);
  border: 0.5px solid var(--b2);
  background: transparent; color: var(--t2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: inherit;
  transition: all 0.2s var(--ease);
}
.swipe-entry-btn:hover { background: rgba(255,255,255,0.06); color: var(--t1); border-color: var(--b2); }

/* ── card-reason ("Why you'll love it") ─────────────── */
.card-reason {
  font-size: 10.5px; color: var(--accent);
  line-height: 1.4; margin-top: 3px;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}
.card-reason.visible { opacity: 1; max-height: 60px; }

/* ── Trailer frame on card ─────────────────────────── */
.card-trailer-frame {
  position: absolute; inset: 0; z-index: 4;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.card-trailer-frame.active { opacity: 1; pointer-events: auto; }
.card-trailer-frame iframe {
  width: 100%; height: 100%;
  border: none; object-fit: cover;
  /* Scale slightly oversized to hide black bars */
  transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════
   SWIPE OVERLAY
   ═══════════════════════════════════════════════════ */
.swipe-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.swipe-overlay.open { opacity: 1; pointer-events: auto; }

/* Header */
.swipe-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px 10px;
  border-bottom: 0.5px solid var(--b1);
  flex: none;
}
.swipe-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 0.5px solid var(--b1); background: transparent;
  color: var(--t2); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.swipe-close:hover { background: rgba(255,255,255,0.08); color: var(--t1); }
.swipe-title {
  font-size: 16px; font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--t1); flex: 1;
}
.swipe-progress-wrap {
  width: 140px; height: 3px;
  background: var(--b1); border-radius: 2px;
}
.swipe-progress-bar {
  height: 100%; border-radius: 2px;
  background: var(--accent);
  width: 0%; transition: width 0.35s ease;
}

/* Stage */
.swipe-stage {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 10px 20px 0;
}
.swipe-loading {
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  color: var(--t3);
}

/* Card */
.swipe-card {
  position: absolute;
  width: min(380px, calc(100vw - 40px));
  aspect-ratio: 2/3;
  border-radius: var(--r16);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
  opacity: 0;
}
.swipe-card-enter { opacity: 1; }
.swipe-card-ghost { pointer-events: none; z-index: 0; }
.swipe-card:not(.swipe-card-ghost) { z-index: 2; }

.swipe-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.swipe-card-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0)   30%,
    rgba(0,0,0,0.55) 55%,
    rgba(0,0,0,0.92) 100%
  );
}
.swipe-card-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 22px 24px;
}
.swipe-card-genres {
  display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px;
}
.swipe-genre-tag {
  padding: 3px 9px; border-radius: var(--r-pill);
  background: rgba(92,124,250,0.22);
  border: 0.5px solid rgba(92,124,250,0.4);
  color: var(--accent); font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em;
}
.swipe-card-title {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 800; line-height: 1.15;
  font-family: 'Playfair Display', Georgia, serif;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 6px;
}
.swipe-card-meta {
  display: flex; gap: 10px; font-size: 12px;
  color: rgba(255,255,255,0.7); margin-bottom: 8px;
}
.swipe-card-rating { color: var(--accent); font-weight: 600; }
.swipe-card-overview {
  font-size: 12px; color: rgba(255,255,255,0.62);
  line-height: 1.5; -webkit-line-clamp: 3;
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}

/* Swipe labels */
.swipe-label {
  position: absolute; top: 28px;
  padding: 7px 16px; border-radius: var(--r8);
  font-size: 18px; font-weight: 900;
  letter-spacing: 0.1em; opacity: 0;
  pointer-events: none; transition: opacity 0.1s;
  border: 3px solid;
}
.swipe-label-like {
  left: 20px; color: #30d158; border-color: #30d158;
  transform: rotate(-12deg);
}
.swipe-label-skip {
  right: 20px; color: var(--danger); border-color: var(--danger);
  transform: rotate(12deg);
}

/* Hint bar */
.swipe-hint {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 28px; flex: none;
  font-size: 11px; color: var(--t3);
}
.swipe-hint-keys { font-size: 10px; color: var(--t4); }

/* Action buttons */
.swipe-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 10px 20px 24px; flex: none;
}
.swipe-action-btn {
  display: flex; align-items: center; justify-content: center;
  border: 0.5px solid var(--b2); border-radius: 50%;
  background: var(--s2); cursor: pointer;
  transition: all 0.2s var(--ease);
}
.swipe-action-btn.swipe-skip,
.swipe-action-btn.swipe-like  { width: 60px; height: 60px; color: var(--t2); }
.swipe-action-btn.swipe-info  { width: 44px; height: 44px; color: var(--t3); }

.swipe-action-btn.swipe-skip:hover { border-color: var(--danger); color: var(--danger); background: rgba(224,85,85,0.12); }
.swipe-action-btn.swipe-like:hover { border-color: #30d158; color: #30d158; background: rgba(48,209,88,0.12); }
.swipe-action-btn.swipe-info:hover { border-color: var(--b2); color: var(--t1); }

/* Summary panel */
.swipe-liked-summary {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 10;
  padding: 24px;
}
.swipe-summary-inner {
  max-width: 420px; width: 100%; text-align: center;
}
.swipe-summary-title {
  font-size: 1.7rem; font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--t1); margin-bottom: 8px;
}
.swipe-summary-sub { font-size: 14px; color: var(--t2); margin-bottom: 20px; }
.swipe-summary-posters {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 24px;
}
.swipe-summary-poster {
  width: 60px; aspect-ratio: 2/3;
  border-radius: var(--r8); object-fit: cover;
  border: 1.5px solid var(--b1);
}
.swipe-summary-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.swipe-summary-btn {
  width: 100%; max-width: 300px; padding: 13px 24px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.2s var(--ease);
}
.swipe-summary-btn.primary {
  background: var(--accent); color: #000; border: none;
}
.swipe-summary-btn.primary:hover { background: var(--accent-hov); transform: scale(0.98); }
.swipe-summary-btn.secondary {
  background: transparent; color: var(--t2);
  border: 0.5px solid var(--b1);
}
.swipe-summary-btn.secondary:hover { border-color: var(--b2); color: var(--t1); }

/* ═══════════════════════════════════════════════════
   TASTE DNA (Profile section)
   ═══════════════════════════════════════════════════ */
.profile-dna-section {
  margin: 0 0 28px;
  padding: 24px 28px;
  background: var(--s1);
  border-radius: var(--r16);
  border: 0.5px solid var(--b1);
}
.profile-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 800;
  color: var(--t1); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.profile-section-title::before {
  content: ''; display: block;
  width: 3px; height: 20px;
  background: var(--accent); border-radius: 2px;
}

.dna-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.dna-badge {
  padding: 4px 13px; border-radius: var(--r-pill);
  background: rgba(92,124,250,0.14);
  border: 0.5px solid rgba(92,124,250,0.32);
  color: var(--accent); font-size: 12px; font-weight: 600;
}

.dna-columns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
@media (max-width: 640px) {
  .dna-columns { grid-template-columns: 1fr; }
}

.dna-col-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--t3);
  font-weight: 700; margin-bottom: 10px;
}
.dna-empty { font-size: 12px; color: var(--t3); }

.dna-bar-row,
.dna-rating-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 7px;
}
.dna-bar-label, .dna-rating-star {
  font-size: 12px; color: var(--t2);
  min-width: 80px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dna-rating-star { min-width: 30px; color: var(--accent); font-size: 11px; }
.dna-bar-track {
  flex: 1; height: 5px;
  background: var(--s3); border-radius: 3px; overflow: hidden;
}
.dna-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hov));
  transition: width 0.7s cubic-bezier(0.16,1,0.3,1);
}
.dna-bar-fill-decade { background: linear-gradient(90deg, #6a8dff, #4a6de0); }
.dna-bar-fill-rating { background: linear-gradient(90deg, #30d158, #28a548); }
.dna-bar-pct {
  font-size: 11px; color: var(--t3);
  min-width: 28px; text-align: right;
}

/* ═══════════════════════════════════════════════════
   CUSTOM SCROLLBAR
   ═══════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(92,124,250,0.45); }
* { scrollbar-width: thin; scrollbar-color: var(--s4) transparent; }

/* ═══════════════════════════════════════════════════
   MICRO-ANIMATIONS — spring feel on all interactives
   ═══════════════════════════════════════════════════ */
button, .genre-pill, .filter-genre-pill, .input-mode-tab,
.nav-tab, .auth-tab, .profile-filter-tab, .tab {
  transition:
    background 0.18s cubic-bezier(0.34,1.56,0.64,1),
    color      0.18s cubic-bezier(0.34,1.56,0.64,1),
    border-color 0.18s cubic-bezier(0.34,1.56,0.64,1),
    transform  0.18s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
button:active:not(:disabled) { transform: scale(0.96) !important; }
.recommend-btn:not(:disabled):hover { transform: scale(1.03) translateY(-1px); }
.hero-btn:hover { transform: translateY(-2px); }
.swipe-action-btn:active { transform: scale(0.90) !important; }

/* Card poster — poster colour glow on hover */
.movie-card:hover .card-poster-wrap {
  box-shadow: 0 16px 36px rgba(var(--card-glow, 92,124,250), 0.30);
}

/* ═══════════════════════════════════════════════════
   FEATURED EDITORIAL CARD (first recommendation)
   ═══════════════════════════════════════════════════ */
.movie-card-featured {
  grid-column: 1 / -1;
  position: relative;
  border-radius: var(--r16);
  overflow: hidden;
  aspect-ratio: unset;
  height: 340px;
  cursor: pointer;
  animation: scaleIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
.featured-backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  transition: transform 0.6s var(--ease);
}
.movie-card-featured:hover .featured-backdrop { transform: scale(1.03); }
.featured-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    rgba(13,10,8,0.95) 0%,
    rgba(13,10,8,0.70) 45%,
    rgba(13,10,8,0.10) 100%
  );
}
.featured-content {
  position: relative; z-index: 2;
  padding: 36px 40px;
  display: flex; flex-direction: column;
  gap: 8px; height: 100%;
}
.featured-eyebrow {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent);
  font-weight: 700;
}
.featured-genres { display: flex; gap: 6px; flex-wrap: wrap; }
.featured-genre-tag {
  padding: 3px 10px; border-radius: var(--r-pill);
  background: rgba(92,124,250,0.15);
  border: 0.5px solid rgba(92,124,250,0.35);
  color: var(--accent); font-size: 11px; font-weight: 600;
}
.featured-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900; color: var(--t1);
  line-height: 1.1; letter-spacing: -0.02em;
}
.featured-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 13px; color: var(--t2);
}
.featured-rating { color: var(--accent); font-weight: 600; }
.featured-overview {
  font-size: 13px; color: var(--t2); line-height: 1.6;
  max-width: 460px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.featured-btn-primary {
  padding: 10px 22px; border-radius: var(--r-pill);
  background: var(--accent); color: #000;
  border: none; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.featured-btn-secondary {
  padding: 10px 22px; border-radius: var(--r-pill);
  background: rgba(245,237,214,0.12); color: var(--t1);
  border: 0.5px solid var(--b2); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  backdrop-filter: blur(8px);
}

@media (max-width: 600px) {
  .movie-card-featured { height: 260px; }
  .featured-content { padding: 20px; }
  .featured-overview { display: none; }
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  border-top: 0.5px solid var(--b1);
  background: var(--s1);
  padding: 48px 0 32px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px; align-items: start;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; padding: 0 20px; gap: 28px; }
}
.footer-brand {}
.footer-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 900; color: var(--t1);
  letter-spacing: -0.03em;
}
.footer-logo span { color: var(--accent); }
.footer-tagline { font-size: 12px; color: var(--t3); margin-top: 4px; }
.footer-links { display: flex; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col-title {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--t3);
  font-weight: 700; margin-bottom: 4px;
}
.footer-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--t2);
  text-align: left; padding: 0;
  transition: color 0.15s var(--ease);
}
.footer-link:hover { color: var(--accent); }
.footer-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px;
}
.footer-tmdb {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--t3);
}
.footer-tmdb-icon { width: 36px; height: 20px; border-radius: 4px; flex: none; }
.footer-copy { font-size: 11px; color: var(--t4); }

/* ═══════════════════════════════════════════════════
   KEYBOARD COMMAND PALETTE
   ═══════════════════════════════════════════════════ */
.cmd-palette {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.cmd-palette.open { opacity: 1; pointer-events: auto; }

.cmd-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cmd-card {
  position: relative; z-index: 1;
  width: min(560px, calc(100vw - 32px));
  background: var(--s2);
  border: 0.5px solid var(--b2);
  border-radius: var(--r16);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: fadeUp 0.22s cubic-bezier(0.16,1,0.3,1) both;
}
.cmd-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--b1);
}
.cmd-search-icon { color: var(--t3); flex: none; }
.cmd-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--t1); font-size: 15px; font-family: inherit;
}
.cmd-input::placeholder { color: var(--t3); }
.cmd-esc {
  font-size: 10px; color: var(--t3);
  background: var(--s3); border: 0.5px solid var(--b1);
  border-radius: 4px; padding: 2px 6px;
  font-family: inherit; flex: none;
}

.cmd-results {
  max-height: 360px; overflow-y: auto;
  padding: 6px 0;
}
.cmd-section-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--t3);
  font-weight: 700; padding: 8px 16px 4px;
}
.cmd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  transition: background 0.12s;
}
.cmd-item:hover, .cmd-item.focused { background: rgba(255,255,255,0.06); }
.cmd-item-icon { font-size: 14px; width: 20px; text-align: center; flex: none; }
.cmd-item-poster {
  width: 28px; aspect-ratio: 2/3; border-radius: 3px;
  object-fit: cover; flex: none;
}
.cmd-item-info { flex: 1; min-width: 0; }
.cmd-item-label { font-size: 13px; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cmd-item-meta { font-size: 11px; color: var(--t3); }
.cmd-item-rating { font-size: 12px; color: var(--accent); flex: none; }
.cmd-empty { padding: 24px 16px; font-size: 13px; color: var(--t3); text-align: center; }

.cmd-footer-bar {
  display: flex; gap: 16px; padding: 8px 16px;
  border-top: 0.5px solid var(--b1);
  background: var(--s1);
}
.cmd-hint { font-size: 11px; color: var(--t3); display: flex; align-items: center; gap: 4px; }
.cmd-hint kbd {
  background: var(--s3); border: 0.5px solid var(--b1);
  border-radius: 3px; padding: 1px 5px;
  font-size: 10px; font-family: inherit;
}

/* ═══════════════════════════════════════════════════
   QUICK PICK MODAL
   ═══════════════════════════════════════════════════ */
.quickpick-card {
  max-width: 540px !important;
  padding: 0 !important;
  overflow: hidden;
}
.quickpick-body { min-height: 420px; position: relative; }

/* Progress bar */
.qp-progress-wrap {
  height: 3px; background: var(--s3); flex: none;
}
.qp-progress-bar {
  height: 100%; background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1);
}

/* Steps */
.qp-step { padding: 32px 28px 28px; }
.qp-step-num { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.qp-question {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem; font-weight: 800; color: var(--t1);
  margin-bottom: 24px; line-height: 1.2;
}
.qp-options {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.qp-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px 10px;
  background: var(--s2); border: 0.5px solid var(--b1);
  border-radius: var(--r12); cursor: pointer;
  font-family: inherit; transition: all 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
.qp-option:hover {
  background: var(--s3); border-color: rgba(92,124,250,0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(92,124,250,0.12);
}
.qp-option-emoji { font-size: 22px; }
.qp-option-label { font-size: 12px; color: var(--t2); font-weight: 500; text-align: center; }

/* Loading */
.qp-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 80px 28px;
  color: var(--t2); font-size: 14px; text-align: center;
}

/* Result */
.qp-result {
  position: relative; min-height: 420px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.qp-result-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
}
.qp-result-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,10,8,0.97) 0%, rgba(13,10,8,0.4) 60%, transparent 100%);
}
.qp-result-content {
  position: relative; z-index: 2;
  padding: 28px; width: 100%;
}
.qp-result-eyebrow {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent); font-weight: 700;
  margin-bottom: 6px;
}
.qp-result-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 900;
  color: var(--t1); line-height: 1.15; margin-bottom: 6px;
}
.qp-result-meta {
  display: flex; gap: 10px; font-size: 12px;
  color: var(--t2); margin-bottom: 10px;
}
.qp-rating { color: var(--accent); font-weight: 600; }
.qp-result-reason {
  font-size: 13px; color: var(--t2); font-style: italic;
  line-height: 1.5; margin-bottom: 18px;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.qp-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qp-action-primary {
  padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--accent); color: #000;
  border: none; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.qp-action-secondary {
  padding: 10px 20px; border-radius: var(--r-pill);
  background: rgba(245,237,214,0.1); color: var(--t1);
  border: 0.5px solid var(--b2); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.qp-action-ghost {
  padding: 10px 16px; border-radius: var(--r-pill);
  background: none; color: var(--t3);
  border: none; font-size: 13px; cursor: pointer; font-family: inherit;
}
.qp-action-ghost:hover { color: var(--t2); }
.qp-error { padding: 40px 28px; text-align: center; color: var(--t2); }
.qp-restart-btn {
  margin-top: 12px; padding: 9px 20px;
  border-radius: var(--r-pill); border: 0.5px solid var(--b1);
  background: none; color: var(--t2); cursor: pointer; font-family: inherit; font-size: 13px;
}

/* Quick-pick open animation */
.qp-open .modal-card { animation: fadeUp 0.25s cubic-bezier(0.16,1,0.3,1) both; }

/* ═══════════════════════════════════════════════════
   FILMOGRAPHY PANEL (slide-in drawer)
   ═══════════════════════════════════════════════════ */
.filmography-panel {
  position: fixed; inset: 0; z-index: 600;
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s ease;
}
.filmography-panel.open { pointer-events: auto; opacity: 1; }

.filmography-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.filmography-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(680px, 100vw);
  background: var(--s1);
  border-left: 0.5px solid var(--b1);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.filmography-panel.open .filmography-drawer { transform: translateX(0); }

.filmography-header {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 24px 16px;
  border-bottom: 0.5px solid var(--b1);
  flex: none;
}
.filmography-meta { flex: 1; min-width: 0; }
.filmography-person-row { display: flex; gap: 14px; align-items: flex-start; }
.filmography-photo {
  width: 54px; height: 54px; border-radius: 50%;
  object-fit: cover; flex: none; border: 1.5px solid var(--b1);
}
.filmography-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 800; color: var(--t1);
}
.filmography-known { font-size: 12px; color: var(--accent); margin-top: 2px; }
.filmography-bio { font-size: 12px; color: var(--t2); line-height: 1.5; margin-top: 6px; }

.filmography-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 0.5px solid var(--b1); background: transparent;
  color: var(--t2); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex: none; transition: all 0.18s;
}
.filmography-close:hover { background: rgba(255,255,255,0.08); color: var(--t1); }

.filmography-grid {
  flex: 1; overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px; padding: 20px;
  align-content: start;
}
.filmography-loading {
  grid-column: 1/-1;
  display: flex; justify-content: center; padding: 60px;
}

/* ═══════════════════════════════════════════════════
   ILLUSTRATED EMPTY STATES
   ═══════════════════════════════════════════════════ */
.empty-state {
  grid-column: 1/-1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px; text-align: center; gap: 14px;
}
.empty-state-art { width: 120px; height: 100px; opacity: 0.6; }
.empty-state-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px; font-weight: 700; color: var(--t1);
}
.empty-state-sub { font-size: 13px; color: var(--t3); max-width: 280px; line-height: 1.5; }

/* ═══════════════════════════════════════════════════
   STREAMING PROVIDER STRIP
   ═══════════════════════════════════════════════════ */
.provider-strip-wrap {
  padding: 12px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.provider-strip-wrap::-webkit-scrollbar { display: none; }
.provider-strip { display: flex; gap: 8px; }
.provider-pill {
  width: 44px; height: 44px; border-radius: var(--r8);
  border: 1.5px solid var(--b1);
  background: var(--s2); cursor: pointer; padding: 4px;
  flex: none; transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.provider-pill:hover { border-color: var(--b2); transform: scale(1.08); }
.provider-pill.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(92,124,250,0.25); transform: scale(1.08); }
.provider-pill-logo { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

/* ═══════════════════════════════════════════════════
   CAST CLICKABLE
   ═══════════════════════════════════════════════════ */
.cast-clickable { cursor: pointer; }
.cast-clickable:hover .cast-name { color: var(--accent); }
.cast-clickable:hover .cast-photo { outline: 1.5px solid rgba(92,124,250,0.5); }

