/* ==========================================================================
   Focus Guard 2.0 - Calm Digital Wellbeing Design System
   Aesthetic: Minimalist, glassmorphic dark theme with serene typography and fluid micro-transitions.
   ========================================================================== */

:root {
  --bg-base: #07090e;
  --bg-surface: rgba(17, 24, 39, 0.7);
  --bg-card: rgba(22, 30, 49, 0.55);
  --bg-card-hover: rgba(30, 41, 67, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(99, 102, 241, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --color-flow: #10b981;      /* Flow state / on track */
  --color-flow-bg: rgba(16, 185, 129, 0.12);
  --color-awareness: #f59e0b; /* Level 1 mild awareness */
  --color-awareness-bg: rgba(245, 158, 11, 0.12);
  --color-suggestion: #8b5cf6;/* Level 2 AI suggestion */
  --color-suggestion-bg: rgba(139, 92, 246, 0.14);
  --color-urgent: #ec4899;    /* Level 3 guided reset */
  --color-urgent-bg: rgba(236, 72, 153, 0.14);
  --color-danger: #f43f5e;    /* Level 4 restriction */
  --color-danger-bg: rgba(244, 63, 94, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-ambient: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow-flow: 0 0 35px -5px rgba(16, 185, 129, 0.25);
  --shadow-glow-drift: 0 0 35px -5px rgba(245, 158, 11, 0.25);
  --shadow-glow-urgent: 0 0 35px -5px rgba(244, 63, 94, 0.3);

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ==========================================================================
   NAVIGATION & HEADER
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #6366f1, #10b981);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.version-pill {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.25);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.header-status-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.telemetry-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-flow);
  box-shadow: 0 0 8px var(--color-flow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.dot-indicator.simulated {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.dot-indicator.drift {
  background: var(--color-awareness);
  box-shadow: 0 0 8px var(--color-awareness);
}

.dot-indicator.urgent {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
}

/* ==========================================================================
   INTERACTIVE DEMO DROPDOWN & SCENARIO CONTROLLER
   ========================================================================== */

.btn-demo-menu {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-demo-menu:hover {
  background: rgba(99, 102, 241, 0.22);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}

.btn-extension-menu {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-extension-menu:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}

.btn-extension-menu.disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.extension-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  transition: all 0.3s ease;
}

.extension-status-dot.inactive {
  background: #64748b;
  box-shadow: none;
}

@keyframes fgSlideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fgFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.fg-inpage-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483640;
  max-width: 680px;
  width: 92%;
  padding: 12px 20px;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid rgba(245, 158, 11, 0.6);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: fgSlideDown 0.35s ease;
}

.demo-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  padding: 8px;
  z-index: 100;
  animation: fgFadeIn 0.15s ease;
}

.demo-dropdown-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 6px 10px 8px;
}

.demo-dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.demo-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.demo-dropdown-item em {
  font-size: 11px;
  color: var(--text-muted);
  font-style: normal;
  margin-left: auto;
}

.demo-dropdown-item .step-num {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 2px 5px;
  color: #cbd5e1;
}

.demo-dropdown-item.highlight-freeze {
  color: #38bdf8;
  font-weight: 600;
}

.demo-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 6px 4px;
}

/* 2-Column Clean Studio Dashboard Layout */
.dashboard-studio-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .dashboard-studio-layout {
    grid-template-columns: 1fr;
  }
}

.studio-main-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.studio-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-header-compact {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
}

.card-eyebrow-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.14);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.input-select:focus {
  border-color: #6366f1;
}

.input-select option {
  background: #0f172a;
  color: #fff;
}

.form-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.duration-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.clean-features-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.clean-features-list li {
  line-height: 1.4;
}

.clean-features-list strong {
  color: #e2e8f0;
}

/* ==========================================================================
   MAIN LAYOUT & CARDS
   ========================================================================== */

.app-main {
  max-width: 1280px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Ambient Focus Hero Card */
.focus-hero-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.focus-hero-card.flow-glow {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: var(--shadow-ambient), var(--shadow-glow-flow);
}

.focus-hero-card.drift-glow {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow-ambient), var(--shadow-glow-drift);
}

.focus-hero-card.urgent-glow {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: var(--shadow-ambient), var(--shadow-glow-urgent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 840px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.intent-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.intent-headline {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.intent-subtext {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
}

/* Timer Ring */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.timer-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   METRICS & DRIFT DASHBOARD GRID
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}

.stat-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.stat-badge.good { background: var(--color-flow-bg); color: var(--color-flow); }
.stat-badge.info { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.stat-badge.warning { background: var(--color-awareness-bg); color: var(--color-awareness); }
.stat-badge.urgent { background: var(--color-danger-bg); color: var(--color-danger); }

/* Transparent Risk Score Breakdown Meter */
.risk-meter-container {
  margin-top: 0.75rem;
}

.risk-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.risk-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
}

.risk-breakdown-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   AI RECOMMENDATION & INTERVENTION CARD
   ========================================================================== */

.intervention-card {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.6), rgba(17, 24, 39, 0.75));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.15);
  animation: slideDown 0.3s ease;
}

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

.intervention-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.intervention-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.intervention-headline {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.intervention-message {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.intervention-rationale {
  font-size: 0.75rem;
  color: #a5b4fc;
  font-style: italic;
}

.intervention-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-action.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   GUIDED 3-MINUTE BREATH RESET MODAL / SCREEN
   ========================================================================== */

.breath-reset-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

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

.breath-circle-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 2.5rem 0;
  display: grid;
  place-items: center;
}

.breath-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8, #6366f1);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
  animation: breatheAnimation 8s infinite ease-in-out;
}

@keyframes breatheAnimation {
  0%, 100% {
    transform: scale(0.85);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
  }
  50% {
    transform: scale(1.35);
    box-shadow: 0 0 80px rgba(99, 102, 241, 0.7);
  }
}

.breath-instruction {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  min-height: 2rem;
}

.breath-timer {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   INTENT ONBOARDING MODAL / CARD
   ========================================================================== */

.category-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.category-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.category-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #fff;
}

.btn-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-chip:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
}

.input-text {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-text:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-start-focus {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-start-focus:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   PERSONAL INSIGHTS TAB
   ========================================================================== */

.insights-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.insight-item svg {
  color: #10b981;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ==========================================================================
   SYSTEM ARCHITECTURE & V1 COMPARISON STYLES
   ========================================================================== */

.loop-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.loop-step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.loop-step-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.loop-step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #a5b4fc;
  font-weight: 700;
}

.loop-step-card strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.loop-step-card p {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

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

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

.comparison-card.v1-side {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, rgba(22, 30, 49, 0.6) 100%);
}

.comparison-card.v2-side {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, rgba(22, 30, 49, 0.6) 100%);
}

.comparison-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.comparison-badge.v1 {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.comparison-badge.v2 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.comparison-mechanic {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
}

.v1-side .comparison-mechanic {
  border-left-color: #f87171;
}

.v2-side .comparison-mechanic {
  border-left-color: #10b981;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.comparison-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.cross-icon {
  color: #f87171;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.check-icon {
  color: #10b981;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.example-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

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

.example-box {
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
}

.example-box.v1 {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.example-box.v2 {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.example-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.4rem;
}

.example-text {
  color: var(--text-primary);
}

.example-text em {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .demo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   USER SPECIFICNESS & WHO'S WATCHING PRESENCE STYLES
   ========================================================================== */

.user-presence-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.user-presence-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.presence-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.72rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.presence-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.presence-user-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.presence-status-label {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 600;
}

.user-presence-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  background: #0b1120;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 20px rgba(99, 102, 241, 0.15);
  z-index: 1000;
  animation: fgFadeIn 0.2s ease;
  overflow: hidden;
}

.dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
}

.dropdown-user-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown-user-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-user-option.active {
  background: rgba(99, 102, 241, 0.12);
  border-left: 3px solid #6366f1;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.dropdown-user-option.active .avatar-sm {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
}

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

/* ==========================================================================
   1-MINUTE TAB FREEZE PUNISHMENT BANNER & MODAL
   ========================================================================== */

.freeze-punishment-banner {
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.85), rgba(15, 23, 42, 0.95));
  border: 2px solid rgba(56, 189, 248, 0.6);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 35px rgba(56, 189, 248, 0.25);
  animation: fgFadeIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

.freeze-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.freeze-banner-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.freeze-timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  min-width: 130px;
}

.freeze-timer-digits {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  line-height: 1;
}

.freeze-timer-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.guest-alert-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fde68a;
  font-size: 0.85rem;
}

/* Fullscreen Frozen Screen Simulation Overlay */
.frozen-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 30%, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.98) 70%);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fgFadeIn 0.3s ease;
  user-select: none;
}

.frozen-screen-card {
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid rgba(56, 189, 248, 0.7);
  border-radius: 28px;
  max-width: 540px;
  width: 100%;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(56, 189, 248, 0.35);
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}

/* Face Scanner Modal */
.face-scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fgFadeIn 0.25s ease;
}

.face-scanner-card {
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 28px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.webcam-viewport {
  position: relative;
  width: 100%;
  height: 240px;
  background: #020617;
  border-radius: 16px;
  overflow: hidden;
  margin: 16px 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.scanning-reticle {
  position: absolute;
  width: 140px;
  height: 160px;
  border: 2px dashed #38bdf8;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
  animation: fgPulse 2s infinite ease-in-out;
  display: grid;
  place-items: center;
}

@keyframes fgPulse {
  0%, 100% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 1; }
}

/* =============================================================================
   IDM-STYLE EXTENSION AUTO-INSTALLER MODAL & NOTIFICATION
   ============================================================================= */
.idm-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fgFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.idm-install-card {
  background: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  padding: 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(56, 189, 248, 0.2);
  color: #f8fafc;
  position: relative;
  overflow: hidden;
  animation: fgCardSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.idm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.idm-badge.connected {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.idm-step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  text-align: left;
}

.idm-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.idm-step-item.active {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.idm-step-item.done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.idm-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.idm-step-item.done .idm-step-icon {
  background: #10b981;
  color: #ffffff;
}

.idm-step-item.active .idm-step-icon {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.6);
}

.idm-btn-primary {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.idm-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.55);
}

.idm-btn-secondary {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.idm-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}


