/* ========================================
   AI Land – Global Styles
   ======================================== */
:root {
  --bg: #0a0a1a;
  --surface: #12122a;
  --surface2: #1a1a3a;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0ff;
  --text-muted: #8888bb;
  --primary: #6366f1;
  --primary-glow: rgba(99,102,241,0.35);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ========== SCREENS ========== */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ========================================
   LOGIN SCREEN
   ======================================== */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 30% 50%, #1a0a3a 0%, #0a0a1a 60%);
  position: relative;
  overflow: hidden;
}

.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.login-card { overflow:hidden;
  background: var(--surface);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 80px rgba(99,102,241,0.15), var(--shadow);
  position: relative;
  z-index: 1;
}

.login-logo {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(99,102,241,0.8));
  animation: float 3s ease-in-out infinite;
}

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

.login-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #6366f1, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.login-path-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 8px;
}

.step-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.step-line {
  flex: 1;
  max-width: 40px;
  height: 3px;
  background: linear-gradient(90deg, rgba(99,102,241,0.6), rgba(99,102,241,0.2));
  border-radius: 2px;
}

.login-steps-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.login-form label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.input-row input {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

.input-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

.login-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99,102,241,0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-lg { padding: 15px 32px; font-size: 16px; border-radius: var(--radius); width: 100%; margin-top: 16px; }
.btn-primary.btn-success { background: linear-gradient(135deg, #059669, #10b981); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--text); }
.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back:hover { border-color: var(--primary); color: var(--text); background: rgba(99,102,241,0.1); }

/* ========================================
   HEADER
   ======================================== */
.app-header {
  background: rgba(10,10,26,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-logo { font-size: 24px; }
.header-title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user { font-size: 13px; color: var(--text-muted); }

/* ========================================
   PATH SCREEN
   ======================================== */
.path-main {
  flex: 1;
  padding: 40px 24px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}
.path-intro { text-align: center; margin-bottom: 48px; }
.path-intro h2 { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.path-intro p { color: var(--text-muted); font-size: 16px; }

.path-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connector line */
.path-container::before {
  content: '';
  position: absolute;
  left: 50px;
  top: 50px;
  bottom: 50px;
  width: 3px;
  background: linear-gradient(to bottom, #6366f1, #8b5cf6, #10b981, #f59e0b, #ef4444);
  border-radius: 2px;
  opacity: 0.3;
}

/* Stage card on path */
.path-stage {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  position: relative;
  cursor: pointer;
}

.path-stage-node {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  border: 3px solid transparent;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 0 transparent;
}

.path-stage-node .stage-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 4px;
}

.path-stage:hover .path-stage-node {
  transform: scale(1.08);
  box-shadow: 0 0 30px var(--stage-color, rgba(99,102,241,0.5));
}

.path-stage-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  margin-top: 12px;
}

.path-stage:hover .path-stage-card {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.path-stage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--stage-color, var(--primary));
}

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

.stage-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.stage-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-locked { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.badge-available { background: rgba(99,102,241,0.15); color: #a78bfa; }
.badge-viewed { background: rgba(16,185,129,0.1); color: #6ee7b7; }
.badge-passed { background: rgba(16,185,129,0.2); color: #10b981; }
.badge-failed { background: rgba(239,68,68,0.1); color: #fca5a5; }

.stage-card-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.stage-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.stage-score-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}
.stage-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.stage-cta {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stage-cta::after { content: '→'; }

/* Path stats */
.path-stats {
  display: flex;
  gap: 16px;
  margin-top: 48px;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ========================================
   STAGE SCREEN
   ======================================== */
.stage-main { flex: 1; display: flex; flex-direction: column; max-width: 960px; margin: 0 auto; width: 100%; padding: 0 0 40px; }

.stage-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 24px;
  gap: 4px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.panel { display: none; padding: 28px 24px; flex: 1; }
.panel.active { display: block; }

/* Resource panel */
.resource-header { margin-bottom: 20px; }
.resource-header h3 { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.resource-header .resource-meta { display: flex; gap: 16px; color: var(--text-muted); font-size: 14px; }
.resource-tag {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a78bfa;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.video-fallback .fallback-icon { font-size: 48px; }
.video-fallback p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.video-fallback a { color: #a78bfa; text-decoration: none; font-weight: 600; padding: 10px 20px; border: 1px solid rgba(167,139,250,0.4); border-radius: var(--radius-sm); transition: all 0.2s; }
.video-fallback a:hover { background: rgba(167,139,250,0.1); }

.resource-note {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.resource-note p { color: var(--text-muted); font-size: 14px; margin-bottom: 0; }

/* Quiz panel */
.quiz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 300px;
  color: var(--text-muted);
  font-size: 16px;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(99,102,241,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.quiz-questions {}
.quiz-header { margin-bottom: 28px; }
.quiz-header h3 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.quiz-header p { color: var(--text-muted); font-size: 14px; }

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.question-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 10px;
}
.question-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 18px;
  color: var(--text);
}
.options-grid { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: left;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}
.option-btn:hover:not(.selected):not(.correct):not(.wrong) {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.08);
}
.option-btn.selected { border-color: var(--primary); background: rgba(99,102,241,0.12); }
.option-btn.correct { border-color: var(--success); background: rgba(16,185,129,0.12); color: #6ee7b7; }
.option-btn.wrong { border-color: var(--danger); background: rgba(239,68,68,0.08); color: #fca5a5; }
.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.option-text { flex: 1; }

.question-feedback {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.question-feedback.show { display: block; }
.question-feedback.correct-fb { background: rgba(16,185,129,0.1); border-left: 3px solid var(--success); color: #a7f3d0; }
.question-feedback.wrong-fb { background: rgba(239,68,68,0.08); border-left: 3px solid var(--danger); color: #fca5a5; }

.quiz-submit-row { margin-top: 24px; display: flex; justify-content: flex-end; }

/* Quiz results */
.quiz-results {}
.result-header {
  text-align: center;
  padding: 32px 24px;
  margin-bottom: 24px;
}
.result-emoji { font-size: 64px; margin-bottom: 12px; }
.result-score-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.result-label { color: var(--text-muted); font-size: 18px; margin-bottom: 16px; }
.result-verdict {
  font-size: 15px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 20px;
  display: inline-block;
}
.verdict-passed { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.verdict-failed { background: rgba(239,68,68,0.1); color: #fca5a5; }

.result-details { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.result-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.result-item .r-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.result-item .r-question { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.result-item .r-answer { font-size: 13px; color: var(--text-muted); }
.result-item .r-explanation { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; font-style: italic; }
.result-item.r-correct { border-left: 3px solid var(--success); }
.result-item.r-wrong { border-left: 3px solid var(--danger); }

.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.modal-card {
  background: var(--surface);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 80px rgba(99,102,241,0.15);
}
.modal-emoji { font-size: 72px; margin-bottom: 16px; animation: float 2s ease-in-out infinite; }
.modal-card h2 { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.modal-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; line-height: 1.6; }
.modal-stars { font-size: 36px; margin-bottom: 24px; letter-spacing: 4px; }
.modal-actions { display: flex; justify-content: center; }

/* ========================================
   UTILITIES
   ======================================== */
.hidden { display: none !important; }
.error-msg {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  margin-top: 16px;
  text-align: left;
}

/* Progress bar on quiz */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #6366f1);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.quiz-progress-text { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

/* Responsive */
@media (max-width: 600px) {
  .path-container::before { left: 40px; }
  .path-stage-node { width: 80px; height: 80px; font-size: 26px; }
  .login-card { overflow:hidden; padding: 36px 24px; }
  .login-title { font-size: 34px; }
  .input-row { flex-direction: column; }
  .path-stats { flex-direction: column; }
  .panel { padding: 20px 16px; }
  .result-actions { flex-direction: column; }
}

/* ========================================
   AI Land v2 – Additional styles
   ======================================== */

/* Lang toggle */
.lang-toggle { display:flex; gap:8px; justify-content:center; margin-bottom:20px; }
.lang-btn { background:rgba(255,255,255,0.05); border:1.5px solid var(--border); color:var(--text-muted); border-radius:20px; font-size:13px; font-weight:600; padding:7px 18px; cursor:pointer; transition:all .2s; font-family:'Inter',sans-serif; }
.lang-btn.active { background:rgba(99,102,241,0.15); border-color:var(--primary); color:var(--text); }

/* Login form v2 */
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; width:100%; min-width:0; }
.form-row .form-group { min-width:0; }
.form-group { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.form-group label { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.6px; text-align:left; }
.form-group input { background:var(--surface2); border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text); font-size:15px; padding:11px 14px; outline:none; transition:border-color .2s; font-family:'Inter',sans-serif; }
.form-group input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-glow); }

/* GDPR */
.gdpr-notice { font-size:11px; color:var(--text-muted); margin-top:20px; line-height:1.5; }
.gdpr-notice a { color:#6366f1; text-decoration:none; }
.gdpr-notice a:hover { text-decoration:underline; }

/* Subtitle controls */
.video-wrapper { position:relative; }
.subtitle-controls { display:flex; align-items:center; gap:8px; padding:10px 4px; flex-wrap:wrap; }
.subtitle-label { font-size:12px; color:var(--text-muted); }
.sub-btn { background:rgba(255,255,255,0.05); border:1.5px solid var(--border); color:var(--text-muted); border-radius:20px; font-size:12px; font-weight:600; padding:5px 12px; cursor:pointer; transition:all .2s; font-family:'Inter',sans-serif; }
.sub-btn:hover { border-color:rgba(99,102,241,0.4); color:var(--text); }
.sub-btn.active { background:rgba(99,102,241,0.15); border-color:var(--primary); color:var(--text); }

/* Badge modal */
.badge-score-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:20px 0; }
.badge-score-card { background:var(--surface2); border-radius:var(--radius); padding:20px; text-align:center; border:1px solid var(--border); }
.bsc-num { font-family:'Space Grotesk',sans-serif; font-size:40px; font-weight:900; line-height:1; }
.bsc-lbl { font-size:13px; color:var(--text-muted); margin-top:6px; }
.bsc-sub { font-size:11px; color:var(--text-muted); margin-top:3px; }

/* Responsive */
@media (max-width:500px) {
  .form-row { grid-template-columns:1fr; }
  .badge-score-grid { grid-template-columns:1fr; }
}

/* ── References block (learner view) ──────────────────────── */
.references-block {
  background: rgba(99,102,241,0.05);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.refs-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 12px;
}
.refs-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ref-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: all .2s;
}
.ref-card:hover {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.08);
  transform: translateX(3px);
}
.ref-card-icon { font-size: 16px; flex-shrink: 0; }
.ref-card-label { flex: 1; font-weight: 500; }
.ref-card-arrow { color: var(--text-muted); font-size: 16px; }


/* ── Encart introductif du quiz ─────────────────────────────────────────── */
.quiz-intro {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(99, 102, 241, .07);
  border: 1px solid rgba(99, 102, 241, .25);
  border-left: 3px solid #6366f1;
}
.quiz-intro-title { font-weight: 600; margin-bottom: 6px; }
.quiz-intro p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); }

/* ── Question hors perimetre de la video ────────────────────────────────── */
.question-card.question-beyond { border-left: 3px solid #f59e0b; }
.beyond-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  vertical-align: middle;
}
.beyond-note {
  margin: 6px 0 2px;
  font-size: 13px;
  color: #b45309;
}
.beyond-hint {
  margin: 0 0 10px;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}
