:root {
  --primary: #2563eb; /* Azul Investimento */
  --secondary: #10b981; /* Verde Dinheiro */
  --bg: #f3f4f6;
  --text: #1f2937;
  --card-bg: #ffffff;
  --wrong: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Containers */
.screen { display: none; width: 100%; max-width: 600px; text-align: center; animation: fadeIn 0.5s ease; }
.screen.active { display: block; }

/* Typography */
h1 { font-size: 2rem; margin-bottom: 10px; color: var(--primary); }
h2 { font-size: 1.5rem; margin-bottom: 20px; }
p { margin-bottom: 20px; font-size: 1.1rem; color: #4b5563; }

/* Buttons & Cards */
.btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  width: 100%;
  margin-top: 10px;
}
.btn:active { transform: scale(0.98); }
.btn-outline { background-color: transparent; border: 2px solid var(--primary); color: var(--primary); }

.module-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.module-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  cursor: pointer;
  border-left: 5px solid var(--primary);
  text-align: left;
  transition: transform 0.2s;
}
.module-card:hover { transform: translateY(-3px); }
.module-card h3 { margin-bottom: 5px; color: var(--text); }
.module-card span { font-size: 0.9rem; color: #6b7280; }

/* Quiz */
.progress-bar { width: 100%; height: 8px; background: #e5e7eb; border-radius: 4px; margin-bottom: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--secondary); width: 0%; transition: width 0.3s; }

.option-btn {
  background: var(--card-bg);
  border: 2px solid #e5e7eb;
  color: var(--text);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  transition: all 0.2s;
}
.option-btn:hover { border-color: var(--primary); }
.option-btn.correct { background-color: #d1fae5; border-color: var(--secondary); color: #065f46; }
.option-btn.wrong { background-color: #fee2e2; border-color: var(--wrong); color: #991b1b; }
.option-btn.disabled { pointer-events: none; opacity: 0.7; }

.feedback { margin-top: 20px; font-weight: bold; min-height: 24px; }
.feedback.success { color: var(--secondary); }
.feedback.error { color: var(--wrong); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================
   HUD de Moedas (canto)
========================= */
.coin-hud {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 9999;
  user-select: none;
}

.coin-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

#coin-count {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

/* utilitário para esconder */
.hidden {
  display: none !important;
}

/* =========================
   Animação do +1
========================= */
.coin-pop {
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
  color: var(--secondary);
}

.coin-pop.show {
  opacity: 1;
  transform: translateY(-8px);
}

/* =========================
   Tela: Login Fantasma
========================= */
.form-card {
  background: var(--card-bg);
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
  text-align: left;
}

.field-label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
}

.field-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  outline: none;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

.field-input:focus {
  border-color: var(--primary);
}

.user-greeting {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 10px;
  text-align: left;
}

/* =========================
   ANIMAÇÃO FINAL (COIN BURST)
   ========================= */

.coin-burst.hidden {
  display: none;
}

.coin-burst {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.35); /* overlay */
  z-index: 9999;
}

.coin-burst-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 22px 18px;
  width: min(420px, 92vw);
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
  text-align: center;

  transform: scale(0.85);
  opacity: 0;
}

.coin-burst-emoji {
  font-size: 48px;
  margin-bottom: 8px;
}

.coin-burst-text {
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.coin-burst-sub {
  color: #4b5563;
  font-size: 0.95rem;
}

/* quando ativar */
.coin-burst.show .coin-burst-card {
  animation: coinBurstPop 650ms ease forwards;
}

@keyframes coinBurstPop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.coin-line{
  display:flex;
  align-items:center;
  gap:8px;
}

.coin-line.total{
  opacity:0.9;
  font-size:0.95rem;
}

.coin-label{
  font-size:0.85rem;
  opacity:0.8;
}

.coins-result{
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
  font-size: 1rem;
}

