/* ==========================================================================
   AMGLC MEDICAL CONGRESS QUIZ - PARTICIPANT STYLES
   Design: Refined Medical Conference Interface (Anti-UI-Slop & High Taste)
   Association des Médecins Généralistes Libéraux de Constantine (AMGLC)
   Centre Culturel Malek Haddad — Constantine 2026
   ========================================================================== */

:root {
  /* Surface & Base Colors */
  --bg-primary: #060b18;
  --bg-secondary: #0a1226;
  --bg-card: rgba(13, 22, 45, 0.82);
  --bg-card-subtle: rgba(18, 30, 60, 0.6);
  --bg-card-hover: rgba(22, 38, 76, 0.9);
  
  /* Hairline Borders & Glass Accents */
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-glass-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #38bdf8;
  
  /* Brand Medical Accents (Constantine Cyan & Clinical Palette) */
  --primary-cyan: #0284c7;
  --primary-cyan-light: #38bdf8;
  --primary-cyan-subtle: rgba(56, 189, 248, 0.12);
  --primary-cyan-glow: rgba(56, 189, 248, 0.28);
  
  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.14);
  
  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-amber-subtle: rgba(245, 158, 11, 0.14);
  
  --accent-rose: #f43f5e;
  --accent-rose-light: #fb7185;
  --accent-rose-subtle: rgba(244, 63, 94, 0.14);
  
  /* High-Contrast Typography */
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Tactile Shadows (Directional elevation, no artificial blurry neon halos) */
  --shadow-card: 0 16px 36px -8px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border-glass);
  --shadow-elevated: 0 20px 48px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-glass-strong);
  --shadow-button: 0 4px 14px -2px rgba(2, 132, 199, 0.45);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.12s ease-out;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 18% 12%, rgba(2, 132, 199, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 82% 88%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #060b18 0%, #0a1226 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular Numerals globally for time, ranks & scores */
.timer-text,
.user-score-chip,
.top3-pts,
.player-score,
.my-rank-val,
.verdict-points,
.stat-metric-val {
  font-variant-numeric: tabular-nums;
  feature-settings: "tnum" 1;
}

/* ==========================================================================
   Header & Sticky Top Bar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 11, 24, 0.88);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.35);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  background: #ffffff;
  padding: 2px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand-titles h1 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.brand-titles .subtitle {
  font-size: 0.72rem;
  color: var(--primary-cyan-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 25, 52, 0.75);
  border: 1px solid var(--border-glass-strong);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.user-pill .doc-icon {
  display: inline-flex;
  align-items: center;
  color: var(--primary-cyan-light);
}

.user-score-chip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--accent-amber-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  transition: var(--transition);
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.sound-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--border-glass-strong);
  transform: translateY(-1px);
}

.sound-toggle-btn:active {
  transform: scale(0.96);
}

.sound-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   Main Container & Glass Panel
   ========================================================================== */
.main-wrapper {
  flex: 1;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

/* Subtle hairline top light bar */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
}

/* ==========================================================================
   View 1: Registration View
   ========================================================================== */
#registration-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.35s ease-out;
}

.intro-hero {
  text-align: center;
  padding: 8px 0 4px;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-cyan-subtle);
  color: var(--primary-cyan-light);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.intro-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.intro-hero h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.28;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.intro-hero p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.48;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-field {
  width: 100%;
  background: rgba(8, 14, 30, 0.7);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.98rem;
  font-family: var(--font-body);
  color: #ffffff;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-field::placeholder {
  color: var(--text-subtle);
}

.input-field:focus {
  border-color: var(--primary-cyan-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.2);
  background: rgba(11, 20, 42, 0.85);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -2px rgba(2, 132, 199, 0.6);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* ==========================================================================
   View 2: Lobby View
   ========================================================================== */
#lobby-view {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.35s ease-out;
}

.lobby-pulse-circle {
  width: 84px;
  height: 84px;
  margin: 10px auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, transparent 70%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-cyan-light);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.15);
  position: relative;
}

.lobby-pulse-circle::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.3);
  animation: pulseLobbyRing 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes pulseLobbyRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.lobby-pulse-circle svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
}

.round-info-card {
  background: rgba(10, 18, 38, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
}

.round-info-card .round-tag {
  font-size: 0.74rem;
  color: var(--accent-amber-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.round-info-card .round-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.round-info-card .round-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.waiting-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.waiting-dots span {
  animation: blinkDots 1.4s infinite;
}
.waiting-dots span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ==========================================================================
   View 3: Question Active View
   ========================================================================== */
#question-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.3s ease-out;
}

.question-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.q-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.surprise-pill {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.4);
  animation: pulseSurprise 2s infinite;
}

/* Timer Ring Component */
.timer-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-box {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 48px;
  height: 48px;
}

.timer-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 4;
}

.timer-bar-circle {
  fill: none;
  stroke: var(--primary-cyan-light);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125.6; /* 2 * PI * 20 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear, stroke 0.3s;
}

.timer-text {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.timer-warning .timer-bar-circle { stroke: var(--accent-amber-light); }
.timer-danger .timer-bar-circle { stroke: var(--accent-rose); }
.timer-danger .timer-text { color: var(--accent-rose); animation: shake 0.3s infinite; }

.question-text-box {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.48;
  color: #ffffff;
  letter-spacing: -0.01em;
  background: rgba(8, 15, 32, 0.65);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Choices Grid & Interactive Option Cards (Anti-UI-Slop & Tactile Feedback)
   ========================================================================== */
.choices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.choice-btn {
  background: rgba(12, 22, 45, 0.72);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.25);
  min-height: 54px;
}

.choice-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.35);
}

.choice-btn:active:not(:disabled) {
  transform: scale(0.985);
  background: rgba(18, 32, 65, 0.95);
}

/* Letter Badges (A, B, C, D) */
.choice-letter {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  transition: var(--transition-fast);
}

/* Distinct Harmonic Accents for A, B, C, D */
.choice-btn[data-letter="A"] .choice-letter {
  background: rgba(2, 132, 199, 0.16);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.choice-btn[data-letter="B"] .choice-letter {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.choice-btn[data-letter="C"] .choice-letter {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.choice-btn[data-letter="D"] .choice-letter {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.35);
}

.choice-text {
  flex: 1;
  font-size: 0.96rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.42;
}

/* Selected State (Doctor tapped an option) */
.choice-btn.selected {
  background: rgba(2, 132, 199, 0.22);
  border-color: var(--primary-cyan-light);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4), 0 8px 20px -2px rgba(0, 0, 0, 0.4);
}

.choice-btn.selected[data-letter="A"] .choice-letter { background: #38bdf8; color: #060b18; border-color: #38bdf8; }
.choice-btn.selected[data-letter="B"] .choice-letter { background: #34d399; color: #060b18; border-color: #34d399; }
.choice-btn.selected[data-letter="C"] .choice-letter { background: #fbbf24; color: #060b18; border-color: #fbbf24; }
.choice-btn.selected[data-letter="D"] .choice-letter { background: #fb7185; color: #060b18; border-color: #fb7185; }

/* Revealed State: Correct Option */
.choice-btn.correct {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.45), 0 8px 24px -2px rgba(0, 0, 0, 0.4) !important;
}

.choice-btn.correct .choice-letter {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* Revealed State: Wrong Option */
.choice-btn.wrong {
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: #f43f5e !important;
  opacity: 0.75;
}

.choice-btn.wrong .choice-letter {
  background: #f43f5e !important;
  color: #ffffff !important;
  border-color: #f43f5e !important;
}

.choice-btn:disabled {
  cursor: default;
}

/* Post-submission waiting feedback */
.submitted-badge {
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submitted-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   Answer Reveal & Clinical Explanation Box
   ========================================================================== */
.answer-reveal-box {
  background: rgba(8, 14, 30, 0.85);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 8px;
  animation: fadeIn 0.35s ease-out;
}

.result-verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}

.verdict-tag {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verdict-tag.correct { color: #34d399; }
.verdict-tag.wrong { color: #fb7185; }

.verdict-points {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-amber-light);
}

.explanation-title {
  font-size: 0.82rem;
  color: var(--primary-cyan-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.explanation-title svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.explanation-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.52;
}

/* ==========================================================================
   View 4: Post-Question Waiting Room (Q1-Q7 Leaderboard & Q8-Q10 Suspense)
   ========================================================================== */
#question-wait-view {
  animation: fadeIn 0.35s ease-out;
}

.wait-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-amber-subtle);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-amber-light);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.wait-status-chip svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* My Personal Standing Hero Card */
.my-rank-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.18) 0%, rgba(10, 18, 38, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: center;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
}

.my-rank-label {
  font-size: 0.78rem;
  color: var(--primary-cyan-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.my-rank-val {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.my-rank-val span {
  color: var(--accent-amber-light);
}

.my-rank-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Top 3 Podium Cards */
.top3-podium-wrapper {
  background: rgba(8, 14, 30, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
}

.top3-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top3-title svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.top3-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.top3-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: rgba(14, 25, 50, 0.75);
  border: 1px solid var(--border-glass);
  transition: var(--transition-fast);
}

.top3-item.rank-1 {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(14, 25, 50, 0.85) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.15);
}

.top3-item.rank-2 {
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.14) 0%, rgba(14, 25, 50, 0.85) 100%);
  border-color: rgba(226, 232, 240, 0.35);
}

.top3-item.rank-3 {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.14) 0%, rgba(14, 25, 50, 0.85) 100%);
  border-color: rgba(217, 119, 6, 0.35);
}

.top3-item.is-me {
  border-color: var(--primary-cyan-light);
  box-shadow: 0 0 0 1px var(--primary-cyan-light);
}

.top3-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top3-medal-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
}

.top3-item.rank-1 .top3-medal-badge {
  background: #f59e0b;
  color: #060b18;
}

.top3-item.rank-2 .top3-medal-badge {
  background: #cbd5e1;
  color: #060b18;
}

.top3-item.rank-3 .top3-medal-badge {
  background: #d97706;
  color: #ffffff;
}

.top3-name {
  font-size: 0.94rem;
  font-weight: 600;
  color: #ffffff;
}

.top3-pts {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--accent-amber-light);
}

/* Waiting Pill Indicator */
.waiting-reveal-pill {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-full);
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 0.84rem;
  color: #e0f2fe;
  margin-top: 4px;
}

.pulse-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-cyan-light);
  box-shadow: 0 0 8px var(--primary-cyan-light);
  animation: pulseDot 1.4s infinite;
}

.pulse-mini-dot.warning {
  background: var(--accent-amber-light);
  box-shadow: 0 0 8px var(--accent-amber-light);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

/* ==========================================================================
   Suspense Screen (Q8, Q9, Q10 - Masked Leaderboard)
   ========================================================================== */
.suspense-icon-radar {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 10px auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.2) 0%, transparent 70%);
  border: 1.5px solid rgba(244, 63, 94, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rose-light);
}

.radar-ping {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(244, 63, 94, 0.4);
  animation: pingRadar 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingRadar {
  75%, 100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.suspense-big-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.suspense-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fb7185 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.suspense-headline {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.suspense-card {
  background: rgba(8, 14, 30, 0.75);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
  line-height: 1.55;
}

.suspense-p {
  font-size: 0.96rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.suspense-subtext {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ==========================================================================
   View 5: Leaderboards & Podiums
   ========================================================================== */
#leaderboard-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeIn 0.35s ease-out;
}

.leaderboard-header {
  text-align: center;
}

.leaderboard-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.leaderboard-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Round Winner Stage */
.trophy-stage {
  text-align: center;
  padding: 18px 0;
}

.trophy-icon {
  font-size: 3.2rem;
  animation: bounceTrophy 1.5s infinite;
  display: inline-block;
  filter: drop-shadow(0 4px 14px rgba(245, 158, 11, 0.5));
}

.winner-banner {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.winner-subtitle {
  font-size: 0.92rem;
  color: var(--accent-amber-light);
  font-weight: 600;
}

/* Top Players List */
.players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 22, 45, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 0.92rem;
  transition: var(--transition-fast);
}

.player-item.is-me {
  background: rgba(2, 132, 199, 0.18);
  border-color: var(--primary-cyan-light);
  font-weight: 700;
}

.player-item.rank-1 {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, rgba(12, 22, 45, 0.7) 100%);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-rank {
  font-family: var(--font-heading);
  font-weight: 800;
  width: 26px;
  text-align: center;
  color: var(--text-muted);
}

.player-item.rank-1 .player-rank { color: #fbbf24; font-size: 1.1rem; }
.player-item.rank-2 .player-rank { color: #cbd5e1; font-size: 1.05rem; }
.player-item.rank-3 .player-rank { color: #fb923c; font-size: 1.05rem; }

.player-name {
  color: #ffffff;
  font-weight: 600;
}

.player-score {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--accent-amber-light);
  font-size: 0.96rem;
}

/* Score Glow Animation */
.user-score-chip.score-glow {
  animation: glowScore 1.2s ease-out;
}

@keyframes glowScore {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); background: rgba(245, 158, 11, 0.4); color: #ffffff; box-shadow: 0 0 16px rgba(245, 158, 11, 0.8); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 18px 16px;
  font-size: 0.76rem;
  color: var(--text-subtle);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes blinkDots {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes pulseSurprise {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 10px rgba(244, 63, 94, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 4px 18px rgba(244, 63, 94, 0.65); }
}

@keyframes bounceTrophy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* ==========================================================================
   Accessibility & Responsive
   ========================================================================== */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-cyan-light) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25) !important;
}

.btn-primary,
.choice-btn,
.sound-toggle-btn {
  min-height: 48px;
}

@media (max-width: 420px) {
  .main-wrapper { padding: 12px 10px; }
  .glass-panel { padding: 18px 16px; }
  .choice-btn { padding: 13px 14px; gap: 12px; }
  .choice-letter { width: 34px; height: 34px; font-size: 0.92rem; }
  .choice-text { font-size: 0.92rem; }
  .intro-hero h2 { font-size: 1.35rem; }
}

/* ==========================================================================
   Bouton & Cartes d'Invitation à l'Évaluation du Congrès
   ========================================================================== */
.feedback-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
  min-height: 38px;
}
.feedback-link-btn:hover,
.feedback-link-btn:active {
  background: rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  color: #fef08a;
}

.feedback-invite-card {
  margin-top: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  text-align: center;
}
.feedback-invite-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.feedback-invite-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0 0 14px 0;
  line-height: 1.45;
}
.feedback-invite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #060b18;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
}
.feedback-invite-btn:hover,
.feedback-invite-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #fef08a, #fbbf24);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
