/* ==========================================================================
   ReelLuv — Dark Cinematic Design System with 4 Seasonal Themes
   ========================================================================== */

/* ===== THEME VARIABLES ===== */

/* Default: Ember (Halloween) */
:root, [data-theme="ember"] {
  --primary: #FF5722;
  --primary-glow: rgba(255, 87, 34, 0.4);
  --primary-light: #FF7043;
  --primary-soft: rgba(255, 87, 34, 0.12);
  --secondary: #E50914;
  --secondary-glow: rgba(229, 9, 20, 0.35);
  --accent: #FFB300;
  --grad-primary: linear-gradient(135deg, #FF7043 0%, #E50914 55%, #9C27B0 100%);
  --grad-ring: linear-gradient(135deg, #FF5722, #E50914);
  --bg-dark: #0A0C10;
  --bg-card: #12151D;
  --bg-card-elevated: #181C26;
  --bg-card-hover: #1F2432;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 87, 34, 0.35);
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 1px 1px var(--border-subtle);
  --shadow-glow: 0 0 35px var(--primary-glow);
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Frost (Winter) */
[data-theme="frost"] {
  --primary: #00E5FF;
  --primary-glow: rgba(0, 229, 255, 0.35);
  --primary-light: #18FFFF;
  --primary-soft: rgba(0, 229, 255, 0.12);
  --secondary: #0091EA;
  --secondary-glow: rgba(0, 145, 234, 0.3);
  --accent: #80D8FF;
  --grad-primary: linear-gradient(135deg, #18FFFF 0%, #0091EA 55%, #304FFE 100%);
  --grad-ring: linear-gradient(135deg, #00E5FF, #0091EA);
  --border-highlight: rgba(0, 229, 255, 0.35);
}

/* Rose (Valentine / Spring) */
[data-theme="rose"] {
  --primary: #FF1493;
  --primary-glow: rgba(255, 20, 147, 0.35);
  --primary-light: #FF69B4;
  --primary-soft: rgba(255, 20, 147, 0.12);
  --secondary: #9C27B0;
  --secondary-glow: rgba(156, 39, 176, 0.3);
  --accent: #E040FB;
  --grad-primary: linear-gradient(135deg, #FF69B4 0%, #9C27B0 55%, #6A1B9A 100%);
  --grad-ring: linear-gradient(135deg, #FF1493, #9C27B0);
  --border-highlight: rgba(255, 20, 147, 0.35);
}

/* Emerald (Cyberpunk / Summer) */
[data-theme="emerald"] {
  --primary: #00E676;
  --primary-glow: rgba(0, 230, 118, 0.35);
  --primary-light: #69F0AE;
  --primary-soft: rgba(0, 230, 118, 0.12);
  --secondary: #76FF03;
  --secondary-glow: rgba(118, 255, 3, 0.3);
  --accent: #B2FF59;
  --grad-primary: linear-gradient(135deg, #69F0AE 0%, #76FF03 55%, #00C853 100%);
  --grad-ring: linear-gradient(135deg, #00E676, #76FF03);
  --border-highlight: rgba(0, 230, 118, 0.35);
}

/* ===== RESET & BASE ===== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; }
.code-font { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; }
.text-muted { color: var(--text-muted); }
.accent-text { color: var(--primary); }
.accent { color: var(--primary); }

a { color: var(--primary-light); text-decoration: none; transition: var(--transition-smooth); }
a:hover { color: var(--primary); }

/* ===== AMBIENT GLOW ORBS ===== */

.glow-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.4;
  animation: pulse 8s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--primary-glow), transparent);
  top: -100px; left: -100px;
}
.orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--secondary-glow), transparent);
  top: 40%; right: -150px;
}
.orb-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(156, 39, 176, 0.12), transparent);
  bottom: 5%; left: 10%;
}
.orb-auth-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--primary-glow), transparent);
  top: 20%; left: 20%;
}
.orb-auth-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--secondary-glow), transparent);
  bottom: 10%; right: 15%;
}

@keyframes pulse {
  0% { transform: scale(1) translateY(0); opacity: 0.35; }
  100% { transform: scale(1.15) translateY(20px); opacity: 0.55; }
}

/* ===== APP CONTAINER ===== */

.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: 70px;
  transition: opacity 0.15s ease;
}

.page-exit { opacity: 0.4; }
.page-enter { animation: fadeIn 0.3s ease forwards; }

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

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--primary-glow);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

/* ===== NAVIGATION BAR ===== */

.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 64px;
  max-width: 1440px;
  margin: 0 auto;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
}
.nav-tab:hover { color: var(--text-main); background: rgba(255,255,255,0.04); }
.nav-tab.active {
  color: var(--text-main);
}
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-primary);
}

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

.nav-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  pointer-events: none;
}
.nav-search-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  color: var(--text-main);
  font-size: 0.85rem;
  width: 180px;
  transition: var(--transition-smooth);
  outline: none;
}
.nav-search-input:focus {
  border-color: var(--border-highlight);
  width: 240px;
  background: rgba(255,255,255,0.08);
}

.nav-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}
.nav-icon-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.06); }

.nav-avatar-wrapper { position: relative; }
.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  color: var(--text-muted);
}
.nav-avatar-btn:hover { background: rgba(255,255,255,0.06); }
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: var(--transition-smooth);
}
.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-dropdown-header {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-header strong { font-size: 0.95rem; }
.nav-dropdown-header span { font-size: 0.8rem; }

.nav-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: var(--transition-smooth);
}
.nav-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.nav-dropdown-item[hidden],
[hidden] { display: none !important; }
.nav-signout-btn { color: #EF4444; }

/* ===== AUTH PAGE ===== */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 24px;
  position: relative;
  box-sizing: border-box;
}

.auth-ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.auth-layout-container {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 52px;
  max-width: 1240px;
  width: 100%;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Start Page Showcase (Left Column) */
.start-showcase {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.start-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.3);
  color: #ff7043;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.start-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5722;
  box-shadow: 0 0 10px #ff5722;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

.start-hero-title {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: #fff;
  margin: 0;
}

.start-hero-gradient {
  background: linear-gradient(135deg, #ff5722 0%, #f59e0b 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.start-hero-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 580px;
}

.start-pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 6px;
}

.start-pillar-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.start-pillar-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.pillar-icon-wrap {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.pillar-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pillar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.pillar-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}

.start-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.start-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.start-meta-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
}

.start-meta-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}

.start-footer-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.start-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.start-nav-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.start-nav-dot {
  color: var(--text-dim);
}

@media (max-width: 1024px) {
  .auth-layout-container {
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 600px;
  }
  .start-pillars-grid {
    grid-template-columns: 1fr;
  }
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(18, 21, 29, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px var(--primary-glow);
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo { margin-bottom: 12px; }
.auth-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}
.auth-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.auth-toggle {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 24px;
}
.auth-toggle-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.auth-toggle-btn.active {
  background: var(--bg-card-hover);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.auth-field input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-smooth);
}
.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.auth-submit-btn {
  margin-top: 4px;
  padding: 13px;
  font-size: 1rem;
}

.auth-feedback {
  text-align: center;
  font-size: 0.85rem;
  min-height: 20px;
}
.auth-feedback.error { color: #EF4444; }
.auth-feedback.success { color: #10B981; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.auth-google-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
}
.auth-footer-link {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-footer-link:hover { color: var(--primary); }

/* ===== DASHBOARD PAGE ===== */

.dashboard-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* Last Watched Hero Card */
.dash-last-watched-section {
  margin-bottom: 24px;
}
.dash-last-watched-hero {
  display: flex;
  gap: 24px;
  background: linear-gradient(135deg, rgba(31, 27, 43, 0.95) 0%, rgba(21, 19, 28, 0.95) 100%);
  border: 1px solid rgba(224, 176, 80, 0.25);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 40px rgba(224, 176, 80, 0.06);
  transition: var(--transition-smooth);
}
.dash-last-watched-hero:hover {
  border-color: rgba(224, 176, 80, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 50px rgba(224, 176, 80, 0.12);
}
.dash-last-watched-hero.is-empty {
  padding: 32px 24px;
  background: linear-gradient(135deg, rgba(26, 23, 36, 0.85) 0%, rgba(15, 13, 20, 0.9) 100%);
  border: 1px dashed var(--border-subtle);
}
.hero-poster-col {
  flex-shrink: 0;
  width: 120px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.hero-poster-col:hover {
  transform: scale(1.03);
}
.hero-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #E0B050, #FF6B1A);
  color: #100a02;
  box-shadow: 0 2px 8px rgba(224, 176, 80, 0.3);
}
.hero-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.hero-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px 0;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1.25;
}
.hero-title:hover {
  color: var(--primary);
}
.hero-year {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}
.hero-ep-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.hero-ep-info .ep-tag {
  color: var(--primary);
  font-weight: 700;
  background: rgba(224, 176, 80, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}
.hero-ep-info .ep-name {
  color: var(--text-main);
  font-style: italic;
}
.hero-verdict-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hero-tickets {
  display: inline-flex;
  align-items: center;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 6px rgba(255, 184, 0, 0.4));
}
.hero-meter-chip {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
}
.hero-meter-chip.scare {
  background: rgba(142, 68, 173, 0.2);
  border: 1px solid rgba(142, 68, 173, 0.4);
  color: #d2a4eb;
}
.hero-meter-chip.laugh {
  background: rgba(243, 156, 18, 0.2);
  border: 1px solid rgba(243, 156, 18, 0.4);
  color: #f8c275;
}
.hero-meter-chip.cry {
  background: rgba(52, 152, 219, 0.2);
  border: 1px solid rgba(52, 152, 219, 0.4);
  color: #8ed0f8;
}
.hero-quote {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--primary);
  padding: 6px 12px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
}
.hero-quote-mark {
  color: var(--primary);
  font-weight: bold;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.hero-action-btn {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .dash-last-watched-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px;
    gap: 16px;
  }
  .hero-poster-col {
    width: 100px;
    height: 150px;
  }
  .hero-top-row, .hero-verdict-row, .hero-actions, .hero-ep-info {
    justify-content: center;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* Dashboard Cards */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  transition: var(--transition-smooth);
}
.dash-card:hover {
  border-color: var(--border-highlight);
  box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.card-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}
.card-menu-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-main); }

/* Challenge Ring Card */
.challenge-card { grid-column: 1; }
.challenge-body {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 16px 0;
}

.challenge-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.challenge-ring-svg { display: block; }
.ring-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-big-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.ring-denom {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.ring-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.challenge-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.challenge-stat { text-align: right; }
.stat-accent {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}
.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.challenge-gauge-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  margin-top: 12px;
}
.challenge-gauge-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--grad-primary);
  transition: width 1s ease;
}
.gauge-label-start, .gauge-label-end {
  position: absolute;
  top: 10px;
  font-size: 0.7rem;
  color: var(--text-dim);
}
.gauge-label-start { left: 0; }
.gauge-label-end { right: 0; }

/* TV Shows Card */
.tv-card { grid-column: 2; }
.tv-show-item {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.tv-show-item:hover {
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.tv-show-item:active {
  transform: translateY(0);
}
.tv-poster-wrap {
  width: 100px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.tv-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.tv-show-info { flex: 1; min-width: 0; }
.tv-show-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.tv-show-title { font-weight: 600; font-size: 1rem; }
.tv-show-ep { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.tv-heart { font-size: 1.1rem; }

.tv-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tv-progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.tv-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 1s ease;
}

.tv-show-actions { margin-bottom: 8px; }
.tv-action-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.8rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.tv-action-btn:hover { border-color: var(--primary); color: var(--primary); }

.tv-show-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.tv-play-btn {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

/* Friends Card */
.friends-card { grid-column: 3; }

.friend-leaderboard { margin-bottom: 16px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: var(--transition-smooth);
}
.lb-row:hover { background: rgba(255,255,255,0.04); }
.lb-you {
  background: var(--primary-soft);
  border: 1px solid var(--border-highlight);
}
.lb-rank {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  width: 24px;
}
.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.lb-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.lb-name { font-weight: 600; font-size: 0.9rem; }
.lb-status { font-size: 0.75rem; color: var(--text-muted); }
.lb-xp-col { text-align: right; }
.lb-xp { font-weight: 600; font-size: 0.9rem; }
.lb-delta { font-size: 0.75rem; }

.friend-activity { margin-top: 12px; }
.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.activity-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Movies Section */
.movies-section {
  max-width: 1400px;
  margin: 0 auto;
}
.movies-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 4px;
}
.movies-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.movies-scroll::-webkit-scrollbar { height: 6px; }
.movies-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 3px; }
.movies-scroll::-webkit-scrollbar-thumb { background: var(--primary-soft); border-radius: 3px; }

.movie-card {
  min-width: 200px;
  max-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.movie-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.movie-poster-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
}
.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rewatch-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.movie-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 6px;
}
.star-display { color: #FFB300; font-size: 0.85rem; letter-spacing: 1px; }

.movie-info { padding: 12px; }
.movie-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.movie-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.movie-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.movie-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* ===== SETTINGS PAGE ===== */

.settings-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.settings-header { margin-bottom: 32px; }
.settings-title { font-size: 1.8rem; margin-bottom: 4px; }

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--text-main);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.theme-card {
  position: relative;
  background: var(--bg-card-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
  font-family: inherit;
  color: var(--text-main);
}
.theme-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}
.theme-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.theme-preview {
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}
.theme-preview-gradient {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}
.theme-preview-dots {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}
.theme-preview-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}

.theme-card-info { display: flex; flex-direction: column; gap: 2px; }
.theme-card-name { font-weight: 600; font-size: 0.85rem; }
.theme-card-desc { font-size: 0.75rem; color: var(--text-muted); }

.theme-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

/* Settings Form */
.settings-form { display: flex; flex-direction: column; gap: 18px; }
.settings-field { display: flex; flex-direction: column; gap: 6px; }
.settings-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.settings-field input,
.settings-field textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-smooth);
}
.settings-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.disabled-input { opacity: 0.5; cursor: not-allowed; }
.field-hint { font-size: 0.75rem; color: var(--text-dim); }

.settings-save-btn { align-self: flex-start; }
.settings-feedback { font-size: 0.85rem; min-height: 20px; }
.settings-feedback.success { color: #10B981; }
.settings-feedback.error { color: #EF4444; }

.settings-actions { display: flex; gap: 12px; }

/* ===== ABOUT PAGE ===== */

.about-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

.about-back-bar {
  margin-bottom: 32px;
}
.about-back-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.about-back-link:hover { color: var(--primary); }

.about-hero {
  text-align: center;
  padding: 40px 0;
}
.about-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 16px 0;
}
.about-hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 48px;
}
.about-section-title {
  font-size: 1.6rem;
  margin: 12px 0;
}
.about-section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.about-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
}
.comparison-card.traditional { border-top: 3px solid #EF4444; }
.comparison-card.reelluv-way { border-top: 3px solid var(--primary); }

.card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.tag-primary { color: var(--primary); }

.comparison-card h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.comparison-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comparison-card li {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.cross { color: #EF4444; flex-shrink: 0; }
.check { color: #10B981; flex-shrink: 0; }

.badge-pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Simulator */
.simulator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
}
.sim-controls { margin-bottom: 24px; }
.control-group { margin-bottom: 16px; }
.control-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.slider-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}

.select-dropdown {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}
.select-dropdown:focus { border-color: var(--primary); }
.select-dropdown option { background: var(--bg-card); color: var(--text-main); }

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-glow);
}

.sim-display {
  display: flex;
  gap: 28px;
  align-items: center;
}
.ring-container { position: relative; flex-shrink: 0; }
.ring-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-percentage {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}
.ring-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.progress-ring-fill {
  stroke-dasharray: 408.4;
  stroke-dashoffset: 408.4;
  transition: stroke-dashoffset 0.5s ease;
}

.sim-metrics { flex: 1; }
.sim-metric-card {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.sim-metric-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.sim-metric-value { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; }
.sim-metric-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.sim-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mini-metric {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-metric .lbl { font-size: 0.75rem; color: var(--text-muted); }
.mini-metric .val { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem; }

/* Features Grid */
.about-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
  transition: var(--transition-smooth);
}
.feature-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* Contact Form */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.form-field input,
.form-field textarea,
.form-field select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--primary); }
.form-field textarea { resize: vertical; }

.form-feedback { font-size: 0.85rem; text-align: center; min-height: 20px; }
.form-feedback.error { color: #EF4444; }
.form-feedback.success { color: #10B981; }

/* About Footer */
.about-footer {
  text-align: center;
  padding: 40px 0 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 48px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .friends-card { grid-column: 1 / -1; }
  .nav-tabs { gap: 2px; }
  .nav-tab { padding: 8px 10px; }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .challenge-card, .tv-card, .friends-card { grid-column: 1; }

  .nav-inner { padding: 0 12px; gap: 8px; }
  .nav-search-wrapper { display: none; }

  .about-comparison { grid-template-columns: 1fr; }
  .about-features-grid { grid-template-columns: 1fr; }
  .sim-display { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .about-hero-title { font-size: 1.8rem; }

  .challenge-body { flex-direction: column; align-items: center; text-align: center; }
  .challenge-stats { flex-direction: row; gap: 20px; }
  .challenge-stat { text-align: center; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .theme-grid { grid-template-columns: 1fr; }
}

/* ===== SCROLLBAR GLOBAL ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   PHASE 2 — Movies / TV / Friends pages, log-watch modal
   ============================================================ */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}
.page-title { font-size: 1.9rem; }
.page-sub { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  font-weight: 600;
  margin: 24px 0 12px;
}
.count-chip {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  vertical-align: middle;
  letter-spacing: 0;
}
.grid-loading { color: var(--text-muted); font-size: 0.9rem; padding: 32px 4px; text-align: center; }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

/* Poster grid */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.poster-card { cursor: pointer; }
.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}
.poster-card:hover .poster-frame {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}
.poster-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-frame img.poster-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-dim);
  background: var(--bg-card-elevated);
  object-fit: contain;
}
.poster-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.poster-rating {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  color: #FFB300;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}
.poster-log-btn {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: var(--transition-smooth);
}
.poster-card:hover .poster-log-btn { opacity: 1; transform: translateY(0); }
.poster-meta { padding: 8px 2px 0; display: flex; flex-direction: column; gap: 1px; }
.poster-name { font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.poster-year { font-size: 0.75rem; color: var(--text-muted); }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-card);
}
.empty-icon { font-size: 2.6rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; max-width: 420px; margin: 0 auto; line-height: 1.5; }

.panel-empty { text-align: center; padding: 28px 12px; }
.panel-empty-icon { font-size: 1.9rem; margin-bottom: 8px; }
.panel-empty-head { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.panel-empty-body { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }
.panel-cta { width: 100%; margin-top: 14px; }

/* ===== Log-watch modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text-main); }
.modal-title-row { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; padding-right: 24px; }
.modal-poster { width: 54px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--bg-card-elevated); }
.modal-heading { font-size: 1.15rem; line-height: 1.25; }
.modal-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-form .form-field { display: flex; flex-direction: column; gap: 6px; }
.modal-form label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.modal-form input:focus, .modal-form textarea:focus { border-color: var(--primary); }
.modal-form textarea { resize: vertical; }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-main); cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); }

.star-input { display: flex; align-items: center; gap: 4px; }
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1;
  color: rgba(255,255,255,0.18);
  padding: 0;
  transition: color 0.12s ease;
}
.star-btn.full { color: #FFB300; }
.star-btn.half { background: linear-gradient(90deg, #FFB300 50%, rgba(255,255,255,0.18) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-clear { background: none; border: none; color: var(--text-dim); font-size: 0.75rem; cursor: pointer; margin-left: 8px; }
.star-clear:hover { color: var(--text-muted); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.modal-actions .btn { padding: 9px 18px; }

.btn-back { margin-bottom: 18px; }

/* ===== TV show list + detail ===== */
.show-list { display: flex; flex-direction: column; gap: 10px; }
.show-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  transition: var(--transition-smooth);
}
.show-row:hover { border-color: var(--border-highlight); transform: translateX(2px); }
.show-poster { width: 46px; height: 68px; object-fit: cover; border-radius: 7px; flex-shrink: 0; background: var(--bg-card-elevated); }
.show-row-main { flex: 1; min-width: 0; }
.show-row-title { font-weight: 600; font-size: 0.95rem; }
.show-row-meta { font-size: 0.78rem; color: var(--text-muted); margin: 3px 0 7px; }
.show-row-chevron { color: var(--text-dim); font-size: 1.3rem; }

.mini-progress { height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.mini-progress-fill { height: 100%; background: var(--grad-primary); border-radius: 3px; transition: width 0.8s ease; }

.show-detail-head { display: flex; gap: 18px; margin-bottom: 12px; }
.show-detail-poster { width: 92px; height: 138px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--bg-card-elevated); }
.show-detail-progress { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-width: 340px; }
.show-detail-progress span { font-size: 0.8rem; color: var(--text-muted); }

.season-block { margin-top: 22px; }
.season-title { font-size: 1rem; margin-bottom: 10px; }
.episode-list { display: flex; flex-direction: column; gap: 4px; }
.episode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  font-size: 0.86rem;
  transition: var(--transition-smooth);
}
.episode-row:hover { border-color: var(--border-highlight); }
.episode-row.done { background: var(--primary-soft); border-color: var(--border-highlight); }
.episode-check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: #fff; font-weight: 700;
}
.episode-row.done .episode-check { background: var(--primary); border-color: var(--primary); }
.episode-num { color: var(--text-muted); font-weight: 600; flex-shrink: 0; width: 34px; }
.episode-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-date { color: var(--text-dim); font-size: 0.78rem; flex-shrink: 0; }

/* ===== Friends ===== */
.group-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.group-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.group-tab:hover { color: var(--text-main); }
.group-tab.active { background: var(--primary-soft); border-color: var(--border-highlight); color: var(--primary); }

.group-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
}
.group-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.invite-code {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
}
.invite-code:hover { border-color: var(--primary); }
.invite-code-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); }
.invite-code-value { font-family: 'JetBrains Mono', monospace; font-size: 1.05rem; font-weight: 500; color: var(--primary); letter-spacing: 1px; }
.invite-code-copy { font-size: 0.7rem; color: var(--text-muted); }

.lb-avatar img, .activity-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.group-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.group-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
}
.group-form h3 { font-size: 0.95rem; margin-bottom: 12px; }
.group-form-row { display: flex; gap: 8px; }
.group-form-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.group-form-row input:focus { border-color: var(--primary); }
#join-group-code { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; }

/* ===== Dashboard additions ===== */
.dash-greeting { margin-bottom: 18px; }
.dash-greeting h1 { font-size: 1.6rem; }
.challenge-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; text-align: center; }
.pace-ahead { color: #10B981 !important; }
.pace-behind { color: #EF4444 !important; }
.pace-done { color: #FFB300 !important; }
.pace-neutral { color: var(--text-muted) !important; }

@media (max-width: 768px) {
  .group-forms { grid-template-columns: 1fr; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
  /* (opacity handled by the (hover: none) block -- width is a poor proxy for touch) */
  .page-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   MOBILE / iOS
   ------------------------------------------------------------
   iOS users have no native app yet, so the web app is the product on iPhone.
   Fixes here address four concrete faults found by measuring a 375px viewport:
     1. the top nav overflowed to 444px, pushing the avatar (and therefore
        Settings / Sign Out) off-screen entirely
     2. every input was 13–15px, and Safari force-zooms the page on focus for
        anything under 16px
     3. tap targets were 30–48px wide by ~32px tall, under Apple's 44px minimum
     4. 100vh and no safe-area insets, so content sat under the notch and the
        home indicator
   ============================================================ */

html {
  -webkit-text-size-adjust: 100%;   /* stop landscape rotation inflating text */
  text-size-adjust: 100%;
}

* { -webkit-tap-highlight-color: transparent; }

/* Dynamic viewport height: on iOS Safari 100vh is the height WITHOUT the
   collapsing toolbar, so it overflows. 100dvh tracks the visible area. */
body { min-height: 100vh; min-height: 100dvh; }
.app-container { min-height: 100vh; min-height: 100dvh; }

/* Respect the notch on the fixed top bar. */
.app-nav {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.app-container { padding-top: calc(70px + env(safe-area-inset-top)); }

@media (max-width: 768px) {
  /* --- Primary nav becomes a bottom tab bar (iOS-native shape) --------------
     The same .nav-tabs element is simply repositioned — no markup change. This
     is what un-breaks the layout: the top bar now only carries brand + avatar,
     so nothing is pushed off-screen and Sign Out is reachable again. */
  /* backdrop-filter on an ancestor establishes a containing block, which would
     anchor the "fixed" tab bar to .app-nav instead of the viewport and render it
     at the TOP. Drop the blur here; at 0.98 alpha it is visually identical. */
  .app-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Fully opaque. The blur is already gone here, so the remaining 2% of
       translucency bought nothing and let page content ghost through the bar
       as it scrolled underneath. */
    background: var(--bg-dark);
  }

  .nav-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    flex: none;
    gap: 0;
    justify-content: space-around;
    background: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-top: 1px solid var(--border-subtle);
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
    z-index: 90;
  }
  .nav-tab {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 48px;          /* ≥44px tap target */
    padding: 6px 2px;
    border-radius: 10px;
  }
  .nav-tab span {
    display: block;             /* labels come back — icons alone are ambiguous */
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1;
  }
  .nav-tab.active { color: var(--primary); }
  .nav-tab.active::after { display: none; }   /* underline reads wrong at the bottom */

  /* Leave room for the bar so the last card is never trapped under it. */
  .app-container { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  /* Top bar: brand on the left, avatar on the right, nothing else competing. */
  .nav-actions { margin-left: auto; gap: 4px; }
  .nav-icon-btn { display: none; }            /* notifications aren't wired up yet */
  .nav-avatar-btn { min-height: 44px; padding: 4px 6px; }
  .nav-brand-text { font-size: 1.2rem; }

  /* --- iOS zoom-on-focus ---------------------------------------------------
     Safari zooms the whole page when a focused field is under 16px. Every form
     control has to be at least 16px on mobile; nothing else prevents it. */
  input, select, textarea,
  .form-field input, .form-field textarea, .form-field select,
  .settings-field input, .settings-field textarea,
  .modal-form input, .modal-form textarea,
  .auth-field input,
  .search-bar input,
  .group-form-row input,
  .select-dropdown {
    font-size: 16px;
  }

  /* --- Tap targets ≥44px ------------------------------------------------- */
  .btn { min-height: 44px; }
  .card-menu-btn { min-width: 44px; min-height: 44px; }
  .star-btn { font-size: 1.9rem; padding: 4px; }
  .auth-toggle-btn { min-height: 44px; }
  .theme-card { min-height: 44px; }
  .episode-row { min-height: 48px; }
  .group-tab { min-height: 40px; }

  /* --- Layout breathing room --------------------------------------------- */
  .page { padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); }
  .dashboard-page { padding: 16px; }
  .page-title { font-size: 1.5rem; }
  .dash-card { padding: 18px; }
  .movie-card { min-width: 150px; }
  .movie-poster-wrap { height: 210px; }
  .show-detail-poster { width: 70px; height: 105px; }
  .group-panel { padding: 18px; }
  .group-panel-head { flex-direction: column; align-items: stretch; }
  .invite-code { align-items: flex-start; }

  /* Modal becomes a bottom sheet — thumb-reachable, the iOS convention. */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    max-height: 92dvh;
    overflow-y: auto;
  }
  .modal-actions { position: sticky; bottom: 0; background: var(--bg-card); padding-top: 10px; }
  .modal-actions .btn { flex: 1; }
}

/* Momentum scrolling inside the horizontal movie rail. */
.movies-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

/* ===== ADMIN CONSOLE ===== */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.admin-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-stat-num { font-family: 'Outfit', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--primary); }
.admin-stat-label { font-size: 0.78rem; color: var(--text-muted); }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-card); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 640px; }
.admin-table th {
  text-align: left; padding: 10px 12px; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-dim); border-bottom: 1px solid var(--border-subtle); font-weight: 600;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-user-name { font-weight: 600; }
.admin-user-handle { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.admin-dim { color: var(--text-muted); font-size: 0.8rem; }

.admin-roles { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.role-chip {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  background: rgba(255,255,255,0.07); color: var(--text-muted);
}
.role-chip.role-owner { background: var(--primary-soft); color: var(--primary); }
.role-chip.role-admin { background: rgba(255,179,0,0.15); color: #FFB300; }
.role-chip.role-moderator { background: rgba(16,185,129,0.15); color: #10B981; }

.admin-pii-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.admin-pii-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-pii-shield-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.admin-pii-info strong {
  color: #f59e0b;
  display: inline;
  margin-right: 6px;
}
.admin-pii-desc {
  color: #d1d5db;
  font-size: 0.8rem;
}
.btn-pii-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-pii-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--border-highlight);
  color: #fff;
}
.admin-email-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.admin-email-text.is-masked {
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.admin-email-text.is-revealed {
  color: #f59e0b;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-email-peek, .btn-email-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  transition: all 0.15s ease;
  line-height: 1.2;
}
.btn-email-peek:hover, .btn-email-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: var(--border-highlight);
}

.admin-role-select {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 4px 8px; color: var(--text-main);
  font-family: inherit; font-size: 0.75rem; cursor: pointer; outline: none;
}
.admin-role-select option { background: var(--bg-card); }

/* User row action buttons */
.btn-user-action {
  background: rgba(224, 176, 80, 0.12);
  border: 1px solid rgba(224, 176, 80, 0.35);
  border-radius: 8px;
  color: var(--primary);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.btn-user-action:hover:not(:disabled) {
  background: var(--primary);
  color: #100a02;
  box-shadow: 0 0 12px rgba(224, 176, 80, 0.4);
}
.btn-user-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-user-action.is-sent {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #10B981;
}

/* Curated Lists & Genre Guardrails */
.curated-guardrail-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(31, 27, 43, 0.95) 0%, rgba(26, 20, 36, 0.95) 100%);
  border: 1px solid rgba(224, 176, 80, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.curated-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.curated-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.curated-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}
.curated-banner-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.curated-banner-desc strong {
  color: var(--primary);
}
.curated-deadline-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.deadline-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.deadline-countdown {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f59e0b;
  font-family: 'JetBrains Mono', monospace;
}
.curated-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.curated-genre-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
}
.curated-genre-card:hover {
  border-color: var(--border-highlight);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.curated-genre-card.is-fallback {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--bg-card) 100%);
}
.curated-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.curated-genre-tag {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.curated-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.curated-status-badge.status-fallback_active {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.curated-status-badge.status-submitted {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.curated-status-badge.status-pending {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.curated-rotation-meta {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}
.rotation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rotation-label {
  color: var(--text-muted);
}
.consecutive-pill {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}
.curated-titles-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.preview-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.curated-mini-posters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.curated-mini-poster {
  width: 44px;
  height: 66px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.curated-mini-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.curated-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.curated-assign-wrap {
  flex: 1;
  min-width: 140px;
}
.curated-mod-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-main);
  font-size: 0.78rem;
  outline: none;
}
.btn-run-fallback {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
}
.curated-card-feedback {
  font-size: 0.78rem;
  line-height: 1.35;
  border-radius: 6px;
  padding: 0;
  transition: all 0.2s ease;
}
.curated-card-feedback.error {
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.curated-card-feedback.success {
  padding: 6px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.admin-audit-list { display: flex; flex-direction: column; gap: 6px; }
.admin-audit-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 9px; padding: 8px 12px; font-size: 0.8rem;
}
.admin-audit-row code { font-size: 0.72rem; }

.admin-note {
  margin-top: 28px; padding: 14px 16px; border-radius: 12px;
  background: var(--primary-soft); border: 1px solid var(--border-highlight);
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.55;
}

/* ===== CHALLENGES ===== */
/* Featured Halloween 100-Bones Challenge */
.halloween-featured-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(38, 18, 56, 0.9) 0%, rgba(26, 12, 18, 0.95) 100%);
  border: 1px solid rgba(255, 107, 26, 0.35);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 107, 26, 0.15);
  position: relative;
  overflow: hidden;
}
.halloween-trophy-col {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.halloween-trophy-frame {
  width: 130px;
  height: 130px;
  border-radius: 16px;
  border: 2px solid rgba(255, 107, 26, 0.5);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 107, 26, 0.25);
  position: relative;
  background: #11091a;
}
.halloween-trophy-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.halloween-trophy-frame:hover .halloween-trophy-hero-img {
  transform: scale(1.05);
}
.halloween-trophy-plate {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(16, 10, 20, 0.92);
  color: #ff9d42;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  padding: 3px 2px;
  letter-spacing: 0.06em;
  border-top: 1px solid rgba(255, 107, 26, 0.4);
}
.halloween-content-col {
  flex: 1;
  min-width: 0;
}
.halloween-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.halloween-hero-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(90deg, #ff6b1a, #b14aed);
  color: #fff;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(255, 107, 26, 0.35);
}
.halloween-date-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.halloween-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
}
.halloween-hero-desc {
  font-size: 0.85rem;
  color: #d1cbd8;
  line-height: 1.5;
  margin: 0 0 14px 0;
}
.halloween-hero-progress {
  margin-bottom: 14px;
}
.halloween-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.halloween-progress-label strong {
  color: #fff;
}
.halloween-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.halloween-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b1a, #b14aed);
  border-radius: 4px;
  transition: width 0.8s ease;
}
.halloween-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ch-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ch-trophy-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 26, 0.15);
  border: 1px solid rgba(255, 107, 26, 0.35);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ff9d42;
}
.ch-trophy-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
}
.ch-card.is-halloween-100 {
  border-color: rgba(255, 107, 26, 0.4);
  background: linear-gradient(180deg, rgba(255, 107, 26, 0.05) 0%, var(--bg-card) 100%);
}
@media (max-width: 640px) {
  .halloween-featured-hero {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 16px;
  }
  .halloween-badge-row, .halloween-hero-actions {
    justify-content: center;
  }
}

.ch-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 20px; margin-bottom: 14px;
  transition: var(--transition-smooth);
}
.ch-card:hover { border-color: var(--border-highlight); }
.ch-card.is-complete { border-color: rgba(255,179,0,0.4); }
.ch-card.is-archived { opacity: 0.55; }
.ch-ring { position: relative; flex-shrink: 0; width: 92px; height: 92px; }
.ch-ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ch-ring-num { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; }
.ch-ring-den { font-size: 0.8rem; color: var(--text-muted); }
.ch-body { flex: 1; min-width: 0; }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ch-name { font-size: 1.1rem; }
.ch-pace { font-size: 0.8rem; font-weight: 700; }
.ch-meta { font-size: 0.8rem; color: var(--text-muted); margin: 4px 0 10px; }
.ch-bar { height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.ch-bar-fill { height: 100%; background: var(--grad-primary); border-radius: 3px; transition: width 1s ease; }
.ch-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0; font-size: 0.78rem; color: var(--text-muted); }
.ch-stats strong { color: var(--text-main); font-family: 'Outfit', sans-serif; font-size: 0.95rem; }
.ch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-danger:hover { border-color: #EF4444 !important; color: #EF4444 !important; }
.ch-watches { margin-top: 14px; }
.ch-watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ch-watch { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,0.03); border-radius: 9px; padding: 8px; }
.ch-watch img { width: 34px; height: 50px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: var(--bg-card-elevated); }
.ch-watch-title { font-size: 0.85rem; font-weight: 600; }

.ch-form {
  background: var(--bg-card); border: 1px solid var(--border-highlight);
  border-radius: 16px; padding: 22px; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.ch-form-title { font-size: 1.05rem; }
.ch-presets { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .ch-card { flex-direction: column; align-items: stretch; gap: 14px; }
  .ch-ring { align-self: center; }
  .ch-watch-list { grid-template-columns: 1fr; }
}

/* ===== MOVIE CARD SUBMETA & HOVER PREVIEWS ===== */
.poster-card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.poster-card-runtime {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.78rem;
}
.poster-hover-preview {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 20, 0.93);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(4px);
  border-radius: 12px;
  z-index: 5;
}
.poster-frame:hover .poster-hover-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.hover-preview-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  line-height: 1.2;
}
.hover-preview-meta {
  font-size: 0.78rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 600;
}
.hover-preview-genres {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.hover-preview-hint {
  font-size: 0.72rem;
  color: var(--secondary, #00E5FF);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ===== VIP TICKET MODAL & TICKET RATING ===== */
.vip-ticket-modal {
  border: 1px solid rgba(255, 87, 34, 0.28) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(255, 87, 34, 0.12) !important;
  background: linear-gradient(170deg, #181924 0%, #111218 100%) !important;
}
.modal-ticket-top-badge {
  text-align: center;
  margin-bottom: 14px;
}
.ticket-badge-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 87, 34, 0.12);
  color: var(--primary);
  border: 1px solid rgba(255, 87, 34, 0.3);
}
.quick-date-buttons {
  display: flex;
  gap: 6px;
}
.quick-date-chip {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.quick-date-chip.active, .quick-date-chip:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}
.ticket-rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.ticket-status-label {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
}
.ticket-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticket-input {
  display: flex;
  gap: 6px;
}
.ticket-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  filter: grayscale(0.5) opacity(0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.ticket-btn:hover {
  transform: scale(1.16);
  filter: grayscale(0) opacity(1);
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
}
.ticket-btn.full {
  filter: grayscale(0) drop-shadow(0 0 10px rgba(245, 158, 11, 0.75));
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}
.ticket-btn.half {
  filter: grayscale(0) drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  opacity: 0.9;
}
.ticket-clear-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}
.luved-wrapper {
  display: flex;
  align-items: center;
}
.luved-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.luved-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.luved-toggle-btn.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(255, 87, 34, 0.2));
  border-color: #EF4444;
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
  transform: scale(1.02);
}
.venue-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.venue-chip {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}
.venue-chip:hover, .venue-chip.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}
.companion-suggestions-box {
  margin-top: 8px;
}
.suggestion-lead {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.companion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.companion-pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.companion-pill:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
  border-style: solid;
}
.companion-pill-admin {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: rgba(255, 87, 34, 0.1) !important;
  font-weight: 600;
}
.companion-pill.added {
  opacity: 0.45;
  pointer-events: none;
}
/* ===== DEFAULT FRIEND BANNER ON FRIENDS PAGE ===== */
.default-friend-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.12), rgba(0, 229, 255, 0.06));
  border: 1px solid rgba(255, 87, 34, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.avatar-circle-brand {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 0 14px var(--primary-soft);
  flex-shrink: 0;
}
.default-friend-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.default-friend-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.default-friend-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

/* ===== TITLE DETAIL PAGE (#/title/:id) ===== */
.title-backdrop-container {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: -100px;
  background: #0f0f15;
}
.title-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: blur(2px);
  transform: scale(1.05);
}
.title-backdrop-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-main) 10%, rgba(15, 15, 21, 0.6) 70%, transparent 100%);
}
.title-back-nav {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}
.title-back-nav:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: var(--primary);
}
.title-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 0 16px;
  margin-bottom: 40px;
  z-index: 2;
}
.title-detail-poster {
  width: 200px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.title-type-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 6px;
}
.title-main-name {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.15;
}
.title-meta-chips {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.meta-pill {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}
.title-genres-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.genre-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.title-synopsis {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 24px;
  max-width: 720px;
}
.title-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
}
.title-stat-box {
  display: flex;
  flex-direction: column;
}
.title-stat-box .stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}
.title-stat-box .stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.title-history-section {
  margin-top: 32px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 20px;
  transition: var(--transition-smooth);
}
.history-card:hover {
  border-color: rgba(255, 87, 34, 0.3);
  transform: translateY(-2px);
}
.history-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.history-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.history-num-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.history-rewatch-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--secondary, #00E5FF);
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.history-first-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.history-luved-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.history-rating-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.history-tickets {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}
.history-venue {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.history-companions {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 8px;
}
.companion-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  margin-left: 4px;
}
.history-notes-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-top: 8px;
  font-style: italic;
  color: #e5e7eb;
  font-size: 0.9rem;
}
.history-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  justify-content: flex-end;
}
.btn-history-action {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}
.btn-history-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-history-delete:hover {
  color: #EF4444;
  border-color: #EF4444;
}

@media (max-width: 768px) {
  .title-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: -60px;
  }
  .title-detail-poster {
    width: 140px;
    margin: 0 auto;
  }
  .title-backdrop-container {
    height: 200px;
  }
}

/* Universal Search & Category Tabs */
.search-category-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-tab-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.search-tab-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-glow);
}
.search-tab-chip.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(255, 75, 110, 0.3);
}
.tab-count {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: 10px;
}
.badge-movie {
  background: rgba(239, 68, 68, 0.85);
}
.badge-tv {
  background: rgba(59, 130, 246, 0.85);
}

/* Poster Card Hover Action Buttons */
.hover-action-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
}
.hover-action-log-btn {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(255, 75, 110, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  pointer-events: auto;
}
.hover-action-log-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(255, 75, 110, 0.5);
}
.hover-action-details-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  pointer-events: auto;
}
.hover-action-details-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Universal Title Rating Banner in Modal */
.universal-rating-card {
  background: rgba(255, 75, 110, 0.08);
  border: 1px solid rgba(255, 75, 110, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.universal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.universal-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.universal-edit-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.universal-edit-toggle:hover {
  color: #fff;
}
.universal-verdict-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 4px;
}
.universal-rating-text strong {
  color: var(--primary);
}
.universal-divider {
  color: var(--text-muted);
}
.universal-liked-badge {
  font-weight: 600;
  font-size: 0.88rem;
}
.universal-liked-badge.active {
  color: #ff4b6e;
}
.universal-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* Log Modal Post-Submission Screen */
.modal-success-screen {
  text-align: center;
  padding: 24px 12px;
}
.success-ticket-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.success-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.success-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.log-another-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.log-another-question {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}
.log-another-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.modal-quick-search-wrap {
  margin-top: 16px;
  text-align: left;
}
.quick-search-header {
  margin-bottom: 10px;
}
.quick-search-header label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.quick-search-header input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}
.quick-search-header input:focus {
  border-color: var(--primary);
}
.modal-quick-results {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.quick-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}
.quick-result-row:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--primary);
}
.quick-result-poster {
  width: 32px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #1e293b;
}
.quick-result-info {
  flex: 1;
}
.quick-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}
.quick-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Modal Review Visibility Selector */
.visibility-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.vis-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}
.vis-option input[type="radio"] {
  display: none;
}
.vis-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.vis-option.active {
  background: rgba(255, 75, 110, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(255, 75, 110, 0.2);
}
.vis-icon {
  font-size: 1.1rem;
}
.vis-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

/* Title Page: Personal vs Public View Switcher */
.title-view-switcher {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.view-switch-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
}
.view-switch-tab:hover {
  background: var(--bg-card-hover);
  color: #fff;
}
.view-switch-tab.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 75, 110, 0.35);
}
.tab-chip {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Personal Review Highlight Card */
.personal-review-highlight {
  background: rgba(255, 75, 110, 0.05);
  border: 1px solid rgba(255, 75, 110, 0.25);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.review-highlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.review-highlight-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-highlight-quote {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.review-highlight-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Visibility Tags */
.vis-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.vis-tag-public {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.vis-tag-friends {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.vis-tag-fof {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.vis-tag-private {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Community Stats Overview */
.community-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.community-stat-item {
  display: flex;
  flex-direction: column;
}
.community-stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}
.community-stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Community Filter Row */
.community-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.community-filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.community-filter-chip:hover {
  color: #fff;
  background: var(--bg-card-hover);
}
.community-filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* Community Review Cards */
.community-review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  transition: var(--transition-fast);
}
.community-review-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-1px);
}
.reviewer-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.reviewer-profile-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reviewer-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.reviewer-names {
  display: flex;
  flex-direction: column;
}
.reviewer-display-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.reviewer-username {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.reviewer-meta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.community-review-quote {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #e5e7eb;
  margin-top: 10px;
}

/* ============================================================
 * Toast Notification System
 * ========================================================== */
.reelluv-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.reelluv-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-icon {
  font-size: 1.15rem;
}

/* ============================================================
 * Quick-Add Toggle Control
 * ========================================================== */
.quick-add-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}
.quick-add-toggle-wrap:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}
.quick-add-switch {
  position: relative;
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  transition: background 0.25s ease;
}
.quick-add-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}
.quick-add-input {
  display: none;
}
.quick-add-input:checked + .quick-add-switch {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}
.quick-add-input:checked + .quick-add-switch::after {
  transform: translateX(18px);
  background: #111;
}
.quick-add-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e5e7eb;
}
.quick-add-input:checked ~ .quick-add-label {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* ============================================================
 * TV Episode Dropdown & Log History Accordion
 * ========================================================== */
.episode-accordion-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.episode-accordion-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.episode-accordion-item.watched {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.02);
}
.episode-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 14px;
}
.episode-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.episode-check-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: transparent;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}
.episode-check-badge.checked {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}
.episode-num-chip {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  flex-shrink: 0;
}
.episode-title-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.episode-watches-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
  flex-shrink: 0;
}
.episode-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ep-action-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.ep-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}
.ep-action-btn.quick-logged {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #4ade80;
}
.ep-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}
.ep-dropdown-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.ep-toggle-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.episode-accordion-item.expanded .ep-toggle-arrow {
  transform: rotate(180deg);
}
.episode-dropdown-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  padding: 16px;
}
.episode-accordion-item.expanded .episode-dropdown-panel {
  display: block;
}
.ep-history-heading {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ep-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ep-history-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ep-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.ep-watch-index {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}
.ep-watch-date {
  font-size: 0.85rem;
  color: #e5e7eb;
}
.ep-watch-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ep-watch-meta-pill {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: #9ca3af;
}
.ep-history-notes {
  font-size: 0.88rem;
  font-style: italic;
  color: #d1d5db;
  padding-left: 10px;
  border-left: 2px solid var(--primary);
  margin: 4px 0;
}
.ep-history-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.ep-entry-action-btn {
  font-size: 0.75rem;
  font-weight: 600;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ep-entry-action-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.ep-entry-action-btn.delete:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ============================================================
 * Emotional Resonance Meters (Scare, Laughter, Cry 1-10)
 * ========================================================== */
.universal-locked-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.meters-container {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.meters-top-header {
  margin-bottom: 12px;
}
.meter-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.meter-chip-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}
.meter-chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
.meter-chip-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
}
.meter-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.meter-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.meter-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.meter-val-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}
.meter-slider {
  width: 100%;
  margin: 6px 0;
  accent-color: #f59e0b;
  cursor: pointer;
}
.meter-sub-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.meter-badge-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.meter-badge-display.scare {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.meter-badge-display.laugh {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.35);
  color: #fde047;
}
.meter-badge-display.cry {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}





/* ===== CURATED SHELVES (public, on #/movies) ===== */
.curated-shelf { margin-bottom: 26px; }
.curated-shelf-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.curated-shelf-head .section-label { margin-bottom: 8px; }
.curated-shelf-by { font-size: 0.75rem; color: var(--text-dim); }
.curated-shelf-desc {
  font-size: 0.85rem; color: var(--text-muted);
  margin: -4px 0 10px; line-height: 1.5;
}
.curated-shelf-card { min-width: 132px; max-width: 132px; cursor: pointer; }
.curated-shelf-card .movie-poster-wrap { height: 198px; }

@media (max-width: 768px) {
  .curated-shelf-card { min-width: 112px; max-width: 112px; }
  .curated-shelf-card .movie-poster-wrap { height: 168px; }
}

/* ===== STOCK CHALLENGE CATALOGUE (browse & activate) ===== */
.catalogue-note {
  font-size: 0.85rem; color: var(--text-muted);
  margin: -4px 0 16px; line-height: 1.55; max-width: 620px;
}
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.catalogue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: var(--transition-smooth);
}
.catalogue-card:hover { border-color: var(--border-highlight); transform: translateY(-2px); }
.catalogue-card.is-active { border-color: var(--primary); background: var(--primary-soft); }
.catalogue-head { display: flex; gap: 12px; align-items: flex-start; }
.catalogue-icon { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.catalogue-name { font-size: 1rem; line-height: 1.25; }
.catalogue-blurb { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; line-height: 1.45; }
.catalogue-meta { font-size: 0.75rem; color: var(--text-dim); }
.catalogue-retro { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.retro-badge {
  align-self: flex-start;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border-highlight);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.75rem;
  font-weight: 700;
}
.catalogue-headstart { font-size: 0.75rem; color: var(--text-muted); }
.catalogue-btn { width: 100%; margin-top: 4px; }

@media (max-width: 768px) {
  .catalogue-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   TOUCH DEVICES — hover-gated actions must stay reachable
   ------------------------------------------------------------
   The poster cards on #/movies, #/search and #/tv put their only "Log Watch"
   and "Details" buttons inside .poster-hover-preview, which is opacity:0 AND
   pointer-events:none until :hover. A touch screen never produces a usable
   hover, so on a phone those buttons were invisible and click-blocked, and the
   card body had no handler of its own — logging a watch from any discovery
   surface was impossible. iOS has no native app yet, so this was the primary
   platform.

   `(hover: none)` targets the actual capability rather than a width guess, so a
   large touch tablet is covered too and a desktop keeps its hover reveal.
   ============================================================ */

@media (hover: none) {
  /* Anchor the panel to the bottom instead of covering the whole poster, so the
     artwork still reads while the actions stay permanently tappable. */
  .poster-hover-preview {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    inset: auto 0 0 0;
    padding: 26px 10px 10px;
    background: linear-gradient(to top,
      rgba(12, 14, 20, 0.97) 0%,
      rgba(12, 14, 20, 0.88) 55%,
      rgba(12, 14, 20, 0) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0 0 12px 12px;
  }

  /* Genres are the first thing to sacrifice for thumb room. */
  .poster-hover-preview .hover-preview-genres { display: none; }
  .poster-hover-preview .hover-preview-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hover-action-row { flex-direction: row; gap: 5px; margin-top: 6px; }
  .hover-action-log-btn,
  .hover-action-details-btn {
    min-height: 40px;
    padding: 8px 4px;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
  }
  /* Logging is the primary action, so it gets the room; Details stays a
     comfortable target but shrinks to fit a two-column grid at 375px. */
  .hover-action-log-btn { flex: 2 1 0; }
  .hover-action-details-btn { flex: 1 1 0; min-width: 62px; }

  /* The older grid used on the "your films" view has the same hover gate. */
  .poster-log-btn { opacity: 1; transform: none; }
}

/* Long/short button labels: "Log Watch" everywhere, "Log" where a two-column
   touch grid cannot fit it (the full label was clipping at 76px on a 375px
   screen). */
.btn-label-short { display: none; }
@media (hover: none) and (max-width: 480px) {
  .btn-label-full { display: none; }
  .btn-label-short { display: inline; }
}

/* Log-watch footer: feedback lives INSIDE the sticky area, so an error can never
   render below the fold (it was landing ~270px past the viewport, which made a
   failed save look like the button simply did nothing). On mobile the sheet also
   has to clear the fixed bottom tab bar, which was painting over the lower half
   of the confirm button. */
.modal-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.modal-actions-row { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions .form-feedback { margin: 0; text-align: left; min-height: 0; }
.modal-actions .form-feedback:empty { display: none; }

@media (max-width: 768px) {
  .modal-actions-row .btn { flex: 1; }
  /* clear the fixed bottom tab bar */
  .modal-card { padding-bottom: calc(22px + 64px + env(safe-area-inset-bottom)); }
  .modal-actions {
    padding-bottom: calc(10px + 64px + env(safe-area-inset-bottom));
    margin-bottom: calc(-64px - env(safe-area-inset-bottom));
  }
}

/* Episode rows on phones -------------------------------------------------
   The header packed check + E-number + title + watch badge on the left and
   Rewatch + History on the right, all in one flex row. At 375px they collided:
   the actions overlapped the watch pill and the episode TITLE was squeezed to
   zero width, so watched episodes showed no name at all. Wrapping to two rows
   gives the title the full width and the actions their own line. */
@media (max-width: 768px) {
  .episode-row-header {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 12px;
  }
  .episode-header-left {
    flex: 1 1 100%;
    min-width: 0;
  }
  .episode-title-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .episode-header-actions {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .episode-header-actions .ep-action-btn,
  .episode-header-actions .ep-dropdown-toggle {
    min-height: 40px;
    white-space: nowrap;
  }
  /* The badge duplicates "History (N)" once the actions are visible. */
  .episode-watches-badge { display: none; }
}

/* ===== TROPHY AVATAR PICKER ===== */
.trophy-picker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.trophy-picker-label { font-size: 0.78rem; }
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.trophy-chip {
  background: var(--bg-card-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; font-family: inherit; color: var(--text-main);
  transition: var(--transition-smooth);
}
.trophy-chip img { width: 44px; height: 44px; }
.trophy-chip-name { font-size: 0.7rem; font-weight: 600; text-align: center; line-height: 1.2; }
.trophy-chip-sub { font-size: 0.65rem; color: var(--text-muted); }
.trophy-chip:not(.is-locked):hover { border-color: var(--border-highlight); transform: translateY(-2px); }
.trophy-chip.is-current { border-color: var(--primary); box-shadow: 0 0 16px var(--primary-glow); }
.trophy-chip.is-locked { opacity: 0.4; cursor: not-allowed; filter: grayscale(1); }
.trophy-chip.is-locked .trophy-chip-sub { color: var(--text-dim); }

/* Trophy worn as an avatar should fill the circle cleanly. */
.nav-avatar img, .lb-avatar img, .activity-avatar img { object-fit: cover; }

/* ============================================================
   DOUBLE-TAP ZOOM
   ------------------------------------------------------------
   Mobile browsers wait ~300ms after a tap to see whether a second one arrives,
   and treat a quick second tap as "zoom in". Navigating the app is tap-heavy —
   bottom tab, then a card on the page that just loaded — so those two taps were
   being read as a double-tap and zooming the page in. Because hash routing never
   reloads the document, the zoom then persisted onto every subsequent page and
   had to be pinched out by hand.

   touch-action: manipulation removes the double-tap gesture on these elements
   only. PINCH ZOOM IS UNAFFECTED, which is why this is used rather than
   maximum-scale=1 / user-scalable=no on the viewport tag — those disable zoom
   outright and break accessibility for anyone who needs to magnify.
   ============================================================ */
a,
button,
label,
summary,
[role="button"],
input[type="checkbox"],
input[type="radio"],
input[type="range"],
select,
.nav-tab,
.poster-card,
.movie-card,
.episode-row,
.episode-row-header,
.show-row,
.trophy-chip,
.theme-card,
.catalogue-card,
.group-tab,
.view-switch-tab,
.ticket-btn,
.star-btn {
  touch-action: manipulation;
}

/* ===== UPCOMING CHALLENGES (joined, not yet started) ===== */
.upcoming-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.upcoming-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);   /* dashed = not live yet */
  border-radius: 14px;
  padding: 16px 18px;
}
.upcoming-main { flex: 1; min-width: 0; }
.upcoming-countdown {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; min-width: 66px;
  padding: 6px 10px; border-radius: 10px;
  background: var(--primary-soft); border: 1px solid var(--border-highlight);
}
.upcoming-days {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: 1.35rem; line-height: 1; color: var(--primary);
}
.upcoming-days-label { font-size: 0.66rem; color: var(--text-muted); text-align: center; }

@media (max-width: 768px) {
  .upcoming-card { flex-wrap: wrap; gap: 12px; }
  .upcoming-main { flex: 1 1 100%; }
  .upcoming-card .tv-action-btn { min-height: 40px; }
}

/* Emotional resonance toggles — the meters default to the genre's match, and any
   of them can be switched on by hand. */
.meter-toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.meter-toggle-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  color: var(--text-muted);
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: var(--transition-smooth);
}
.meter-toggle-chip:hover { color: var(--text-main); border-color: var(--border-highlight); }
.meter-toggle-chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   TITLE PAGE — mobile layout corrections
   ------------------------------------------------------------
   .reviewer-title-bar is flex/space-between with no wrap and no min-width:0 on
   its children, so at 375px the visibility badge and date rode straight over the
   reviewer's name and handle. The view switcher's long labels also wrapped to
   three lines and ate most of the screen.
   ============================================================ */
@media (max-width: 768px) {
  .reviewer-title-bar {
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }
  .reviewer-profile-group { flex: 1 1 auto; min-width: 0; }
  .reviewer-names { min-width: 0; }
  .reviewer-display-name,
  .reviewer-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  /* Badge + date drop to their own line rather than sitting on the name. */
  .reviewer-meta-group {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Two long tab labels were wrapping to three lines each. */
  .title-view-switcher { gap: 8px; }
  .view-switch-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 10px;
    font-size: 0.78rem;
    gap: 6px;
    justify-content: center;
    text-align: center;
  }
  .title-stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* Long unbroken strings — a pasted link in a review, a very long title — must
   never widen the page. There was no word-breaking rule anywhere in the sheet. */
.community-review-quote,
.ch-watch-title,
.review-highlight-quote,
.ep-history-notes,
.movie-title,
.poster-name,
.show-row-title,
.episode-title-text,
.reviewer-display-name,
.reviewer-username,
.lb-name,
.activity-text {
  overflow-wrap: anywhere;
}

/* ===== PROFILE & STATS (#/profile) ===== */
.pf-header {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 26px;
}
.pf-avatar {
  width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-card-elevated);
  border: 2px solid var(--border-highlight);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 2rem;
  overflow: hidden;
}
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-identity { flex: 1; min-width: 0; }
.pf-handle { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--primary); }

.pf-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 8px;
}
.pf-tile {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 2px;
}
.pf-tile-num {
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.7rem;
  color: var(--primary); line-height: 1;
}
.pf-tile-lbl { font-size: 0.75rem; color: var(--text-muted); }

.pf-resonance { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pf-meter {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.pf-meter-top { display: flex; justify-content: space-between; font-size: 0.85rem; }

.pf-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pf-bars { display: flex; flex-direction: column; gap: 8px; }
.pf-bar-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }
.pf-bar-label { flex: 0 0 92px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
.pf-bar-fill { height: 100%; background: var(--grad-primary); border-radius: 4px; }
.pf-bar-count { flex: 0 0 26px; text-align: right; font-weight: 600; }

.pf-trophy-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.pf-trophy {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 12px 6px; text-align: center;
}
.pf-trophy img { width: 46px; height: 46px; }
.pf-trophy span { font-size: 0.7rem; font-weight: 600; line-height: 1.2; }
.pf-trophy small { font-size: 0.65rem; color: var(--text-muted); }
.pf-trophy.is-locked { opacity: 0.4; filter: grayscale(1); }
.pf-recent-card { cursor: pointer; min-width: 140px; max-width: 140px; }

@media (max-width: 768px) {
  .pf-two-col { grid-template-columns: 1fr; gap: 8px; }
  .pf-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-avatar { width: 64px; height: 64px; font-size: 1.5rem; }
  .pf-header { gap: 14px; }
}
.pf-flag-note {
  margin-top: 10px; padding: 10px 14px; border-radius: 10px;
  background: rgba(255,179,0,0.10); border: 1px solid rgba(255,179,0,0.35);
  color: #FFB300; font-size: 0.82rem; line-height: 1.5;
}

/* ===== DASHBOARD: challenge cycling + community standings ===== */
.dash-ch-head { display: flex; align-items: center; gap: 8px; }
.dash-ch-title { flex: 1; min-width: 0; margin-bottom: 0; overflow-wrap: anywhere; }
.dash-ch-arrow {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  width: 32px; min-height: 40px;
  font-size: 1.3rem; line-height: 1;
  cursor: pointer; flex-shrink: 0;
  transition: var(--transition-smooth);
}
.dash-ch-arrow:hover { color: var(--primary); border-color: var(--border-highlight); }
.dash-ch-dots { display: flex; gap: 6px; justify-content: center; margin: 8px 0 4px; }
.dash-ch-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.18); cursor: pointer;
  transition: var(--transition-smooth);
}
.dash-ch-dot.active { background: var(--primary); transform: scale(1.25); }
/* An upcoming challenge is hollow rather than filled: it is in the rotation but
   nothing counts toward it yet, and a solid dot would imply progress. */
.dash-ch-dot.upcoming {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.35);
}
.dash-ch-dot.active.upcoming {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.dash-ch-count {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.dash-ch-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--text-muted);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-subtle);
}

/* Touch: the controls above are drawn for a mouse — a 32px arrow and a 7px dot
   are both well under the ~44px a finger can hit reliably, which is why the
   card looked like it would not cycle on a phone. The dot keeps its 7px look
   and gains an invisible hit area instead, sized with the gap so neighbouring
   areas tile exactly rather than overlapping onto the wrong dot. */
@media (hover: none) {
  .dash-ch-arrow { width: 44px; min-height: 44px; font-size: 1.5rem; }
  .dash-ch-dots { gap: 14px; }
  .dash-ch-dot { position: relative; }
  .dash-ch-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 14px);
    height: 44px;
  }
}

.dash-lb { margin-top: 12px; }
.dash-lb-note { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 6px; }

/* ===== EDIT GROUP MODAL ===== */
.eg-icon-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.eg-icon {
  width: 52px; height: 52px; padding: 0;
  border-radius: 10px; overflow: hidden;
  border: 2px solid var(--border-subtle);
  background: var(--bg-card-elevated); cursor: pointer;
  transition: var(--transition-smooth);
}
.eg-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eg-icon:hover { border-color: var(--border-highlight); }
.eg-icon.is-current { border-color: var(--primary); box-shadow: 0 0 12px var(--primary-glow); }
.eg-genre-row { display: flex; gap: 6px; flex-wrap: wrap; }
.eg-genre { font-size: 0.75rem; padding: 6px 12px; min-height: 36px; }

/* ===== PUBLIC INSTALL PAGE ===== */
.install-page { max-width: 680px; margin: 0 auto; padding: 40px 20px 60px; }
.install-hero { text-align: center; margin-bottom: 40px; }
.install-mark { font-size: 3.4rem; line-height: 1; margin-bottom: 12px; }
.install-title { font-size: 2rem; font-weight: 800; margin: 0 0 10px; }
.install-sub { color: var(--text-muted); max-width: 44ch; margin: 0 auto 26px; line-height: 1.55; }
.install-cta {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 34px; font-size: 1.05rem; font-weight: 700;
  /* Comfortably past the 44px touch minimum: this is the one control on the
     page that matters, and it is nearly always tapped on a phone. */
  min-height: 56px;
}
.install-meta { font-size: 0.72rem; font-weight: 500; opacity: 0.8; }
.install-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }
.install-steps, .install-honest { margin-bottom: 32px; }
.install-list { padding-left: 22px; line-height: 1.7; color: var(--text-muted); }
.install-list li { margin-bottom: 10px; }
.install-list strong { color: var(--text-bright, #fff); }
.install-honest p {
  color: var(--text-muted); line-height: 1.6; font-size: 0.9rem;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
}
.install-footer { text-align: center; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 560px) {
  .install-title { font-size: 1.55rem; }
  .install-cta { width: 100%; }
}

/* ===== DIRECT INVITES ===== */
.invite-box {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 14px; margin-top: 12px;
}
.invite-box-label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.invite-box-row { display: flex; gap: 8px; }
.invite-box-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-card-elevated); border: 1px solid var(--border-subtle);
  color: inherit; font-size: 0.9rem; min-height: 44px;
}
.invite-box-row .btn { min-height: 44px; flex-shrink: 0; }
.invite-box-hint { font-size: 0.75rem; color: var(--text-muted); margin: 8px 0 0; line-height: 1.5; }
.invite-box-hint.success { color: var(--success, #00E676); }
.invite-box-hint.error { color: var(--danger, #ef4444); }

.invite-inbox { margin-bottom: 22px; }
.invite-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border-highlight, var(--border-subtle));
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
}
.invite-card-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.invite-card-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card-elevated); font-size: 1.1rem;
}
.invite-card-group { margin: 0; font-weight: 700; font-size: 0.95rem; }
.invite-card-from { margin: 2px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.invite-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
/* Both are the same size so "Join" is not the easier target by accident --
   declining an invite should be exactly as easy as accepting one. */
.invite-card-actions .btn { min-height: 44px; padding: 0 18px; font-size: 0.85rem; }

@media (max-width: 480px) {
  .invite-card { flex-direction: column; align-items: stretch; }
  .invite-card-actions .btn { flex: 1; }
}

/* ===== BACKLOG ===== */
.chip-count {
  display: inline-block; margin-left: 5px; padding: 0 6px;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  background: rgba(255,255,255,0.12);
}
.wl-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.wl-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
}
.wl-poster { position: relative; aspect-ratio: 2/3; background: var(--bg-card-elevated); cursor: pointer; }
.wl-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wl-flag {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px;
  border-radius: 999px; font-size: 0.66rem; font-weight: 800;
  background: rgba(0,0,0,0.75); color: #fff;
}
.wl-flag.p2 { background: var(--primary); color: #000; }
.wl-meta { padding: 10px 12px 4px; flex: 1; }
.wl-title { margin: 0; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-sub { margin: 2px 0 0; font-size: 0.75rem; color: var(--text-muted); }
.wl-note { margin: 6px 0 0; font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.wl-actions { display: flex; gap: 6px; padding: 10px 12px 12px; }
/* Both actions at the touch minimum: removing something should not be fiddlier
   than logging it. */
.wl-actions .btn { flex: 1; min-height: 44px; font-size: 0.78rem; padding: 0 8px; }

/* ===== CHARTS ===== */
.chart-list { list-style: none; margin: 0; padding: 0; }
.chart-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; margin-bottom: 8px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 14px; transition: var(--transition-smooth);
}
.chart-row:hover { border-color: var(--border-highlight); }
.chart-rank {
  flex-shrink: 0; width: 30px; text-align: center;
  font-size: 1.1rem; font-weight: 800; color: var(--text-dim);
}
.chart-poster {
  flex-shrink: 0; width: 46px; height: 69px; border-radius: 7px;
  overflow: hidden; background: var(--bg-card-elevated);
}
.chart-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chart-main { flex: 1; min-width: 0; }
.chart-title { margin: 0; font-weight: 700; font-size: 0.95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-sub { margin: 2px 0 6px; font-size: 0.75rem; color: var(--text-muted); }
.chart-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.chart-bar span { display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary, var(--primary))); }
.chart-count { flex-shrink: 0; text-align: right; line-height: 1.25; }
.chart-count strong { display: block; font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.chart-count span { display: block; font-size: 0.7rem; color: var(--text-muted); }
.chart-count em { display: block; font-size: 0.66rem; color: var(--text-dim); font-style: normal; }

.rawg-attribution { font-size: 0.72rem; color: var(--text-dim); margin-top: 18px; text-align: center; }
.rawg-attribution a { color: var(--text-muted); }

@media (max-width: 480px) {
  .chart-rank { width: 22px; font-size: 0.95rem; }
  .chart-poster { width: 38px; height: 57px; }
  .chart-count strong { font-size: 1rem; }
}
