/* 英语训练 - 专属样式
 * 覆盖 style.css 的暗色变量为亮色主题，适合学习场景
 * 添加英语训练特有样式：年级卡片、单元列表、闯关路径、答题卡
 * 配色：emerald/teal 主色调
 */

:root {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --border-glow: rgba(5, 150, 105, 0.3);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent-primary: #059669;
  --accent-secondary: #0d9488;
  --accent-gradient: linear-gradient(135deg, #059669 0%, #0d9488 50%, #6366f1 100%);
  --accent-glow: rgba(5, 150, 105, 0.2);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.2);
  --warning: #f59e0b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border-color);
}
.header-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}
.brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Profile widget */
.profile-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.profile-btn:hover { border-color: var(--accent-primary); }
.profile-avatar { font-size: 18px; }
.profile-caret { font-size: 10px; color: var(--text-muted); }
.profile-panel {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 16px;
  min-width: 220px;
  z-index: 200;
}
.profile-panel.hidden { display: none; }
.profile-panel-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
}
.profile-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.profile-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
.profile-item:hover { background: var(--bg-input); }
.profile-item.active { background: rgba(5,150,105,0.1); color: var(--accent-primary); font-weight: 700; }
.profile-delete { font-size: 12px; color: var(--error); cursor: pointer; opacity: 0.6; }
.profile-delete:hover { opacity: 1; }
.profile-add { display: flex; gap: 6px; }
.profile-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-input);
  color: var(--text-primary);
}
.profile-add-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Stat group */
.stat-group { display: flex; align-items: center; gap: 8px; }
.stat-item {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
.stat-xp { color: var(--accent-primary); }
.stat-streak { color: var(--warning); }
.stat-mistakes-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
}

/* === Main content === */
.main-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  min-height: calc(100vh - 64px);
}
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-inner { display: flex; flex-direction: column; gap: 16px; }
.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.view-title { font-size: 20px; font-weight: 800; flex: 1; }
.btn-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-back:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.btn-back-small {
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
}

/* === Home cards === */
.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.card-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card-icon-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.card-icon-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.card-icon-rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.card-body { flex: 1; min-width: 0; }
.card-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.card-arrow { font-size: 20px; color: var(--text-muted); flex-shrink: 0; }

/* === Level grid === */
.level-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.level-card {
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.level-card:hover { border-color: var(--accent-primary); background: var(--bg-card-hover); }
.level-card-stage { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.level-card-name { font-size: 15px; font-weight: 800; }
.level-card-progress { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.level-card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
}
.badge-done { background: #d1fae5; color: #059669; }
.badge-todo { background: #f1f5f9; color: var(--text-muted); }

/* === Unit list === */
.btn-midterm {
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
  transition: transform 0.15s;
}
.btn-midterm:active { transform: scale(0.98); }
.unit-list { display: flex; flex-direction: column; gap: 12px; }
.unit-item {
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.unit-item:hover { border-color: var(--accent-primary); }
.unit-item.locked { opacity: 0.6; }
.unit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.unit-title { font-size: 14px; font-weight: 700; }
.unit-progress { font-size: 12px; color: var(--text-muted); }
.unit-stars { display: flex; gap: 2px; margin-top: 6px; }
.unit-star { font-size: 12px; }
.star-done { color: #fbbf24; }
.star-todo { color: #e2e8f0; }
.unit-actions { display: flex; gap: 8px; margin-top: 10px; }
.unit-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.unit-btn-path { background: rgba(5,150,105,0.1); color: var(--accent-primary); }
.unit-btn-path:hover { background: rgba(5,150,105,0.2); }
.unit-btn-test { background: rgba(99,102,241,0.1); color: #6366f1; }
.unit-btn-test:hover { background: rgba(99,102,241,0.2); }
.unit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Path view (Duolingo-style) === */
.path-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 20px 0;
}
.path-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.path-node:hover { transform: scale(1.05); }
.path-node-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: all 0.2s;
  position: relative;
}
.path-node.completed .path-node-circle {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.path-node.available .path-node-circle {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  animation: pulse 2s ease infinite;
}
.path-node.locked .path-node-circle {
  background: #e2e8f0;
  color: var(--text-muted);
}
@keyframes pulse {
  0%,100% { box-shadow: 0 4px 16px rgba(5,150,105,0.2); }
  50% { box-shadow: 0 4px 24px rgba(5,150,105,0.5); }
}
.path-node-label {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  max-width: 120px;
  margin-top: 6px;
  color: var(--text-primary);
}
.path-node-stars { font-size: 10px; margin-top: 2px; }
.path-connector {
  width: 4px; height: 28px;
  background: var(--border-color);
}
.path-connector.done { background: #10b981; }

/* === Quiz === */
.quiz-container {
  max-width: 520px;
  margin: 0 auto;
}
.quiz-progress-bar {
  padding: 12px 0;
  margin-bottom: 8px;
}
.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
#quizHearts { font-size: 16px; }
.progress-track {
  height: 6px;
  background: var(--border-color);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #14b8a6);
  border-radius: 100px;
  transition: width 0.3s ease;
  width: 0%;
}
.quiz-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 700;
}
.quiz-stat { color: var(--text-secondary); }

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.quiz-lesson-tag {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 600;
}
.quiz-question {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
  color: var(--text-primary);
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.quiz-option {
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}
.quiz-option:hover { border-color: var(--accent-primary); }
.quiz-option.selected {
  border-color: var(--accent-primary);
  background: rgba(5,150,105,0.08);
}
.quiz-option.correct {
  border-color: var(--success);
  background: rgba(16,185,129,0.1);
  color: var(--success);
}
.quiz-option.wrong {
  border-color: var(--error);
  background: rgba(239,68,68,0.1);
  color: var(--error);
}
.quiz-feedback {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  min-height: 24px;
  margin-bottom: 8px;
}
.quiz-feedback.correct { color: var(--success); }
.quiz-feedback.wrong { color: var(--error); }
.quiz-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-primary {
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  padding: 12px 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--text-muted); }
.hidden { display: none !important; }

/* Quiz result */
.quiz-result {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.result-emoji { font-size: 48px; margin-bottom: 12px; }
.result-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.result-detail { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.result-stars { font-size: 28px; margin-bottom: 20px; }
.result-actions { display: flex; gap: 10px; justify-content: center; }

/* === Mistakes === */
.btn-clear-mistakes {
  padding: 6px 14px;
  border: 1px solid var(--error);
  border-radius: 8px;
  background: transparent;
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mistakes-list { display: flex; flex-direction: column; gap: 10px; }
.mistake-item {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mistake-q { font-size: 15px; font-weight: 700; }
.mistake-a { font-size: 13px; color: var(--success); }
.mistake-user-a { font-size: 13px; color: var(--error); }
.mistake-meta { display: flex; gap: 8px; align-items: center; }
.mistake-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--bg-input);
  color: var(--text-muted);
}
.mistake-remove {
  align-self: flex-start;
  padding: 4px 12px;
  border: 1px solid var(--error);
  border-radius: 8px;
  background: transparent;
  color: var(--error);
  font-size: 12px;
  cursor: pointer;
  margin-top: 4px;
}
.mistake-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.mistake-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* === Games === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.game-card {
  padding: 24px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.game-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.game-icon { font-size: 36px; margin-bottom: 8px; }
.game-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.game-desc { font-size: 12px; color: var(--text-secondary); }

/* === 24-point game === */
.game24-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 12px;
}
.game24-nums {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.game24-num {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.game24-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.game24-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-primary);
}
.game24-input:focus { border-color: var(--accent-primary); outline: none; }
.game24-feedback { font-size: 14px; font-weight: 600; min-height: 24px; }
.game24-solution {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.game24-solution summary { cursor: pointer; text-align: center; }
.game24-diff-select {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.diff-btn {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  background: var(--bg-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.diff-btn.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }

/* === 2048 game === */
.game2048-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.game2048-board {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  margin: 0 auto;
  background: #cbd5e1;
  border-radius: var(--radius-md);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  touch-action: none;
  user-select: none;
}
.tile-cell {
  background: rgba(255,255,255,0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  transition: all 0.12s ease;
}
.tile-2 { background: #eee4da; }
.tile-4 { background: #ede0c8; }
.tile-8 { background: #f2b179; color: #fff; }
.tile-16 { background: #f59563; color: #fff; }
.tile-32 { background: #f67c5f; color: #fff; }
.tile-64 { background: #f65e3b; color: #fff; }
.tile-128 { background: #edcf72; font-size: 20px; }
.tile-256 { background: #edcc61; font-size: 20px; }
.tile-512 { background: #edc850; font-size: 20px; }
.tile-1024 { background: #edc53f; font-size: 16px; }
.tile-2048 { background: #edc22e; font-size: 16px; }
.game2048-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.game2048-overlay.hidden { display: none; }
.overlay-content { text-align: center; }
.overlay-emoji { font-size: 48px; margin-bottom: 8px; }
.overlay-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.overlay-score { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.modal-overlay.hidden { display: none; }
.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  max-width: 360px;
  width: calc(100% - 32px);
  text-align: center;
}
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.modal-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.goal-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.goal-btn {
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.goal-btn.active { background: var(--accent-primary); color: #fff; }
.modal-cancel {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

/* === Responsive === */
@media (max-width: 600px) {
  .header-container { padding: 10px 12px; }
  .brand-title { font-size: 16px; }
  .stat-item { font-size: 12px; }
  .main-content { padding: 12px 12px 48px; }
  .level-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
  .quiz-question { font-size: 18px; }
  .quiz-card { padding: 20px 16px; }
  .card { padding: 16px; }
  .card-icon-wrap { width: 52px; height: 52px; font-size: 26px; }
  .card-title { font-size: 16px; }
  .card-desc { font-size: 12px; }
  .game24-num { width: 52px; height: 52px; font-size: 22px; }
}
@media (max-width: 380px) {
  .stat-group { gap: 4px; }
  .stat-item { font-size: 11px; }
}

/* Combo popup */
.combo-pop {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 100px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(249,115,22,0.4);
  z-index: 250;
  animation: comboPop 0.6s ease;
  pointer-events: none;
}
@keyframes comboPop {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
  30% { transform: translateX(-50%) scale(1.1); opacity: 1; }
  70% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0; }
}

/* ===== English module styles ===== */

/* Subject toggle */
.subject-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 3px;
}
.subject-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.subject-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.subject-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* English card icon (emerald) */
.card-icon-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

/* English level card additions */
.level-card-term {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 6px;
}
.level-card-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Path node hint (concept preview) */
.path-node-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 2px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.path-node-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Quiz knowledge box (concept + example) */
.quiz-knowledge-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.quiz-knowledge-label {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.quiz-knowledge-concept {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}
.quiz-knowledge-example {
  font-size: 13px;
  color: #0284c7;
  margin-top: 4px;
  line-height: 1.5;
}

/* Quiz difficulty badge */
.quiz-difficulty-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.quiz-difficulty-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid;
}
.quiz-difficulty-badge.diff-easy {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}
.quiz-difficulty-badge.diff-medium {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.quiz-difficulty-badge.diff-hard {
  background: #fdf2f8;
  color: #be185d;
  border-color: #fbcfe8;
}

/* Quiz option letter */
.quiz-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s;
}
.quiz-option.correct .quiz-option-letter {
  background: var(--success);
  color: #fff;
}
.quiz-option.wrong .quiz-option-letter {
  background: var(--error);
  color: #fff;
}
.quiz-option.selected .quiz-option-letter {
  background: var(--accent-primary);
  color: #fff;
}
.quiz-option-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

/* Level section (grouped by stage) */
.level-section {
  margin-bottom: 24px;
}
.level-section-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.level-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

/* English views default hidden */
.en-view { display: none; }
.en-view.active { display: block; }
