/* ── Variables ─────────────────────────────── */
:root {
  --bg:        #141414;
  --surface:   #1f1f1f;
  --surface-2: #282828;
  --surface-3: #333;
  --border:    rgba(255,255,255,0.08);
  --red:       #e50914;
  --red-dim:   rgba(229,9,20,0.15);
  --gold:      #f5c518;
  --text:      #fff;
  --text-2:    #aaa;
  --text-3:    #555;
  --r:         8px;
  --r-sm:      4px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Header ────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(20,20,20,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 800; white-space: nowrap; color: var(--text);
}
.brand-icon { color: var(--red); flex-shrink: 0; }

/* ── Header Search ─────────────────────────── */
.header-search-wrap { flex: 1; max-width: 440px; position: relative; }
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--text-3); pointer-events: none;
}
.header-search {
  width: 100%; padding: 8px 12px 8px 34px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color .2s, background .2s;
}
.header-search:focus { border-color: rgba(229,9,20,.5); background: var(--surface-2); }
.header-search::placeholder { color: var(--text-3); }

/* ── Header Nav ────────────────────────────── */
.header-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.nav-tab {
  background: none; border: none; color: var(--text-2);
  padding: 7px 13px; font-size: 14px; font-weight: 500;
  cursor: pointer; border-radius: 6px; transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--text); background: var(--surface); }
.nav-tab.active { color: var(--text); background: var(--surface-2); }
.btn-add {
  margin-left: 10px; padding: 7px 18px;
  background: var(--red); color: #fff; border: none;
  border-radius: 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .2s, transform .15s; white-space: nowrap;
}
.btn-add:hover { background: #c4070f; transform: translateY(-1px); }
.btn-add:active { transform: none; }

/* ── Main Layout ───────────────────────────── */
.main { max-width: 1440px; margin: 0 auto; padding: 28px 24px; }
.tab { animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ── Toolbar ───────────────────────────────── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count-label { font-size: 13px; color: var(--text-2); }
.section-heading { font-size: 22px; font-weight: 700; }
.sub-heading { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }

/* Collection workspace */
.collection-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.collection-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}
.collection-sidebar {
  position: sticky;
  top: 84px;
  z-index: 3;
}
.collection-sidebar-card,
.collection-topbar,
.collection-toolbar-card,
.collection-subsection,
.collection-results {
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    var(--surface);
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.collection-sidebar-card {
  padding: 20px 18px;
}
.collection-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.collection-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}
.collection-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.collection-sidebar-title,
.collection-page-title {
  color: var(--text);
  letter-spacing: -0.02em;
}
.collection-sidebar-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}
.collection-page-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 10px;
}
.collection-sidebar-copy,
.collection-page-subtitle {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.6;
}
.collection-filter-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.collection-filter-section:first-of-type {
  margin-top: 22px;
}
.collection-filter-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.collection-filter-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.collection-filter-note {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}
.collection-filter-group,
.collection-view-modes,
.collection-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.collection-filter-chip,
.collection-view-chip,
.collection-status-tab {
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.74);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.collection-filter-chip {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
}
.collection-view-chip,
.collection-status-tab {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.collection-filter-chip:hover,
.collection-view-chip:hover,
.collection-status-tab:hover {
  border-color: rgba(229,9,20,.45);
  color: var(--text);
  transform: translateY(-1px);
}
.collection-filter-chip.active,
.collection-view-chip.active,
.collection-status-tab.active {
  background: rgba(229,9,20,.16);
  border-color: rgba(229,9,20,.55);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(229,9,20,.16);
}
.collection-view-modes {
  justify-content: flex-end;
  max-width: 360px;
}
.collection-status-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.collection-status-tabs::-webkit-scrollbar {
  display: none;
}
.collection-toolbar-card,
.collection-subsection,
.collection-results {
  padding: 20px;
}
.collection-toolbar-card .toolbar {
  margin-bottom: 0;
}
.collection-toolbar-card .toolbar-right {
  justify-content: flex-end;
  align-items: flex-start;
}
.collection-subsection {
  margin-bottom: 0;
}
.collection-results {
  position: relative;
  overflow: hidden;
}
.collection-results .empty-state {
  padding: 56px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}
.collection-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.collection-sidebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.collection-sidebar-toggle,
.collection-sidebar-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
}
.collection-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}
.collection-sidebar-close {
  display: none;
}
.collection-shell.sidebar-collapsed .collection-sidebar-card {
  padding: 16px 10px;
}
.collection-shell.sidebar-collapsed .collection-sidebar-head {
  flex-direction: column;
  align-items: center;
}
.collection-shell.sidebar-collapsed .collection-sidebar-actions {
  width: 100%;
  justify-content: center;
}
.collection-shell.sidebar-collapsed .collection-kicker,
.collection-shell.sidebar-collapsed .collection-sidebar-title,
.collection-shell.sidebar-collapsed .collection-sidebar-copy,
.collection-shell.sidebar-collapsed .collection-filter-section,
.collection-shell.sidebar-collapsed .collection-reset-btn {
  display: none;
}
.collection-shell.sidebar-collapsed .collection-sidebar-toggle {
  margin-top: 4px;
}
.collection-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.collection-mobile-filter-btn { display: none; }
.collection-filter-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-size: 13px;
  outline: none;
  color-scheme: dark;
}
.collection-filter-select option {
  background: #232323;
  color: #f5f5f5;
}
.collection-filter-select:disabled {
  opacity: .65;
  cursor: not-allowed;
}
.collection-filter-help {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,.55);
}
.collection-reset-btn {
  width: 100%;
  margin-top: 18px;
}
.collection-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}
.collection-summary-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 600;
}
.collection-filters-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 34;
}
.collection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.collection-list-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.4fr) minmax(0, .9fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)),
    var(--surface);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.collection-list-row:hover {
  transform: translateY(-1px);
  border-color: rgba(229,9,20,.3);
  box-shadow: 0 12px 24px rgba(0,0,0,.22);
}
.collection-list-poster {
  position: relative;
  width: 72px;
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.collection-list-poster img,
.collection-list-poster .card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.collection-list-body,
.collection-list-meta {
  min-width: 0;
}
.collection-list-title-row,
.collection-list-detail-row,
.collection-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.collection-list-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.collection-list-detail-row,
.collection-list-meta {
  color: var(--text-2);
  font-size: 12px;
}
.collection-list-genres {
  font-size: 13px;
  color: rgba(255,255,255,.78);
  margin-top: 4px;
}
.collection-list-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.collection-list-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.collection-mini-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 700;
}
.collection-list-actions {
  justify-content: flex-end;
}
.collection-results .movie-card:hover {
  transform: scale(1.02);
}
.collection-shelves {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.collection-shelf {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.collection-shelf .category-row {
  align-items: flex-start;
}
.collection-shelf .category-row .movie-card {
  flex: 0 0 108px;
  width: 108px;
}
.collection-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.collection-shelf-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.collection-shelf-meta {
  font-size: 12px;
  color: var(--text-2);
}
@media (max-width: 980px) {
  .collection-shell {
    grid-template-columns: 1fr;
  }
  .collection-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  .collection-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 360px);
    padding: 16px;
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 35;
    overflow-y: auto;
  }
  .collection-sidebar.is-open {
    transform: translateX(0);
  }
  .collection-sidebar-close,
  .collection-mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .collection-sidebar-toggle {
    display: none;
  }
  .collection-filters-scrim.is-open {
    display: block;
  }
}
@media (max-width: 760px) {
  .collection-topbar {
    flex-direction: column;
    padding: 20px;
  }
  .collection-topbar-actions,
  .collection-view-modes {
    width: 100%;
    justify-content: flex-start;
  }
  .collection-toolbar-card .toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
  .collection-list-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .collection-list-meta,
  .collection-list-actions {
    grid-column: 2;
  }
  .collection-list-actions {
    justify-content: flex-start;
  }
}

/* ── Genre Chips ───────────────────────────── */
.genre-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.genre-chip {
  padding: 4px 13px; border-radius: 14px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border); background: transparent;
  color: var(--text-2); transition: all .15s;
}
.genre-chip:hover { border-color: var(--red); color: var(--text); }
.genre-chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── Sort ──────────────────────────────────── */
.sort-select {
  padding: 6px 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-size: 13px; cursor: pointer; outline: none;
}

/* ── Movies Grid ───────────────────────────── */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px;
}
.collection-view-host {
  display: block;
  width: 100%;
}

/* ── Movie Card ────────────────────────────── */
.movie-card {
  position: relative; border-radius: var(--r); overflow: visible;
  cursor: pointer; aspect-ratio: 2/3; background: var(--surface);
  transition: transform .25s ease, box-shadow .25s ease, z-index 0s;
}
.movie-card:hover {
  transform: scale(1.06); z-index: 10;
  box-shadow: 0 16px 48px rgba(0,0,0,.75);
}
.card-poster-wrap {
  width: 100%; height: 100%; border-radius: var(--r); overflow: hidden;
  position: relative;
}
.card-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-3); text-align: center; padding: 8px;
  line-height: 1.3;
}

/* Card overlay (fades in on hover) */
.card-overlay {
  position: absolute; inset: 0; border-radius: var(--r);
  background: linear-gradient(to top, rgba(0,0,0,.97) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.0) 100%);
  opacity: 0; transition: opacity .22s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px; gap: 5px;
}
.movie-card:hover .card-overlay { opacity: 1; }

.overlay-title { font-size: 12px; font-weight: 700; line-height: 1.3; color: #fff; }
.overlay-meta  { font-size: 11px; color: var(--text-2); }

/* Interactive stars inside overlay */
.overlay-stars { display: flex; gap: 2px; }
.overlay-stars .star {
  font-size: 14px; cursor: pointer; color: var(--text-3);
  transition: color .1s, transform .1s; user-select: none;
  line-height: 1;
}
.overlay-stars .star.on { color: var(--gold); }
.overlay-stars:hover .star { color: var(--gold); }
.overlay-stars:hover .star:hover ~ .star { color: var(--text-3); }
.overlay-stars .star:hover { transform: scale(1.25); }

.overlay-actions { display: flex; gap: 6px; }
.overlay-btn {
  flex: 1; padding: 5px 4px; background: rgba(255,255,255,.13);
  border: none; border-radius: var(--r-sm); color: #fff;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background .15s; text-align: center;
}
.overlay-btn:hover { background: var(--red); }
.overlay-btn-remove { flex: 0 0 28px; font-size: 12px; }
.overlay-btn-remove:hover { background: rgba(229,9,20,.5); }

/* My-rating badge (top-right, always visible when rated) */
.rated-badge {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px; padding: 2px 6px;
  font-size: 11px; font-weight: 700; color: var(--gold);
  pointer-events: none;
}

/* ── Empty State ───────────────────────────── */
.empty-state {
  grid-column: 1/-1; text-align: center;
  padding: 80px 20px; color: var(--text-2);
}
.empty-glyph { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 15px; margin-bottom: 20px; }

/* ── Discover ──────────────────────────────── */
.discover-hero { text-align: center; padding: 44px 0 32px; }
.discover-title {
  font-size: 30px; font-weight: 800; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, var(--text-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.discover-search-wrap { position: relative; max-width: 580px; margin: 0 auto; }
.discover-search-wrap svg {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%); color: var(--text-3); pointer-events: none;
}
.discover-search {
  width: 100%; padding: 14px 18px 14px 48px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 32px; color: var(--text); font-size: 16px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.discover-search:focus {
  border-color: rgba(229,9,20,.5);
  box-shadow: 0 0 0 3px rgba(229,9,20,.1);
}
.discover-search::placeholder { color: var(--text-3); }

/* ── Discover Landing Hero ──────────────────────────────────────── */
.discover-landing-hero {
  position: relative; border-radius: 16px; overflow: hidden;
  min-height: 340px; margin-bottom: 28px;
  display: flex; align-items: flex-end;
  background: linear-gradient(135deg, #0f0f19, #1a1a2e);
}
.dlh-backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
  background-repeat: no-repeat;
}
.dlh-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.7) 50%,
    rgba(0,0,0,.2) 100%
  );
}
.dlh-content {
  position: relative; z-index: 1; padding: 36px 40px; max-width: 600px;
}
.dlh-greeting { font-size: 14px; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.dlh-label {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.dlh-title {
  font-size: clamp(28px, 4vw, 48px); font-weight: 800; line-height: 1.1;
  color: #fff; margin-bottom: 10px;
}
.dlh-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 18px;
}
.dlh-meta .genre-pill { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.dlh-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dlh-actions .btn-primary { background: #fff; color: #000; font-weight: 700; }
.dlh-actions .btn-primary:hover { background: rgba(255,255,255,.85); }
.dlh-actions .btn-ghost {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25);
}
.dlh-actions .btn-ghost:hover { background: rgba(255,255,255,.22); }

/* ── Journey stats strip ────────────────────────────────────────── */
.journey-strip {
  display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap;
}
.journey-tile {
  flex: 1; min-width: 120px; background: var(--surface); border-radius: 12px;
  padding: 14px 16px; border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.journey-tile-num { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.journey-tile-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.journey-tile-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Curated category cards */
.curated-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 32px;
}
.curated-card {
  height: 76px; border-radius: var(--r); overflow: hidden;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; text-align: center; padding: 0 12px;
  transition: transform .2s, box-shadow .2s; border: 1px solid transparent;
  color: #fff; position: relative;
}
.curated-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.curated-card span { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* Discover result cards — overlay always visible */
.discover-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  aspect-ratio: 2/3; background: var(--surface);
  cursor: pointer; transition: transform .25s, box-shadow .25s;
}
.discover-card:hover { transform: scale(1.05); box-shadow: 0 12px 32px rgba(0,0,0,.65); }
.discover-card .card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.discover-card .card-overlay {
  opacity: 1 !important;
  background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.4) 55%, transparent 100%);
}
.in-collection-badge {
  position: absolute; top: 7px; left: 7px;
  background: rgba(0,180,70,.85); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}

/* ── Lists Grid ────────────────────────────── */
.lists-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.list-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  border-color: var(--red);
}
.list-mosaic {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; height: 88px; background: var(--surface-2);
}
.mosaic-cell { overflow: hidden; }
.mosaic-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic-placeholder {
  width: 100%; height: 100%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-3);
}
.list-card-info { padding: 12px; }
.list-card-name { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.list-card-meta { font-size: 12px; color: var(--text-2); }
.list-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-card-share-pill {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 12px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.list-card-share-pill:hover { border-color: var(--accent); color: var(--accent); }
.list-card-share-pill.shared { border-color: var(--gold); color: var(--gold); background: rgba(245,197,24,.08); }
.back-btn {
  background: none; border: none; color: var(--text-2); font-size: 14px;
  cursor: pointer; padding: 0; transition: color .15s; margin-right: 8px;
}
.back-btn:hover { color: var(--text); }

/* ── Tonight's Pick ────────────────────────── */
.pick-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; gap: 14px; color: var(--text-2);
}
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pick-hero {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--surface); margin-bottom: 36px;
  min-height: 340px;
}
.pick-backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(28px) brightness(.28); transform: scale(1.08);
}
.pick-content {
  position: relative; display: flex; gap: 32px;
  padding: 40px; align-items: flex-start;
}
.pick-poster {
  flex-shrink: 0; width: 170px; height: 255px;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.7);
}
.pick-poster img { width: 100%; height: 100%; object-fit: cover; }
.pick-poster-placeholder {
  width: 100%; height: 100%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}
.pick-info { flex: 1; min-width: 0; }
.pick-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: var(--red); margin-bottom: 10px;
}
.pick-title { font-size: 34px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.pick-meta-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2); margin-bottom: 12px;
}
.pick-meta-dot { color: var(--text-3); }
.pick-tmdb { color: var(--gold); font-weight: 600; }
.genre-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.genre-pill {
  display: inline-block; padding: 3px 10px; background: var(--surface-3);
  border-radius: 12px; font-size: 11px; color: var(--text-2);
}
.pick-reason {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2);
  background: rgba(255,255,255,.06); padding: 5px 12px;
  border-radius: 20px; margin-bottom: 18px;
}
.pick-plot {
  font-size: 14px; line-height: 1.65; color: var(--text-2);
  margin-bottom: 22px; max-width: 560px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-love {
  padding: 10px 28px; background: var(--red); color: #fff; border: none;
  border-radius: 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background .2s, transform .15s;
}
.btn-love:hover { background: #c4070f; transform: translateY(-1px); }
.btn-neutral {
  padding: 10px 20px; background: rgba(255,255,255,.09); color: #fff;
  border: 1px solid rgba(255,255,255,.15); border-radius: 20px;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s;
}
.btn-neutral:hover { background: rgba(255,255,255,.16); }

.more-picks-heading { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.more-picks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.pick-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.pick-section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.pick-section-title {
  font-size: 18px;
  font-weight: 700;
}
.pick-section-reason {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Movie Detail Modal ────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.78);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeUp .2s ease;
}
.modal-sheet {
  background: var(--surface); border-radius: 16px;
  max-width: 860px; width: 100%; max-height: 92vh;
  overflow-y: auto; position: relative; animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform:translateY(24px); opacity:0; } to { transform:none; opacity:1; } }
.sheet-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.1); border: none; color: var(--text);
  width: 32px; height: 32px; border-radius: 50%; font-size: 14px;
  cursor: pointer; z-index: 10; transition: background .15s;
}
.sheet-close:hover { background: var(--red); }

/* Detail Hero */
.detail-hero {
  height: 200px; background: var(--surface-2);
  border-radius: 16px 16px 0 0; overflow: hidden; position: relative;
}
.detail-backdrop { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45); }
.detail-backdrop-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Detail Body */
.detail-body { padding: 0 24px 28px; }
.detail-top {
  display: flex; gap: 24px; margin-top: -70px;
  margin-bottom: 20px; position: relative;
}
.detail-poster {
  flex-shrink: 0; width: 130px; height: 195px;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.65);
  border: 2px solid rgba(255,255,255,.08);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-poster-placeholder {
  width: 100%; height: 100%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.detail-main { flex: 1; min-width: 0; padding-top: 82px; }
.detail-title { font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.detail-meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2); margin-bottom: 10px;
}
.detail-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.detail-section { margin-top: 22px; }
.detail-section-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text-2); }
.detail-plot { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.detail-loading { font-size: 13px; color: var(--text-3); padding: 8px 0; }

/* My-rating row */
.my-rating-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 16px 0;
}
.my-rating-label { font-size: 14px; font-weight: 600; }
.rating-stars { display: flex; gap: 3px; }
.rating-stars .star {
  font-size: 20px; cursor: pointer; color: var(--text-3);
  transition: color .1s, transform .1s; user-select: none; line-height: 1;
}
.rating-stars .star.on { color: var(--gold); }
.rating-stars:hover .star { color: var(--gold); }
.rating-stars:hover .star:hover ~ .star { color: var(--text-3); }
.rating-stars .star:hover { transform: scale(1.2); }

/* TMDb rating */
.tmdb-score {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--gold); font-weight: 700;
}

/* Cast */
.cast-scroll {
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px;
}
.cast-chip {
  flex-shrink: 0; padding: 4px 12px; background: var(--surface-2);
  border-radius: 14px; font-size: 12px; color: var(--text-2); white-space: nowrap;
}

/* Similar movies */
.similar-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px;
}
.similar-item { flex-shrink: 0; width: 88px; cursor: pointer; text-align: center; }
.similar-item img {
  width: 88px; height: 132px; object-fit: cover;
  border-radius: 6px; display: block; margin-bottom: 5px;
  transition: transform .2s; border: 1px solid var(--border);
}
.similar-item:hover img { transform: scale(1.06); }
.similar-item-title { font-size: 10px; color: var(--text-2); line-height: 1.3; }

/* ── Smaller Modals ────────────────────────── */
.modal-panel {
  background: var(--surface); border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 92vh;
  overflow-y: auto; animation: slideUp .25s ease;
}
.modal-sm { max-width: 360px; }
.disclaimer-modal {
  max-width: 680px;
  max-height: 58vh;
}
.disclaimer-overlay {
  align-items: center;
}
.disclaimer-modal .modal-body {
  max-height: calc(58vh - 60px);
  overflow-y: auto;
}
.disclaimer-modal .modal-head {
  padding: 14px 20px 12px;
}
.disclaimer-copy {
  padding: 14px 20px 18px;
  line-height: 1.5;
  color: var(--text-1);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.sheet-close-sm {
  background: none; border: none; color: var(--text-2);
  font-size: 18px; cursor: pointer; padding: 4px; transition: color .15s;
}
.sheet-close-sm:hover { color: var(--red); }
.modal-body { padding: 20px; }
.modal-search-input {
  width: 100%; padding: 11px 14px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text); font-size: 15px; outline: none;
  margin-bottom: 12px; transition: border-color .2s;
}
.modal-search-input:focus { border-color: rgba(229,9,20,.5); }
.modal-search-input::placeholder { color: var(--text-3); }

/* Add-movie results grid */
.add-results {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px; margin-bottom: 14px; max-height: 300px; overflow-y: auto;
}
.add-result-item {
  position: relative; border-radius: 6px; overflow: hidden;
  aspect-ratio: 2/3; background: var(--surface-2); cursor: pointer;
  transition: transform .15s;
}
.add-result-item:hover { transform: scale(1.04); }
.add-result-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.add-result-placeholder {
  width: 100%; height: 100%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-3); text-align: center; padding: 6px;
}
.add-result-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.95) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6px; opacity: 0; transition: opacity .15s;
}
.add-result-item:hover .add-result-overlay { opacity: 1; }
.add-result-title { font-size: 10px; font-weight: 700; line-height: 1.3; color: #fff; }
.add-result-year  { font-size: 10px; color: var(--text-2); }
.add-result-btn {
  width: 100%; margin-top: 4px; padding: 4px;
  background: var(--red); border: none; border-radius: 3px;
  color: #fff; font-size: 10px; font-weight: 700; cursor: pointer;
}
.add-result-added {
  width: 100%; margin-top: 4px; padding: 4px;
  background: rgba(0,180,70,.8); border: none; border-radius: 3px;
  color: #fff; font-size: 10px; font-weight: 700; text-align: center;
}

/* Manual form */
.manual-details {
  margin-top: 12px; border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.manual-details summary {
  padding: 10px 14px; font-size: 13px; color: var(--text-2);
  cursor: pointer; user-select: none; background: var(--surface-2);
  transition: background .15s; list-style: none;
}
.manual-details summary:hover { background: var(--surface-3); }
.manual-form {
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}

/* ── Form Elements ─────────────────────────── */
.form-input {
  width: 100%; padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s; font-family: inherit; resize: vertical;
}
.form-input:focus { border-color: rgba(229,9,20,.5); }
.form-input::placeholder { color: var(--text-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Buttons ───────────────────────────────── */
.btn-primary {
  padding: 9px 20px; background: var(--red); color: #fff; border: none;
  border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .15s; white-space: nowrap;
}
.btn-primary:hover { background: #c4070f; transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-ghost {
  padding: 9px 16px; background: transparent; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 6px; font-size: 14px;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.btn-danger {
  padding: 9px 16px; background: var(--red-dim); color: var(--red);
  border: 1px solid rgba(229,9,20,.3); border-radius: 6px; font-size: 14px;
  cursor: pointer; transition: background .15s;
}
.btn-danger:hover { background: rgba(229,9,20,.25); }
.btn-sm { padding: 6px 12px !important; font-size: 12px !important; border-radius: 4px !important; }

/* ── List Popover ──────────────────────────── */
.list-popover {
  position: absolute; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: 0 14px 48px rgba(0,0,0,.75); padding: 10px;
  z-index: 400; min-width: 180px; max-width: 220px;
  animation: fadeUp .15s ease;
}
.list-popover-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-3); margin-bottom: 8px; padding: 0 4px;
}
.list-pop-opt {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; background: none; border: none;
  color: var(--text); font-size: 13px; cursor: pointer;
  border-radius: 4px; transition: background .1s;
}
.list-pop-opt:hover { background: var(--surface-2); }
.list-pop-opt--done {
  color: var(--text-muted); cursor: default;
  display: flex; align-items: center; gap: 6px;
}
.list-pop-opt--done:hover { background: none; }
.list-pop-opt--done span:first-child { color: #4ade80; font-weight: 700; }
.list-popover-new {
  margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px;
}
.list-popover-new input {
  width: 100%; padding: 6px 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 4px; color: var(--text);
  font-size: 12px; outline: none; margin-bottom: 6px;
  font-family: inherit;
}
.list-popover-new input:focus { border-color: rgba(229,9,20,.5); }
.list-popover-new button {
  width: 100%; padding: 7px; background: var(--red);
  border: none; border-radius: 4px; color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ── Toast ─────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 999; display: flex; flex-direction: column;
  gap: 8px; align-items: flex-end; pointer-events: none;
}
.toast {
  padding: 12px 18px; background: var(--surface-3);
  border: 1px solid var(--border); border-radius: var(--r);
  font-size: 14px; color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  animation: toastIn .25s ease; max-width: 300px;
  pointer-events: auto; transition: opacity .3s;
}
.toast.success { border-left: 3px solid #4caf50; }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid #2196f3; }
.toast.fade-out { opacity: 0; }
@keyframes toastIn { from { transform:translateX(20px); opacity:0; } to { transform:none; opacity:1; } }

/* ── Skeleton ──────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r);
}
@keyframes shimmer { from { background-position:200% 0; } to { background-position:-200% 0; } }
.skeleton-card { aspect-ratio: 2/3; }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 1100px) {
  .collection-shell {
    grid-template-columns: 1fr;
  }
  .collection-sidebar {
    position: static;
  }
  .collection-topbar {
    flex-direction: column;
  }
  .collection-view-modes {
    justify-content: flex-start;
    max-width: none;
  }
}
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 10px; }
  .header-search-wrap { order: 3; flex: 1 0 100%; max-width: none; }
  .header-nav { order: 2; flex-shrink: 0; }
  .nav-tab { padding: 6px 10px; font-size: 13px; }
}
@media (max-width: 640px) {
  .main { padding: 16px; }
  .collection-sidebar-card,
  .collection-topbar,
  .collection-toolbar-card,
  .collection-subsection,
  .collection-results {
    border-radius: 16px;
    padding: 16px;
  }
  .collection-filter-heading-row,
  .collection-toolbar-card .toolbar,
  .collection-toolbar-card .toolbar-right {
    align-items: flex-start;
  }
  .collection-page-title {
    font-size: 26px;
  }
  .collection-view-modes,
  .collection-status-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .collection-view-chip,
  .collection-status-tab {
    flex: 0 0 auto;
  }
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .pick-content { flex-direction: column; padding: 24px; }
  .pick-poster { width: 130px; height: 195px; }
  .pick-title { font-size: 24px; }
  .detail-top { flex-direction: column; margin-top: 0; }
  .detail-main { padding-top: 0; }
  .curated-grid { grid-template-columns: repeat(2, 1fr); }
  .lists-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-sheet { border-radius: 16px 16px 0 0; max-height: 95vh; }
  .modal-panel { border-radius: 16px 16px 0 0; max-width: 100%; max-height: 95vh; }
  .disclaimer-overlay { padding: 20px; align-items: center; }
  .disclaimer-modal { border-radius: 16px; max-width: 680px; max-height: 72vh; }
  .disclaimer-modal .modal-body { max-height: calc(72vh - 60px); }
  .header-nav { gap: 0; }
  .btn-add { padding: 7px 12px; font-size: 13px; }
}

/* ── Auth overlay ────────────────────────── */
.auth-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
}
.auth-panel {
  background: var(--surface); border-radius: 16px;
  padding: 36px 32px; width: 100%; max-width: 380px;
  animation: slideUp .3s ease; position: relative;
}
.auth-help-links {
  display: flex; justify-content: space-between; margin-top: 12px;
}
.auth-help-link {
  background: none; border: none; color: var(--text-muted); font-size: 12px;
  cursor: pointer; padding: 0; text-decoration: underline; transition: color .15s;
}
.auth-help-link:hover { color: var(--text-primary); }
.auth-help-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary);
}
.auth-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; line-height: 1;
  padding: 4px 6px; border-radius: 4px; transition: color .15s;
}
.auth-close:hover { color: var(--text-primary); }
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 800; margin-bottom: 28px;
  justify-content: center; color: var(--text);
}
.auth-brand svg { color: var(--red); }
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1; background: none; border: none;
  color: var(--text-2); padding: 10px; font-size: 14px;
  font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--red); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-error {
  font-size: 13px; color: var(--red); padding: 8px 12px;
  background: var(--red-dim); border-radius: 4px;
}

/* ── Auth area in header ─────────────────── */
.auth-area { display: flex; align-items: center; margin-left: 8px; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px 5px 6px;
  cursor: pointer; color: var(--text); font-size: 13px;
  font-weight: 600; transition: background .15s;
}
.user-menu-btn:hover { background: var(--surface-3); }
.user-avatar { font-size: 18px; line-height: 1; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: 0 8px 32px rgba(0,0,0,.6);
  min-width: 180px; z-index: 300; overflow: hidden;
  animation: fadeUp .15s ease;
}
.dropdown-item {
  display: block; width: 100%; padding: 11px 16px;
  background: none; border: none; color: var(--text);
  font-size: 14px; text-align: left; cursor: pointer;
  transition: background .1s;
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item.danger { color: var(--red); }
.user-menu-wrap { position: relative; }
.sign-in-btn {
  padding: 6px 14px; background: none;
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--text-2); font-size: 13px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.sign-in-btn:hover { color: var(--text); border-color: rgba(255,255,255,.25); }

/* ── Watch status badge ──────────────────── */
.status-badge {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  font-size: 10px; font-weight: 800; padding: 2px 8px;
  border-radius: 10px; pointer-events: none; letter-spacing: .4px;
}
.status-badge-compact {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  text-align: center;
  letter-spacing: 0;
}
.status-want     { background: rgba(59,130,246,.85); color: #fff; }
.status-watching { background: rgba(245,158,11,.85); color: #fff; }
.status-watched  { background: rgba(34,197,94,.85);  color: #fff; }

/* ── Status control in detail modal ─────── */
.status-control {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}
.status-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  font-weight: 600; cursor: pointer; border: 1px solid var(--border);
  background: transparent; color: var(--text-2);
  transition: all .15s;
}
.status-btn:hover { border-color: rgba(255,255,255,.25); color: var(--text); }
.status-btn.active-want     { background: rgba(59,130,246,.2);  border-color: #3b82f6; color: #93c5fd; }
.status-btn.active-watching { background: rgba(245,158,11,.2);  border-color: #f59e0b; color: #fcd34d; }
.status-btn.active-watched  { background: rgba(34,197,94,.2);   border-color: #22c55e; color: #86efac; }

/* ── Note textarea ───────────────────────── */
.note-wrap { margin-top: 16px; }
.note-label { font-size: 12px; font-weight: 700; text-transform: uppercase;
              letter-spacing: .8px; color: var(--text-3); margin-bottom: 6px; }
.note-input {
  width: 100%; padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-size: 13px; resize: vertical;
  min-height: 72px; outline: none; transition: border-color .2s;
  font-family: inherit;
}
.note-input:focus { border-color: rgba(229,9,20,.4); }
.note-save-btn {
  margin-top: 6px; padding: 5px 14px; background: var(--surface-3);
  border: none; border-radius: 4px; color: var(--text-2);
  font-size: 12px; cursor: pointer; transition: background .15s;
}
.note-save-btn:hover { background: var(--surface-4, #3a3a3a); color: var(--text); }

/* ── Trailer button ──────────────────────── */
.trailer-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15); border-radius: 20px;
  color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.trailer-btn:hover { background: rgba(255,255,255,.18); }
.trailer-btn .play-icon { color: var(--red); font-size: 16px; }
.trailer-embed-wrap {
  display: flex; justify-content: center; margin-top: 16px;
}
.trailer-embed {
  border-radius: var(--r); overflow: hidden;
  aspect-ratio: 16/9; width: min(640px, 100%);
  flex-shrink: 0;
}
.trailer-embed iframe { width: 100%; height: 100%; border: none; display: block; }

/* ── Mood picker ─────────────────────────── */
.mood-section { margin-bottom: 28px; }
.mood-heading { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; }
.mood-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.mood-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 8px; border-radius: var(--r);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  text-align: center;
}
.mood-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.mood-card.active { border-width: 2px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.mood-emoji { font-size: 26px; line-height: 1; }
.mood-label { font-size: 11px; font-weight: 600; color: var(--text-2); }

/* ── Feeling Lucky button ────────────────── */
.lucky-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 24px;
  color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; margin-bottom: 28px;
}
.lucky-btn:hover {
  background: var(--surface-2); border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(245,197,24,.2);
}
.lucky-result {
  max-width: 320px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px; display: flex; gap: 14px; align-items: center;
  animation: fadeUp .25s ease; margin-bottom: 20px;
}
.lucky-poster { width: 60px; height: 90px; object-fit: cover;
                border-radius: 4px; flex-shrink: 0; }
.lucky-poster-placeholder { width: 60px; height: 90px; background: var(--surface-3);
  border-radius: 4px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 24px; }
.lucky-info .lucky-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.lucky-info .lucky-meta { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }

/* ── Dynamic category rows ───────────────── */
.cat-section { margin-bottom: 36px; }
.cat-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px;
}
.cat-emoji { font-size: 20px; }
.cat-name { font-size: 17px; font-weight: 700; }
.cat-refresh-btn {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.cat-refresh-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cat-refresh-btn:disabled { opacity: .5; cursor: default; }
.cat-scroll-wrap { position: relative; }
.cat-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scroll-behavior: smooth;
}
.cat-scroll::-webkit-scrollbar { height: 4px; }
.cat-movie {
  flex-shrink: 0; width: 120px; cursor: pointer;
  transition: transform .2s;
}
.cat-movie:hover { transform: scale(1.05); }
.cat-poster-wrap {
  position: relative;
  width: 120px;
  margin-bottom: 6px;
}
.cat-poster {
  width: 120px; height: 180px; object-fit: cover;
  border-radius: 6px; display: block; margin-bottom: 0;
  border: 1px solid var(--border);
}
.cat-poster-placeholder {
  width: 120px; height: 180px; background: var(--surface-2);
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; color: var(--text-3);
  text-align: center; padding: 8px; margin-bottom: 0;
}
.cat-title { font-size: 11px; color: var(--text-2); line-height: 1.3; }
.cat-year  { font-size: 10px; color: var(--text-3); }

/* ── Stats modal ─────────────────────────── */
.modal-stats { max-width: 560px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface-2); border-radius: var(--r);
  padding: 16px; text-align: center;
}
.stat-num { font-size: 32px; font-weight: 800; color: var(--text); }
.stat-lbl { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.genre-bars { display: flex; flex-direction: column; gap: 8px; }
.genre-bar-row { display: flex; align-items: center; gap: 10px; }
.genre-bar-label { font-size: 13px; color: var(--text-2); width: 100px; text-align: right; flex-shrink: 0; }
.genre-bar-track { flex: 1; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.genre-bar-fill { height: 100%; background: var(--red); border-radius: 3px; transition: width .6s ease; }
.genre-bar-count { font-size: 12px; color: var(--text-3); width: 24px; }

/* ── Share sheet ─────────────────────────── */
.list-card-share-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(0,0,0,.6); border: none; border-radius: 50%;
  width: 28px; height: 28px; font-size: 13px; cursor: pointer;
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.list-card-share-btn:hover { background: rgba(0,0,0,.85); color: var(--text); }
.list-card-share-btn.shared { color: var(--gold); }
.share-sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: 320px; z-index: 600;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,.5); animation: slideInRight .25s ease;
  display: flex; flex-direction: column;
}
@keyframes slideInRight { from { transform: translateX(40px); opacity:0; } to { transform:none; opacity:1; } }
.share-sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.share-sheet-body { padding: 20px; flex: 1; }
.share-toggle {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.share-toggle-label { font-size: 14px; font-weight: 600; }
.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: var(--surface-3); border-radius: 12px; cursor: pointer;
  transition: background .2s;
}
.toggle-switch.on { background: var(--red); }
.toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.toggle-switch.on .toggle-knob { transform: translateX(20px); }
.share-link-box {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.share-link-input {
  flex: 1; padding: 8px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-2); font-size: 12px; outline: none;
}
.copy-link-btn {
  padding: 8px 14px; background: var(--red); border: none;
  border-radius: 6px; color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.copy-link-btn:hover { background: #c4070f; }

/* ── Public list page ────────────────────── */
.public-list-header {
  padding: 32px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.public-list-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.public-list-meta { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.public-list-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .mood-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .mood-card  { padding: 10px 4px; }
  .mood-emoji { font-size: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .share-sheet { width: 100%; }
}

/* ── Social / Activity Feed ──────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 12px; padding: 0 0 40px; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 14px 16px;
}
.activity-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-raised); display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 14px; color: var(--text-primary); line-height: 1.4; }
.activity-text strong { color: var(--accent); cursor: pointer; }
.activity-text strong:hover { text-decoration: underline; }
.activity-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.activity-poster {
  width: 40px; height: 60px; border-radius: 6px; object-fit: cover;
  flex-shrink: 0; background: var(--surface-raised);
}

/* ── Group Vote ─────────────────────────────────────────────── */
.vote-picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; max-height: 360px; overflow-y: auto;
}
.vote-picker-card {
  position: relative; cursor: pointer; border-radius: 8px; overflow: hidden;
  aspect-ratio: 2/3; background: var(--surface-raised);
  border: 2px solid transparent; transition: border-color 0.2s;
}
.vote-picker-card.selected { border-color: var(--accent); }
.vote-picker-card img { width: 100%; height: 100%; object-fit: cover; }
.vote-picker-card .check-badge {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px;
  display: none; align-items: center; justify-content: center;
}
.vote-picker-card.selected .check-badge { display: flex; }
.vote-picker-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 16px 6px 6px; font-size: 11px; color: #fff; text-align: center;
}

.modal-vote { max-width: 520px; }
.vote-swipe-area { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.vote-card-wrap {
  position: relative; width: 240px; aspect-ratio: 2/3; border-radius: 16px;
  overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.vote-card-wrap img { width: 100%; height: 100%; object-fit: cover; }
.vote-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  padding: 32px 16px 16px;
}
.vote-card-title { font-size: 16px; font-weight: 600; color: #fff; }
.vote-card-year { font-size: 13px; color: rgba(255,255,255,.7); }
.vote-actions { display: flex; gap: 16px; }
.vote-no-btn, .vote-yes-btn {
  flex: 1; padding: 12px; border-radius: 12px; border: none;
  font-size: 20px; cursor: pointer; font-weight: 700; transition: transform .15s;
}
.vote-no-btn { background: rgba(239,68,68,.15); color: #ef4444; }
.vote-yes-btn { background: rgba(34,197,94,.15); color: #22c55e; }
.vote-no-btn:hover { background: rgba(239,68,68,.3); transform: scale(1.05); }
.vote-yes-btn:hover { background: rgba(34,197,94,.3); transform: scale(1.05); }
.vote-progress { font-size: 13px; color: var(--text-muted); text-align: center; }
.vote-results { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.vote-result-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-raised); border-radius: 10px; padding: 10px;
}
.vote-result-poster { width: 40px; height: 60px; border-radius: 6px; object-fit: cover; }
.vote-result-info { flex: 1; }
.vote-result-title { font-size: 14px; font-weight: 600; }
.vote-result-score { font-size: 12px; color: var(--text-secondary); }
.vote-share-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.vote-share-input {
  flex: 1; background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; color: var(--text-primary); font-size: 13px;
}

/* ── Profile Page ───────────────────────────────────────────── */
.profile-header {
  display: flex; align-items: flex-start; gap: 20px; padding: 24px 0 20px;
}
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--surface-raised); display: flex; align-items: center;
  justify-content: center; font-size: 36px; flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-name { font-size: 20px; font-weight: 700; }
.profile-username { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.profile-bio { font-size: 14px; color: var(--text-secondary); margin-top: 8px; }
.profile-stats-row { display: flex; gap: 20px; margin-top: 12px; }
.profile-stat { text-align: center; }
.profile-stat-num { font-size: 18px; font-weight: 700; }
.profile-stat-label { font-size: 12px; color: var(--text-muted); }
.profile-follow-btn { margin-top: 12px; }
.profile-lists { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.profile-list-item {
  background: var(--surface-raised); border-radius: 10px; padding: 12px 16px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.profile-list-item:hover { background: var(--border); }

/* ── Filmmaker Overlay ───────────────────────────────────────── */
.filmmaker-header {
  display: flex; align-items: center; gap: 16px; padding: 24px 0 16px;
}
.filmmaker-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-raised); display: flex; align-items: center;
  justify-content: center; font-size: 28px; overflow: hidden;
}
.filmmaker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.filmmaker-name { font-size: 20px; font-weight: 700; }
.filmmaker-role { font-size: 14px; color: var(--text-secondary); }
.filmmaker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px;
  padding-bottom: 40px;
}
.filmmaker-card {
  cursor: pointer; border-radius: 10px; overflow: hidden;
  background: var(--surface-raised); transition: transform .2s;
}
.filmmaker-card:hover { transform: translateY(-4px); }
.filmmaker-card-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--surface); }
.filmmaker-card-info { padding: 8px; }
.filmmaker-card-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.filmmaker-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.filmmaker-card-badge {
  display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px;
  margin-top: 4px; font-weight: 600;
}
.filmmaker-card-badge.in-col { background: rgba(99,102,241,.15); color: var(--accent); }
.filmmaker-card-badge.want { background: rgba(59,130,246,.15); color: #60a5fa; }
.filmmaker-card-badge.watching { background: rgba(245,158,11,.15); color: #fbbf24; }
.filmmaker-card-badge.watched { background: rgba(34,197,94,.15); color: #4ade80; }

/* ── Horizontal scroll wrapper with arrows ──────────────────────── */
.h-scroll-outer { position: relative; }
.scroll-arrow {
  position: absolute; top: 50%; transform: translateY(-60%);
  width: 36px; height: 56px; z-index: 20; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.scroll-arrow.visible { opacity: 1; pointer-events: auto; }
.scroll-arrow-left  {
  left: 0;
  background: linear-gradient(to right, rgba(15,15,19,.92) 40%, transparent);
  padding-right: 8px;
}
.scroll-arrow-right {
  right: 0;
  background: linear-gradient(to left, rgba(15,15,19,.92) 40%, transparent);
  padding-left: 8px;
}
.h-scroll-outer:hover .scroll-arrow.visible { opacity: 1; }

/* ── Category rows (auto-collections, friend picks, social) ─────── */
.category-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin;
}
.category-row::-webkit-scrollbar { height: 4px; }
.category-row-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.category-card {
  flex-shrink: 0; width: 120px; cursor: pointer; transition: transform .2s;
}
.category-card:hover { transform: scale(1.04); }
.category-card-poster {
  width: 120px; height: 180px; border-radius: 8px; overflow: hidden;
  background: var(--surface-raised); margin-bottom: 6px;
  border: 1px solid var(--border);
}
.category-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.category-card-title {
  font-size: 11px; color: var(--text-secondary); line-height: 1.3;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.category-card-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── Stats Year ──────────────────────────────────────────────────── */
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Person chips (cast & crew) ─────────────────────────────────── */
.cast-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin;
}
.cast-scroll::-webkit-scrollbar { height: 4px; }
.person-chip {
  flex-shrink: 0; width: 80px; cursor: pointer; text-align: center;
  transition: transform .2s;
}
.person-chip:hover { transform: translateY(-3px); }
.person-chip-img {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 6px; background: var(--surface-raised);
  border: 2px solid var(--border);
}
.person-chip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-chip-avatar {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 22px; font-weight: 700;
  color: var(--text-muted); background: var(--surface-raised);
}
.person-chip-name {
  font-size: 11px; font-weight: 600; color: var(--text-primary);
  line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.person-chip-role {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* ── Filmmaker card action buttons ──────────────────────────────── */
.fmk-actions {
  display: flex; gap: 4px; padding: 6px 8px 8px; border-top: 1px solid var(--border);
}
.fmk-action-btn {
  flex: 1; padding: 5px 4px; border: none; border-radius: 6px;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: opacity .15s;
}
.fmk-action-btn:hover { opacity: .8; }
.fmk-action-btn:disabled { cursor: default; opacity: .5; }
.fmk-add      { background: var(--accent); color: #fff; }
.fmk-collected { background: rgba(34,197,94,.15); color: #4ade80; }
.fmk-list     { background: var(--surface-raised); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── TV / Content type labels ───────────────────────────────────── */
.content-type-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(99,102,241,.9); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  padding: 2px 5px; border-radius: 3px; text-transform: uppercase;
  pointer-events: none; z-index: 5;
}
.tv-badge-detail {
  background: rgba(99,102,241,.15); color: #a5b4fc;
  font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 600;
}
.cat-tv-label { font-size: 9px; color: #a5b4fc; text-transform: uppercase; letter-spacing: .5px; }
.tv-progress-row {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 10px 12px; background: var(--surface-raised); border-radius: 8px;
}
.tv-progress-label { font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.tv-progress-inputs { display: flex; align-items: center; gap: 6px; }
.tv-ep-input {
  width: 52px; padding: 5px 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-primary); font-size: 14px; text-align: center;
}
.tv-ep-input:focus { border-color: var(--accent); outline: none; }

/* ── Content-type filter pills ──────────────────────────────────── */
.content-filter-pills { display: flex; gap: 4px; }
.cf-pill {
  padding: 5px 12px; border-radius: 16px; border: 1px solid var(--border);
  background: transparent; color: var(--text-2); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cf-pill:hover { border-color: var(--accent); color: var(--text); }
.cf-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Shared / Public List Page ─────────────────────────────────────── */
.pl-hero {
  position: relative; min-height: 420px; display: flex; align-items: flex-end;
  overflow: hidden; background: linear-gradient(135deg,#0a0a14,#1a0a2e);
}
.pl-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
}
.pl-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.95) 0%, rgba(0,0,0,.75) 55%, rgba(0,0,0,.3) 100%);
}
.pl-hero-inner { position: relative; z-index: 1; padding: 48px 48px 44px; max-width: 680px; }
.pl-back-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pl-back-link { color: rgba(255,255,255,.6); font-size: 13px; text-decoration: none; transition: color .15s; }
.pl-back-link:hover { color: #fff; }
.pl-badge {
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: 1.5px; padding: 3px 8px; border-radius: 4px;
}
.pl-list-title { font-size: clamp(28px,5vw,52px); font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 10px; }
.pl-list-desc { font-size: 15px; color: rgba(255,255,255,.7); margin-bottom: 18px; line-height: 1.5; }
.pl-owner-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pl-owner-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.pl-owner-name { font-size: 14px; font-weight: 600; color: #fff; }
.pl-owner-handle { font-size: 12px; color: rgba(255,255,255,.5); }
.pl-stats-row { display: flex; gap: 24px; margin-bottom: 16px; }
.pl-stat { display: flex; flex-direction: column; gap: 2px; }
.pl-stat-num { font-size: 20px; font-weight: 800; color: #fff; }
.pl-stat-label { font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .5px; }
.pl-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.pl-genres .genre-pill { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); border-color: transparent; }
.pl-add-btn {
  display: block; width: 100%; max-width: 340px; padding: 14px 20px;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-bottom: 10px;
  transition: background .2s, transform .15s;
}
.pl-add-btn:hover { background: #5040d0; transform: translateY(-1px); }
.pl-add-btn:disabled { opacity: .7; cursor: default; transform: none; }
.pl-no-signin { font-size: 12px; color: rgba(255,255,255,.45); }

.pl-explainer {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 20px 48px;
}
.pl-explainer-inner { max-width: 900px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pl-explainer-icon { font-size: 28px; flex-shrink: 0; }
.pl-explainer-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pl-explainer-body { font-size: 13px; color: var(--text-secondary); }
.pl-explainer-steps { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.pl-step {
  padding: 5px 12px; border-radius: 20px; background: var(--surface-raised);
  font-size: 12px; font-weight: 600; color: var(--text-secondary); border: 1px solid var(--border);
}

.pl-grid-section { max-width: 1200px; margin: 0 auto; padding: 36px 48px 48px; }
.pl-grid-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.pl-grid-count { font-size: 20px; font-weight: 700; }
.pl-poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}
.pl-poster-card { cursor: default; }
.pl-poster-wrap {
  position: relative; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden;
  background: var(--surface); margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .2s, box-shadow .2s;
}
.pl-poster-wrap:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.6); }
.pl-poster-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-poster-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 36px; background: var(--surface-raised);
}
.pl-poster-num {
  position: absolute; bottom: 6px; left: 8px;
  font-size: 11px; font-weight: 800; color: rgba(255,255,255,.5);
}
.pl-poster-title { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.pl-poster-meta { font-size: 11px; color: var(--text-muted); }
.pl-hidden { display: none; }

.pl-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 28px 48px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.pl-footer-brand { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.pl-footer-note { font-size: 12px; color: var(--text-muted); max-width: 400px; line-height: 1.5; }

@media (max-width: 640px) {
  .pl-hero-inner { padding: 32px 20px 32px; }
  .pl-explainer { padding: 16px 20px; }
  .pl-grid-section { padding: 24px 16px 40px; }
  .pl-footer { padding: 20px 16px; flex-direction: column; align-items: flex-start; }
  .pl-poster-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; }
}

/* ── Discover filter chip strip ─────────────────────────────────── */
.discover-filter-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px;
  scrollbar-width: none; margin-bottom: 4px;
}
.discover-filter-strip::-webkit-scrollbar { display: none; }
.dfc-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.dfc-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.dfc-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Where to Watch providers ───────────────────────────────────── */
.provider-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.provider-badge {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  display: block; transition: transform .15s, box-shadow .15s;
  flex-shrink: 0;
}
.provider-badge:hover { transform: scale(1.12); box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.provider-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.provider-name-fallback {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 9px; font-weight: 700; background: var(--surface-raised);
  color: var(--text-secondary); text-align: center; padding: 2px;
}
.provider-label { font-size: 11px; color: var(--text-muted); margin-left: 4px; }

/* ── Per-row genre chips ─────────────────────────────────────────── */
.row-genre-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.row-genre-chip {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.row-genre-chip:hover { border-color: var(--accent); color: var(--accent); }
.row-genre-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── App Footer ──────────────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 48px;
}
.app-footer-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.app-footer-brand {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.app-footer-links {
  display: flex; gap: 18px; flex: 1;
}
.app-footer-links a {
  font-size: 12px; color: var(--text-muted);
  text-decoration: none; transition: color .15s;
}
.app-footer-links a:hover { color: var(--text-primary); }
.app-footer-version {
  font-size: 11px; color: var(--text-muted);
  font-family: monospace; letter-spacing: .5px;
}

/* ── Vote picker toolbar ─────────────────────────────────────────── */
.vote-picker-toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.vote-watchlist-toggle {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-secondary); cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.vote-watchlist-toggle input { cursor: pointer; accent-color: var(--accent); }
.vote-picker-genre-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.vpg-chip {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.vpg-chip:hover { border-color: var(--accent); color: var(--accent); }
.vpg-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.vote-picker-count {
  font-size: 11px; color: var(--text-muted); margin-bottom: 8px;
}

/* ── Vote session cards ──────────────────────────────────────────── */
#voteSessionsList { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.vs-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; transition: border-color .15s;
}
.vs-card:hover { border-color: var(--accent); }
.vs-card-main { flex: 1; cursor: pointer; min-width: 0; }
.vs-card-title { font-size: 15px; font-weight: 700; margin-bottom: 4px;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-card-meta { font-size: 12px; color: var(--text-muted); display: flex;
                align-items: center; gap: 6px; flex-wrap: wrap; }
.vs-status { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
             text-transform: uppercase; letter-spacing: .5px; }
.vs-status.open { background: rgba(34,197,94,.15); color: #4ade80; }
.vs-status.closed { background: rgba(255,255,255,.08); color: var(--text-muted); }
.vs-you { color: var(--accent); font-weight: 600; }
.vs-owner { color: var(--text-secondary); }
.vs-card-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Streaming provider icons on poster cards ───────────────────── */
.card-provider-icons {
  position: absolute; bottom: 6px; left: 6px; z-index: 4;
  display: flex; gap: 3px; pointer-events: none;
}
.card-provider-icons img {
  width: 20px; height: 20px; border-radius: 4px;
  object-fit: cover; opacity: 0.92;
  box-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.movie-card:hover .card-provider-icons { opacity: 0; transition: opacity .2s; }

/* ── Vote card updates ───────────────────────────────────────────── */
.vs-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.vs-winner { font-size: 13px; color: #fbbf24; margin-bottom: 4px; }
.social-section { margin-bottom: 8px; }

/* ── Custom confirm dialog ───────────────────────────────────────── */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.confirm-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 28px 24px; max-width: 380px; width: 100%;
  animation: slideUp .2s ease;
}
.confirm-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.confirm-body { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-btn { padding: 9px 20px; border-radius: 8px; font-size: 14px; font-weight: 700;
               border: none; cursor: pointer; background: var(--accent); color: #fff; transition: opacity .15s; }
.confirm-btn.danger { background: #ef4444; }
.confirm-btn:hover { opacity: .85; }

/* ── Disabled nav tabs (sign-in required) ───────────────────────── */
.nav-tab-disabled {
  opacity: 0.4; cursor: not-allowed !important;
  pointer-events: none;
}

/* ── Data tools footer buttons ───────────────────────────────────── */
.app-footer-tool-btn {
  font-size: 11px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.app-footer-tool-btn:hover { border-color: var(--accent); color: var(--accent); }
