/* ============================================================
   game-shared.css
   Estilos comuns a todos os minijogos da Mentuca.
   Cada jogo inclui este arquivo ANTES do seu style.css específico.
   ============================================================ */

/* ── VARIÁVEIS GLOBAIS ───────────────────────────────────────────────────── */
:root {
  --correct:       #6aaa64;
  --present:       #c9b458;
  --absent:        #787c7e;
  --bg-color:      #ffffff;
  --border-color:  #d3d6da;
  --text-color:    #111827;
  --muted-color:   #6b7280;
  --mentuca-color: #58cc02;
  --accent:        #1d4ed8;
  --accent-light:  #dbeafe;
  --font:          'Nunito', Arial, sans-serif;
}

/* ── RESET & BASE ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  touch-action: manipulation;
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 64px;
}

.back-btn {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}

.back-btn::before {
  content: '←';
  font-size: 1rem;
}

.back-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.header-content {
  text-align: center;
}

.header-content h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1e3a8a;
}

.header-content p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted-color);
}

.mentuca-logo {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 210px;
  height: auto;
}

@media (max-width: 560px) {
  .mentuca-logo { width: 110px; right: 10px; }
  .header-content h1 { font-size: 1.2rem; }
  .back-btn { font-size: 0.75rem; padding: 5px 7px; }
}

/* ── BANNER DE INFO (matéria / tema do dia) ─────────────────────────────── */
.info-banner {
  width: 100%;
  max-width: 560px;
  margin: 10px auto 0;
  background: #f0f9ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-banner-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-color);
}

.info-banner-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a8a;
}

/* ── UTILIDADE ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #111827;
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 2000;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { opacity: 1; }

/* ── MODAL ───────────────────────────────────────────────────────────────── */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: white;
  padding: 26px 24px 22px;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  background: none;
  border: none;
}

.close-btn:hover { color: #555; }

#modal-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #111;
}

#modal-message {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #374151;
}

/* ── ESTATÍSTICAS ────────────────────────────────────────────────────────── */
#statistics {
  margin-bottom: 10px;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 14px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111;
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted-color);
  text-align: center;
}

/* ── BOTÃO COMPARTILHAR ──────────────────────────────────────────────────── */
#share-btn {
  display: block;
  width: 100%;
  background-color: var(--correct);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  border-radius: 8px;
  cursor: pointer;
  margin-top: 6px;
  transition: background-color 0.15s;
}

#share-btn:hover { background-color: #58966c; }

/* ── CTA LOJA ────────────────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}

.cta-mentuca p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #374151;
  font-weight: 700;
}

.cta-btns {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.mentuca-btn {
  display: inline-block;
  background-color: var(--mentuca-color);
  color: white;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 700;
  border-radius: 30px;
  font-size: 1rem;
  box-shadow: 0 4px 0 #46a302;
  transition: transform 0.1s;
}

.mentuca-btn:hover { color: white; }
.mentuca-btn:active { transform: translateY(4px); box-shadow: none; }
