/* ==========================================================================
   QUIZCRAFT: MASTER LIGHT-THEME DESIGN SYSTEM
   Derived directly from approved FigCraft artboards
   ========================================================================== */

:root, [data-surface="console"] {
  /* Surface & Canvas Tokens (Console: Light, Dense Dashboard) */
  --bg-canvas: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F1F5F9;
  --border-subtle: #E2E8F0;
  --border-focus: #C7D2FE;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08);

  /* Primary Brand Tokens */
  --brand-primary: #4F46E5;
  --brand-hover: #4338CA;
  --brand-light: #EEF2FF;
  --brand-border: #C7D2FE;

  /* Secondary Accent Tokens */
  --accent-gold: #F59E0B;
  --accent-gold-dark: #D97706;
  --accent-gold-light: #FFFBEB;
  --accent-gold-border: #FCD34D;

  /* Ink & Typography Tokens */
  --ink-primary: #0F172A;
  --ink-secondary: #475569;
  --ink-muted: #94A3B8;
  --ink-inverted: #FFFFFF;

  /* 4 Game Answer Colors (Accessible, High-Energy) */
  --ans-red: #EF4444;
  --ans-red-bg: #FEF2F2;
  --ans-red-border: #FCA5A5;

  --ans-blue: #3B82F6;
  --ans-blue-bg: #EFF6FF;
  --ans-blue-border: #93C5FD;

  --ans-yellow: #F59E0B;
  --ans-yellow-bg: #FFFBEB;
  --ans-yellow-border: #FCD34D;

  --ans-green: #10B981;
  --ans-green-bg: #ECFDF5;
  --ans-green-border: #6EE7B7;

  /* Feedback Tokens */
  --feedback-correct: #10B981;
  --feedback-wrong: #F43F5E;

  /* 8-Point Spatial Grid */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* STAGE SURFACE (Dark, Projector-First, Spotlight Gradients, Huge Type) */
[data-surface="stage"] {
  --bg-canvas: #0B0F19;
  --bg-surface: #111827;
  --bg-surface-subtle: #1F2937;
  --border-subtle: #374151;
  --border-focus: #6366F1;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px -4px rgba(0, 0, 0, 0.7);

  --brand-primary: #6366F1;
  --brand-hover: #818CF8;
  --brand-light: rgba(99, 102, 241, 0.18);
  --brand-border: #4F46E5;

  --accent-gold: #FBBF24;
  --accent-gold-dark: #F59E0B;
  --accent-gold-light: rgba(245, 158, 11, 0.18);
  --accent-gold-border: #D97706;

  --ink-primary: #F9FAFB;
  --ink-secondary: #D1D5DB;
  --ink-muted: #9CA3AF;
  --ink-inverted: #0B0F19;

  --ans-red-bg: rgba(239, 68, 68, 0.15);
  --ans-blue-bg: rgba(59, 130, 246, 0.15);
  --ans-yellow-bg: rgba(245, 158, 11, 0.15);
  --ans-green-bg: rgba(16, 185, 129, 0.15);
}

/* System prefers-color-scheme fallback when data-surface is not explicitly set */
@media (prefers-color-scheme: dark) {
  :root:not([data-surface="console"]) {
    --bg-canvas: #0B0F19;
    --bg-surface: #111827;
    --bg-surface-subtle: #1F2937;
    --border-subtle: #374151;
    --border-focus: #6366F1;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px -4px rgba(0, 0, 0, 0.7);

    --brand-primary: #6366F1;
    --brand-hover: #818CF8;
    --brand-light: rgba(99, 102, 241, 0.18);
    --brand-border: #4F46E5;

    --ink-primary: #F9FAFB;
    --ink-secondary: #D1D5DB;
    --ink-muted: #9CA3AF;
    --ink-inverted: #0B0F19;
  }
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Stage Surface Spotlight Gradients */
[data-surface="stage"] body,
body[data-surface="stage"],
.surface-stage {
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.09), transparent 45%),
    radial-gradient(circle at 15% 75%, rgba(16, 185, 129, 0.08), transparent 45%);
}

/* App Container */
#app {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

/* Header Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
}

.brand-badge .icon {
  font-size: 1.35rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Host Authentication Profile Pill in Top Nav */
.nav-host-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-light);
  border: 1.5px solid var(--brand-border);
  padding: 4px 12px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.15);
}

.host-avatar-badge {
  font-size: 1.15rem;
  line-height: 1;
}

.host-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.host-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-primary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-role-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-primary);
  letter-spacing: 0.05em;
}

.btn-nav-logout-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-nav-logout-pill:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
}

/* Hero Host Welcome Banner */
.hero-host-active-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 820px;
  margin: 16px auto 24px auto;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(16, 185, 129, 0.12));
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.12);
}

.hero-host-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.hero-host-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.hero-host-greeting {
  font-size: 1.05rem;
  color: var(--ink-primary);
}

.hero-host-sub {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.hero-host-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Primary Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--ink-inverted);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1.5px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--brand-border);
}

.btn-gold {
  background: var(--accent-gold);
  color: var(--ink-inverted);
}

.btn-gold:hover {
  background: var(--accent-gold-dark);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

/* View Containers */
.view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   VIEW: HOME / SELECTOR
   ========================================================================== */
.home-hero {
  text-align: center;
  max-width: 800px;
  margin: var(--space-8) auto;
}

.home-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.home-hero h1 span {
  color: var(--brand-primary);
}

.home-hero p {
  font-size: 1.25rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-8);
}

.role-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  max-width: 900px;
  margin: 0 auto;
}

.role-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
}

.role-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.role-card .avatar-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

.role-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.role-card p {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-6);
}

/* ==========================================================================
   VIEW: HOST WAITING LOBBY
   ========================================================================== */
.lobby-pin-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-6);
}

.lobby-instructions h3 {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.lobby-instructions .join-url {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--ink-primary);
  margin-bottom: var(--space-2);
}

.lobby-instructions .pin-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.pin-display-box {
  background: var(--brand-light);
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-8);
  text-align: center;
}

.pin-display-box .pin-number {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--brand-hover);
  font-family: monospace, sans-serif;
  line-height: 1;
}

.players-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.players-section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.player-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.player-chip {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.player-chip .p-avatar {
  font-size: 1.5rem;
}

.player-chip .p-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   VIEW: LIVE QUESTION SCREEN (PROJECTOR & HOST)
   ========================================================================== */
.question-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  background: var(--bg-surface);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.timer-pill {
  background: var(--accent-gold-light);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-6);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-gold-dark);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.question-prompt-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-bottom: var(--space-6);
}

.question-prompt-card h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.3;
}

.options-2x2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.option-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  box-shadow: var(--shadow-sm);
  border-width: 2px;
  border-style: solid;
  transition: all 0.2s ease;
}

.opt-a { border-color: var(--ans-red-border); }
.opt-b { border-color: var(--ans-blue-border); }
.opt-c { border-color: var(--ans-yellow-border); }
.opt-d { border-color: var(--ans-green-border); }

.opt-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #FFFFFF;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.opt-a .opt-badge { background: var(--ans-red); }
.opt-b .opt-badge { background: var(--ans-blue); }
.opt-c .opt-badge { background: var(--ans-yellow); }
.opt-d .opt-badge { background: var(--ans-green); }

.opt-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.3;
}

/* ==========================================================================
   VIEW: PLAYER MOBILE INTERFACE
   ========================================================================== */
.player-mobile-wrap {
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.player-mobile-answers-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.mobile-answer-btn {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 76px;
  width: 100%;
  border-width: 2px;
  border-style: solid;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.mobile-answer-btn:active {
  transform: scale(0.98);
}

.mobile-answer-btn.selected {
  background: var(--brand-light);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px var(--brand-primary);
}

.mobile-answer-btn .btn-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-primary);
}

/* ==========================================================================
   VIEW: LEADERBOARD PODIUM
   ========================================================================== */
.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-6);
  margin: var(--space-8) 0;
  min-height: 380px;
}

.podium-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-width: 2px;
  border-style: solid;
  box-shadow: var(--shadow-md);
  width: 280px;
  transition: all 0.3s ease;
}

.podium-card.first {
  height: 380px;
  border-color: var(--accent-gold);
  border-width: 3px;
  box-shadow: 0 16px 36px -4px rgba(245, 158, 11, 0.25);
  order: 2;
}

.podium-card.second {
  height: 320px;
  border-color: #CBD5E1;
  order: 1;
}

.podium-card.third {
  height: 280px;
  border-color: #E2E8F0;
  order: 3;
}

.podium-card .medal {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
}

.podium-card.first .medal { color: var(--accent-gold-dark); }
.podium-card.second .medal { color: #64748B; }
.podium-card.third .medal { color: #B45309; }

.podium-card .avatar {
  font-size: 3.5rem;
  margin-bottom: var(--space-2);
}

.podium-card .player-name {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.podium-card .score {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-primary);
}

/* Runner Up Table */
.runners-up-table {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.runner-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.runner-row .left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-weight: 700;
}

.runner-row .rank {
  color: var(--ink-muted);
  width: 32px;
}

.runner-row .score {
  font-weight: 800;
  color: var(--brand-primary);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .options-2x2-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .podium-container {
    flex-direction: column;
    align-items: center;
    min-height: auto;
  }
  .podium-card {
    width: 100%;
    height: auto !important;
  }
  .home-hero h1 {
    font-size: 2.25rem;
  }
  .pin-display-box .pin-number {
    font-size: 2.75rem;
  }
}

/* Streak Flame Badge & Animations */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: #FEF3C7;
  color: #B45309;
  border: 1.5px solid #FCD34D;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1rem;
  margin-top: 14px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
  animation: pulse-streak 1.8s infinite ease-in-out;
}

.streak-badge .flame {
  font-size: 1.3rem;
  display: inline-block;
  animation: flicker 0.6s infinite alternate ease-in-out;
}

@keyframes pulse-streak {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes flicker {
  0% { transform: rotate(-5deg) scale(0.95); }
  100% { transform: rotate(5deg) scale(1.05); }
}

/* Modal Overlay & Quiz Creator Form */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
  animation: fadeIn 0.15s ease-out;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border-subtle);
  padding: var(--space-8);
}

.form-group {
  margin-bottom: var(--space-5);
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: inherit;
  background: var(--bg-surface);
  color: var(--ink-primary);
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.question-builder-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  position: relative;
  text-align: left;
}

.options-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.option-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 10px;
}

.option-input-wrap input[type="text"] {
  border: none;
  outline: none;
  width: 100%;
  padding: 8px 4px;
  font-size: 0.95rem;
  font-family: inherit;
  background: transparent;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   STATE-OF-THE-ART LANDING PAGE STYLES
   ========================================================================== */

/* Top Navigation Enhancements */
.brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--brand-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--brand-primary);
}

.nav-quick-join {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 4px 3px 12px;
}

.nav-quick-join input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  width: 90px;
  color: var(--ink-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
}

/* Landing Container */
.landing-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
}

/* Hero Section */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.pill-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

.hero-subheadline {
  font-size: 1.25rem;
  color: var(--ink-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Hero Cards Customization (Pixel-Perfect Symmetrical Anatomy) */
.role-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--space-8);
  max-width: 960px;
  margin: 0 auto;
}

.player-hero-card,
.host-hero-card {
  position: relative;
  background: #FFFFFF;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  min-height: 470px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  transition: all 0.25s ease;
}

.player-hero-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -4px rgba(79, 70, 229, 0.14);
}

.host-hero-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -4px rgba(245, 158, 11, 0.16);
}

.role-card-badge {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.role-card-badge.player-badge {
  background: #EEF2FF;
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
}

.role-card-badge.host-badge {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid var(--accent-gold-border);
}

/* 68px Symmetrical Circle Bubbles */
.card-icon-bubble {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 16px auto;
  transition: transform 0.2s ease;
}

.role-card:hover .card-icon-bubble {
  transform: scale(1.08);
}

.card-icon-bubble.player-bubble {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 2px solid var(--brand-border);
}

.card-icon-bubble.host-bubble {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 2px solid var(--accent-gold-border);
}

.role-card h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin-bottom: 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Symmetrical Action Box */
.sym-action-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
}

.sym-input-wrap {
  width: 100%;
}

.sym-pin-input {
  width: 100%;
  height: 54px;
  box-sizing: border-box;
  padding: 0 16px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--bg-surface-subtle);
  color: var(--ink-primary);
  transition: all 0.2s ease;
}

.sym-pin-input:focus {
  border-color: var(--brand-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.sym-host-status {
  width: 100%;
  height: 54px;
  box-sizing: border-box;
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  border: 2px solid var(--accent-gold-border);
  border-radius: var(--radius-md);
  background: #FFFBEB;
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-block {
  width: 100%;
}

.btn-sym-action {
  height: 52px;
  box-sizing: border-box;
  padding: 0 20px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-gold-gradient {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-gold-gradient:hover {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

/* Symmetrical Bottom Trust List */
.sym-trust-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-item .check-icon {
  color: #10B981;
  font-weight: 800;
  font-size: 1rem;
}
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-align: left;
  margin-top: 6px;
}

/* 2. Interactive Demo Widget */
.demo-section {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.demo-card {
  background: #FFFFFF;
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: 0 16px 40px -8px rgba(79, 70, 229, 0.1);
  position: relative;
  overflow: hidden;
}

.demo-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  background: var(--brand-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
}

.pulse-live {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

.demo-header h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.demo-header p {
  color: var(--ink-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-6);
}

.demo-quiz-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.demo-question-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.demo-q-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-primary);
  background: var(--brand-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.demo-q-text {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink-primary);
  flex: 1;
}

.demo-timer {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.demo-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.demo-option-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.demo-option-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.opt-red { background: var(--ans-red); }
.opt-blue { background: var(--ans-blue); }
.opt-yellow { background: var(--ans-yellow); }
.opt-green { background: var(--ans-green); }

.opt-shape {
  font-size: 1.25rem;
  opacity: 0.85;
}

.demo-option-btn.demo-correct {
  outline: 4px solid #10B981;
  animation: pulse 0.5s ease;
}

.demo-option-btn.demo-wrong {
  opacity: 0.5;
  filter: grayscale(0.5);
}

.demo-option-btn.demo-highlight {
  outline: 4px solid #10B981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.demo-feedback-banner {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  animation: fadeIn 0.25s ease;
}

.demo-feedback-banner.success {
  background: #ECFDF5;
  border: 1.5px solid #6EE7B7;
}

.demo-feedback-banner.error {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
}

/* 3. Metrics Strip */
.metrics-strip {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  box-shadow: var(--shadow-sm);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.metric-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* 4. Features Section */
.section-heading {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-8) auto;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}

.section-heading h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.section-heading p {
  font-size: 1.1rem;
  color: var(--ink-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* 5. Steps Section */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--brand-border);
  line-height: 1;
  margin-bottom: var(--space-3);
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

/* 6. Question Banks */
.banks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  max-width: 1050px;
  margin: 0 auto;
}

.bank-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bank-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.bank-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--brand-light);
  color: var(--brand-primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-3);
  align-self: flex-start;
}

.bank-badge.gold {
  background: var(--accent-gold-light);
  color: var(--accent-gold-dark);
}

.bank-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.bank-card p {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.bank-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

/* Category Filter Tabs */
.library-filter-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.filter-tab-btn {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

.filter-tab-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-light);
}

.filter-tab-btn.active {
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

/* Quick Card Actions */
.bank-card-actions {
  display: flex;
  gap: 8px;
  margin-top: var(--space-2);
  align-items: center;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-host {
  flex: 1.3;
}

.btn-quick-edit {
  flex: 1;
}


/* 7. Comparison Section */
.table-responsive {
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: auto;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.comparison-table th {
  background: var(--bg-surface-subtle);
  font-weight: 800;
  color: var(--ink-primary);
}

.comparison-table th.col-highlight,
.comparison-table td.col-highlight {
  background: var(--brand-light);
  color: var(--brand-primary);
  font-weight: 700;
}

.check-yes {
  color: #059669;
  font-weight: 800;
}

.check-no {
  color: #DC2626;
  font-weight: 700;
}

.check-warn {
  color: #D97706;
  font-weight: 700;
}

/* 8. Call to Action Banner */
.cta-banner {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #312E81 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.4);
}

.cta-inner h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: var(--space-3);
}

.cta-inner p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-6) auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* 9. Landing Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-8);
  margin-top: var(--space-8);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
}

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .home-hero h1 {
    font-size: 2.2rem;
  }

  .demo-options-grid {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
  }

  .metric-divider {
    width: 60%;
    height: 1px;
  }

  .quick-pin-box {
    flex-direction: column;
  }
}

/* Host Portal Multi-Host Privacy & Category Tabs */
.privacy-notice-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #166534;
  line-height: 1.5;
}

.privacy-notice-strip .privacy-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.author-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.author-tab-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-tab-btn:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
  border-color: var(--brand-border);
}

.author-tab-btn.active {
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.author-tab-btn.active.tab-private {
  background: #10B981;
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.author-tab-btn.active.tab-reports {
  background: #D97706;
  border-color: #B45309;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.author-tab-btn .tab-count {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.author-tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Past Sessions & Reports History */
.past-sessions-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-history-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.session-history-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.session-card-info h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.session-card-meta {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.session-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.session-pin-badge {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 800;
  background: var(--brand-light);
  color: var(--brand-primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.session-winner-badge {
  font-weight: 700;
  color: #065F46;
  background: #D1FAE5;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* Hero Category Fast-Pills */
.hero-category-pills {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cat-pill {
  background: #FFFBEB;
  border: 1px solid var(--accent-gold-border);
  color: #B45309;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-cat-pill:hover {
  background: #FEF3C7;
  border-color: #D97706;
  transform: translateY(-1px);
}

/* Quiz Preview Modal (Kahoot-Style Interactive Question Inspection) */
.modal-preview-content {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 820px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-preview-header {
  padding: 24px 28px 18px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-surface-subtle);
}

.modal-preview-body {
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preview-question-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}

.preview-q-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.preview-q-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-primary);
  background: var(--brand-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.preview-q-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.preview-q-text {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.45;
  margin-bottom: 14px;
}

.preview-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.preview-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
  font-size: 0.92rem;
}

.preview-option-item.is-correct {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
  font-weight: 700;
}

.preview-opt-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: #E2E8F0;
  color: var(--ink-primary);
  flex-shrink: 0;
}

.preview-option-item.is-correct .preview-opt-badge {
  background: #10B981;
  color: #FFFFFF;
}

.preview-explanation {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  background: #F8FAFC;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand-primary);
}

.modal-preview-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border-subtle);
  background: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Authentication Modals & Quick Demo Login Chips */
.auth-modal-content {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 92%;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
}

.demo-login-box {
  background: #F8FAFC;
  border: 1.5px dashed var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 22px;
}

.demo-login-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-account-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-chip-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-chip-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateX(3px);
}

.demo-chip-role {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.nav-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   KNOWLEDGE GAP REPORT & HEATMAP SYSTEM
   ========================================================================== */

.report-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 24px;
}

.report-title-area h1 {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--ink-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.report-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.report-meta-chip {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

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

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.report-stat-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.report-stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.report-stat-value {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.report-stat-desc {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.report-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reteach-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.reteach-card {
  background: #FFF1F2;
  border: 1.5px solid #FECDD3;
  border-left: 6px solid var(--feedback-wrong);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
}

.reteach-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.reteach-badge {
  background: var(--feedback-wrong);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.reteach-question-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.reteach-insight {
  font-size: 0.9rem;
  color: #881337;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

/* Heatmap Pure CSS Grid */
.heatmap-wrapper {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.heatmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
}

.heatmap-table th {
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-secondary);
  text-align: center;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.heatmap-table th.question-col-header {
  text-align: left;
  max-width: 320px;
  min-width: 200px;
}

.heatmap-table td {
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease;
}

.heatmap-table td.q-label {
  text-align: left;
  font-weight: 700;
  color: var(--ink-primary);
  background: transparent;
  font-size: 0.88rem;
  white-space: normal;
  max-width: 320px;
}

.heatmap-cell-correct {
  background: #DCFCE7 !important;
  color: #166534 !important;
  border: 1px solid #86EFAC;
}

.heatmap-cell-wrong {
  background: #FFE4E6 !important;
  color: #9F1239 !important;
  border: 1px solid #FDA4AF;
}

.heatmap-cell-empty {
  background: #F1F5F9 !important;
  color: #94A3B8 !important;
  border: 1px dashed #CBD5E1;
}

.heatmap-cell:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-sm);
  z-index: 2;
  position: relative;
}

/* Distribution Bars */
.dist-bar-container {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  font-size: 0.8rem;
}

.dist-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

/* Print Stylesheet for 1-Page / PDF Saving */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .nav-header,
  .report-actions,
  #btn-rematch,
  #btn-export-csv,
  button,
  .btn {
    display: none !important;
  }

  .report-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .report-stat-card,
  .heatmap-wrapper,
  .reteach-card {
    box-shadow: none !important;
    border: 1px solid #CCCCCC !important;
    page-break-inside: avoid;
  }

  .heatmap-wrapper {
    overflow: visible !important;
  }
}

/* ==========================================================================
   MIXED-FORMAT DECKS: WORD CLOUD, SLIDER, ORDER, & OPEN ENDED
   ========================================================================== */

/* Pure-CSS Word Cloud */
.wordcloud-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: center;
  align-items: center;
  padding: 36px 24px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  min-height: 280px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

.wordcloud-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  user-select: none;
}

.wordcloud-item:hover {
  transform: scale(1.18);
}

.wordcloud-count {
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: 700;
}

/* Slider Component */
.slider-container {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.slider-val-readout {
  font-size: 3rem;
  font-weight: 900;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
  margin: 12px 0;
}

.slider-input-range {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  outline: none;
  cursor: pointer;
  accent-color: var(--brand-primary);
}

.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* Order Sequence Component */
.order-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.order-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.15s ease;
}

.order-item-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.order-btn-group {
  display: flex;
  gap: 6px;
}

.order-arrow-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.order-arrow-btn:hover:not(:disabled) {
  background: var(--brand-light);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.order-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Open Responses Grid */
.open-responses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.open-response-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.open-card-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.open-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

/* Live results bar */
.live-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.live-bar-label {
  width: 140px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-bar-fill-track {
  flex: 1;
  height: 16px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.live-bar-fill-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* =============================================================================
   PHASE 4: TEAM MODE STYLES
   ============================================================================= */

/* Team Rosters in Host Lobby */
.team-lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.team-roster-column {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.team-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-subtle);
}

.team-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: #FFFFFF;
}

.team-player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

.team-player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Team Race Track on Host Leaderboard (CSS Transforms Only) */
.race-track-container {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.race-track-lane {
  position: relative;
  height: 48px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.race-track-lane:last-child {
  margin-bottom: 0;
}

.race-track-finish-line {
  position: absolute;
  right: 18px;
  top: 0;
  bottom: 0;
  width: 12px;
  background: repeating-linear-gradient(45deg, #000, #000 6px, #FFF 6px, #FFF 12px);
  opacity: 0.25;
  border-radius: 2px;
}

.race-car-runner {
  position: absolute;
  left: 8px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

/* Team Podium on Final Screen */
.team-podium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: flex-end;
  max-width: 800px;
  margin: 32px auto;
}

.team-podium-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 3px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease;
}

.team-podium-card.rank-1 {
  order: 2;
  border-color: #F59E0B;
  transform: translateY(-20px);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, var(--bg-surface) 100%);
}

.team-podium-card.rank-2 {
  order: 1;
  border-color: #94A3B8;
}

.team-podium-card.rank-3 {
  order: 3;
  border-color: #B45309;
}

.team-mvp-card {
  max-width: 500px;
  margin: 24px auto;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   PHASE 5: ASYNC SELF-PACED ASSIGNMENT STYLES
   ========================================================================== */
.assignment-screen-container {
  max-width: 640px;
  margin: 40px auto;
  padding: 32px 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease;
}

.assignment-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  background: #EEF2FF;
  color: var(--brand-primary);
  margin-bottom: 14px;
}

.assignment-meta-box {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
}

.assignment-meta-item strong {
  color: var(--ink-primary);
}

.assignment-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 800;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
  border: 1px solid #BFDBFE;
}

.assignment-feedback-banner {
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 24px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.assignment-feedback-banner.correct {
  background: #ECFDF5;
  border: 2px solid #10B981;
  color: #065F46;
}

.assignment-feedback-banner.wrong {
  background: #FEF2F2;
  border: 2px solid #EF4444;
  color: #991B1B;
}

.assignment-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 12px;
}

.assignment-results-table th,
.assignment-results-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.assignment-results-table th {
  background: var(--bg-surface-subtle);
  font-weight: 800;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.assignment-results-table tr:hover td {
  background: var(--bg-surface-subtle);
}

/* ==========================================================================
   PHASE 5: BRAND MOTIF & DESIGN OVERHAUL
   ========================================================================== */

/* 1. Brand Logo Mark (4 Answer Shapes) */
.brand-logo-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 12px);
  gap: 3px;
  font-size: 11px;
  line-height: 1;
  vertical-align: middle;
  margin-right: 6px;
}
.shape-logo-tri { color: var(--ans-red); }
.shape-logo-dia { color: var(--ans-blue); }
.shape-logo-cir { color: var(--ans-yellow); }
.shape-logo-sqr { color: var(--ans-green); }

/* Brand Shape Colors */
.shape-tri { color: var(--ans-red); }
.shape-dia { color: var(--ans-blue); }
.shape-cir { color: var(--ans-yellow); }
.shape-sqr { color: var(--ans-green); }

/* 2. Brand Section Divider */
.brand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px 0;
  font-size: 14px;
}
.brand-divider::before,
.brand-divider::after {
  content: "";
  flex: 1;
  max-width: 140px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

/* 3. Brand Shape Loader */
.brand-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
}
.brand-loader-shapes {
  display: flex;
  gap: 12px;
  font-size: 24px;
}
.load-shape {
  display: inline-block;
  animation: pulse-shape 1.2s infinite ease-in-out;
}
.load-tri { color: var(--ans-red); animation-delay: 0s; }
.load-dia { color: var(--ans-blue); animation-delay: 0.15s; }
.load-cir { color: var(--ans-yellow); animation-delay: 0.3s; }
.load-sqr { color: var(--ans-green); animation-delay: 0.45s; }

@keyframes pulse-shape {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.35) translateY(-5px); opacity: 1; }
}

/* 4. Touch Target & Accessibility Standards (Minimum 44px) */
.btn, .nav-link, .filter-tab-btn, .demo-option-btn, .demo-chip-btn, .mobile-drawer-link {
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
}

.btn-icon-sm {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

/* 5. Mobile Navigation & Drawer */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink-primary);
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  margin-top: 8px;
  z-index: 999;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--ink-primary);
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.mobile-drawer-link:hover {
  background: var(--bg-surface-subtle);
}

.mobile-drawer-hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 8px 0;
}

@media (max-width: 768px) {
  .top-nav {
    position: relative;
    padding: var(--space-3) var(--space-4);
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: inline-flex !important;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
}

/* 6. Hero Actions Bar */
.hero-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-actions-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 680px;
  margin: 28px auto;
}

.hero-pin-bar {
  display: flex;
  width: 100%;
  background: var(--bg-surface);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.18);
  padding: 6px;
  gap: 8px;
}

.hero-pin-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 20px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: 0.05em;
  min-width: 0;
}

.hero-pin-input::placeholder {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 1rem;
}

.btn-hero-join {
  min-height: 48px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-lg);
  white-space: nowrap;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 7. HERO VISUAL: Projector Screen + Mobile Phone Simulation */
.hero-visual-stage {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1080px;
  margin: 36px auto 0 auto;
  align-items: center;
}

/* Projector Screen Frame (Stage Dark Surface) */
.mockup-projector {
  background: #0B0F19;
  border: 2px solid #374151;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
  padding: 24px;
  color: #F9FAFB;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.mockup-projector::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 120px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.3), transparent 70%);
  pointer-events: none;
}

.projector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #1F2937;
  font-size: 0.8rem;
  font-weight: 800;
}

.proj-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proj-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

.proj-badge {
  color: #9CA3AF;
  letter-spacing: 0.05em;
}

.proj-pin {
  background: #1F2937;
  color: #A5B4FC;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
}

.projector-question {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 18px 0;
  color: #FFFFFF;
}

.projector-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proj-opt {
  display: grid;
  grid-template-columns: 24px 1.4fr 1fr 40px;
  align-items: center;
  gap: 10px;
  background: #111827;
  border: 1px solid #1F2937;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
}

.proj-opt.proj-highlight-correct {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.12);
}

.proj-bar-mini-track {
  height: 8px;
  background: #1F2937;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.proj-bar-mini {
  height: 100%;
  background: #4F46E5;
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.proj-opt.proj-highlight-correct .proj-bar-mini {
  background: #3B82F6;
}

.proj-pct {
  text-align: right;
  font-size: 0.8rem;
  color: #9CA3AF;
}

.projector-lift-banner {
  margin-top: 18px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #059669;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #6EE7B7;
}

.lift-badge {
  background: #047857;
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 900;
}

/* Phone Frame Mockup (Mobile View with Confidence Toggle) */
.mockup-phone {
  background: #FFFFFF;
  border: 6px solid #1E293B;
  border-radius: 36px;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.25);
  padding: 18px 14px;
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

.phone-speaker {
  width: 50px;
  height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
  margin: 0 auto 14px auto;
}

.phone-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.phone-conf-module {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 14px;
  text-align: left;
}

.phone-conf-heading {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.phone-conf-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #E2E8F0;
  padding: 3px;
  border-radius: var(--radius-sm);
}

.mock-conf-btn {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 2px;
  border-radius: 6px;
  text-align: center;
  color: var(--ink-secondary);
}

.mock-conf-btn.active {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.phone-pad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.phone-pad-btn {
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.5rem;
  transition: transform 0.15s;
}

.phone-pad-btn.pad-red { background: var(--ans-red); }
.phone-pad-btn.pad-blue { background: var(--ans-blue); }
.phone-pad-btn.pad-yellow { background: var(--ans-yellow); }
.phone-pad-btn.pad-green { background: var(--ans-green); }

.phone-pad-btn.pad-tapped {
  box-shadow: 0 0 0 4px #FFFFFF, 0 0 0 7px var(--ans-blue);
  transform: scale(0.96);
}

.phone-feedback-chip {
  background: #ECFDF5;
  border: 1px solid #10B981;
  color: #065F46;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  text-align: center;
}

@media (max-width: 900px) {
  .hero-visual-stage {
    grid-template-columns: 1fr;
    max-width: 540px;
  }
}

/* 8. Stage Surface Typography & Host View Standards */
[data-surface="stage"] .question-text,
.surface-stage .question-text,
.host-question-text {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 9. Countdown Ring */
.countdown-ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.countdown-ring-svg {
  transform: rotate(-90deg);
}
.ring-bg {
  stroke: var(--border-subtle);
}
.ring-progress {
  stroke: var(--brand-primary);
  transition: stroke-dashoffset 0.8s linear;
}
.ring-sec {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--brand-primary);
}

/* 10. Prefers Reduced Motion Fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .load-shape {
    animation: none !important;
    opacity: 1 !important;
  }
}
