/* ==========================================================================
   WOULD WATCH THAT — Refined Formal Editorial Cinema Stylesheet
   3 Dark Surfaces × 5 Formal Accents
   ========================================================================== */

:root {
  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Default Surface: Abyssal Carbon */
  --bg-page: #0a0c0f;
  --bg-surface: #111419;
  --bg-elevated: #171b22;
  --bg-popover: #14181f;
  --bg-glass: rgba(10, 12, 15, 0.86);
  --border-subtle: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f2efe9;
  --text-secondary: #9fa5b0;
  --text-muted: #6c727e;
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.62);
  --shadow-popover: 0 20px 44px rgba(0, 0, 0, 0.7);

  /* Default Accent: Royal Gold */
  --accent: #c9a23f;
  --accent-hover: #dcb857;
  --accent-soft: rgba(201, 162, 63, 0.12);
  --accent-border: rgba(201, 162, 63, 0.42);
  --accent-contrast: #0b0d10;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 3 Formal Dark Surfaces ---------- */
[data-theme="abyssal-carbon"] {
  --bg-page: #0a0c0f;
  --bg-surface: #111419;
  --bg-elevated: #171b22;
  --bg-popover: #14181f;
  --bg-glass: rgba(10, 12, 15, 0.88);
}

[data-theme="midnight-slate"] {
  --bg-page: #0c121b;
  --bg-surface: #121b28;
  --bg-elevated: #192536;
  --bg-popover: #152030;
  --bg-glass: rgba(12, 18, 27, 0.88);
}

[data-theme="pure-obsidian"] {
  --bg-page: #000000;
  --bg-surface: #0a0a0c;
  --bg-elevated: #131317;
  --bg-popover: #101014;
  --bg-glass: rgba(0, 0, 0, 0.9);
}

/* ---------- 5 Focused Formal Accents ---------- */
[data-accent="royal-gold"] {
  --accent: #c9a23f;
  --accent-hover: #dcb857;
  --accent-soft: rgba(201, 162, 63, 0.12);
  --accent-border: rgba(201, 162, 63, 0.42);
  --accent-contrast: #0a0c0f;
}

[data-accent="silver-nitrate"] {
  --accent: #bfc7d1;
  --accent-hover: #d8dfe7;
  --accent-soft: rgba(191, 199, 209, 0.12);
  --accent-border: rgba(191, 199, 209, 0.42);
  --accent-contrast: #0a0c0f;
}

[data-accent="deep-teal"] {
  --accent: #1e8f8a;
  --accent-hover: #29a8a2;
  --accent-soft: rgba(30, 143, 138, 0.14);
  --accent-border: rgba(30, 143, 138, 0.45);
  --accent-contrast: #ffffff;
}

[data-accent="oxblood-noir"] {
  --accent: #8f2d3e;
  --accent-hover: #a93a4d;
  --accent-soft: rgba(143, 45, 62, 0.18);
  --accent-border: rgba(143, 45, 62, 0.5);
  --accent-contrast: #ffffff;
}

[data-accent="midnight-pine"] {
  --accent: #246b56;
  --accent-hover: #2f856c;
  --accent-soft: rgba(36, 107, 86, 0.18);
  --accent-border: rgba(36, 107, 86, 0.5);
  --accent-contrast: #ffffff;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.ambient-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 75% 45% at 50% -10%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 55% 40% at 100% 100%, rgba(255, 255, 255, 0.02), transparent 65%);
}

img { display: block; max-width: 100%; }
button, input, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ---------- Formal Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.72rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}
.brand-monogram { color: var(--accent); display: flex; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.brand-subtitle {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.nav-btn:hover { color: var(--text-primary); }
.nav-btn.active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.badge-pill {
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.05rem 0.42rem;
  border-radius: 999px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-header-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.26rem 0.72rem 0.26rem 0.28rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.member-pill:hover { border-color: var(--accent); }
.member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

/* ---------- Buttons ---------- */
.btn-accent, .btn-outline, .btn-ghost, .icon-btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid var(--accent);
  padding: 0.56rem 1.1rem;
  font-weight: 600;
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.54rem 1rem;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 0.52rem 0.8rem;
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.04); }

.btn-sm { padding: 0.38rem 0.8rem; font-size: 0.78rem; }

.icon-btn {
  width: 35px;
  height: 35px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }

.file-label { cursor: pointer; }

/* ---------- API Banner ---------- */
.api-banner {
  position: relative;
  z-index: 2;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-border);
}
.api-banner-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.83rem;
}

/* ---------- Main Shell & Search ---------- */
.main-shell {
  position: relative;
  z-index: 2;
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
}

.search-bar-section { margin-bottom: 1.65rem; }

.concierge-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.concierge-input-wrap {
  flex: 1 1 320px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.concierge-input-wrap input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.76rem 2.3rem 0.76rem 2.7rem;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.concierge-input-wrap input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.clear-search-btn {
  position: absolute;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
}

.concierge-actions { display: flex; gap: 0.5rem; }

/* ---------- Editorial Headings & Dividers ---------- */
.view-section { display: none; }
.view-section.active { display: block; }

.eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--accent);
  text-transform: uppercase;
}

.editorial-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.editorial-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.25rem 0;
  color: var(--accent);
  opacity: 0.65;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* ---------- Hero Spotlight ---------- */
.hero-spotlight {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  min-height: 450px;
  box-shadow: var(--shadow-lg);
}

.deco-corner {
  position: absolute;
  z-index: 6;
  color: var(--accent);
  opacity: 0.55;
  pointer-events: none;
}
.deco-tl { top: 14px; left: 14px; }
.deco-tr { top: 14px; right: 14px; }

.hero-slide {
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: flex-end;
  padding: 2.75rem;
  background-size: cover;
  background-position: center 22%;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 13, 0.95) 0%, rgba(8, 10, 13, 0.72) 48%, rgba(8, 10, 13, 0.2) 100%),
    linear-gradient(0deg, rgba(8, 10, 13, 0.96) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  color: #f4f1ea;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.hero-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.6vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
}

.hero-overview {
  margin: 0 0 1.35rem;
  color: rgba(244, 241, 234, 0.78);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.hero-controls {
  position: absolute;
  bottom: 1.35rem;
  right: 1.65rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(10, 12, 15, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}
.hero-arrow:hover { border-color: var(--accent); color: var(--accent); }

.hero-dots { display: flex; gap: 0.35rem; }
.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}
.hero-dot.active { width: 24px; background: var(--accent); }

.hero-skeleton {
  height: 450px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

/* ---------- Collections ---------- */
.collection-block { margin-bottom: 2.6rem; }
.collection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.collection-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
}

.collection-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(176px, 194px);
  gap: 1.05rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scrollbar-width: thin;
}

/* ---------- Sleek Non-Clanky Popover Filter Studio ---------- */
.section-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.studio-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.filter-bar-shell {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.filter-popover {
  position: relative;
}

.filter-trigger {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.62rem 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.filter-trigger:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.filter-popover.open .filter-trigger,
.filter-popover.has-value .filter-trigger {
  border-color: var(--accent-border);
  background: var(--bg-elevated);
}

.ft-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.9;
}
.ft-icon-imdb { color: #e2b616; }

.ft-labels {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.ft-name {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
}
.ft-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.filter-popover.open .ft-chevron { transform: rotate(180deg); color: var(--accent); }

.filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  max-width: 340px;
  background: var(--bg-popover);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem;
  z-index: 65;
  box-shadow: var(--shadow-popover);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.filter-panel-wide { min-width: 320px; max-width: 380px; }

/* Keep rightmost column popovers inside viewport */
.filter-popover:nth-child(5n) .filter-panel,
.filter-popover:nth-child(5n-1) .filter-panel {
  left: auto;
  right: 0;
}

.panel-section { display: flex; flex-direction: column; gap: 0.45rem; }
.panel-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
}

.active-filters-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

/* ---------- Chips & Inputs ---------- */
.pill-group { display: flex; flex-wrap: wrap; gap: 0.36rem; }

.chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}

.form-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.field-row input[type="text"],
.field-row input[type="password"],
.field-row input[type="number"],
.field-row select,
.year-range-row input,
.autocomplete-wrap input,
.sorter-shell select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.65rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
}
.field-row input:focus,
.field-row select:focus,
.autocomplete-wrap input:focus,
.sorter-shell select:focus {
  border-color: var(--accent-border);
}

input[type="range"] { accent-color: var(--accent); cursor: pointer; }

.year-range-row { display: flex; align-items: center; gap: 0.45rem; }

.autocomplete-wrap { position: relative; }
.autocomplete-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  z-index: 70;
  max-height: 190px;
  overflow-y: auto;
  box-shadow: var(--shadow-popover);
}
.autocomplete-item {
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.autocomplete-item:hover { background: var(--accent-soft); color: var(--accent); }

.selected-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag-removable {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.tag-removable button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}

.helper-note { margin: 0; font-size: 0.74rem; color: var(--text-muted); }

/* ---------- Formal Sorter Toolbar ---------- */
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.85rem 0;
  margin-bottom: 1.3rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.results-meta { font-size: 0.84rem; color: var(--text-secondary); }

.sorter-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.sorter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.sorter-quick-pills {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.18rem;
  gap: 0.15rem;
}

.sort-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.sort-pill:hover { color: var(--text-primary); }
.sort-pill.active {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}

.sorter-shell select {
  width: auto;
  min-width: 195px;
  padding: 0.42rem 0.65rem;
  font-size: 0.78rem;
}

/* ---------- Media Cards & Graphic Badges ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.2rem;
}

.media-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.media-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
}
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms ease; }
.media-card:hover .poster-wrap img { transform: scale(1.03); }

.poster-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-serif);
  color: var(--text-muted);
}

.card-laurel {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  background: rgba(10, 12, 15, 0.85);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.46rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  backdrop-filter: blur(6px);
}

.card-wl-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 15, 0.76);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  transition: var(--transition);
}
.card-wl-btn:hover { border-color: var(--accent); }
.card-wl-btn.saved {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.card-body {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.24;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub { font-size: 0.74rem; color: var(--text-muted); }

.ratings-strip {
  margin-top: auto;
  padding-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rating-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.16rem 0.44rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.rating-imdb {
  background: rgba(226, 182, 22, 0.12);
  color: #e9c237;
  border: 1px solid rgba(226, 182, 22, 0.3);
}

.rating-lb {
  background: rgba(64, 188, 244, 0.1);
  color: #9be4b8;
  border: 1px solid rgba(0, 224, 84, 0.28);
}

.rating-unrated {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.award-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pagination-bar { display: flex; justify-content: center; margin-top: 2.2rem; }

/* ---------- Modals & Screening Room ---------- */
.modal-backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-dialog {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.detail-dialog { max-width: 920px; }
.trailer-dialog { max-width: 980px; overflow: hidden; }
.auth-dialog { max-width: 430px; padding: 2rem 1.85rem; }

.modal-close-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 15, 0.75);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-close-inline {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
}

.detail-banner {
  min-height: 245px;
  background-size: cover;
  background-position: center 25%;
  position: relative;
}
.detail-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 15, 0.2) 0%, var(--bg-surface) 100%);
}

.detail-content {
  padding: 0 1.85rem 1.85rem;
  margin-top: -96px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 1.6rem;
}

.detail-poster {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.detail-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.15;
}
.detail-meta-line { font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 0.85rem; }
.detail-badges-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.detail-overview { font-size: 0.92rem; color: var(--text-primary); margin: 0 0 1.1rem; }

.detail-credits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  padding: 0.95rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.15rem;
  font-size: 0.82rem;
}
.detail-credits strong {
  display: block;
  color: var(--accent);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.15rem;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.trailer-topbar {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.trailer-topbar h3 { margin: 0; font-family: var(--font-display); font-size: 1.1rem; }
.trailer-topbar-actions { display: flex; align-items: center; gap: 0.55rem; }
.trailer-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.trailer-stage iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Settings Drawer ---------- */
.drawer-backdrop { display: flex; justify-content: flex-end; padding: 0; }
.settings-panel {
  width: min(390px, 100%);
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer-header {
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header h2 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.drawer-content { padding: 1.4rem; display: flex; flex-direction: column; gap: 1.6rem; }
.settings-group h3 {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.swatch-grid, .accent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}
.swatch-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}
.swatch-btn:hover { border-color: var(--border-strong); }
.swatch-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.settings-btn-row { display: flex; gap: 0.55rem; margin-top: 0.65rem; }

/* ---------- Auth Modal ---------- */
.auth-crest {
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.auth-header h2 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin: 1.1rem 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.22rem;
  border-radius: var(--radius-sm);
}
.auth-tab {
  background: transparent;
  border: none;
  padding: 0.46rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}
.auth-error { margin: 0; color: #ef6d6a; font-size: 0.8rem; }
.signed-in-panel {
  margin-top: 1.15rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.signed-in-name { font-family: var(--font-display); font-size: 1.15rem; }

/* ---------- Empty State & Toast ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.2rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-border);
  color: var(--text-primary);
  padding: 0.64rem 1.2rem;
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-lg);
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .filter-bar-shell { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-popover:nth-child(5n) .filter-panel,
  .filter-popover:nth-child(5n-1) .filter-panel { left: 0; right: auto; }
  .filter-popover:nth-child(3n) .filter-panel { left: auto; right: 0; }
}

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; padding: 0.7rem 1rem; }
  .brand-subtitle { display: none; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .main-shell { padding: 1.1rem 1rem 4rem; }
  .filter-bar-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-panel, .filter-panel-wide {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    max-width: 100%;
    min-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 75vh;
    overflow-y: auto;
  }
  .sorter-quick-pills { display: none; }
  .hero-slide { padding: 1.6rem 1.25rem 4.2rem; min-height: 380px; }
  .detail-content { grid-template-columns: 1fr; margin-top: -60px; }
  .detail-poster { width: 135px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}
