/* ══════════════════════════════════════════════
   IDIOMAS MOTOR — CSS
   Scoped under .idiomas-motor to avoid conflicts
   ══════════════════════════════════════════════ */

.idiomas-motor {
  --bg: #0f0f1a;
  --card: #1a1a2e;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --text: #e8e8f0;
  --muted: #8888aa;
  --success: #4ecdc4;
  --gold: #ffd93d;

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* ── Top Bar (single line with progress) ── */
.idiomas-motor .topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid #ffffff10;
  position: sticky;
  top: 0;
  z-index: 10;
}
.idiomas-motor .topbar h1 { font-size: 14px; font-weight: 600; white-space: nowrap; }
.idiomas-motor .topbar .streak { font-size: 12px; color: var(--gold); white-space: nowrap; }

/* ── Progress (inline in topbar) ── */
.idiomas-motor .progress-bar {
  height: 4px;
  background: #ffffff15;
  border-radius: 4px;
  overflow: hidden;
}
.idiomas-motor .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.idiomas-motor .progress-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Screens ── */
.idiomas-motor .screen { display: none; padding: 20px; max-width: 480px; margin: 0 auto; }
.idiomas-motor .screen.active { display: block; }

/* ── Learn Screen ── */
/* ── Chip "Voltar para palavra anterior" (topo do screenLearn) ── */
.idiomas-motor .palavra-anterior-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  margin: 4px 0 14px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.10), rgba(255, 101, 132, 0.08));
  border: 1px solid rgba(108, 99, 255, 0.22);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.2;
  max-width: 100%;
  animation: idiomasMotorFadeInUp 0.35s ease;
}
.idiomas-motor .palavra-anterior-chip:hover {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.18), rgba(255, 101, 132, 0.14));
  border-color: rgba(108, 99, 255, 0.45);
  transform: translateX(-2px);
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.18);
}
.idiomas-motor .palavra-anterior-chip:active {
  transform: translateX(-2px) scale(0.97);
}
.idiomas-motor .palavra-anterior-chip .chip-arrow {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.idiomas-motor .palavra-anterior-chip:hover .chip-arrow {
  transform: translateX(-3px);
}
.idiomas-motor .palavra-anterior-chip .chip-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.idiomas-motor .palavra-anterior-chip .chip-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.idiomas-motor .palavra-anterior-chip .chip-word {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.idiomas-motor .palavra-anterior-chip .chip-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.idiomas-motor .palavra-anterior-chip .chip-emoji:empty { display: none; }

.idiomas-motor .word-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  margin: 20px 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.idiomas-motor .word-card:active { transform: scale(0.97); }
.idiomas-motor .word-card .tap-hint {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.6;
}

.idiomas-motor .word-image {
  font-size: 96px;
  line-height: 1.2;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px #00000060);
  animation: idiomasMotorFadeInUp 0.4s ease;
}
.idiomas-motor .word-text {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
  animation: idiomasMotorFadeInUp 0.4s ease 0.1s both;
}
.idiomas-motor .word-phonetic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: idiomasMotorFadeInUp 0.4s ease 0.15s both;
}
.idiomas-motor .word-phonetic {
  font-size: 16px;
  color: var(--muted);
  font-style: italic;
}
.idiomas-motor .phonetic-help-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.2s;
}
.idiomas-motor .phonetic-help-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(124,58,237,0.08);
}

/* ── Phonetic Modal ── */
.phonetic-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.phonetic-modal-overlay.active {
  display: flex;
}
.phonetic-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 460px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: idiomasMotorFadeInUp 0.25s ease;
}
.phonetic-modal h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1e1e2e;
}
.phonetic-modal p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 16px;
}
.phonetic-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.phonetic-modal-close:hover { color: #333; }
.phonetic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 16px;
}
.phonetic-table th {
  background: #f3f0ff;
  color: #6d28d9;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.phonetic-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  vertical-align: middle;
}
.phonetic-table td:last-child {
  white-space: nowrap;
  font-size: 13px;
}
.phonetic-table tr:last-child td { border-bottom: none; }
.phonetic-table td:first-child {
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  color: #6d28d9;
  width: 80px;
  text-align: center;
  vertical-align: middle;
}
.ipa-symbol-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  vertical-align: middle;
}
.ipa-play {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #6d28d9;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ipa-play:hover { background: #5b21b6; transform: scale(1.1); }
.ipa-play:active { transform: scale(0.95); }
.phonetic-tip {
  background: #f3f0ff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #6d28d9;
  font-weight: 500;
  margin: 0;
}

/* ── Audio Pulse ── */
.idiomas-motor .audio-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 20px;
  background: var(--accent);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  animation: idiomasMotorFadeInUp 0.4s ease 0.2s both;
}
.idiomas-motor .audio-pulse .icon { font-size: 18px; }
.idiomas-motor .audio-pulse.playing { animation: idiomasMotorPulse 1s ease infinite; }

/* ── Image Carousel ── */
.idiomas-motor .carousel-section {
  margin: 20px 0;
}
.idiomas-motor .carousel-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.idiomas-motor .carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.idiomas-motor .carousel-track::-webkit-scrollbar { display: none; }
.idiomas-motor .carousel-slide {
  flex: 0 0 85%;
  scroll-snap-align: center;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: var(--card);
  aspect-ratio: 4/3;
}
.idiomas-motor .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.idiomas-motor .carousel-slide img.loading { opacity: 0; }
.idiomas-motor .carousel-slide .slide-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 32px;
}
.idiomas-motor .carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.idiomas-motor .carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff20;
  transition: background 0.3s;
}
.idiomas-motor .carousel-dot.active { background: var(--accent); }
.idiomas-motor .carousel-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  opacity: 0.6;
}

/* GIFs: secao paralela com cabecalho proprio + tag GIF discreta no canto */
.idiomas-motor .gifs-section { margin-top: 28px; }
.idiomas-motor .gifs-section h3 {
  background: linear-gradient(90deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.idiomas-motor .carousel-slide.gif-slide::after {
  content: 'GIF';
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1;
}

/* Botao de report no canto inferior direito da imagem — pill com icone + label */
.idiomas-motor .img-report {
  position: absolute;
  bottom: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  border: none;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: all 0.18s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}
.idiomas-motor .img-report .img-report-icon { flex-shrink: 0; }
.idiomas-motor .img-report .img-report-label { white-space: nowrap; }
.idiomas-motor .carousel-slide:hover .img-report,
.idiomas-motor .review-card:hover .img-report,
.idiomas-motor .img-report:focus { opacity: 0.95; }
.idiomas-motor .img-report:hover { opacity: 1; background: rgba(220, 38, 38, 0.92); color: #fff; transform: translateY(-1px); }
.idiomas-motor .img-report.reportado {
  opacity: 1;
  background: rgba(75, 85, 99, 0.85);
  color: rgba(255, 255, 255, 0.95);
  cursor: default;
}
.idiomas-motor .img-report.reportado:hover { transform: none; background: rgba(75, 85, 99, 0.85); }
.idiomas-motor .img-report:disabled { cursor: wait; opacity: 0.6; }
/* Mobile: sempre visivel (nao tem hover) */
@media (hover: none) {
  .idiomas-motor .img-report { opacity: 0.85; }
}

/* Dialog de confirmacao do report */
.report-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.22s ease;
  padding: 16px;
}
.report-dialog-overlay.show { opacity: 1; }
.report-dialog {
  background: #1f2937;
  color: #f3f4f6;
  border-radius: 14px;
  padding: 22px 22px 18px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.22s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.report-dialog-overlay.show .report-dialog { transform: translateY(0) scale(1); }
.report-dialog-title { font-size: 17px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.report-dialog-sub { font-size: 13px; color: rgba(255, 255, 255, 0.7); margin-bottom: 14px; }
.report-motivos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.report-motivo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.report-motivo:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.14); }
.report-motivo input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease;
}
.report-motivo input[type="radio"]:checked { border-color: #818cf8; }
.report-motivo input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #818cf8;
}
.report-motivo:has(input:checked) { background: rgba(129, 140, 248, 0.12); border-color: rgba(129, 140, 248, 0.4); }
.report-actions { display: flex; gap: 10px; justify-content: flex-end; }
.report-btn-cancel,
.report-btn-confirm {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.report-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
.report-btn-cancel:hover { background: rgba(255, 255, 255, 0.14); }
.report-btn-confirm {
  background: #dc2626;
  color: #fff;
}
.report-btn-confirm:hover { background: #b91c1c; }

/* Toast no topo da tela */
.idiomas-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: #1f2937;
  color: #f3f4f6;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 10001;
  max-width: calc(100vw - 32px);
  text-align: center;
  pointer-events: none;
}
.idiomas-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.idiomas-toast.success { border-color: rgba(34, 197, 94, 0.4); background: linear-gradient(135deg, #1f2937, #134e3a); }
.idiomas-toast.error { border-color: rgba(220, 38, 38, 0.4); background: linear-gradient(135deg, #1f2937, #4c1e1e); }

/* Desktop: 3 imagens grandes lado a lado (mantem tamanho grande, usa o espaco lateral)
   .screen tem max-width 480px (linha 67). O carousel-section ESCAPA desse limite
   pra ocupar ate 1100px no centro da viewport — assim cada imagem fica generosa. */
@media (min-width: 768px) {
  .idiomas-motor .carousel-section {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, 95vw);
  }
  .idiomas-motor .carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .idiomas-motor .carousel-slide {
    flex: none;
    width: 100%;
    aspect-ratio: 4/3;
  }
  /* Em desktop os dots e o hint ficam redundantes */
  .idiomas-motor .carousel-dots,
  .idiomas-motor .carousel-hint { display: none; }
}

/* ── Examples ── */
.idiomas-motor .examples-section {
  margin: 24px 0;
}
.idiomas-motor .examples-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.idiomas-motor .example-card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.2s;
  animation: idiomasMotorFadeInUp 0.3s ease both;
}
.idiomas-motor .example-card:nth-child(2) { animation-delay: 0.05s; }
.idiomas-motor .example-card:nth-child(3) { animation-delay: 0.1s; }
.idiomas-motor .example-card:nth-child(4) { animation-delay: 0.15s; }
.idiomas-motor .example-card:active { background: #ffffff10; }
.idiomas-motor .example-card .ex-icon { font-size: 28px; flex-shrink: 0; }
.idiomas-motor .example-card .ex-text { font-size: 20px; font-weight: 500; flex: 1; }
.idiomas-motor .example-card .ex-yg {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff4444;
  border: none;
  color: white;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idiomas-motor .example-card .ex-yg:active { transform: scale(0.85); }
.idiomas-motor .example-card .ex-help {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idiomas-motor .example-card .ex-help:active { transform: scale(0.85); }
.idiomas-motor .example-card .ex-help.opened { background: var(--success); }
.idiomas-motor .example-card .ex-eye {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff10;
  border: none;
  color: white;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idiomas-motor .example-card .ex-eye:active { transform: scale(0.85); }
.idiomas-motor .example-card .ex-eye.opened { background: var(--accent); }
.idiomas-motor .ex-translation {
  background: #ffffff08;
  border-radius: 12px;
  padding: 10px 16px;
  margin: -4px 0 6px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--success);
  animation: idiomasMotorFadeInUp 0.3s ease;
}
.idiomas-motor .ex-visual {
  background: #ffffff08;
  border-radius: 12px;
  padding: 16px;
  margin: -4px 0 6px;
  text-align: center;
  font-size: 52px;
  line-height: 1.4;
  animation: idiomasMotorFadeInUp 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 6px;
}

/* ── Quiz Screen ── */
.idiomas-motor .quiz-prompt {
  text-align: center;
  margin: 16px 0 12px;
}
.idiomas-motor .quiz-prompt .q-image { font-size: 100px; margin-bottom: 12px; }
.idiomas-motor .quiz-prompt .q-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.idiomas-motor .quiz-prompt .q-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.idiomas-motor .quiz-prompt .q-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.idiomas-motor .quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.idiomas-motor .quiz-opt {
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  font-weight: 600;
}
.idiomas-motor .quiz-opt:active { transform: scale(0.96); }
.idiomas-motor .quiz-opt.correct {
  border-color: var(--success);
  background: #4ecdc420;
}
.idiomas-motor .quiz-opt.wrong {
  border-color: var(--accent2);
  background: #ff658420;
  opacity: 0.5;
}
.idiomas-motor .quiz-opt .opt-emoji { font-size: 36px; display: block; margin-bottom: 8px; }

/* ── Review Screen ── */
.idiomas-motor .review-card {
  background: var(--card);
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
  margin: 20px 0;
  cursor: pointer;
}
.idiomas-motor .review-card .r-image { font-size: 80px; margin-bottom: 16px; position: relative; display: inline-block; }
/* Quando a palavra tem foto real, .r-image vira container da imagem */
.idiomas-motor .review-card .r-image.has-photo {
  font-size: 0;
  margin: 0 auto 18px;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  display: block;
}
.idiomas-motor .review-card .r-image.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.idiomas-motor .review-card .r-word {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  filter: blur(12px);
  transition: filter 0.4s ease;
  cursor: pointer;
}
.idiomas-motor .review-card .r-word.revealed { filter: blur(0); }
.idiomas-motor .review-card .r-hint {
  font-size: 13px;
  color: var(--muted);
  animation: pulse-hint 2s ease-in-out infinite;
}
@keyframes pulse-hint {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.idiomas-motor .review-card .r-details {
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.idiomas-motor .review-card .r-translation {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.idiomas-motor .review-card .r-phonetic {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.idiomas-motor .review-card .r-example {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.idiomas-motor .review-card .r-mastery-bar {
  width: 100%;
  max-width: 200px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin: 0 auto 4px;
  overflow: hidden;
}
.idiomas-motor .review-card .r-mastery-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0;
}
.idiomas-motor .review-card .r-mastery-label {
  font-size: 12px;
  color: var(--muted);
}

.idiomas-motor .review-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.idiomas-motor .review-btns button {
  flex: 1;
  padding: 14px 8px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.idiomas-motor .review-btns button:active {
  transform: scale(0.95);
}
.idiomas-motor .review-btns .review-btn-label {
  font-size: 15px;
  font-weight: 700;
}
.idiomas-motor .review-btns .review-btn-desc {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
}
.idiomas-motor .review-btns .btn-hard { background: var(--accent2); }
.idiomas-motor .review-btns .btn-good { background: var(--accent); }
.idiomas-motor .review-btns .btn-easy { background: var(--success); }

/* ── Lesson Complete ── */
.idiomas-motor .complete-screen {
  text-align: center;
  padding-top: 60px;
}
.idiomas-motor .complete-screen .trophy { font-size: 80px; margin-bottom: 20px; }
.idiomas-motor .complete-screen h2 { font-size: 28px; margin-bottom: 8px; }
.idiomas-motor .complete-screen p { color: var(--muted); margin-bottom: 32px; }
.idiomas-motor .complete-screen .stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
}
.idiomas-motor .stat-box {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: center;
  min-width: 90px;
}
.idiomas-motor .stat-box .stat-val { font-size: 28px; font-weight: 700; color: var(--accent); }
.idiomas-motor .stat-box .stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Buttons ── */
.idiomas-motor .btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.idiomas-motor .btn-primary:active { transform: scale(0.97); }

.idiomas-motor .btn-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px solid #ffffff20;
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}

/* ── Home Screen ── */
.idiomas-motor .home-hero {
  text-align: center;
  padding: 40px 0 20px;
}
.idiomas-motor .home-hero .lang-flag { font-size: 64px; margin-bottom: 12px; }
.idiomas-motor .home-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.idiomas-motor .home-hero p { color: var(--muted); font-size: 14px; }

.idiomas-motor .lesson-list { margin: 20px 0; }
.idiomas-motor .lesson-item {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.idiomas-motor .lesson-item:active { background: #ffffff10; }
.idiomas-motor .lesson-item .li-icon { font-size: 32px; }
.idiomas-motor .lesson-item .li-info { flex: 1; }
.idiomas-motor .lesson-item .li-title { font-size: 16px; font-weight: 600; }
.idiomas-motor .lesson-item .li-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.idiomas-motor .lesson-item .li-status { font-size: 13px; color: var(--success); font-weight: 600; }
.idiomas-motor .lesson-item.locked { opacity: 0.4; pointer-events: none; }
.idiomas-motor .lesson-item.locked .li-status { color: var(--muted); }

/* ── Animations ── */
@keyframes idiomasMotorFadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes idiomasMotorPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes idiomasMotorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.idiomas-motor .shake { animation: idiomasMotorShake 0.3s ease; }

/* ── Nav ── */
.idiomas-motor .bottom-nav {
  position: fixed;
  bottom: 0;
  left: var(--menu-groups-width, 112px);
  right: 0;
  background: var(--card);
  border-top: 1px solid #ffffff10;
  display: flex;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 10;
}
@media (max-width: 768px) {
  .idiomas-motor .bottom-nav {
    left: 0;
  }
}
.idiomas-motor .nav-item {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.idiomas-motor .nav-item.active { color: var(--accent); }
.idiomas-motor .nav-item .nav-icon { font-size: 22px; display: block; margin-bottom: 2px; }

.idiomas-motor .content-area { padding-bottom: 80px; }

/* ── Listen Mode ── */
.idiomas-motor .listen-section {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}
.idiomas-motor .listen-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 16px;
}
.idiomas-motor .listen-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.idiomas-motor .listen-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.2s;
}
.idiomas-motor .listen-btn:active { transform: scale(0.9); }
.idiomas-motor .mic-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), #ff4466);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.idiomas-motor .mic-btn:active { transform: scale(0.9); }
.idiomas-motor .mic-btn.recording {
  box-shadow: 0 0 0 6px rgba(255, 101, 132, 0.3);
  animation: idiomasMotorMicPulse 1.2s ease infinite;
}
@keyframes idiomasMotorMicPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(255, 101, 132, 0.3); }
  50% { box-shadow: 0 0 0 14px rgba(255, 101, 132, 0.1); }
}
.idiomas-motor .listen-sentence {
  font-size: 22px;
  font-weight: 600;
  margin-top: 12px;
  min-height: 30px;
}
.idiomas-motor .speech-result {
  margin-top: 12px;
  min-height: 24px;
  font-size: 15px;
  color: var(--muted);
}
.idiomas-motor .speech-result .match { color: var(--success); font-weight: 600; }
.idiomas-motor .speech-result .miss { color: var(--accent2); font-weight: 600; text-decoration: underline wavy; }
.idiomas-motor .speech-score {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.idiomas-motor .speech-score.great { background: #4ecdc430; color: var(--success); }
.idiomas-motor .speech-score.good { background: #ffd93d30; color: var(--gold); }
.idiomas-motor .speech-score.retry { background: #ff658430; color: var(--accent2); }

/* ── Translation Reveal Card ── */
.idiomas-motor .translate-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 20px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  border: 1px solid #ffffff10;
  cursor: pointer;
  transition: background 0.2s;
}
.idiomas-motor .translate-card:active { background: #ffffff08; }
.idiomas-motor .translate-card .tr-text {
  font-size: 20px;
  font-weight: 600;
  display: none;
  animation: idiomasMotorFadeInUp 0.3s ease;
}
.idiomas-motor .translate-card.revealed .tr-text {
  display: block;
}
.idiomas-motor .translate-card .tr-eye {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
}
.idiomas-motor .translate-card.revealed .tr-eye {
  color: var(--accent);
}

/* ── YouGlish ── */
.idiomas-motor .youglish-section {
  margin: 20px 0;
}
.idiomas-motor .youglish-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.idiomas-motor .youglish-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
  border: 2px solid transparent;
}
.idiomas-motor .youglish-toggle:hover { background: #ffffff08; }
.idiomas-motor .youglish-toggle.active { border-color: #ff4444; }
.idiomas-motor .youglish-toggle .yt-icon { font-size: 28px; flex-shrink: 0; }
.idiomas-motor .youglish-toggle .yt-info { flex: 1; }
.idiomas-motor .youglish-toggle .yt-title { font-size: 15px; font-weight: 600; }
.idiomas-motor .youglish-toggle .yt-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.idiomas-motor .youglish-toggle .yt-arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.3s;
}
.idiomas-motor .youglish-toggle.active .yt-arrow { transform: rotate(180deg); }

.idiomas-motor .youglish-player {
  display: none;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.idiomas-motor .youglish-player.open { display: block; }
.idiomas-motor .youglish-status {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  background: var(--card);
}
.idiomas-motor #yg-widget {
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
.idiomas-motor .yg-crop {
  max-height: 480px;
  overflow: hidden;
}
.idiomas-motor .youglish-controls {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--card);
  border-radius: 0 0 14px 14px;
}
.idiomas-motor .yg-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #ffffff10;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.idiomas-motor .yg-btn:active { background: #ffffff20; }
.idiomas-motor .yg-btn.yg-next { background: var(--accent); color: white; }
.idiomas-motor .yg-btn.yg-replay {
  background: var(--gold);
  color: #000;
  font-size: 14px;
  flex: 1.5;
}

/* YouGlish — hide branding */
.idiomas-motor #yg-widget [class*="fluently"],
.idiomas-motor #yg-widget [class*="Fluently"],
.idiomas-motor #yg-widget [class*="powered"],
.idiomas-motor #yg-widget [class*="promo"],
.idiomas-motor #yg-widget [class*="coach"],
.idiomas-motor #yg-widget [class*="Coach"],
.idiomas-motor #yg-widget [class*="accent-test"],
.idiomas-motor #yg-widget [class*="footer"] {
  display: none !important;
}

/* ── Word type badge ── */
.idiomas-motor .word-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.idiomas-motor .word-type.noun { background: #6c63ff30; color: #a29bfe; }
.idiomas-motor .word-type.verb { background: #ff658430; color: #ff6584; }
.idiomas-motor .word-type.adj { background: #4ecdc430; color: #4ecdc4; }
.idiomas-motor .word-type.phrase { background: #ffd93d30; color: #ffd93d; }

/* ── XP Floating Animation ── */
@keyframes idiomasMotorXpFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}
.idiomas-motor .xp-float {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  pointer-events: none;
  z-index: 9999;
  animation: idiomasMotorXpFloat 1.2s ease-out forwards;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ── Back to Dashboard button ── */
.idiomas-motor .btn-back-dashboard {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px solid #ffffff20;
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}
.idiomas-motor .btn-back-dashboard:hover { background: #ffffff08; }

/* ── Achievements on complete ── */
.idiomas-motor .achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 10px 16px;
  margin: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  animation: idiomasMotorFadeInUp 0.4s ease both;
}
.idiomas-motor .achievement-badge .ach-icon { font-size: 24px; }

/* ── Level Up Overlay ── */
@keyframes idiomasMotorLevelUpPulse {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes idiomasMotorLevelUpShine {
  0% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.6); }
  50% { box-shadow: 0 0 60px 30px rgba(108, 99, 255, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); }
}
.idiomas-motor .level-up-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: idiomasMotorFadeIn 0.3s ease;
}
.idiomas-motor .level-up-content {
  text-align: center;
  animation: idiomasMotorLevelUpPulse 0.6s ease-out;
}
.idiomas-motor .level-up-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: idiomasMotorLevelUpShine 1.5s ease infinite;
  display: inline-block;
  border-radius: 50%;
}
.idiomas-motor .level-up-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent, #6c63ff), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.idiomas-motor .level-up-nivel {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}
.idiomas-motor .level-up-titulo {
  font-size: 18px;
  font-weight: 600;
  color: #a78bfa;
  margin-bottom: 12px;
}
.idiomas-motor .level-up-moedas {
  font-size: 16px;
  color: #fbbf24;
  font-weight: 600;
}
.idiomas-motor .level-up-fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}
@keyframes idiomasMotorFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ══════════════════════════════════════════════
   LIGHT THEME OVERRIDES
   ══════════════════════════════════════════════ */
[data-theme="light"] .idiomas-motor {
  --bg: #f0f2f5;
  --card: #ffffff;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --text: #1f2937;
  --muted: #6b7280;
  --success: #16a34a;
  --gold: #d97706;

  background: var(--bg);
  color: var(--text);
}

/* Top Bar */
[data-theme="light"] .idiomas-motor .topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Progress */
[data-theme="light"] .idiomas-motor .progress-bar {
  background: #e5e7eb;
}

/* Word Card */
[data-theme="light"] .idiomas-motor .word-card {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .idiomas-motor .word-image {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Translation Card */
[data-theme="light"] .idiomas-motor .translate-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
[data-theme="light"] .idiomas-motor .translate-card:active {
  background: #f9fafb;
}
[data-theme="light"] .idiomas-motor .ex-translation {
  background: #f0fdf4;
  color: #16a34a;
}
[data-theme="light"] .idiomas-motor .ex-visual {
  background: #f9fafb;
}

/* Carousel */
[data-theme="light"] .idiomas-motor .carousel-slide {
  background: #f3f4f6;
}
[data-theme="light"] .idiomas-motor .carousel-dot {
  background: #d1d5db;
}
[data-theme="light"] .idiomas-motor .carousel-dot.active {
  background: var(--accent);
}

/* Examples */
[data-theme="light"] .idiomas-motor .example-card {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .idiomas-motor .example-card:active {
  background: #f9fafb;
}
[data-theme="light"] .idiomas-motor .example-card .ex-eye {
  background: #f3f4f6;
  color: #6b7280;
}
[data-theme="light"] .idiomas-motor .example-card .ex-eye.opened {
  background: var(--accent);
  color: white;
}

/* Quiz */
[data-theme="light"] .idiomas-motor .quiz-opt {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: #1f2937;
}
[data-theme="light"] .idiomas-motor .quiz-opt.correct {
  background: #f0fdf4;
  border-color: #16a34a;
}
[data-theme="light"] .idiomas-motor .quiz-opt.wrong {
  background: #fef2f2;
  border-color: #dc2626;
}

/* Review */
[data-theme="light"] .idiomas-motor .review-card {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Complete / Stats */
[data-theme="light"] .idiomas-motor .stat-box {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Buttons */
[data-theme="light"] .idiomas-motor .btn-secondary {
  border: 2px solid #d1d5db;
  color: #374151;
}
[data-theme="light"] .idiomas-motor .btn-back-dashboard {
  border: 2px solid #d1d5db;
  color: #374151;
}
[data-theme="light"] .idiomas-motor .btn-back-dashboard:hover {
  background: #f9fafb;
}

/* YouGlish */
[data-theme="light"] .idiomas-motor .youglish-toggle {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .idiomas-motor .youglish-toggle:hover {
  background: #f9fafb;
}
[data-theme="light"] .idiomas-motor .youglish-status {
  background: #f3f4f6;
  color: #6b7280;
}
[data-theme="light"] .idiomas-motor .youglish-controls {
  background: #f3f4f6;
}
[data-theme="light"] .idiomas-motor .yg-btn {
  background: #e5e7eb;
  color: #374151;
}
[data-theme="light"] .idiomas-motor .yg-btn:active {
  background: #d1d5db;
}

/* Listen Section */
[data-theme="light"] .idiomas-motor .listen-section {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Bottom Nav */
[data-theme="light"] .idiomas-motor .bottom-nav {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06);
}

/* Lesson List (Home) */
[data-theme="light"] .idiomas-motor .lesson-item {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .idiomas-motor .lesson-item:active {
  background: #f9fafb;
}

/* Word Type Badges — more contrast in light mode */
[data-theme="light"] .idiomas-motor .word-type.noun { background: #ede9fe; color: #5b21b6; }
[data-theme="light"] .idiomas-motor .word-type.verb { background: #fee2e2; color: #dc2626; }
[data-theme="light"] .idiomas-motor .word-type.adj { background: #ccfbf1; color: #0f766e; }
[data-theme="light"] .idiomas-motor .word-type.phrase { background: #fef9c3; color: #854d0e; }

/* Achievement Badge */
[data-theme="light"] .idiomas-motor .achievement-badge {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
}

/* Level Up Overlay — keep dark overlay but adjust text */
[data-theme="light"] .idiomas-motor .level-up-overlay {
  background: rgba(0, 0, 0, 0.75);
}

/* XP Float */
[data-theme="light"] .idiomas-motor .xp-float {
  color: #d97706;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Speech score */
[data-theme="light"] .idiomas-motor .speech-score.great { background: #dcfce7; color: #16a34a; }
[data-theme="light"] .idiomas-motor .speech-score.good { background: #fef9c3; color: #d97706; }
[data-theme="light"] .idiomas-motor .speech-score.retry { background: #fee2e2; color: #dc2626; }

/* ══════════════════════════════════════════════
   COMBO SYSTEM
   ══════════════════════════════════════════════ */

.combo-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 900;
  z-index: 1000;
  pointer-events: none;
  animation: comboPopIn 0.8s ease-out forwards;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.combo-blue { color: #3b82f6; }
.combo-green { color: #10b981; }
.combo-gold { color: #eab308; text-shadow: 0 0 20px rgba(234,179,8,0.5); }
.combo-red { color: #ef4444; text-shadow: 0 0 30px rgba(239,68,68,0.5); }

@keyframes comboPopIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}

/* ══════════════════════════════════════════════
   QUIZ FEEDBACK MICRO-CELEBRATIONS
   ══════════════════════════════════════════════ */

.idiomas-motor .quiz-correct-celebrate {
  animation: correctPulse 0.5s ease-out;
}
.idiomas-motor .quiz-wrong-shake {
  animation: wrongShake 0.4s ease-out;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(16,185,129,0.4); }
  100% { transform: scale(1); }
}

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

/* ══════════════════════════════════════════════
   XP BAR IN MOTOR
   ══════════════════════════════════════════════ */

.idiomas-motor .motor-xp-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.1);
  z-index: 999;
}
.idiomas-motor .motor-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  transition: width 0.5s ease-out;
}

[data-theme="light"] .idiomas-motor .motor-xp-bar {
  background: rgba(0,0,0,0.08);
}

/* ══════════════════════════════════════════════
   CONFETTI CANVAS
   ══════════════════════════════════════════════ */

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}
