/* ============================================================
   LaoTalk — Learning System 2026
   ============================================================ */

.learn-stage {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  position: relative;
}

/* --- Progress Section --- */
.learn-progress-area {
  margin-bottom: 1.5rem;
  padding: 0 4px;
}

.learn-progress-track {
  height: 8px;
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}

.learn-progress-bar {
  height: 100%;
  background: var(--hero-grad);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.learn-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* --- The Master Card Container --- */
.learn-card-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  padding: 1rem 0;
}

.mode-card:active { transform: scale(0.98); }
.mode-card {
  width: 100%;
  max-width: 380px;
  min-height: 280px;
  background: var(--surface);
  border-radius: 32px;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mode-card.correct { border-color: var(--success); background: rgba(52, 199, 89, 0.05); }
.mode-card.wrong { border-color: var(--danger); background: rgba(255, 59, 48, 0.05); }

/* --- Typography System --- */
.text-hero {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  word-break: break-word;
}

.text-phonetic {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.text-desc {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.interaction-hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-top: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Action Bar --- */
.learn-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  margin: 1.5rem auto 0;
}

.action-btn {
  height: 56px;
  border-radius: 18px;
  border: none;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.action-btn:active { transform: scale(0.96); opacity: 0.9; }

.action-btn.success { background: var(--success); color: #fff; box-shadow: 0 10px 20px rgba(52, 199, 89, 0.3); }
.action-btn.danger { background: var(--danger); color: #fff; box-shadow: 0 10px 20px rgba(255, 59, 48, 0.3); }
.action-btn.primary { background: var(--hero-grad); color: #fff; box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4); }
.action-btn.secondary { background: var(--surface-secondary); color: var(--text-secondary); border: 1.5px solid var(--border); }

/* --- Quiz Specifics --- */
.quiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 1.25rem;
}

.quiz-opt:active { transform: scale(0.97); }
.quiz-opt {
  min-height: 80px;
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.quiz-opt.correct { background: var(--success); border-color: var(--success); color: #fff; }
.quiz-opt.wrong { background: var(--danger); border-color: var(--danger); color: #fff; }

/* --- Result View --- */
.report-card {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: reportPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reportPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.report-emoji { font-size: 5rem; margin-bottom: 1rem; }
.report-title { font-size: 1.8rem; font-weight: 900; color: var(--text); margin-bottom: 0.5rem; }
.report-stats-grid {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 2rem 0;
}
.stat-box { display: flex; flex-direction: column; gap: 4px; }
.stat-val { font-size: 2.2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.stat-lbl { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }

/* --- Dark Mode Overrides --- */
[data-theme="dark"] .mode-card,
[data-theme="dark"] .quiz-opt {
  background: #2C2C2E;
  border-color: rgba(255, 255, 255, 0.08);
}
