/**
 * Mika Academy - Styles v3 LIGHT THEME
 * Science 3rd Prep - Second Term 2026
 * Supports: Web + Mobile (PWA)
 * Theme: Fresh Light Colors + Gen Z Vibes
 */

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

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

:root {
  /* Light Fresh Palette */
  --primary: #6C63FF;
  --primary-light: #EEF0FF;
  --primary-dark: #5348e0;
  --secondary: #FF6B9D;
  --secondary-light: #FFF0F6;
  --accent: #00C9A7;
  --accent-light: #E0FFF8;
  --warning: #FFB347;
  --warning-light: #FFF8EE;
  --success: #00C853;
  --success-bg: #E8FFF1;
  --success-text: #006B2B;
  --danger: #FF4757;
  --danger-bg: #FFF0F1;
  --danger-text: #B71C1C;
  --info: #00B4D8;
  --info-light: #E0F7FA;

  /* Neutral */
  --white: #FFFFFF;
  --bg: #F7F8FF;
  --bg2: #F0F2FF;
  --card: #FFFFFF;
  --border: #E8EAFF;
  --text: #1A1B2E;
  --text-muted: #6B7280;
  --gray: #9CA3AF;

  /* Shadows */
  --shadow: 0 4px 20px rgba(108,99,255,0.12);
  --shadow-sm: 0 2px 10px rgba(108,99,255,0.08);
  --shadow-card: 0 8px 32px rgba(108,99,255,0.1);
  --shadow-hover: 0 12px 40px rgba(108,99,255,0.2);

  /* Radii */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Font */
  --font: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(108,99,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(255,107,157,0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0,201,167,0.04) 0%, transparent 60%);
}

/* ===================== LAYOUT ===================== */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 14px;
}

/* ===================== HEADER ===================== */
.header {
  background: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FF 100%);
}

.header h1, #app-title {
  color: var(--primary);
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  text-align: center;
  margin-bottom: 10px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  border: 1px solid rgba(108,99,255,0.15);
  transition: transform 0.2s;
}

.stat-item:hover { transform: scale(1.05); }
.stat-icon { font-size: 1.1rem; }
.stat-value { font-weight: 900; color: var(--primary); min-width: 20px; text-align: center; }

.lang-btn {
  position: absolute !important;
  top: 14px;
  left: 14px;
  padding: 6px 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  color: white !important;
  border-radius: 20px !important;
  min-height: 34px !important;
  box-shadow: 0 2px 10px rgba(108,99,255,0.4) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  cursor: pointer !important;
  border: none !important;
  z-index: 10 !important;
}

.lang-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 14px rgba(108,99,255,0.5) !important;
}

[dir="ltr"] .lang-btn { left: auto; right: 14px; }

/* Hide the old bilingual_system duplicate button */
#lang-toggle-btn { display: none !important; }

/* ===================== CONTENT ===================== */
#content {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-height: 400px;
  border: 1px solid var(--border);
}

.section-title {
  color: var(--primary);
  margin-bottom: 16px;
  font-size: 1.2rem;
  font-weight: 700;
}

/* ===================== UNIT HEADER ===================== */
.unit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  color: white;
  box-shadow: 0 4px 15px rgba(108,99,255,0.3);
}

.unit-badge {
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.unit-title { font-weight: 700; font-size: 0.95rem; }

/* ===================== LESSON CARDS ===================== */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.lesson-card {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.lesson-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.lesson-card:hover, .lesson-card:focus {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  outline: none;
  background: var(--primary-light);
}

.lesson-card:active { transform: translateY(-2px); }

.character-avatar { width: 60px; height: 60px; text-align: center; margin: 0 auto 8px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.character-avatar.large { width: 80px; height: 80px; }
.character-avatar svg { width: 100%; height: 100%; }
.lesson-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
  color: var(--text);
}
.lesson-desc { text-align: center; color: var(--text-muted); font-size: 0.78rem; }
.lesson-teacher { margin-top: 6px; font-size: 0.75rem; text-align: center; color: var(--primary); font-weight: 600; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  touch-action: manipulation;
  user-select: none;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
  letter-spacing: 0.3px;
}

.btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 20px rgba(108,99,255,0.4);
  transform: translateY(-1px);
}
.btn:active { transform: scale(0.97) translateY(0); }
.btn:focus { outline: 3px solid rgba(108,99,255,0.4); outline-offset: 2px; }

.btn-secondary {
  background: linear-gradient(135deg, #6B7280, #4B5563);
  box-shadow: 0 4px 12px rgba(107,114,128,0.3);
}
.btn-secondary:hover { background: linear-gradient(135deg, #4B5563, #374151); }

.btn-sm { padding: 7px 14px; font-size: 0.85rem; min-height: 36px; }

.btn-study {
  background: linear-gradient(135deg, #00B4D8, #0077B6);
  box-shadow: 0 4px 12px rgba(0,180,216,0.3);
  width: 100%; margin-bottom: 10px;
}
.btn-study:hover { background: linear-gradient(135deg, #0077B6, #00B4D8); }

.btn-practice {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
  width: 100%; margin-bottom: 10px;
}

.btn-exam {
  background: linear-gradient(135deg, var(--secondary), #e83e8c);
  box-shadow: 0 4px 12px rgba(255,107,157,0.3);
  width: 100%;
}
.btn-exam:hover { background: linear-gradient(135deg, #e83e8c, var(--secondary)); }

.back-btn { width: 100%; margin-top: 12px; }
.check-btn {
  width: 100%; margin-top: 16px;
  background: linear-gradient(135deg, var(--accent), #00A896);
  box-shadow: 0 4px 12px rgba(0,201,167,0.3);
}

/* ===================== TOP NAV ===================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

/* ===================== MODAL ===================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(26,27,46,0.6);
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--white);
  margin: 4% auto 4%;
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  width: 93%;
  max-width: 560px;
  position: relative;
  animation: slideDown 0.25s ease;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(108,99,255,0.2);
}

.close-modal {
  position: absolute;
  right: 14px; top: 14px;
  font-size: 24px; font-weight: bold;
  color: var(--gray); cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--border);
  line-height: 1; padding: 4px 8px;
  border-radius: 8px; min-height: 36px; min-width: 36px;
  transition: all 0.2s;
}

.close-modal:hover { color: var(--text); background: var(--primary-light); }

.modal-header { text-align: center; margin-bottom: 16px; }
.modal-title { color: var(--primary); font-size: 1.2rem; margin: 8px 0 4px; font-weight: 700; }
.modal-subtitle { color: var(--text-muted); font-size: 0.85rem; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.progress-label { text-align: center; color: var(--text-muted); margin-bottom: 12px; font-size: 0.85rem; }

/* ===================== PROGRESS BAR ===================== */
.progress-bar {
  width: 100%; height: 12px;
  background: var(--primary-light);
  border-radius: 6px; overflow: hidden;
  margin: 8px 0;
  border: 1px solid rgba(108,99,255,0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===================== GAMES FLOW ===================== */
.games-flow-wrapper { max-width: 600px; margin: 0 auto; }

.games-flow-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  color: white;
  box-shadow: 0 8px 24px rgba(108,99,255,0.3);
}

.games-flow-emoji { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.games-flow-emoji svg { width: 100%; height: 100%; }
.games-flow-header h2 { font-size: 1.2rem; margin-bottom: 4px; font-weight: 700; }
.games-flow-lesson { opacity: 0.9; font-size: 0.9rem; }

.games-flow-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.game-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.game-step:hover, .game-step:focus {
  background: var(--primary-light);
  border-color: var(--primary);
  outline: none;
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}

[dir="ltr"] .game-step:hover { transform: translateX(4px); }
.game-step:active { transform: scale(0.98); }

.exam-step {
  background: var(--secondary-light);
  border-color: rgba(255,107,157,0.3);
}

.exam-step:hover { background: #FFE0EF; border-color: var(--secondary); }

.step-number {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(108,99,255,0.3);
}

.exam-step .step-number {
  background: linear-gradient(135deg, var(--secondary), #e83e8c);
  box-shadow: 0 2px 8px rgba(255,107,157,0.3);
}

.step-icon { font-size: 1.6rem; flex-shrink: 0; }
.step-info { flex: 1; }
.step-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }

.step-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--secondary), #e83e8c);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 3px;
}

.step-arrow { color: var(--gray); font-size: 1.4rem; }

.games-flow-bottom {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.games-flow-bottom .btn { flex: 1; min-width: 130px; }

/* ===================== EXAM ===================== */
.exam-wrapper { max-width: 700px; margin: 0 auto; }
.exam-title { color: var(--primary); margin-bottom: 8px; font-size: 1.2rem; font-weight: 700; }
.exam-instruction { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9rem; }

.exam-questions { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }

.exam-question {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color 0.2s;
}

.exam-question:hover { border-color: rgba(108,99,255,0.3); }

.exam-q-num {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.exam-q-text {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.6;
  color: var(--text);
}

.exam-options { display: flex; flex-direction: column; gap: 8px; }

.exam-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.exam-option:hover { background: var(--primary-light); border-color: var(--primary); }
.exam-option input[type="radio"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); }

.exam-option-letter {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: bold;
  flex-shrink: 0;
}

/* Exam Results */
.exam-results { max-width: 700px; margin: 0 auto; }
.exam-review { margin-top: 24px; }
.exam-review h3 { color: var(--primary); margin-bottom: 14px; font-weight: 700; }

.review-item {
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 2px solid var(--border);
}

.review-item.correct { background: var(--success-bg); border-color: var(--success); }
.review-item.incorrect { background: var(--danger-bg); border-color: var(--danger); }

.review-q { font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.review-answer { font-size: 0.85rem; line-height: 1.6; }
.review-exp {
  color: #856404;
  background: #FFF8E1;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-top: 6px;
  border: 1px solid #FFD54F;
}

.correct-icon { color: var(--success); }
.wrong-icon { color: var(--danger); }

/* ===================== FEEDBACK ===================== */
.feedback {
  padding: 12px 16px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
  margin-top: 12px;
  animation: slideDown 0.2s ease;
  font-size: 0.9rem;
}

.feedback.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 2px solid var(--success);
}
.feedback.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 2px solid var(--danger);
}

/* ===================== ERROR / LOADING ===================== */
.error-message {
  background: var(--danger-bg);
  color: var(--danger-text);
  padding: 16px;
  border-radius: var(--radius);
  border: 2px solid var(--danger);
  text-align: center;
}

.loading-text { text-align: center; color: var(--text-muted); padding: 40px; font-size: 1rem; }

/* ===================== RESULTS ===================== */
.results-screen { text-align: center; padding: 16px 0; }
.result-emoji { font-size: 64px; margin: 12px 0; line-height: 1; }
.result-score { color: var(--primary); font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.result-percentage {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 10px 0;
}
.result-message { font-size: 0.95rem; color: var(--text-muted); margin: 12px 0 20px; line-height: 1.5; }

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

.result-actions .btn { flex: 1; min-width: 130px; max-width: 200px; }

/* ===================== QUIZ ===================== */
.game-container { max-width: 700px; margin: 0 auto; }
.game-title { color: var(--primary); margin-bottom: 14px; font-size: 1.2rem; font-weight: 700; }
.game-question { color: var(--text-muted); text-align: center; margin-bottom: 14px; font-size: 0.95rem; line-height: 1.5; }
.game-instruction { color: var(--text-muted); text-align: center; margin-bottom: 14px; font-size: 0.85rem; font-style: italic; }
.game-hint {
  color: #856404;
  background: var(--warning-light);
  border: 2px solid var(--warning);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.6;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius);
  border-right: 4px solid var(--primary);
  border: 2px solid rgba(108,99,255,0.2);
  border-right: 4px solid var(--primary);
}

[dir="ltr"] .question { border-right: 2px solid rgba(108,99,255,0.2); border-left: 4px solid var(--primary); }

.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.option {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  min-height: 52px;
  user-select: none;
  font-weight: 600;
}

.option:hover, .option:focus {
  background: var(--primary-light);
  border-color: var(--primary);
  outline: none;
  transform: translateX(-3px);
  box-shadow: var(--shadow-sm);
}

[dir="ltr"] .option:hover { transform: translateX(3px); }
.option:active { transform: scale(0.98); }

.option.correct {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success-text);
  animation: correctPulse 0.4s ease;
}

.option.wrong {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger-text);
  animation: wrongShake 0.4s ease;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

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

.option-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  flex-shrink: 0;
}

.option.correct .option-letter { background: var(--success); }
.option.wrong .option-letter { background: var(--danger); }

/* ===================== FLASHCARDS ===================== */
.flashcard {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 36px 20px;
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
  transition: transform 0.2s ease;
  user-select: none;
  box-shadow: 0 8px 30px rgba(108,99,255,0.3);
}

.flashcard:hover { transform: scale(1.01); }
.flashcard:active { transform: scale(0.99); }
.flashcard.back {
  background: linear-gradient(135deg, var(--accent), #00A896);
  box-shadow: 0 8px 30px rgba(0,201,167,0.3);
}

.flashcard-side-label { font-size: 0.7rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.flashcard-text { font-size: 1.05rem; font-weight: 700; line-height: 1.6; }
.tap-hint { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 10px; }

.card-nav { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.card-nav .btn { flex: 1; min-width: 110px; max-width: 170px; }
.card-nav .btn:disabled { background: #D1D5DB; cursor: not-allowed; opacity: 0.6; box-shadow: none; }

.completion-message {
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  margin: 10px 0;
  text-align: center;
  color: var(--accent);
  font-weight: 700;
}

/* ===================== MATCH GAME ===================== */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.match-item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.match-item:hover { background: var(--primary-light); border-color: var(--primary); }
.match-item.selected { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.match-item.matched { background: var(--success-bg); border-color: var(--success); color: var(--success-text); }
.match-item.wrong { background: var(--danger-bg); border-color: var(--danger); }

/* ===================== SORT GAME ===================== */
.sort-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.sort-item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: grab;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  color: var(--text);
}

.sort-item:hover { border-color: var(--primary); background: var(--primary-light); }
.sort-item.dragging { opacity: 0.5; cursor: grabbing; }
.sort-item.correct { background: var(--success-bg); border-color: var(--success); }
.sort-item.wrong { background: var(--danger-bg); border-color: var(--danger); }
.sort-handle { color: var(--gray); font-size: 1.2rem; }

/* ===================== DRAG DROP ===================== */
.drag-drop-area {
  min-height: 60px;
  background: var(--primary-light);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  transition: all 0.2s;
}

.drag-drop-area.dragover {
  background: rgba(108,99,255,0.15);
  border-color: var(--primary-dark);
}

.drag-item {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: grab;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(108,99,255,0.3);
}

.drag-item:hover { transform: scale(1.05); }
.drag-item.dragging { opacity: 0.5; }

/* ===================== BUILD GAME ===================== */
.build-blanks {
  font-size: 1rem;
  line-height: 2.2;
  margin-bottom: 16px;
  color: var(--text);
}

.build-blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 3px solid var(--primary);
  margin: 0 4px;
  padding: 2px 8px;
  text-align: center;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  background: var(--primary-light);
  transition: all 0.2s;
}

.build-blank:hover { background: rgba(108,99,255,0.2); }
.build-blank.filled { background: var(--primary); color: white; }

/* ===================== LESSON CONTENT ===================== */
.lesson-content {
  line-height: 1.8;
  color: var(--text);
}

.lesson-content h2, .lesson-content h3 {
  color: var(--primary);
  margin: 20px 0 10px;
  font-weight: 700;
}

.lesson-content p { margin-bottom: 12px; }

.tip-card {
  background: var(--primary-light);
  border: 2px solid rgba(108,99,255,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
  border-right: 4px solid var(--primary);
}

[dir="ltr"] .tip-card { border-right: 2px solid rgba(108,99,255,0.2); border-left: 4px solid var(--primary); }

.tip-card h4 { color: var(--primary); margin-bottom: 8px; font-weight: 700; }

/* ===================== VIDEO SECTION ===================== */
.video-section { margin: 20px 0; }

.video-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.video-card:hover { box-shadow: var(--shadow-card); }

.video-title {
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.video-desc { padding: 8px 16px; font-size: 0.8rem; color: var(--text-muted); }

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ===================== FINAL REVIEW HERO ===================== */
.final-review-home-hero {
  background: linear-gradient(135deg, #F8F9FF 0%, #EEF0FF 100%);
  border: 2px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.final-review-home-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(108,99,255,0.1), transparent);
  border-radius: 50%;
}

.final-review-home-hero-content { flex: 1; }

.final-review-home-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--warning), #FF8C00);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(255,179,71,0.4);
}

.final-review-home-title {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.final-review-home-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.final-review-home-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.final-review-home-features span {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.final-review-home-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.final-review-home-main-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 15px rgba(108,99,255,0.4);
  flex: 1;
  min-width: 160px;
}

.final-review-home-secondary-btn {
  background: linear-gradient(135deg, var(--accent), #00A896);
  box-shadow: 0 4px 15px rgba(0,201,167,0.3);
  flex: 1;
  min-width: 140px;
}

.final-review-home-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.final-review-home-mika { width: 110px; height: 130px; }
.final-review-home-mika svg { width: 100%; height: 100%; }

/* Hudhud coach in practice */
.final-mika-coach { display: flex; align-items: center; gap: 12px; background: rgba(255,140,66,0.08); border: 1px solid rgba(255,140,66,0.2); border-radius: 16px; padding: 12px 16px; margin: 12px 0; }
.final-mika-coach-avatar { width: 70px; height: 70px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.final-mika-coach-avatar svg { width: 100%; height: 100%; }
.final-mika-coach-bubble { flex: 1; font-size: 0.9rem; line-height: 1.6; color: #333; }

.final-review-home-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
}

.final-review-home-mini {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.final-review-home-mika-message {
  font-size: 0.78rem;
  color: var(--primary);
  text-align: center;
  font-weight: 600;
  background: var(--primary-light);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(108,99,255,0.2);
}

/* ===================== VISITOR COUNTER ===================== */
.visitor-counter-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.visitor-counter-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.visitor-counter-icon { font-size: 2rem; }
.visitor-counter-title { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.visitor-counter-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.visitor-counter-badge-wrap { text-align: center; margin: 8px 0; }
.visitor-counter-img { max-width: 200px; height: auto; }
.visitor-counter-note { font-size: 0.75rem; color: var(--text-muted); text-align: center; }

/* ===================== CONTACT SECTION ===================== */
.contact-section {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  border: 2px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  margin: 20px 0;
  text-align: center;
}

.contact-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.contact-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; }

.contact-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.contact-link.whatsapp { background: #25D366; color: white; }
.contact-link.telegram { background: #0088CC; color: white; }
.contact-link.youtube { background: #FF0000; color: white; }
.contact-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* ===================== FINAL REVIEW HUB ===================== */
.final-review-hub { max-width: 800px; margin: 0 auto; }

.final-review-header {
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl);
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(108,99,255,0.3);
}

.final-review-header h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 8px; }
.final-review-header p { opacity: 0.9; font-size: 0.9rem; }

.final-review-modes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.review-mode-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s;
}

.review-mode-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.review-mode-icon { font-size: 2.5rem; margin-bottom: 10px; }
.review-mode-title { font-weight: 700; color: var(--text); font-size: 0.95rem; margin-bottom: 4px; }
.review-mode-desc { font-size: 0.78rem; color: var(--text-muted); }

/* ===================== GOVERNORATE FILTER ===================== */
.gov-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.gov-btn {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
}

.gov-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.gov-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-color: transparent; }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes confettiFall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===================== CONFETTI ===================== */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall 3s ease-in forwards;
  pointer-events: none;
  z-index: 9998;
}

/* ===================== BOOT LOADING ===================== */
.boot-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.boot-loading::before {
  content: '🧪';
  font-size: 3rem;
  animation: pulse 1s infinite;
}

/* ===================== MOBILE RESPONSIVE ===================== */
@media (max-width: 768px) {
  .container { padding: 8px 10px; }

  .header { padding: 12px 14px; border-radius: var(--radius); }
  .header h1, #app-title { font-size: 1rem; margin-bottom: 8px; }

  #content { padding: 14px; border-radius: var(--radius); }

  .lessons-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .lesson-card { padding: 14px 12px; }
  .character-avatar { width: 50px; height: 50px; }

  .final-review-home-hero {
    flex-direction: column;
    padding: 16px;
  }

  .final-review-home-side {
    flex-direction: row;
    min-width: auto;
    width: 100%;
    justify-content: center;
  }

  .final-review-home-mika { width: 80px; height: 95px; }

  .final-review-modes { grid-template-columns: repeat(2, 1fr); }
  .gov-filter-grid { grid-template-columns: repeat(3, 1fr); }

  .match-grid { gap: 8px; }
  .match-item { font-size: 0.8rem; padding: 10px 8px; }

  .btn { padding: 10px 18px; font-size: 0.9rem; }
  .btn-sm { padding: 6px 12px; font-size: 0.8rem; }

  .modal-content { margin: 2% auto; padding: 18px 14px; }

  .stat-item { padding: 5px 10px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .lessons-grid { grid-template-columns: repeat(2, 1fr); }
  .final-review-modes { grid-template-columns: 1fr 1fr; }
  .gov-filter-grid { grid-template-columns: repeat(2, 1fr); }
  .result-percentage { font-size: 2.4rem; }
  .games-flow-bottom { flex-direction: column; }
}

/* ===================== DARK MODE SUPPORT ===================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1022;
    --bg2: #161830;
    --card: #1A1B2E;
    --border: #2A2B45;
    --text: #E8E9FF;
    --text-muted: #9CA3AF;
    --white: #1A1B2E;
    --primary-light: rgba(108,99,255,0.15);
    --secondary-light: rgba(255,107,157,0.1);
    --accent-light: rgba(0,201,167,0.1);
    --warning-light: rgba(255,179,71,0.1);
    --success-bg: rgba(0,200,83,0.1);
    --danger-bg: rgba(255,71,87,0.1);
  }

  body {
    background: var(--bg);
    background-image:
      radial-gradient(circle at 10% 20%, rgba(108,99,255,0.08) 0%, transparent 50%),
      radial-gradient(circle at 90% 80%, rgba(255,107,157,0.08) 0%, transparent 50%);
  }

  .header { background: var(--card); }
  .lesson-card { background: var(--card); color: var(--text); }
  .option { background: var(--card); color: var(--text); }
  .game-step { background: var(--card); }
  .exam-question { background: var(--card); }
  .exam-option { background: var(--bg); }
  .sort-item { background: var(--card); color: var(--text); }
  .match-item { background: var(--card); color: var(--text); }
  .visitor-counter-card { background: var(--card); }
  .review-mode-card { background: var(--card); }
  .gov-btn { background: var(--card); color: var(--text); }
  .video-card { background: var(--card); }
  .video-title { background: var(--bg); color: var(--text); }
  .modal-content { background: var(--card); }
  #content { background: var(--card); }
  .question { background: rgba(108,99,255,0.15); }
  .tip-card { background: rgba(108,99,255,0.1); }
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(108,99,255,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===================== SELECTION ===================== */
::selection { background: rgba(108,99,255,0.2); color: var(--text); }
/* ===================== HEADER LOGO ===================== */
.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.header-hudhud-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  animation: floatAnim 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(255,140,66,0.3));
}

.header-title-group {
  text-align: right;
}

.header-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

/* ===================== BOOT LOADING ===================== */
.boot-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===================== SVG DIAGRAMS ===================== */
.svg-diagram-container {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid #e8eaff;
  overflow-x: auto;
}

.svg-diagram-container svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.svg-diagram-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

/* ===================== EXPERIMENT BOX ===================== */
.experiment-box {
  background: linear-gradient(135deg, #E8FFF1, #F0FFF8);
  border: 2px solid #00C853;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
}

.experiment-box h4 {
  color: #006B2B;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===================== EXPECTED QUESTIONS ===================== */
.expected-questions-hub {
  background: linear-gradient(135deg, #FFF8EE, #FFFBF5);
  border: 2px solid #FFB347;
  border-radius: 20px;
  padding: 20px;
  margin: 16px 0;
}

.expected-questions-hub h2 {
  color: #E65100;
  text-align: center;
  margin-bottom: 16px;
}

.expected-q-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(255,179,71,0.15);
  border: 1px solid rgba(255,179,71,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.expected-q-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,179,71,0.25);
}

.expected-q-card .q-text {
  font-weight: 600;
  color: #1A1B2E;
  margin-bottom: 8px;
  line-height: 1.6;
}

.expected-q-card .q-answer {
  background: #E8FFF1;
  border-radius: 10px;
  padding: 10px 14px;
  color: #006B2B;
  font-size: 0.9rem;
  display: none;
  margin-top: 8px;
}

.expected-q-card.revealed .q-answer {
  display: block;
}

.expected-q-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FF8C42, #FF6B35);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* ===================== LESSON CONTENT IMPROVEMENTS ===================== */
.lesson-content-wrapper {
  font-family: var(--font);
  line-height: 1.8;
  color: var(--text);
}

.lesson-content-wrapper h2 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary-light);
}

.lesson-content-wrapper h3 {
  color: #FF6B35;
  font-size: 1.1rem;
  margin: 16px 0 8px;
}

.lesson-content-wrapper h4 {
  color: #5348E0;
  font-size: 1rem;
  margin: 12px 0 6px;
}

.lesson-content-wrapper .definition-box {
  background: linear-gradient(135deg, #EEF0FF, #F8F9FF);
  border-right: 4px solid var(--primary);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
  font-weight: 600;
}

.lesson-content-wrapper .equation-box {
  background: #1A1B2E;
  color: #00E5FF;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 0;
  font-family: monospace;
  font-size: 1rem;
  text-align: center;
  direction: ltr;
}

.lesson-content-wrapper .tip-box {
  background: linear-gradient(135deg, #FFF8EE, #FFFBF5);
  border: 2px solid #FFB347;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
}

/* ===================== FINAL REVIEW HUB EXPECTED SECTION ===================== */
.expected-section-btn {
  background: linear-gradient(135deg, #FF8C42, #FF6B35) !important;
  color: white !important;
  border: none !important;
  border-radius: 18px !important;
  padding: 18px !important;
  text-align: right !important;
  cursor: pointer !important;
  box-shadow: 0 8px 20px rgba(255,107,53,0.3) !important;
  transition: all 0.2s !important;
  width: 100%;
  display: block;
  font-family: var(--font);
}

.expected-section-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(255,107,53,0.4) !important;
}

/* ===================== MOBILE RESPONSIVE ===================== */
@media (max-width: 768px) {
  .header-logo {
    flex-direction: column;
    gap: 8px;
  }
  
  .header-hudhud-logo {
    width: 50px;
    height: 50px;
  }
  
  .header-title-group {
    text-align: center;
  }
}

/* ===================== MIKA v25 - SUBJECT TABS & HERO ===================== */
.mika-subject-tabs::-webkit-scrollbar {
  display: none;
}

.mika-tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
}

.mika-tab-btn:active {
  transform: translateY(0);
}

/* Hero Banner */
.mika-hero-banner {
  animation: fadeInDown 0.4s ease;
}

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

/* Deen Option Buttons */
.deen-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  text-align: right;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.deen-option-btn:hover:not(:disabled) {
  border-color: #6C63FF;
  background: #f3f2ff;
  transform: translateX(-3px);
}

.deen-option-btn .deen-opt-letter {
  background: #6C63FF;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.deen-option-btn .deen-opt-text {
  flex: 1;
  line-height: 1.4;
}

/* Deen Next Button */
.deen-next-quiz-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6C63FF, #5a52d5);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.deen-next-quiz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}

/* Deen Big Btn */
.deen-big-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #6C63FF, #5a52d5);
  color: white;
  border: none;
  border-radius: 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.deen-big-btn.secondary {
  background: white;
  color: #6C63FF;
  border: 2px solid #6C63FF;
  box-shadow: none;
}

.deen-big-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}

/* Deen Wrong Section */
.deen-wrong-section {
  background: #fff8f8;
  border: 1px solid #ffcdd2;
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.deen-wrong-item {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ffcdd2;
}

.deen-wrong-q {
  color: #c62828;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.deen-wrong-a {
  color: #2e7d32;
  font-size: 0.9rem;
  background: #e8f5e9;
  border-radius: 8px;
  padding: 8px;
}

/* Deen Streak Bar */
.deen-streak-bar {
  text-align: center;
  padding: 10px;
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border-radius: 12px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: #f57c00;
  border: 1px solid #ffe082;
}

/* Deen Result */
.deen-result-header {
  border-radius: 20px 20px 0 0;
  padding: 24px;
  text-align: center;
  color: white;
}

.deen-result-stars {
  font-size: 2rem;
  margin-bottom: 8px;
}

.deen-result-score {
  font-size: 2.5rem;
  font-weight: 900;
}

.deen-result-pct {
  font-size: 1.2rem;
  opacity: 0.9;
}

.deen-result-msg {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.deen-result-actions {
  padding: 16px;
  background: white;
  border-radius: 0 0 20px 20px;
}


/* ============================================================ */
/* SVG Question Visuals v40                                      */
/* ============================================================ */
.q-svg-visual {
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
}

.q-svg-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Chemical equation display */
.equation-display {
  background: #f0f4ff;
  border: 2px solid #6C63FF;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  color: #1a1b2e;
  margin: 10px 0;
  letter-spacing: 0.5px;
}

/* Question type badge colors */
.q-type-equation { background: #EEF2FF; color: #4C1D95; }
.q-type-chemical_equation { background: #FEF3C7; color: #92400E; }
.q-type-visual { background: #DCFCE7; color: #166534; }
.q-type-drawing { background: #DBEAFE; color: #1D4ED8; }
.q-type-genetics_problem { background: #FDF4FF; color: #7E22CE; }
