@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400&family=Cormorant+Garamond:ital,wght@0,500;0,700;1,400&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #0f0e17;
  --bg-card: #1a1928;
  --bg-card-hover: #232136;
  --surface: #2b2745;
  --surface-light: #362f56;
  --border: #3d3660;
  --text: #fffffe;
  --text-muted: #a7a0c4;
  --accent: #ff8906;
  --accent-light: #ffb347;
  --accent-glow: rgba(255, 137, 6, 0.3);
  --purple: #e53170;
  --purple-glow: rgba(229, 49, 112, 0.3);
  --green: #2cb67d;
  --green-light: #3fc68e;
  --green-glow: rgba(44, 182, 125, 0.25);
  --red: #ff6b6b;
  --red-light: #ff8787;
  --red-glow: rgba(255, 107, 107, 0.2);
  --blue: #7f5af0;
  --blue-light: #9b7dfa;
  --blue-glow: rgba(127, 90, 240, 0.25);
  --gold: #ffd700;
  --gold-glow: rgba(255, 215, 0, 0.3);
  --xp-bar: linear-gradient(90deg, #7f5af0, #e53170, #ff8906);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(127, 90, 240, 0.15);
}

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

body {
  font-family: 'Nunito', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.greek-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* ═══════ CONFETTI CANVAS ═══════ */
#confettiCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ═══════ HEADER ═══════ */
header {
  background: linear-gradient(135deg, #1a1928 0%, #232136 50%, #1a1928 100%);
  border-bottom: 2px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  font-size: 1.8rem;
}

.brand-text {
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.player-name-inline {
  font-weight: 800;
  color: var(--accent-light);
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 137, 6, 0.4);
  transition: all 0.2s;
  margin-right: 0.3rem;
}

.player-name-inline:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


.header-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-pill:hover {
  transform: scale(1.05);
}

.stat-pill .pill-icon { font-size: 1.1rem; }
.stat-pill.streak .pill-value { color: var(--accent); }
.stat-pill.xp .pill-value { color: var(--blue-light); }
.stat-pill.gems .pill-value { color: var(--green-light); }

/* ═══════ XP LEVEL BAR ═══════ */
.xp-level-bar {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 0;
}

.xp-bar-outer {
  background: var(--surface);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  background: var(--xp-bar);
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.xp-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 20px;
  background: rgba(255,255,255,0.4);
  filter: blur(4px);
  border-radius: 8px;
}

.xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-weight: 600;
}

/* ═══════ CONTAINER ═══════ */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ═══════ PANELS ═══════ */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.panel h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ═══════ DAILY MOTIVATION ═══════ */
.daily-motivation {
  background: linear-gradient(rgba(15, 14, 23, 0.6), rgba(15, 14, 23, 0.75)), url('img/IMG_7103.jpg') center/cover no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.daily-motivation::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(127, 90, 240, 0.08) 0%, transparent 70%);
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.daily-motivation .motto {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  font-style: italic;
  color: var(--accent-light);
  position: relative;
}

.daily-motivation .motto-translation {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  position: relative;
}

/* ═══════ STREAK BANNER ═══════ */
.streak-banner {
  background: linear-gradient(135deg, #2b1f0e, #3d2a12);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 30px var(--accent-glow);
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow); }
}

.streak-banner .streak-fire { font-size: 2.5rem; }
.streak-banner .streak-info { flex: 1; }
.streak-banner .streak-count {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}
.streak-banner .streak-label {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 600;
}

/* ═══════ MODE GRID ═══════ */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mode-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  transition: background 0.3s;
}

.mode-card:hover {
  border-color: var(--blue-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(127, 90, 240, 0.15);
}

.mode-card:hover::before {
  background: var(--blue);
}

.mode-card.selected {
  border-color: var(--blue);
  background: rgba(127, 90, 240, 0.12);
  box-shadow: 0 0 24px var(--blue-glow);
}

.mode-card.selected::before {
  background: var(--blue);
}

.mode-card .icon { font-size: 1.8rem; display: block; margin-bottom: 0.3rem; }
.mode-card .label { font-weight: 800; font-size: 0.95rem; display: block; }
.mode-card .desc { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 0.15rem; }

.mode-card .mode-xp {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue-light);
  background: rgba(127, 90, 240, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* ═══════ SETTINGS ═══════ */
.settings-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 140px;
}

.setting-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.setting-group select,
.setting-group input[type="number"] {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.3s;
}

.setting-group select:focus,
.setting-group input:focus {
  border-color: var(--blue);
}

/* ═══════ BUTTONS ═══════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::after {
  width: 300px; height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  box-shadow: 0 4px 16px var(--blue-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--blue-glow);
}

.btn-go {
  background: linear-gradient(135deg, var(--green), #1a9060);
  color: white;
  font-size: 1.2rem;
  padding: 1rem 3rem;
  box-shadow: 0 4px 20px var(--green-glow);
  letter-spacing: 0.02em;
}

.btn-go:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 36px var(--green-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--blue);
  background: var(--bg-card-hover);
}

.btn-danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--red-light);
  border: 1px solid rgba(255, 107, 107, 0.3);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.25);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

/* ═══════ HEARTS (LIVES) ═══════ */
.hearts-display {
  display: flex;
  gap: 0.2rem;
  font-size: 1.4rem;
}

.hearts-display .heart { transition: all 0.3s; }
.hearts-display .heart.lost {
  filter: grayscale(1) opacity(0.3);
  transform: scale(0.8);
}

.hearts-display .heart.breaking {
  animation: heartBreak 0.5s ease;
}

@keyframes heartBreak {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.7); filter: grayscale(0.5); }
  100% { transform: scale(0.8); filter: grayscale(1) opacity(0.3); }
}

/* ═══════ TIMER ═══════ */
.timer-section {
  margin-bottom: 1rem;
}

.timer-bar-container {
  width: 100%;
  height: 10px;
  background: var(--surface);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.timer-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 1s linear, background 0.5s;
  background: var(--green);
}

.timer-bar.warning { background: var(--accent); }
.timer-bar.danger { background: var(--red); animation: bar-pulse 0.5s ease-in-out infinite alternate; }

@keyframes bar-pulse {
  from { opacity: 1; }
  to { opacity: 0.6; }
}

/* ═══════ HUD ═══════ */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hud .timer-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--green);
  min-width: 70px;
  text-align: right;
}

.hud .timer-text.warning { color: var(--accent); }
.hud .timer-text.danger { color: var(--red); animation: pulse 0.5s ease-in-out infinite alternate; }

@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.4; }
}

.progress-pills {
  display: flex;
  gap: 4px;
}

.progress-pill {
  width: 24px;
  height: 6px;
  border-radius: 3px;
  background: var(--surface);
  transition: all 0.3s;
}

.progress-pill.correct { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.progress-pill.wrong { background: var(--red); }
.progress-pill.current { background: var(--blue); animation: pip-pulse 1s ease-in-out infinite alternate; }

@keyframes pip-pulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ═══════ QUESTION CARD ═══════ */
.question-card {
  text-align: center;
  padding: 2rem 1.5rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.question-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-light);
  background: rgba(127, 90, 240, 0.15);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.question-prompt {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  color: var(--text);
}

.question-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.answer-input {
  width: 100%;
  max-width: 480px;
  padding: 0.9rem 1.25rem;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.answer-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 20px var(--blue-glow);
}

.answer-input.correct-input {
  border-color: var(--green);
  background: rgba(44, 182, 125, 0.1);
  box-shadow: 0 0 30px var(--green-glow);
  animation: correct-shake 0.4s ease;
}

.answer-input.wrong-input {
  border-color: var(--red);
  background: rgba(255, 107, 107, 0.08);
  box-shadow: 0 0 20px var(--red-glow);
  animation: wrong-shake 0.4s ease;
}

@keyframes correct-shake {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes wrong-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.answer-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  justify-content: center;
}

/* ═══════ FEEDBACK ═══════ */
.feedback {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  text-align: center;
  display: none;
  animation: feedback-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.feedback.show { display: block; }

@keyframes feedback-pop {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.feedback.correct-feedback {
  background: rgba(44, 182, 125, 0.12);
  border: 2px solid var(--green);
}

.feedback.wrong-feedback {
  background: rgba(255, 107, 107, 0.08);
  border: 2px solid rgba(255, 107, 107, 0.4);
}

.feedback-emoji {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.feedback-text {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.feedback-correct .feedback-text { color: var(--green-light); }
.feedback-wrong .feedback-text { color: var(--red-light); }

.feedback-explanation {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.4rem;
}

.feedback-correct-answer {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-light);
  margin-top: 0.5rem;
}

.feedback-xp {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--blue-light);
  background: rgba(127, 90, 240, 0.15);
  padding: 0.2rem 0.7rem;
  border-radius: 15px;
  animation: xp-float 0.6s ease;
}

@keyframes xp-float {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ XP POPUP ═══════ */
.xp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 900;
  color: var(--blue-light);
  text-shadow: 0 0 40px var(--blue-glow);
  pointer-events: none;
  z-index: 9998;
  animation: xp-big-pop 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes xp-big-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  60% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(0.8); }
}

/* ═══════ COMBO DISPLAY ═══════ */
.combo-display {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 200;
  text-align: right;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.combo-display.active { opacity: 1; }

.combo-count {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.combo-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-light);
  letter-spacing: 0.1em;
}

.combo-multiplier {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold);
}

/* ═══════ STRESS OVERLAY ═══════ */
.stress-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1000;
  border: 0px solid transparent;
  transition: border-width 0.5s, border-color 0.5s;
}

.stress-overlay.stress-low { border: 3px solid rgba(255, 137, 6, 0.25); }
.stress-overlay.stress-high {
  border: 5px solid rgba(255, 107, 107, 0.3);
  animation: stress-glow 1s ease-in-out infinite alternate;
}

@keyframes stress-glow {
  from { border-color: rgba(255, 107, 107, 0.15); }
  to { border-color: rgba(255, 107, 107, 0.45); }
}

/* ═══════ RESULTS ═══════ */
.results-panel { text-align: center; }

.result-mascot {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: mascot-bounce 1s ease infinite;
}

@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.result-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.3rem;
}

.result-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.grade-display {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  margin: 0.5rem 0;
}

.grade-S { color: var(--gold); text-shadow: 0 0 50px var(--gold-glow); animation: grade-glow-s 2s ease-in-out infinite alternate; }
.grade-A { color: var(--green-light); text-shadow: 0 0 30px var(--green-glow); }
.grade-B { color: var(--blue-light); text-shadow: 0 0 30px var(--blue-glow); }
.grade-C { color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }
.grade-D { color: var(--red-light); }

@keyframes grade-glow-s {
  from { text-shadow: 0 0 30px var(--gold-glow); }
  to { text-shadow: 0 0 60px var(--gold-glow), 0 0 100px rgba(255, 215, 0, 0.15); }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.stat-box {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.stat-box .stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-light);
}

.stat-box .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  font-weight: 700;
}

/* ═══════ ACHIEVEMENTS ═══════ */
.achievements-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  animation: badge-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.achievement-badge.new {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px var(--gold-glow);
}

@keyframes badge-pop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════ XP REWARD ANIMATION ═══════ */
.xp-reward-bar {
  background: var(--surface);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
  margin: 1rem 0;
  position: relative;
}

.xp-reward-fill {
  height: 100%;
  background: var(--xp-bar);
  border-radius: 8px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════ COACHING MESSAGE ═══════ */
.coaching-msg {
  background: linear-gradient(135deg, rgba(127, 90, 240, 0.08), rgba(229, 49, 112, 0.08));
  border: 1px solid rgba(127, 90, 240, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
  text-align: center;
}

.coaching-msg .coach-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
.coaching-msg .coach-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.coaching-msg .coach-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ═══════ REVIEW LIST ═══════ */
.review-list { text-align: left; margin-top: 1rem; }

.review-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-left: 4px solid var(--border);
}

.review-item.was-correct { border-left-color: var(--green); }
.review-item.was-wrong { border-left-color: var(--red); }

.review-item .review-icon { font-size: 1.1rem; flex-shrink: 0; }
.review-item .review-body { flex: 1; }
.review-item .review-prompt { font-weight: 700; font-size: 1rem; margin-bottom: 0.15rem; }
.review-item .review-your { color: var(--text-muted); font-size: 0.85rem; }
.review-item .review-correct { color: var(--green); font-weight: 700; font-size: 0.9rem; }
.review-item .review-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ═══════ SCREENS ═══════ */
.screen {
  display: none;
  animation: screen-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.screen.active { display: block; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ ACHIEVEMENT TOAST ═══════ */
.achievement-toast {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #2b1f0e, #3d2a12);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10000;
  box-shadow: 0 8px 40px rgba(255, 215, 0, 0.25);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 280px;
}

.achievement-toast.show {
  transform: translateX(-50%) translateY(0);
}

.achievement-toast .toast-icon { font-size: 2rem; }
.achievement-toast .toast-body { flex: 1; }
.achievement-toast .toast-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.achievement-toast .toast-desc {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

/* ═══════ MULTIPLE CHOICE ═══════ */
.choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.choice-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: left;
  line-height: 1.4;
  position: relative;
}

.choice-btn .choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(127, 90, 240, 0.2);
  color: var(--blue-light);
  font-size: 0.75rem;
  font-weight: 800;
  margin-right: 0.6rem;
  flex-shrink: 0;
  vertical-align: middle;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(127, 90, 240, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--blue-glow);
}

.choice-btn:disabled {
  cursor: default;
  transform: none !important;
}

.choice-btn.choice-correct {
  border-color: var(--green) !important;
  background: rgba(44, 182, 125, 0.15) !important;
  box-shadow: 0 0 20px var(--green-glow) !important;
}

.choice-btn.choice-correct .choice-letter {
  background: var(--green);
  color: white;
}

.choice-btn.choice-wrong {
  border-color: var(--red) !important;
  background: rgba(255, 107, 107, 0.1) !important;
  box-shadow: 0 0 12px var(--red-glow) !important;
  animation: wrong-shake 0.4s ease;
}

.choice-btn.choice-wrong .choice-letter {
  background: var(--red);
  color: white;
}

.choice-btn.choice-dimmed {
  opacity: 0.4;
}

/* ═══════ RHYTHM & EVOLUTION BANNER ═══════ */
.rhythm-banner {
  background: linear-gradient(135deg, #1a1230, #251a38);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px var(--blue-glow);
}

.rhythm-photo {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  position: relative;
  overflow: hidden;
}

.rhythm-photo-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 0.75rem;
}

.rhythm-evo-big {
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.rhythm-caption {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  font-style: italic;
  margin-top: 0.15rem;
}

.rhythm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rhythm-countdown {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.rhythm-days {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  margin-right: 0.2rem;
}

.rhythm-evo {
  font-size: 1.1rem;
  font-weight: 800;
}

.rhythm-status {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.rhythm-done {
  background: rgba(44, 182, 125, 0.15);
  color: var(--green-light);
  border: 1px solid rgba(44, 182, 125, 0.3);
}

.rhythm-pending {
  background: rgba(255, 137, 6, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(255, 137, 6, 0.3);
}

.rhythm-next {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.rhythm-next strong { color: var(--blue-light); }
.rhythm-next em { color: var(--text-muted); }

/* Passage status badges */
.passage-card-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.passage-card-status.passed {
  background: rgba(44, 182, 125, 0.15);
  color: var(--green-light);
}

.passage-card-status.retry {
  background: rgba(255, 137, 6, 0.15);
  color: var(--accent-light);
}

/* ═══════ FOCUS WARNING ═══════ */
.focus-warning {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: linear-gradient(135deg, #3a1a0e, #4d2a12);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10001;
  box-shadow: 0 8px 32px rgba(255, 137, 6, 0.3);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
  min-width: 260px;
  max-width: 90vw;
}

.focus-warning.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.focus-warning-icon { font-size: 1.5rem; flex-shrink: 0; }
.focus-warning-text { font-size: 0.9rem; font-weight: 600; color: var(--accent-light); }
.focus-warning-text strong { color: var(--accent); }

/* ═══════ FOCUS TIP ═══════ */
.focus-tip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.focus-tip-icon { font-size: 1.5rem; flex-shrink: 0; }

.focus-tip-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.focus-tip-body strong { color: var(--text); }

.focus-tip-close {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.focus-tip-close:hover {
  border-color: var(--blue);
  color: var(--text);
}

/* ═══════ WEAKNESS BANNER ═══════ */
.weakness-banner {
  background: linear-gradient(135deg, #1a1230, #2a1a3a);
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 20px var(--purple-glow);
  animation: glow-pulse-purple 3s ease-in-out infinite;
}

@keyframes glow-pulse-purple {
  0%, 100% { box-shadow: 0 0 15px var(--purple-glow); }
  50% { box-shadow: 0 0 30px var(--purple-glow); }
}

.weakness-banner .weakness-icon { font-size: 2rem; }
.weakness-banner .weakness-info { flex: 1; }
.weakness-banner .weakness-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--purple);
  background: rgba(229, 49, 112, 0.15);
  color: var(--purple);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-pill:hover {
  background: rgba(229, 49, 112, 0.3);
  transform: translateY(-1px);
}

/* ═══════ LESSONS PATH ═══════ */
.lessons-path {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}

.lesson-node {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.lesson-node:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--blue-glow);
}

.lesson-node.completed {
  border-color: var(--green);
  background: rgba(44, 182, 125, 0.08);
}

.lesson-node.completed::after {
  content: '✓';
  position: absolute;
  top: -6px; right: -6px;
  background: var(--green);
  color: white;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-node.recommended {
  border-color: var(--purple);
  box-shadow: 0 0 15px var(--purple-glow);
  animation: glow-pulse-purple 2s ease-in-out infinite;
}

.lesson-node.recommended::before {
  content: 'Consigliato';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.lesson-node .lesson-node-icon { font-size: 1.6rem; display: block; margin-bottom: 0.3rem; }
.lesson-node .lesson-node-title { font-weight: 800; font-size: 0.8rem; display: block; line-height: 1.3; }
.lesson-node .lesson-node-xp {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--blue-light);
  background: rgba(127, 90, 240, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
}

/* ═══════ LESSON SCREEN ═══════ */
.lesson-panel {
  position: relative;
}

.lesson-back {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

.lesson-icon { font-size: 3rem; text-align: center; margin: 0.5rem 0; }

.lesson-title {
  text-align: center;
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.lesson-summary {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1.25rem;
}

.lesson-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: 1.25rem;
}

.lesson-paradigm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.lesson-paradigm-box h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-light);
  margin-bottom: 0.6rem;
}

.lesson-paradigm {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
}

.lesson-examples {
  margin-bottom: 1.25rem;
}

.lesson-example {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.lesson-example .ex-greek {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.lesson-example .ex-translation {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.lesson-tip-box {
  background: linear-gradient(135deg, rgba(255, 137, 6, 0.08), rgba(255, 137, 6, 0.15));
  border: 1px solid rgba(255, 137, 6, 0.3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.lesson-tip-icon { font-size: 1.3rem; flex-shrink: 0; }
.lesson-tip-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--accent-light);
  font-weight: 600;
}

/* ═══════ FEEDBACK PILL ═══════ */
.feedback-pill {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.pill-mini-lesson {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  white-space: pre-line;
}

/* ═══════ PASSAGES (VERSIONI) ═══════ */
.passages-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.passage-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.passage-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.passage-card.passage-read {
  border-color: var(--green);
  background: rgba(44, 182, 125, 0.06);
}

.passage-card .passage-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.passage-card .passage-card-body { flex: 1; }

.passage-card .passage-card-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.passage-card .passage-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.passage-card .passage-card-diff {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.passage-card .diff-1 { background: rgba(44, 182, 125, 0.15); color: var(--green-light); }
.passage-card .diff-2 { background: rgba(255, 137, 6, 0.15); color: var(--accent-light); }
.passage-card .diff-3 { background: rgba(229, 49, 112, 0.15); color: var(--purple); }

/* Passage screen */
.passage-panel { position: relative; }

.passage-header { text-align: center; margin-bottom: 1.5rem; }

.passage-author {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.passage-title {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.passage-source {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.passage-greek-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  line-height: 2.2;
  position: relative;
}

.passage-word {
  display: inline;
  cursor: pointer;
  padding: 0.15rem 0.1rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  border-bottom: 2px dotted rgba(127, 90, 240, 0.3);
}

.passage-word:hover {
  background: rgba(127, 90, 240, 0.2);
  color: var(--blue-light);
}

.passage-word.word-active {
  background: rgba(127, 90, 240, 0.3);
  color: var(--blue-light);
  border-bottom-color: var(--blue);
}

.word-popup {
  background: var(--bg-card);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(127, 90, 240, 0.25);
  animation: feedback-pop 0.25s ease;
}

.word-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.word-popup-form {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-light);
}

.word-popup-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.word-popup-close:hover { color: var(--text); }

.word-popup-lemma {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.word-popup-analysis {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.3rem;
}

.word-popup-meaning {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.3rem;
}

.word-popup-topic {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.word-popup-topic a {
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
}

.passage-section {
  margin-bottom: 1.25rem;
}

.passage-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-light);
  margin-bottom: 0.5rem;
}

.passage-translation {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
}

.passage-moral {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.passage-grammar {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}

/* ═══════ SIMULATION ═══════ */
.sim-progress-bar {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.sim-step {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.3s;
}

.sim-step.passed {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.sim-step.current {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pip-pulse 1.5s ease-in-out infinite alternate;
}

.sim-progress-label {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.sim-all-done {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--green-light);
  background: rgba(44, 182, 125, 0.12);
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 0.5rem;
}

.sim-assigned-num {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.sim-assigned {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.sim-assigned-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.sim-assigned-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sim-assigned-meta strong {
  color: var(--accent);
}

.sim-assigned-retry {
  font-size: 0.8rem;
  color: var(--red-light);
  margin-top: 0.3rem;
  font-weight: 700;
}

.sim-clock-icon { font-size: 1.3rem; }
.sim-label { font-weight: 700; font-size: 0.9rem; color: var(--text-muted); }

.sim-greek-panel { position: relative; }

.sim-passage-info {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.sim-greek-text {
  font-size: 1.2rem;
  line-height: 1.9;
}

.sim-translation-area {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  padding: 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
  line-height: 1.7;
}

.sim-translation-area:focus {
  border-color: var(--blue);
  box-shadow: 0 0 16px var(--blue-glow);
}

.sim-word-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.4rem;
}

/* ═══════ CORRECTOR INPUT ═══════ */
.corrector-textarea {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
  line-height: 1.5;
}

.corrector-textarea:focus {
  border-color: var(--blue);
}

.photo-upload-area {
  margin-top: 0.75rem;
  text-align: center;
}

.photo-label { cursor: pointer; }

.photo-preview {
  position: relative;
  display: inline-block;
  margin-top: 0.75rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}

.photo-preview img {
  max-width: 100%;
  max-height: 200px;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════ CORRECTION RESULTS ═══════ */
.corr-score-label {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.corr-section {
  margin-bottom: 1.25rem;
  text-align: left;
}

.corr-section h3 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--blue-light);
}

.corr-strengths {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--green-light);
  background: rgba(44, 182, 125, 0.08);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green);
}

.corr-correct-translation {
  font-size: 1rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text);
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.corr-errors-list { display: flex; flex-direction: column; gap: 0.6rem; }

.corr-error-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--red);
}

.corr-error-greek {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.corr-error-user {
  font-size: 0.85rem;
  color: var(--red-light);
  text-decoration: line-through;
  margin-bottom: 0.1rem;
}

.corr-error-correct {
  font-size: 0.9rem;
  color: var(--green-light);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.corr-error-explain {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.corr-error-topic-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
}

.corr-weaknesses {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.corr-topic-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.corr-topic-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(229, 49, 112, 0.15);
  color: var(--purple);
  cursor: pointer;
  transition: all 0.2s;
}

.corr-topic-badge:hover {
  background: rgba(229, 49, 112, 0.3);
  transform: translateY(-1px);
}

.corr-exercises {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}

/* ═══════ LOADING ═══════ */
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 600px) {
  .container { padding: 1rem; }
  header { padding: 0.75rem 1rem; }
  .header-stats { gap: 0.5rem; }
  .stat-pill { font-size: 0.8rem; padding: 0.25rem 0.5rem; }
  .question-prompt { font-size: 1.6rem; }
  .hud .timer-text { font-size: 1.3rem; }
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grade-display { font-size: 3.5rem; }
  .combo-display { top: 60px; right: 10px; }
  .combo-count { font-size: 1.5rem; }
  .streak-banner { padding: 0.75rem 1rem; }
  .streak-banner .streak-fire { font-size: 1.8rem; }
}
