/* ==========================================================================
   DESIGN SYSTEM INFANTIL - PLATAFORMA EDUCATIVA (6 A 8 ANOS)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@700;800;900&display=swap');

:root {
  --font-kids: 'Fredoka', 'Nunito', cursive, sans-serif;
  --font-text: 'Nunito', sans-serif;

  /* Paleta Vibrante de Alto Contraste */
  --color-primary: #4F46E5;
  --color-primary-dark: #3730A3;
  --color-secondary: #06B6D4;
  --color-accent-gold: #F59E0B;
  --color-accent-coral: #F43F5E;
  --color-success: #10B981;
  --color-success-dark: #059669;
  
  --bg-gradient: linear-gradient(180deg, #E0F2FE 0%, #EFF6FF 50%, #F5F3FF 100%);
  --card-bg: #FFFFFF;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  
  --border-radius-card: 28px;
  --border-radius-button: 22px;
  --shadow-card: 0 12px 30px -8px rgba(30, 41, 59, 0.12), 0 4px 6px -2px rgba(30, 41, 59, 0.05);
  --shadow-btn: 0 6px 0px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-kids);
  background: var(--bg-gradient);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Container Responsivo Principal */
.app-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   TOP BAR (ESTRELAS, GEMAS, PORTÃO PARENTAL)
   ========================================================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding: 12px 20px;
  border-radius: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border: 3px solid #E2E8F0;
  margin-bottom: 20px;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-reward {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFBEB;
  border: 2px solid #FDE68A;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #B45309;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.badge-reward:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.badge-gem {
  background: #EFF6FF;
  border: 2px solid #BFDBFE;
  color: #1D4ED8;
}
.badge-gem:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-toggle-sound {
  background: #F8FAFC;
  color: #334155;
  border: 2px solid #CBD5E1;
  font-size: 0.95rem;
  padding: 8px 14px;
  min-height: 44px;
  transition: all 0.2s ease;
}
.btn-toggle-sound:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}
.btn-toggle-sound.is-muted {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

/* Botões Táteis com Efeito 3D */
.btn-tactile {
  font-family: var(--font-kids);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--border-radius-button);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  min-width: 56px;
  transition: all 0.1s ease;
  position: relative;
}

.btn-parental {
  background: #F1F5F9;
  color: #475569;
  border: 2px solid #CBD5E1;
  box-shadow: 0 4px 0 #94A3B8;
  font-size: 1rem;
  padding: 8px 16px;
}
.btn-parental:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #94A3B8;
}

.theme-filter-btn {
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 16px;
}
.theme-filter-btn:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
}

.btn-primary {
  background: #6366F1;
  color: white;
  box-shadow: 0 6px 0 #4338CA;
}
.btn-primary:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #4338CA;
}

.btn-success {
  background: #10B981;
  color: white;
  box-shadow: 0 6px 0 #059669;
}
.btn-success:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #059669;
}

.btn-coral {
  background: #F43F5E;
  color: white;
  box-shadow: 0 6px 0 #BE123C;
}
.btn-coral:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #BE123C;
}

.btn-undo {
  background: #6366F1;
  color: white;
  box-shadow: 0 6px 0 #4338CA;
}
.btn-undo:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #4338CA;
}

.btn-abacus {
  background: #8B5CF6;
  color: white;
  box-shadow: 0 6px 0 #6D28D9;
}
.btn-abacus:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #6D28D9;
}

.btn-hangman {
  background: #0D9488;
  color: white;
  box-shadow: 0 6px 0 #0F766E;
}
.btn-hangman:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #0F766E;
}

/* ==========================================================================
   NAVEGAÇÃO POR ABAS / ILHAS
   ========================================================================== */
.view-section {
  display: none;
  flex-direction: column;
  flex: 1;
}
.view-section.active {
  display: flex;
}

.island-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.island-card {
  background: white;
  border-radius: var(--border-radius-card);
  padding: 24px;
  border: 4px solid #E0E7FF;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.island-card:hover {
  transform: translateY(-6px);
  border-color: #818CF8;
}

.island-card-abacus {
  border-color: #FBCFE8;
}
.island-card-abacus:hover {
  border-color: #EC4899;
}

.island-card-hangman {
  border-color: #99F6E4;
}
.island-card-hangman:hover {
  border-color: #0D9488;
}

.island-icon {
  font-size: 4rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
  animation: floatBounce 3s ease-in-out infinite;
}

.island-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.island-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.4;
}

.island-tag {
  background: #EEF2FF;
  color: #4F46E5;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

/* ==========================================================================
   MASCOTE GUIA (LUMI / PLUG)
   ========================================================================== */
.mascot-helper {
  background: white;
  border-radius: 24px;
  padding: 16px 20px;
  border: 3px solid #FED7AA;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.12);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  position: relative;
}

.mascot-avatar {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-bubble {
  background: #FFF7ED;
  padding: 12px 18px;
  border-radius: 18px;
  border: 2px dashed #FDBA74;
  font-size: 1.15rem;
  color: #9A3412;
  font-weight: 600;
  flex: 1;
}

.btn-speak {
  background: #FFEDD5;
  border: 2px solid #FDBA74;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.1s;
}
.btn-speak:active {
  transform: scale(0.9);
}

/* ==========================================================================
   MINI-JOGO 1: QUEBRA-CABEÇA DE SÍLABAS
   ========================================================================== */
.game-board {
  background: white;
  border-radius: var(--border-radius-card);
  padding: 28px;
  border: 4px solid #C7D2FE;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.word-target-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.word-illustration {
  font-size: 5.5rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  margin-bottom: 6px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.word-illustration:hover {
  transform: scale(1.08);
}

.btn-word-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  font-family: var(--font-kids);
  font-size: 1.25rem;
  font-weight: 800;
  border: 3px solid #3730A3;
  border-radius: 26px;
  padding: 12px 28px;
  box-shadow: 0 6px 0 #312E81, 0 10px 20px rgba(79, 70, 229, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
  user-select: none;
}
.btn-word-audio:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #312E81, 0 12px 24px rgba(79, 70, 229, 0.35);
  background: linear-gradient(135deg, #818CF8 0%, #6366F1 100%);
}
.btn-word-audio:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #312E81;
}
.btn-word-audio.playing {
  animation: audioPulse 0.6s infinite alternate;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-color: #B45309;
  box-shadow: 0 4px 0 #92400E, 0 8px 20px rgba(245, 158, 11, 0.4);
}
.btn-word-audio .audio-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes audioPulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.target-slots-container {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  justify-content: center;
}

.syllable-slot {
  width: 100px;
  height: 90px;
  border: 4px dashed #94A3B8;
  border-radius: 20px;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  transition: all 0.2s ease;
  cursor: pointer;
}
.syllable-slot.filled {
  border-style: solid;
  border-color: #6366F1;
  background: #EEF2FF;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.syllables-tray {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.syllable-piece {
  min-width: 90px;
  height: 80px;
  padding: 0 16px;
  background: #3B82F6;
  color: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  box-shadow: 0 6px 0 #1D4ED8;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s;
  letter-spacing: 2px;
}
.syllable-piece:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #1D4ED8;
}
.syllable-piece.used {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
}

/* ==========================================================================
   MINI-JOGO 2: BALANÇA MATEMÁTICA CONCRETA (LAYOUT ESPAÇADO E ANTI-SOBREPOSIÇÃO)
   ========================================================================== */
.balance-rig {
  width: 100%;
  max-width: 580px;
  height: 250px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 10px auto 16px auto;
}

/* Suporte / Pedestal do Fulcro Elevado */
.balance-stand-base {
  position: absolute;
  bottom: 0;
  width: 130px;
  height: 18px;
  background: #64748B;
  border-radius: 9px;
  box-shadow: 0 4px 0 #475569;
  z-index: 1;
}

.balance-stand-pillar {
  position: absolute;
  bottom: 18px;
  width: 22px;
  height: 140px;
  background: linear-gradient(180deg, #475569 0%, #334155 100%);
  border-radius: 4px;
  z-index: 1;
}

.balance-stand-pivot {
  position: absolute;
  bottom: 148px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F59E0B;
  border: 4px solid #B45309;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

/* Haste Basculante Centralizada no Ponto de Apoio */
.balance-beam {
  width: min(440px, 92%);
  height: 16px;
  background: #334155;
  border-radius: 8px;
  position: absolute;
  bottom: 154px;
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Pratos da Balança */
.balance-plate {
  width: min(120px, 28vw);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.plate-chain {
  width: 3px;
  height: 38px;
  background: #94A3B8;
  border-radius: 2px;
}

.plate-pan {
  width: 100%;
  min-height: 48px;
  background: #F8FAFC;
  border: 3px solid #94A3B8;
  border-radius: 0 0 22px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.05);
}

.plate-pan.target-pan {
  border-color: #3B82F6;
  background: #EFF6FF;
}

.plate-pan.player-pan {
  border-color: #10B981;
  background: #ECFDF5;
}

.plate-weight-label {
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Painel de Ações e Alternativas (Totalmente Isolado sem Sobreposição) */
.balance-controls-panel {
  width: 100%;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 24px;
  padding: 20px 16px;
  margin-top: 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.balance-prompt {
  font-weight: 700;
  color: #475569;
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.fruits-tray {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.fruit-button {
  background: white;
  border: 3px solid #A7F3D0;
  padding: 12px 22px;
  border-radius: 20px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #065F46;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 5px 0 #6EE7B7;
  transition: transform 0.1s, box-shadow 0.1s, background-color 0.15s;
  user-select: none;
}
.fruit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #6EE7B7;
  background: #F0FDF4;
}
.fruit-button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #6EE7B7;
}

/* Botão de Retirar Fruta (Cores Quentes/Âmbar para Diferenciar da Adição) */
.fruit-button.btn-remove-fruit {
  border-color: #FDBA74;
  color: #C2410C;
  box-shadow: 0 5px 0 #FB923C;
  background: #FFF7ED;
}
.fruit-button.btn-remove-fruit:hover {
  background: #FFEDD5;
  box-shadow: 0 7px 0 #FB923C;
}
.fruit-button.btn-remove-fruit:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #FB923C;
}

/* Maçãs individuais nos pratos com feedback tátil */
.pan-apple-item {
  display: inline-block;
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.player-pan .pan-apple-item {
  cursor: pointer;
}
.player-pan .pan-apple-item:hover {
  transform: scale(1.3) translateY(-4px);
}
.player-pan .pan-apple-item:active {
  transform: scale(0.85);
}

/* ==========================================================================
   PORTÃO PARENTAL & DASHBOARD DOS PAIS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 32px;
  max-width: 500px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.num-btn {
  font-family: var(--font-kids);
  font-size: 1.5rem;
  font-weight: 700;
  height: 60px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.num-btn:hover {
  background: #E2E8F0;
}

.parent-dashboard {
  background: white;
  border-radius: var(--border-radius-card);
  padding: 28px;
  border: 4px solid #E2E8F0;
  box-shadow: var(--shadow-card);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.metric-box {
  background: #F8FAFC;
  border-radius: 20px;
  padding: 20px;
  border: 2px solid #E2E8F0;
  text-align: left;
}

.metric-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 6px;
}

/* ==========================================================================
   ANIMAÇÕES E EFEITOS
   ========================================================================== */
@keyframes floatBounce {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6)); }
}

.celebration-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: #FEF3C7;
  border: 6px solid #F59E0B;
  padding: 30px 50px;
  border-radius: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.celebration-banner.show {
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* ==========================================================================
   ÁREA RESTRITA DOS PAIS: ABAS, FORMULÁRIOS, PERFIS DE FILHOS
   ========================================================================== */
.auth-container {
  max-width: 520px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: var(--border-radius-card);
  padding: 32px;
  border: 4px solid #E2E8F0;
  box-shadow: var(--shadow-card);
}

.auth-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 18px;
  padding: 6px;
  margin-bottom: 24px;
  gap: 6px;
}

.auth-tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  border-radius: 14px;
  font-family: var(--font-kids);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #FFFFFF;
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-text);
  font-size: 1.05rem;
  border: 2px solid #CBD5E1;
  border-radius: 16px;
  background: #F8FAFC;
  color: #1E293B;
  outline: none;
  transition: border-color 0.2s;
  user-select: text;
}

.form-control:focus {
  border-color: var(--color-primary);
  background: #FFFFFF;
}

.form-feedback {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.form-feedback.error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #B91C1C;
}

.form-feedback.success {
  display: block;
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #047857;
}

.lgpd-consent-box {
  background: #F8FAFC;
  border: 2px dashed #CBD5E1;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #475569;
  text-align: left;
  line-height: 1.4;
}

.lgpd-consent-box label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #1E293B;
}

.lgpd-consent-box input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Perfis de Crianças */
.children-section {
  margin: 24px 0;
  text-align: left;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.child-card {
  background: #F8FAFC;
  border: 3px solid #E2E8F0;
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.child-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.child-card.active {
  border-color: var(--color-primary);
  background: #EEF2FF;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.child-badge-active {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}

.child-avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 10px auto;
}

.child-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1E293B;
}

.child-meta {
  font-size: 0.9rem;
  color: #64748B;
  margin-top: 4px;
}

.btn-add-child-card {
  border: 3px dashed #CBD5E1;
  background: #FAFAFA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: 700;
  min-height: 160px;
}

.btn-add-child-card:hover {
  border-color: var(--color-primary);
  background: #F5F3FF;
}

.db-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  color: #065F46;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}

/* ==========================================================================
   MINI-JOGO 3: ÁBACO MÁGICO (SOMA E SUBTRAÇÃO)
   ========================================================================== */
.abacus-mode-selector {
  display: inline-flex;
  gap: 6px;
  background: #EDE9FE;
  padding: 4px;
  border-radius: 16px;
  border: 2px solid #DDD6FE;
}

.abacus-mode-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #6D28D9;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.abacus-mode-btn:hover {
  background: #DDD6FE;
}
.abacus-mode-btn.active {
  background: #8B5CF6;
  color: white;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.35);
}

.abacus-game-board {
  background: white;
  border-radius: var(--border-radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 3px solid #F3E8FF;
  text-align: center;
  margin-top: 14px;
}

.abacus-equation-card {
  background: #F8FAFC;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.eq-challenge-text {
  font-size: 2.6rem;
  font-weight: 900;
  color: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  line-height: 1.2;
}

.eq-num {
  color: #4F46E5;
  background: #EEF2FF;
  padding: 2px 16px;
  border-radius: 16px;
  border: 2px solid #C7D2FE;
}

.eq-op {
  color: #F59E0B;
  font-size: 2.2rem;
}

.eq-target {
  color: #94A3B8;
  background: #F1F5F9;
  border: 2.5px dashed #CBD5E1;
  padding: 2px 20px;
  border-radius: 16px;
}

.eq-current-feedback {
  margin-top: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748B;
  transition: all 0.2s ease;
}

.eq-current-feedback.match {
  color: #065F46;
  background: #ECFDF5;
  border: 2px solid #A7F3D0;
  display: inline-block;
  padding: 6px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  animation: pulseLight 1.5s infinite;
}

@keyframes pulseLight {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Moldura Rústica de Madeira do Ábaco */
.abacus-frame {
  background: #FEF3C7;
  border: 9px solid #92400E;
  border-radius: 30px;
  box-shadow: 0 14px 30px rgba(146, 64, 14, 0.18), inset 0 4px 10px rgba(0, 0, 0, 0.06);
  padding: 14px 20px;
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

.abacus-top-beam {
  font-size: 1.1rem;
  font-weight: 800;
  color: #78350F;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 3px solid #D97706;
  padding-bottom: 10px;
}

.abacus-wires-container {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 20px;
  padding: 16px 8px;
  min-height: 420px;
}

.abacus-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.abacus-rod-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.rod-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.rod-header-tens .rod-title { color: #4338CA; }
.rod-header-units .rod-title { color: #B45309; }

.rod-badge {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 12px;
}

.rod-header-tens .rod-badge {
  background: #EEF2FF;
  color: #3730A3;
  border: 1.5px solid #C7D2FE;
}

.rod-header-units .rod-badge {
  background: #FFFBEB;
  color: #92400E;
  border: 1.5px solid #FDE68A;
}

.abacus-wire-slot {
  position: relative;
  width: 100%;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.abacus-metal-rod {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  background: linear-gradient(90deg, #94A3B8, #F1F5F9, #64748B);
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.abacus-beads-zone {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
  min-height: 140px;
}

.abacus-beads-zone.active-zone {
  justify-content: flex-end; /* Encosta para baixo, junto à barra de leitura */
}

.abacus-beads-zone.inactive-zone {
  justify-content: flex-start; /* Encosta para baixo, em repouso */
}

/* Viga Central de Leitura */
.abacus-reading-beam {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 10px;
  background: #78350F;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin: 6px 0;
}

.abacus-divider-wire {
  width: 3px;
  background: #D97706;
  opacity: 0.4;
  border-radius: 2px;
}

/* Contas do Ábaco (Visual 3D Esférico/Oval) */
.abacus-bead {
  width: 76px;
  height: 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s, opacity 0.15s;
  position: relative;
  user-select: none;
}

.abacus-bead:hover {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.abacus-bead:active {
  transform: scale(0.95);
}

.bead-tens {
  background: linear-gradient(180deg, #818CF8 0%, #4F46E5 55%, #312E81 100%);
  border: 1.5px solid #1E1B4B;
  box-shadow: 0 3px 6px rgba(49, 46, 129, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.5);
}

.bead-units {
  background: linear-gradient(180deg, #FCD34D 0%, #F59E0B 55%, #B45309 100%);
  border: 1.5px solid #78350F;
  box-shadow: 0 3px 6px rgba(180, 83, 9, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.5);
}

.abacus-bead.inactive {
  opacity: 0.55;
  filter: saturate(0.7);
}

.abacus-rod-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.btn-bead-ctrl {
  min-height: 40px;
  padding: 6px 14px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 14px;
  background: white;
  border: 2px solid #C7D2FE;
  color: #4338CA;
  box-shadow: 0 4px 0 #A5B4FC;
}
.btn-bead-ctrl:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #A5B4FC;
}

.btn-bead-minus {
  border-color: #FED7AA;
  color: #C2410C;
  box-shadow: 0 4px 0 #FDBA74;
}
.btn-bead-minus:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #FDBA74;
}

.abacus-bottom-beam {
  border-top: 3px solid #D97706;
  padding-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #92400E;
}

.abacus-actions-tray {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ==========================================================================
   MINI-JOGO 4: JOGO DA FORCA (BALÕES MÁGICOS E PISTAS ILUSTRADAS)
   ========================================================================== */
.hangman-game-board {
  background: white;
  border-radius: var(--border-radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 3px solid #CCFBF1;
  text-align: center;
  margin-top: 14px;
}

.hangman-stage-card {
  background: #F0FDFA;
  border: 2.5px solid #99F6E4;
  border-radius: 24px;
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.06);
}

.hangman-clue-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: left;
}

.hangman-icon-bubble {
  font-size: 3.6rem;
  background: white;
  border-radius: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #5EEAD4;
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.15);
  animation: floatBounce 3s ease-in-out infinite;
}

.hangman-clue-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 380px;
}

.hangman-category-pill {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0F766E;
  background: #CCFBF1;
  padding: 2px 10px;
  border-radius: 10px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hangman-clue-desc {
  font-size: 1.25rem;
  font-weight: 700;
  color: #134E4A;
  margin: 0;
  line-height: 1.35;
}

/* Balões Mágicos (Vidas Lúdicas) */
.hangman-balloons-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px dashed #99F6E4;
}

.balloons-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F766E;
}

.balloons-row {
  display: flex;
  gap: 12px;
  font-size: 2.2rem;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.balloon-item {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s, filter 0.3s;
  animation: balloonFloat 2.5s ease-in-out infinite alternate;
  user-select: none;
}

.balloon-item.popped {
  opacity: 0.2;
  filter: grayscale(100%);
  transform: scale(0.6) translateY(12px) !important;
}

@keyframes balloonFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Slots da Palavra Secreta */
.hangman-slots-wrapper {
  padding: 14px 0 24px;
  display: flex;
  justify-content: center;
}

.hangman-slots-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hangman-letter-slot {
  width: 58px;
  height: 68px;
  background: #F8FAFC;
  border: 3px solid #94A3B8;
  border-bottom: 6px solid #475569;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  font-weight: 900;
  color: #0F172A;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.hangman-letter-slot.revealed {
  background: #ECFDF5;
  border-color: #10B981;
  border-bottom-color: #059669;
  color: #065F46;
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.2);
  animation: popSlot 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popSlot {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1.06); }
}

/* Teclado do Alfabeto A-Z */
.hangman-keyboard-section {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 24px;
  padding: 20px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.keyboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 800;
  color: #475569;
  font-size: 1.05rem;
}

.letters-tried-pill {
  background: #E2E8F0;
  color: #334155;
  font-size: 0.85rem;
  padding: 3px 12px;
  border-radius: 12px;
}

.hangman-alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
}

.hangman-key {
  min-height: 52px;
  border: 2px solid #CBD5E1;
  background: white;
  border-radius: 14px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  box-shadow: 0 4px 0 #94A3B8;
  transition: transform 0.1s, box-shadow 0.1s, background-color 0.15s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.hangman-key:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #94A3B8;
  background: #F1F5F9;
}

.hangman-key:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 0 0 #94A3B8;
}

.hangman-key.correct {
  background: #10B981 !important;
  color: white !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 0 #047857 !important;
  cursor: not-allowed;
  opacity: 0.95;
}

.hangman-key.wrong {
  background: #F1F5F9 !important;
  color: #94A3B8 !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 1px 0 #CBD5E1 !important;
  text-decoration: line-through;
  text-decoration-color: #EF4444;
  text-decoration-thickness: 3px;
  cursor: not-allowed;
  opacity: 0.5;
}

/* ==========================================================================
   TELA INICIAL DE LOGIN: HERO HEADER E RECURSOS
   ========================================================================== */
.auth-hero-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-hero-title {
  font-size: 2.2rem;
  color: var(--color-primary-dark);
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.auth-hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 18px auto;
  line-height: 1.5;
}

.auth-pill-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* CHIP DA CRIANÇA ATIVA NA TOP-BAR */
.child-active-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 2.5px solid #818CF8;
  padding: 5px 14px 5px 8px;
  border-radius: 26px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.12);
}

.child-active-chip:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.2);
}

.chip-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #EEF2FF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #C7D2FE;
  flex-shrink: 0;
}

.chip-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.chip-name {
  font-size: 1rem;
  font-weight: 800;
  color: #1E293B;
  line-height: 1.1;
}

.chip-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4F46E5;
}

/* BADGE DE CAPACIDADE DE FILHOS (ATÉ 10) */
.children-capacity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F1F5F9;
  border: 2px solid #E2E8F0;
  padding: 10px 16px;
  border-radius: 16px;
  margin-top: 10px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
}

.capacity-counter-pill {
  background: #4F46E5;
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.capacity-limit-reached {
  background: #FEF2F2;
  border: 2px solid #FCA5A5;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 12px;
  text-align: center;
}

/* ==========================================================================
   PERSONALIZADOR DE AVATAR (SVG DINÂMICO INTERATIVO)
   ========================================================================== */
.avatar-customizer-box {
  background: #F8FAFC;
  border: 2.5px solid #E2E8F0;
  border-radius: 22px;
  padding: 16px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.avatar-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.avatar-preview-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid #818CF8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
  margin-bottom: 10px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.avatar-preview-circle:hover {
  transform: scale(1.06);
}

.avatar-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatches-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.color-swatch-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.selected {
  outline: 3px solid #4F46E5;
  outline-offset: 2px;
  transform: scale(1.15);
}

.avatar-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.avatar-chip-btn {
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 12px;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: var(--font-kids);
}

.avatar-chip-btn:hover {
  border-color: #818CF8;
  background: #EEF2FF;
}

.avatar-chip-btn.selected {
  background: #4F46E5;
  border-color: #3730A3;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
}

.btn-randomize-avatar {
  background: #EDE9FE;
  color: #6D28D9;
  border: 2px solid #C4B5FD;
  border-radius: 14px;
  font-family: var(--font-kids);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-randomize-avatar:hover {
  background: #DDD6FE;
  transform: translateY(-2px);
}

/* ==========================================================================
   ESTILOS PARA RECUPERAÇÃO DE SENHA, VALIDAÇÃO DE E-MAIL E RELATÓRIOS
   ========================================================================== */
.verify-code-input {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  text-align: center;
  letter-spacing: 8px;
  color: var(--color-primary-dark) !important;
  background: #EEF2FF !important;
  border: 2.5px solid #818CF8 !important;
  border-radius: 18px !important;
  padding: 12px !important;
}

.dev-code-banner {
  background: #FEF3C7;
  border: 2px dashed #F59E0B;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #92400E;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dev-code-badge {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 3px;
  background: #FFFFFF;
  color: #B45309;
  padding: 4px 12px;
  border-radius: 10px;
  border: 2px solid #FCD34D;
}

.report-child-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.report-child-picker-bar label {
  font-size: 1rem;
  color: #334155;
  font-weight: 700;
}

.report-child-picker-bar select {
  max-width: 320px;
  padding: 10px 14px;
}

.bncc-report-card {
  background: #FFFFFF;
  border: 2.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.skills-report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 12px;
  font-family: var(--font-text);
  font-size: 0.95rem;
}

.skills-report-table th {
  background: #F1F5F9;
  color: #475569;
  font-weight: 800;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid #CBD5E1;
}

.skills-report-table th:first-child {
  border-top-left-radius: 12px;
}

.skills-report-table th:last-child {
  border-top-right-radius: 12px;
}

.skills-report-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #E2E8F0;
  color: #1E293B;
  vertical-align: middle;
}

.skills-report-table tr:hover td {
  background: #F8FAFC;
}

.bncc-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  background: #EEF2FF;
  color: #4338CA;
  border: 1.5px solid #C7D2FE;
  padding: 3px 8px;
  border-radius: 8px;
  font-family: monospace;
}

.status-badge-completed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
}

.status-badge-progress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ==========================================================================
   SELETOR DE DIFICULDADE E BADGES NOS JOGOS
   ========================================================================== */
.difficulty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 2px solid #CBD5E1;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}
.difficulty-pill:hover {
  background: #EEF2FF;
  border-color: #818CF8;
  transform: translateY(-2px);
}
.difficulty-pill.diff-facil {
  background: #ECFDF5;
  border-color: #6EE7B7;
  color: #047857;
}
.difficulty-pill.diff-medio {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #B45309;
}
.difficulty-pill.diff-desafio {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #B91C1C;
}

/* Cards de Escolha de Dificuldade no Modal */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.diff-card {
  background: #FFFFFF;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
.diff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.diff-card.selected {
  border-color: #6366F1;
  background: #EEF2FF;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.diff-card-facil.selected {
  border-color: #10B981;
  background: #ECFDF5;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.diff-card-medio.selected {
  border-color: #F59E0B;
  background: #FFFBEB;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}
.diff-card-desafio.selected {
  border-color: #EF4444;
  background: #FEF2F2;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.diff-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.diff-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.diff-desc {
  font-size: 0.88rem;
  color: #64748B;
  line-height: 1.35;
  margin-top: 4px;
}
.diff-badge-rec {
  position: absolute;
  top: -12px;
  right: 12px;
  background: #F59E0B;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   MODAIS EXPLICATIVOS (DIFICULDADE E RECOMPENSAS)
   ========================================================================== */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.custom-modal-overlay.active {
  display: flex;
}

.custom-modal-box {
  background: white;
  border-radius: 28px;
  max-width: 620px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 4px solid #E0E7FF;
  position: relative;
  animation: modalPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.rewards-modal-icon-bounce {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 12px;
  display: block;
  animation: rewardPulse 1.8s infinite ease-in-out;
}

@keyframes rewardPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15) rotate(5deg);
  }
}

/* ==========================================================================
   MELHORIAS DE EXPERIÊNCIA PWA & DISPOSITIVOS MÓVEIS (CELULARES E TABLETS)
   ========================================================================== */

/* Suporte a entalhes de tela (Notch / Ilha Dinâmica / Barra Home no iOS e Android) */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Prevenção de recarga acidental por gesto (pull-to-refresh) em telas touch */
body {
  overscroll-behavior-y: contain;
}

/* Adaptações Visuais em Modo Standalone (App Instalado) */
body.pwa-standalone {
  user-select: none;
  -webkit-user-select: none;
}

body.pwa-standalone .app-container {
  padding-top: 8px;
}

/* Banner de Convite de Instalação PWA */
.pwa-install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
  border: 2px solid #C7D2FE;
  animation: modalPopIn 0.3s ease;
  flex-wrap: wrap;
  gap: 12px;
}

.pwa-install-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 240px;
}

.pwa-install-banner-icon {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pwa-install-banner-text h3 {
  font-size: 1.15rem;
  margin-bottom: 2px;
  font-weight: 800;
  color: #FFFFFF;
}

.pwa-install-banner-text p {
  font-size: 0.9rem;
  color: #E0E7FF;
  line-height: 1.3;
}

.pwa-install-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-pwa-install {
  background: #F59E0B !important;
  color: #78350F !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 0 #B45309 !important;
  padding: 10px 18px !important;
  font-size: 1rem !important;
  border-radius: 16px !important;
  cursor: pointer;
}

.btn-pwa-install:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #B45309 !important;
}

.btn-pwa-dismiss {
  background: transparent;
  border: none;
  color: #E0E7FF;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-pwa-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* Botão de Instalação na Top Bar */
.pwa-install-trigger {
  display: none;
  align-items: center;
  gap: 6px;
  background: #FEF3C7;
  color: #92400E;
  border: 2px solid #FDE68A;
  box-shadow: 0 3px 0 #D97706;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 8px 14px;
  min-height: 44px;
}

.pwa-install-trigger:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #D97706;
}

/* Toasts de Notificação PWA (Offline / Online / Update) */
.pwa-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.pwa-toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  animation: modalPopIn 0.3s ease;
}

.pwa-toast-success {
  background: #10B981;
  color: #FFFFFF;
  border: 2px solid #059669;
}

.pwa-toast-warning {
  background: #F59E0B;
  color: #78350F;
  border: 2px solid #D97706;
}

.pwa-toast-info {
  background: #3B82F6;
  color: #FFFFFF;
  border: 2px solid #2563EB;
}

.pwa-toast-update {
  background: #4F46E5;
  color: #FFFFFF;
  border: 2px solid #3730A3;
  flex-direction: column;
  align-items: flex-start;
}

.pwa-toast-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  opacity: 0.8;
}

.pwa-toast-close:hover {
  opacity: 1;
}

/* Modal de Instruções de Instalação no iOS (Safari) */
.pwa-ios-step {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  background: #F8FAFC;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  text-align: left;
}

.pwa-ios-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4F46E5;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.pwa-ios-step-text {
  font-size: 1rem;
  color: #334155;
  line-height: 1.35;
}



