/* ════════════════════════════════════════
   HEADER MOCKADO (apenas no demo)
════════════════════════════════════════ */
#mock-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: #1b5e20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#mock-header .logo { color: #fff; font-size: 1.1em; font-weight: bold; letter-spacing: 1px; }
#mock-header .globinho-bar {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); border-radius: 20px; padding: 5px 14px;
}
#mock-header .globinho-bar img { width: 30px; }
#mock-header .saldo {
  color: #fff; font-weight: bold; font-size: 1.1em; min-width: 36px;
  transition: transform 0.2s;
}
.saldo.pulsar { animation: pulsar 0.4s ease; }
@keyframes pulsar {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); color: #a5d6a7; }
  100% { transform: scale(1); }
}

/* ════════════════════════════════════════
   TERMOS CLICÁVEIS
════════════════════════════════════════ */
.termo {
  position: relative;
  display: inline-block;
  cursor: pointer;
  font-weight: bold;
  color: #1565c0;
  background: #fff9c4;
  padding: 1px 6px;
  border-radius: 5px;
  border-bottom: 2px dashed #f9a825;
  transition: background 0.2s, transform 0.15s;
  z-index: 1;
}
.termo::after { content: " 💡"; font-size: 0.78em; opacity: 0.8; }
.termo:hover  { background: #ffe082; transform: scale(1.05); }

.termo.coletado {
  background: #c8e6c9;
  border-bottom: 2px solid #388e3c;
  color: #1b5e20;
  cursor: default;

}
.termo.coletado::after { content: " ✅"; }

/* ════════════════════════════════════════
   TOOLTIP BALÃO
════════════════════════════════════════ */
.termo-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 300px;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border-left: 5px solid #1976d2;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-size: 1em;
  font-weight: normal;
  line-height: 1.5;
  animation: glossFadeUp 0.2s ease;
  white-space: normal;
  text-align: left;
  z-index: 1000;
}
.termo-tooltip::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%; transform: translateX(-50%);
  border: 9px solid transparent;
  border-bottom-color: #1976d2;
  
}
.termo-tooltip.visible { display: block; }

/* Eleva o termo ativo para frente de todos os outros */
.termo.ativo { z-index: 2000 !important; }

/* Mobile: tooltip em largura fixa relativa à tela, sem transbordar */
/* Mobile tooltip gerenciado via #gloss-mobile-tooltip em glossario.js */

/* ════════════════════════════════════════
   FEEDBACK FLUTUANTE +2 🌍
════════════════════════════════════════ */
.gloss-feedback {
  position: absolute;
  top: -30px; left: 50%; transform: translateX(-50%);
  background: #2e7d32; color: #fff;
  font-size: 0.8em; font-weight: bold;
  padding: 3px 10px; border-radius: 20px;
  pointer-events: none; white-space: nowrap; z-index: 1000;
  animation: glossSubir 1.3s ease forwards;
}

/* ════════════════════════════════════════
   BARRA DE PROGRESSO
════════════════════════════════════════ */
#barra-progresso-wrap {
  background: #e8f5e9; border-radius: 10px; padding: 10px 16px;
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
#barra-progresso-wrap .label { font-size: 0.82em; color: #2e7d32; white-space: nowrap; }
#barra-outer {
  flex: 1; min-width: 80px; height: 10px;
  background: #c8e6c9; border-radius: 10px; overflow: hidden;
}
#barra-inner {
  height: 100%; background: #43a047; border-radius: 10px;
  width: 0%; transition: width 0.4s ease;
}
#barra-texto { font-size: 0.82em; color: #388e3c; white-space: nowrap; }

/* ════════════════════════════════════════
   FICHA DE CONCEITOS
════════════════════════════════════════ */
#ficha-conceitos {
  margin-top: 32px;
  border: 2px solid #a5d6a7;
  border-radius: 14px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #f1f8e9, #e8f5e9);
  display: none;

}
#ficha-conceitos .ficha-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
#ficha-conceitos h3 {
  margin: 0;
  font-size: 1em; color: #2e7d32; text-transform: uppercase; letter-spacing: 0.06em;
}
#ficha-conceitos .ficha-badge {
  background: #43a047; color: #fff;
  font-size: 0.75em; font-weight: bold;
  padding: 3px 10px; border-radius: 20px;
}

#lista-glossario {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
#lista-glossario li {
  background: #fff;
  border: 1px solid #c5e1a5;
  border-left: 4px solid #66bb6a;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85em;
  line-height: 1.45;
  animation: glossFadeUp2 0.35s ease;
  max-width: 300px;
}
#lista-glossario li b { color: #2e7d32; display: inline; }

@media (max-width: 600px) {
  #lista-glossario li { max-width: 100%; width: 100%; }
}

/* ════════════════════════════════════════
   MENSAGEM DE CONCLUSÃO
════════════════════════════════════════ */
#mensagem-final {
  display: none;
  text-align: center; margin-top: 18px;
  padding: 14px; background: #fff9c4; border-radius: 10px;
  border: 2px solid #f9a825; animation: glossFadeUp2 0.4s ease;
}
#mensagem-final p { margin: 0; font-size: 1em; }

/* ════════════════════════════════════════
   ANIMAÇÕES
════════════════════════════════════════ */
@keyframes glossSubir {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-36px); }
}
@keyframes glossFadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes glossFadeUp2 {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glossSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════
   TEMAS POR ÁREA (classes opcionais)
════════════════════════════════════════ */
.termo.politica  { border-bottom-color: #3f51b5; }
.termo.economia  { border-bottom-color: #e53935; }
.termo.tecnologia{ border-bottom-color: #fb8c00; }

/* ════════════════════════════════════════
   DARK MODE
════════════════════════════════════════ */
body.dark-mode .termo {
  background: #3a3000;
  color: #ffd54f;
  border-bottom-color: #ffa000;
}
body.dark-mode .termo:hover { background: #4a4000; }

body.dark-mode .termo.coletado {
  background: #1b3a1f;
  border-bottom-color: #66bb6a;
  color: #a5d6a7;
}
body.dark-mode .termo.coletado::after { content: " ✅"; }

/* Tooltip balão */
body.dark-mode .termo-tooltip {
  background: #1e1e1e;
  color: #e0e0e0;
  border-left-color: #64b5f6;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
body.dark-mode .termo-tooltip::before {
  border-bottom-color: #64b5f6;
}

/* Barra de progresso */
body.dark-mode #barra-progresso-wrap {
  background: #1a2a1a;
}
body.dark-mode #barra-outer {
  background: #2d4a2d;
}
body.dark-mode #barra-progresso-wrap .label,
body.dark-mode #barra-texto {
  color: #81c784;
}

/* Ficha de conceitos */
body.dark-mode #ficha-conceitos {
  background: linear-gradient(135deg, #1a2a1a, #152215);
  border-color: #2e7d32;
}
body.dark-mode #ficha-conceitos h3 { color: #81c784; }

/* Lista do glossário */
body.dark-mode #lista-glossario li {
  background: #252525;
  border-color: #2d4a2d;
  border-left-color: #4caf50;
  color: #e0e0e0;
}
body.dark-mode #lista-glossario li b { color: #81c784; }

/* Mensagem de conclusão */
body.dark-mode #mensagem-final {
  background: #332b00;
  border-color: #ffa000;
  color: #ffe082;
}
