/* ============================================
   MALTA NAUTICAL LICENCE QUIZ — LIGHT THEME
   ============================================ */

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

:root {
  --bg:        #f4f7fc;
  --bg2:       #eaf0fb;
  --surface:   #ffffff;
  --border:    #dde5f4;
  --blue:      #1a6bff;
  --blue2:     #0e4fcf;
  --teal:      #00b59e;
  --gold:      #e09000;
  --red:       #dc2f3f;
  --green:     #18a84a;
  --text:      #0e1d36;
  --muted:     #6b7fa3;
  --card-bg:   #ffffff;
  --card-border: #dde5f4;
  --radius:    18px;
  --radius-sm: 10px;
  --shadow:    0 4px 24px rgba(30,60,120,0.10);
  --shadow-lg: 0 8px 40px rgba(30,60,120,0.14);
  --font:      'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ===== HOME ===== */
#screen-home {
  position: relative;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px 60px;
  overflow: hidden;
}
.home-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(160deg, #edf2ff 0%, #f4f7fc 50%, #e8f5f3 100%);
}
.home-bg::after {
  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='%231a6bff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.home-content {
  position: relative; z-index: 1;
  max-width: 700px; width: 100%;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.home-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(26,107,255,0.08);
  border: 1px solid rgba(26,107,255,0.2);
  padding: 6px 18px; border-radius: 100px;
  font-size: 0.8rem; color: var(--blue); font-weight: 600;
  letter-spacing: 0.04em;
  animation: fadeDown 0.6s ease;
}
.anchor-icon { font-size: 1.1rem; }
.home-title {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 900; text-align: center;
  line-height: 1.1; color: var(--text);
  animation: fadeDown 0.7s ease 0.1s both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--teal), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-sub {
  font-size: 1.05rem; color: var(--muted); text-align: center;
  max-width: 520px; line-height: 1.65;
  animation: fadeDown 0.7s ease 0.2s both;
}

/* ===== TOPIC CHIPS ===== */
.topics-preview {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  animation: fadeDown 0.7s ease 0.3s both;
}
.topic-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 14px; border-radius: 100px;
  font-size: 0.8rem; color: var(--muted);
  box-shadow: 0 1px 4px rgba(30,60,120,0.06);
  transition: all 0.2s;
}
.topic-chip i { margin-right: 4px; }
.topic-chip:hover {
  background: rgba(26,107,255,0.08);
  border-color: rgba(26,107,255,0.35);
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(26,107,255,0.12);
}

/* ===== MODE CARDS ===== */
.mode-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; width: 100%;
  animation: fadeUp 0.7s ease 0.4s both;
}
.mode-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow);
}
.mode-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  opacity: 0; transition: opacity 0.25s;
}
.mode-card:hover { transform: translateY(-4px); border-color: rgba(26,107,255,0.3); box-shadow: var(--shadow-lg); }
.mode-card:hover::before { opacity: 1; }
.mode-icon { font-size: 2rem; color: var(--blue); line-height: 1; }
.mode-label { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.mode-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.mode-arrow { font-size: 1.1rem; color: var(--blue); margin-top: 8px; }

.mode-card--important::before { background: linear-gradient(90deg, var(--gold), #ffb84d); }
.mode-card--important .mode-icon, .mode-card--important .mode-arrow { color: var(--gold); }
.mode-card--important:hover { border-color: rgba(224,144,0,0.3); box-shadow: 0 8px 40px rgba(224,144,0,0.15); }

.mode-card--hard::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.mode-card--hard .mode-icon, .mode-card--hard .mode-arrow { color: #8b5cf6; }
.mode-card--hard:hover { border-color: rgba(139,92,246,0.3); box-shadow: 0 8px 40px rgba(139,92,246,0.15); }

/* ===== SETTINGS ===== */
.quiz-settings, .study-settings, .important-settings, .hard-settings {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px; width: 100%;
  box-shadow: var(--shadow);
  animation: fadeUp 0.4s ease;
}
.quiz-settings h3, .study-settings h3, .important-settings h3, .hard-settings h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 20px;
  color: var(--teal);
}
.settings-row {
  display: flex; align-items: flex-start; gap: 12px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.settings-row label {
  font-size: 0.85rem; color: var(--muted);
  padding-top: 8px; min-width: 140px;
}
.setting-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.setting-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  padding: 6px 16px; font-size: 0.82rem;
  cursor: pointer; font-family: var(--font);
  transition: all 0.2s;
}
.setting-btn:hover { background: rgba(26,107,255,0.08); border-color: rgba(26,107,255,0.4); color: var(--blue); }
.setting-btn.active {
  background: var(--blue); border-color: var(--blue);
  color: #fff; font-weight: 600;
}
.btn-start {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff; border: none; border-radius: 12px;
  padding: 14px 32px; font-size: 1rem; font-weight: 700;
  font-family: var(--font); cursor: pointer;
  transition: all 0.25s; box-shadow: 0 4px 20px rgba(26,107,255,0.25);
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(26,107,255,0.35); }
.btn-start.study {
  background: linear-gradient(135deg, var(--teal), var(--blue2));
}
.btn-start.important {
  background: linear-gradient(135deg, var(--gold), #d18700);
  box-shadow: 0 4px 20px rgba(224,144,0,0.25);
}
.btn-start.important:hover {
  box-shadow: 0 8px 30px rgba(224,144,0,0.35);
}
.btn-start.hard {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 20px rgba(139,92,246,0.25);
}
.btn-start.hard:hover {
  box-shadow: 0 8px 30px rgba(139,92,246,0.35);
}

.important-settings h3 { color: var(--gold); }
.hard-settings h3 { color: #8b5cf6; }
.important-topics {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.imp-tag {
  background: rgba(224,144,0,0.08); border: 1px solid rgba(224,144,0,0.2);
  color: var(--gold); padding: 4px 12px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.imp-note {
  font-size: 0.85rem; color: var(--text); line-height: 1.5;
  background: var(--bg); border-left: 3px solid var(--gold);
  padding: 12px 16px; border-radius: 0 8px 8px 0;
  margin-bottom: 20px; display: flex; align-items: flex-start; gap: 8px;
}
.imp-note i { color: var(--gold); font-size: 1.1rem; }

/* ===== QUIZ HEADER ===== */
.quiz-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.back-btn {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 7px 14px;
  font-size: 0.82rem; cursor: pointer; font-family: var(--font);
  transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.back-btn:hover { background: var(--bg2); border-color: rgba(26,107,255,0.3); color: var(--blue); }
.quiz-meta { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.quiz-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.question-counter { font-size: 1rem; font-weight: 700; color: var(--text); }
.timer-wrap {
  display: flex; align-items: center; gap: 6px;
  background: rgba(224,144,0,0.1); border: 1px solid rgba(224,144,0,0.3);
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.9rem; font-weight: 700; color: var(--gold);
}
.timer-warn { background: rgba(220,47,63,0.1) !important; border-color: rgba(220,47,63,0.4) !important; color: var(--red) !important; animation: pulse 1s ease infinite; }

/* ===== PROGRESS BAR ===== */
.quiz-progress-bar {
  height: 4px; background: var(--border); width: 100%;
}
.quiz-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.5s ease;
}

/* ===== QUIZ BODY ===== */
.quiz-body {
  flex: 1; display: flex; align-items: flex-start;
  justify-content: center; padding: 30px 20px;
  background: var(--bg);
}
.question-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%; max-width: 680px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.4s ease;
}
.question-category-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,181,158,0.1); border: 1px solid rgba(0,181,158,0.3);
  color: var(--teal); padding: 4px 14px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 20px;
}
.question-media {
  display: flex; justify-content: center; margin-bottom: 20px;
}
.question-media img {
  max-height: 200px; max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 12px;
  object-fit: contain;
}
.flag-svg-wrap {
  display: flex; justify-content: center; align-items: center;
  width: 180px; height: 120px;
  border-radius: 12px; border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
}
.flag-svg-wrap svg { width: 100%; height: 100%; }
.buoy-svg-wrap {
  display: flex; justify-content: center; align-items: center;
  width: 140px; height: 180px;
  border-radius: 12px; border: 1px solid var(--border);
  overflow: visible;
  background: var(--bg);
  padding: 8px;
}
.buoy-svg-wrap svg { width: 100%; height: 100%; overflow: visible; }
.question-text {
  font-size: 1.25rem; font-weight: 600; line-height: 1.5;
  margin-bottom: 28px; color: var(--text);
}
/* ===== HARD MODE INPUT ===== */
.hard-mode-input {
  display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px;
}
#typed-answer {
  width: 100%; min-height: 120px;
  padding: 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1rem;
  resize: vertical; transition: all 0.2s;
}
#typed-answer:focus {
  outline: none; border-color: #8b5cf6;
  background: #fff; box-shadow: 0 0 0 4px rgba(139,92,246,0.1);
}
.btn-submit-answer {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white; border: none; padding: 14px 24px;
  border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s; box-shadow: 0 4px 15px rgba(139,92,246,0.25);
}
.btn-submit-answer:hover {
  transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139,92,246,0.35);
}
.btn-submit-answer:disabled {
  opacity: 0.7; cursor: not-allowed; transform: none;
}
.ai-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #8b5cf6; font-weight: 600; font-size: 1.1rem;
  margin-top: 10px;
}
.loader-spin {
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.options-grid {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px;
}
.option-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  text-align: left; color: var(--text);
  font-size: 0.95rem; font-family: var(--font);
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 12px;
  line-height: 1.4;
}
.option-btn:hover:not(:disabled) {
  background: rgba(26,107,255,0.06);
  border-color: rgba(26,107,255,0.4);
  transform: translateX(4px);
  box-shadow: 0 2px 10px rgba(26,107,255,0.08);
}
.option-btn .opt-letter {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
  color: var(--text);
}
.option-btn.correct {
  background: rgba(24,168,74,0.08) !important;
  border-color: var(--green) !important;
  color: var(--text);
}
.option-btn.correct .opt-letter { background: var(--green); color: #fff; }
.option-btn.wrong {
  background: rgba(220,47,63,0.08) !important;
  border-color: var(--red) !important;
  color: var(--text);
}
.option-btn.wrong .opt-letter { background: var(--red); color: #fff; }
.option-btn:disabled { cursor: default; }

/* ===== FEEDBACK ===== */
.feedback-box {
  border-radius: 12px; padding: 0; max-height: 0; overflow: hidden;
  transition: all 0.4s ease;
  margin-bottom: 0;
}
.feedback-box.show {
  padding: 16px 20px; max-height: 1000px; margin-bottom: 20px;
  overflow-y: auto;
}
.feedback-box.correct-fb { background: rgba(24,168,74,0.08); border: 1px solid rgba(24,168,74,0.3); }
.feedback-box.wrong-fb { background: rgba(220,47,63,0.08); border: 1px solid rgba(220,47,63,0.3); }
.feedback-icon { font-size: 1.4rem; }
.feedback-text { 
  font-size: 0.9rem; 
  line-height: 1.6; 
  margin-top: 6px; 
  color: var(--muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.feedback-text strong { color: var(--text); }

.btn-next {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff; border: none; border-radius: 12px;
  padding: 13px 28px; font-size: 1rem; font-weight: 700;
  font-family: var(--font); cursor: pointer; width: 100%;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(26,107,255,0.2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(26,107,255,0.3); }

/* ===== FOOTER STATS ===== */
.quiz-footer-stats {
  display: flex; justify-content: center; gap: 30px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
}
.stat-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; }
.correct-stat { color: var(--green); }
.wrong-stat { color: var(--red); }
.skip-stat { color: var(--muted); }

/* ===== STUDY MODE ===== */
.study-body { flex-direction: column; align-items: center; gap: 24px; padding: 30px 20px; background: var(--bg); }
.flashcard {
  width: 100%; max-width: 680px;
  height: 340px; perspective: 1200px; cursor: pointer;
}
.flashcard-inner {
  width: 100%; height: 100%;
  position: relative; transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px 32px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 14px;
  box-shadow: var(--shadow);
}
.flashcard-front {
  background: linear-gradient(160deg, #ffffff, #eef3ff);
}
.flashcard-back {
  background: linear-gradient(160deg, #f0fdf6, #eef3ff);
  border-color: rgba(24,168,74,0.25);
  transform: rotateY(180deg);
}
.card-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 600;
}
.answer-label { color: var(--green); }
.study-media img { max-height: 120px; border-radius: 8px; object-fit: contain; }
.study-question { font-size: 1.15rem; font-weight: 600; line-height: 1.5; max-width: 500px; color: var(--text); }
.study-answer { font-size: 1rem; line-height: 1.6; color: #0a6e3a; max-width: 500px; }
.study-category-tag {
  background: rgba(24,168,74,0.1); border: 1px solid rgba(24,168,74,0.25);
  color: var(--green); padding: 3px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.flip-hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; animation: bounce 2s ease infinite; }

.study-nav {
  display: flex; align-items: center; gap: 16px; width: 100%; max-width: 680px;
  justify-content: space-between;
}
.study-nav-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 10px 22px;
  font-size: 0.9rem; font-family: var(--font); cursor: pointer;
  transition: all 0.2s; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 1px 4px rgba(30,60,120,0.06);
}
.study-nav-btn:hover { background: rgba(26,107,255,0.08); border-color: rgba(26,107,255,0.35); color: var(--blue); }
.study-nav-btn:disabled { opacity: 0.35; cursor: default; }

.study-dots { display: flex; gap: 6px; }
.study-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all 0.2s; }
.study-dot.active { background: var(--teal); width: 20px; border-radius: 4px; }

.study-actions { display: flex; gap: 12px; }
.study-action-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); border-radius: 10px; padding: 9px 20px;
  font-size: 0.82rem; font-family: var(--font); cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.study-action-btn:hover { color: var(--blue); background: rgba(26,107,255,0.06); border-color: rgba(26,107,255,0.3); }

/* ===== RESULTS ===== */
#screen-results { justify-content: center; align-items: center; padding: 30px 20px; background: var(--bg); }
.results-container {
  width: 100%; max-width: 660px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.results-badge { font-size: 4rem; }
.results-title { font-size: 2rem; font-weight: 800; text-align: center; color: var(--text); }
.score-ring-wrap {
  position: relative; width: 180px; height: 180px;
  display: flex; align-items: center; justify-content: center;
}
.score-ring { width: 180px; height: 180px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 14; }
.ring-fill { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dasharray 1.2s ease; }
.score-center { position: absolute; display: flex; flex-direction: column; align-items: center; }
.score-percent { font-size: 2.5rem; font-weight: 900; color: var(--text); }
.score-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.results-stats { display: flex; gap: 24px; }
.res-stat {
  text-align: center; background: var(--card-bg);
  border: 1px solid var(--card-border); border-radius: 14px;
  padding: 18px 28px; box-shadow: var(--shadow);
}
.res-num { font-size: 2rem; font-weight: 800; }
.res-stat div:last-child { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.res-stat.correct .res-num { color: var(--green); }
.res-stat.wrong .res-num { color: var(--red); }
.pass-fail-banner {
  border-radius: 14px; padding: 16px 32px;
  font-size: 1.15rem; font-weight: 700; text-align: center; width: 100%;
}
.pass-banner { background: rgba(24,168,74,0.08); border: 1px solid rgba(24,168,74,0.3); color: var(--green); }
.fail-banner { background: rgba(220,47,63,0.08); border: 1px solid rgba(220,47,63,0.3); color: var(--red); }
.review-section { width: 100%; }
.review-section h3 { font-size: 1.05rem; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.review-item {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
}
.review-icon { font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.review-q { font-size: 0.88rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.review-a { font-size: 0.82rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.review-a span { color: var(--green); font-weight: 600; }
.results-actions { display: flex; gap: 14px; }
.btn-result {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff; border: none; border-radius: 12px;
  padding: 13px 28px; font-size: 0.95rem; font-weight: 700;
  font-family: var(--font); cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; gap: 8px;
}
.btn-result:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,107,255,0.25); }
.btn-result.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-result.secondary:hover { background: var(--bg2); box-shadow: none; }

/* ===== ANIMATIONS ===== */
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:none; } }
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes bounce { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-5px); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.65; } }
@keyframes pop { 0% { transform:scale(0.8); opacity:0; } 70% { transform:scale(1.08); } 100% { transform:scale(1); opacity:1; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  .mode-cards { grid-template-columns: 1fr; }
  .settings-row { flex-direction: column; }
  .settings-row label { padding-top: 0; }
  .question-card { padding: 20px 16px; }
  .question-text { font-size: 1.05rem; }
  .flashcard { height: 280px; }
  .results-stats { gap: 10px; }
  .res-stat { padding: 14px 16px; }
}
