/* ==========================================================================
   ALFABETIZAÇÃO KIDS — Stylesheet v1.0.0
   Tema: Alegre, colorido, amigável para crianças
   Fontes: Fredoka One (títulos) + Nunito (corpo)
   ========================================================================== */

/* ── Variáveis ──────────────────────────────────────────────────────────── */
:root {
  --ak-orange:    #FF6B35;
  --ak-orange2:   #EA580C;
  --ak-teal:      #4ECDC4;
  --ak-teal2:     #0D9488;
  --ak-yellow:    #FFE66D;
  --ak-yellow2:   #F59E0B;
  --ak-pink:      #FF85A1;
  --ak-green:     #6BCB77;
  --ak-purple:    #C77DFF;
  --ak-blue:      #4CC9F0;
  --ak-bg:        #FFFBF0;
  --ak-white:     #FFFFFF;
  --ak-dark:      #1E1B2E;
  --ak-gray:      #6B7280;
  --ak-light:     #F3F4F6;
  --ak-border:    #E5E7EB;

  --r-sm:   12px;
  --r-md:   20px;
  --r-lg:   32px;
  --r-pill: 100px;

  --sh-sm:  0 4px 12px rgba(0,0,0,0.07);
  --sh-md:  0 8px 28px rgba(0,0,0,0.11);
  --sh-lg:  0 20px 56px rgba(0,0,0,0.15);

  --ff-title: 'Fredoka One', cursive;
  --ff-body:  'Nunito', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
.ak-app *, .ak-footer * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.ak-app {
  font-family: var(--ff-body);
  background: var(--ak-bg);
  color: var(--ak-dark);
  overflow-x: hidden;
  min-height: 80vh;
}

/* ── Loading ────────────────────────────────────────────────────────────── */
.ak-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 16px;
}
.ak-loading p {
  font-family: var(--ff-body);
  font-weight: 700;
  color: var(--ak-gray);
  font-size: 18px;
}
.ak-loading-spinner {
  font-size: 56px;
  display: block;
  animation: ak-spin 1.2s linear infinite;
}

/* ── Header / Nav ───────────────────────────────────────────────────────── */
.ak-header {
  background: var(--ak-white);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--sh-sm);
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 16px;
}
.ak-logo {
  font-family: var(--ff-title);
  font-size: 26px;
  color: var(--ak-orange);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  user-select: none;
}
.ak-logo:hover { opacity: .85; }
.ak-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ak-nav-btn {
  background: none;
  border: 2.5px solid var(--ak-orange);
  color: var(--ak-orange);
  font-family: var(--ff-body);
  font-weight: 800;
  font-size: 14px;
  padding: 7px 18px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .22s ease;
  white-space: nowrap;
}
.ak-nav-btn:hover, .ak-nav-btn.ak-active {
  background: var(--ak-orange);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255,107,53,.35);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.ak-hero {
  position: relative;
  padding: 72px 28px 80px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(145deg, #FF6B35 0%, #FF85A1 55%, #FFD93D 100%);
}
.ak-hero-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.18) 1.5px, transparent 1.5px);
  background-size: 36px 36px;
  pointer-events: none;
}
.ak-hero-emoji {
  font-size: 88px;
  display: block;
  margin-bottom: 20px;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.18));
  animation: ak-bounce 2.4s ease-in-out infinite;
}
.ak-hero h1 {
  font-family: var(--ff-title);
  font-size: clamp(38px, 7vw, 72px);
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.18);
  margin-bottom: 18px;
  line-height: 1.1;
}
.ak-hero p {
  font-size: clamp(16px, 2.8vw, 22px);
  color: rgba(255,255,255,.94);
  font-weight: 700;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* ── Botões ─────────────────────────────────────────────────────────────── */
.ak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 36px;
  border-radius: var(--r-pill);
  border: none;
  font-family: var(--ff-body);
  font-weight: 900;
  font-size: 17px;
  cursor: pointer;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  letter-spacing: .2px;
  line-height: 1;
}
.ak-btn-primary {
  background: var(--ak-orange);
  color: #fff;
  box-shadow: 0 8px 28px rgba(255,107,53,.45);
}
.ak-btn-primary:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 36px rgba(255,107,53,.5);
}
.ak-btn-teal {
  background: var(--ak-teal);
  color: #fff;
  box-shadow: 0 8px 28px rgba(78,205,196,.45);
}
.ak-btn-teal:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 36px rgba(78,205,196,.5);
}
.ak-btn-outline {
  background: transparent;
  color: var(--ak-orange);
  border: 3px solid var(--ak-orange);
  padding: 12px 28px;
}
.ak-btn-outline:hover {
  background: var(--ak-orange);
  color: #fff;
  transform: translateY(-2px);
}
.ak-btn-gray {
  background: #E5E7EB;
  color: var(--ak-gray);
}
.ak-btn-gray:hover { background: #D1D5DB; transform: translateY(-1px); }
.ak-btn:disabled, .ak-btn.ak-disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Seções gerais ──────────────────────────────────────────────────────── */
.ak-section {
  padding: 60px 28px;
}
.ak-section-white { background: var(--ak-white); }
.ak-section-bg    { background: var(--ak-bg); }
.ak-section-title {
  font-family: var(--ff-title);
  font-size: clamp(28px,4vw,42px);
  color: var(--ak-dark);
  margin-bottom: 10px;
  text-align: center;
}
.ak-section-sub {
  font-size: 16px;
  font-weight: 700;
  color: var(--ak-gray);
  text-align: center;
  margin-bottom: 40px;
}

/* ── Seletor de Idade ───────────────────────────────────────────────────── */
.ak-age-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 36px;
}
.ak-age-btn {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 4px solid var(--ak-border);
  background: var(--ak-white);
  font-family: var(--ff-title);
  cursor: pointer;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: var(--sh-sm);
  position: relative;
}
.ak-age-btn .num {
  font-size: 34px;
  color: var(--ak-orange);
  line-height: 1;
}
.ak-age-btn .lbl {
  font-size: 9px;
  color: var(--ak-gray);
  font-family: var(--ff-body);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.ak-age-btn:hover {
  transform: scale(1.14) translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: var(--ak-orange);
}
.ak-age-btn.ak-selected {
  background: var(--ak-orange);
  border-color: var(--ak-orange);
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(255,107,53,.4);
}
.ak-age-btn.ak-selected .num { color: #fff; }
.ak-age-btn.ak-selected .lbl { color: rgba(255,255,255,.9); }

.ak-age-result {
  text-align: center;
  animation: ak-fade-up .4s ease;
}

/* ── Cards de Jogos ─────────────────────────────────────────────────────── */
.ak-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
}
.ak-game-card {
  background: var(--ak-white);
  border-radius: var(--r-lg);
  padding: 36px 26px 28px;
  text-align: center;
  box-shadow: var(--sh-sm);
  border: 3px solid transparent;
  transition: all .32s cubic-bezier(.34,1.56,.64,1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.ak-game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: var(--card-color, var(--ak-orange));
  border-radius: 0 0 4px 4px;
}
.ak-game-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--sh-lg);
  border-color: var(--card-color, var(--ak-orange));
}
.ak-card-icon {
  font-size: 68px;
  display: block;
  margin-bottom: 14px;
  animation: ak-float 3.5s ease-in-out infinite;
}
.ak-card-badge {
  display: inline-block;
  padding: 5px 18px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ak-game-card h3 {
  font-family: var(--ff-title);
  font-size: 30px;
  color: var(--ak-dark);
  margin-bottom: 8px;
}
.ak-game-card > p {
  color: var(--ak-gray);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 20px;
}
.ak-card-emojis {
  font-size: 26px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

/* ── Features ───────────────────────────────────────────────────────────── */
.ak-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.ak-feat-card {
  background: var(--ak-bg);
  border-radius: var(--r-lg);
  padding: 32px 18px;
  text-align: center;
  transition: all .28s ease;
}
.ak-feat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-md);
  background: var(--ak-white);
}
.ak-feat-icon { font-size: 48px; display: block; margin-bottom: 14px; }
.ak-feat-card h3 { font-family: var(--ff-title); font-size: 20px; color: var(--ak-dark); margin-bottom: 6px; }
.ak-feat-card p  { font-size: 13px; color: var(--ak-gray); font-weight: 700; line-height: 1.6; }

/* ── Tabuleiro do Jogo ──────────────────────────────────────────────────── */
.ak-game-view {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}
.ak-game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ak-score-pill {
  background: var(--ak-yellow);
  color: var(--ak-dark);
  font-family: var(--ff-title);
  font-size: 18px;
  padding: 8px 20px;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ak-word-pill {
  background: var(--ak-light);
  color: var(--ak-gray);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
}
.ak-progress-wrap {
  background: #E5E7EB;
  border-radius: var(--r-pill);
  height: 13px;
  margin-bottom: 20px;
  overflow: hidden;
}
.ak-progress-bar {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--ak-teal), var(--ak-green));
  transition: width .6s ease;
}
.ak-nivel-badge {
  text-align: center;
  margin-bottom: 18px;
}
.ak-nivel-tag {
  display: inline-block;
  padding: 6px 22px;
  border-radius: var(--r-pill);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .3px;
}

/* ── Caixa da Imagem ────────────────────────────────────────────────────── */
.ak-image-box {
  background: linear-gradient(135deg, #FFF9E6, #FFF0C4);
  border: 4px solid #FFD700;
  border-radius: var(--r-lg);
  padding: 36px 24px 24px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(255,215,0,.22);
  position: relative;
}
.ak-image-emoji {
  font-size: 108px;
  display: block;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.14));
}
.ak-image-hint {
  font-weight: 800;
  font-size: 14px;
  color: var(--ak-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Slots de Resposta ──────────────────────────────────────────────────── */
.ak-slots {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.ak-slot {
  min-width: 74px;
  height: 74px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 3px dashed #CBD5E1;
  background: var(--ak-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-title);
  font-size: 22px;
  color: var(--ak-dark);
  cursor: pointer;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.04);
  user-select: none;
}
.ak-slot.ak-filled {
  border-style: solid;
  border-color: var(--ak-teal);
  background: linear-gradient(135deg, #E6FAFA, #D0F4F2);
  color: var(--ak-teal2);
  transform: scale(1.06);
}
.ak-slot.ak-filled:hover {
  border-color: var(--ak-pink);
  background: linear-gradient(135deg, #FFF0F5, #FFE0EC);
  color: #C9185B;
  transform: scale(1.09);
}
.ak-slot.ak-correct {
  border-color: var(--ak-green) !important;
  background: linear-gradient(135deg, #E8F8E8, #D0F0D0) !important;
  color: #2E7D32 !important;
  animation: ak-pop .5s ease;
}
.ak-slot.ak-wrong { animation: ak-shake .5s ease; }

/* ── Banco de Sílabas ───────────────────────────────────────────────────── */
.ak-syllable-bank {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  background: var(--ak-light);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  margin-bottom: 24px;
  border: 2px solid var(--ak-border);
}
.ak-syl-btn {
  min-width: 74px;
  height: 74px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: none;
  background: var(--ak-white);
  font-family: var(--ff-title);
  font-size: 22px;
  color: var(--ak-dark);
  cursor: pointer;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--sh-sm);
  position: relative;
  user-select: none;
}
/* Barras coloridas embaixo de cada sílaba */
.ak-syl-btn:nth-child(6n+1) { border-bottom: 5px solid var(--ak-orange); }
.ak-syl-btn:nth-child(6n+2) { border-bottom: 5px solid var(--ak-teal);   }
.ak-syl-btn:nth-child(6n+3) { border-bottom: 5px solid var(--ak-pink);   }
.ak-syl-btn:nth-child(6n+4) { border-bottom: 5px solid var(--ak-green);  }
.ak-syl-btn:nth-child(6n+5) { border-bottom: 5px solid var(--ak-purple); }
.ak-syl-btn:nth-child(6n+6) { border-bottom: 5px solid var(--ak-blue);   }

.ak-syl-btn:hover {
  transform: translateY(-7px) scale(1.1);
  box-shadow: var(--sh-md);
}
.ak-syl-btn:active { transform: translateY(-2px) scale(.97); }
.ak-syl-btn.ak-used {
  opacity: .3;
  pointer-events: none;
  transform: scale(.9);
}

/* ── Barra de Ações ─────────────────────────────────────────────────────── */
.ak-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Overlay de Sucesso ─────────────────────────────────────────────────── */
.ak-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,27,46,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: ak-fade-in .3s ease;
}
.ak-success-card {
  background: var(--ak-white);
  border-radius: var(--r-lg);
  padding: 52px 44px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  animation: ak-pop-up .45s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--sh-lg);
}
.ak-success-card .s-emoji  { font-size: 80px; display: block; margin-bottom: 12px; }
.ak-success-card .s-title  { font-family: var(--ff-title); font-size: 42px; color: var(--ak-green); margin-bottom: 6px; }
.ak-success-card .s-word   { font-family: var(--ff-title); font-size: 44px; color: var(--ak-orange); letter-spacing: 5px; margin-bottom: 20px; }
.ak-stars-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 40px;
  margin-bottom: 28px;
}
.ak-star-item { filter: grayscale(1) opacity(.25); transition: all .3s ease; }
.ak-star-item.ak-lit {
  filter: none;
  animation: ak-star-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}
.ak-star-item.ak-lit:nth-child(2) { animation-delay: .15s; }
.ak-star-item.ak-lit:nth-child(3) { animation-delay: .30s; }

/* ── Confetti ───────────────────────────────────────────────────────────── */
.ak-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 19999;
  border-radius: 3px;
  animation: ak-fall linear forwards;
}

/* ── Tela de Resultado ──────────────────────────────────────────────────── */
.ak-results-view {
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 24px;
  text-align: center;
}
.ak-trophy-big { font-size: 100px; display: block; margin-bottom: 20px; animation: ak-bounce 2.5s ease-in-out infinite; }
.ak-result-score-box {
  background: var(--ak-white);
  border-radius: var(--r-lg);
  padding: 36px;
  margin: 32px 0;
  box-shadow: var(--sh-md);
}
.ak-big-number  { font-family: var(--ff-title); font-size: 72px; line-height: 1; }
.ak-score-label { font-weight: 700; color: var(--ak-gray); font-size: 18px; margin-top: 6px; }
.ak-result-bar-wrap {
  background: #E5E7EB;
  border-radius: var(--r-pill);
  height: 18px;
  margin-top: 24px;
  overflow: hidden;
}
.ak-result-bar {
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 1.2s ease;
}
.ak-result-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ak-footer {
  background: var(--ak-dark);
  color: #fff;
  padding: 52px 28px 28px;
  text-align: center;
}
.ak-footer-inner { max-width: 800px; margin: 0 auto; }
.ak-footer-logo {
  font-family: var(--ff-title);
  font-size: 30px;
  color: var(--ak-yellow);
  margin-bottom: 10px;
}
.ak-footer-tagline {
  color: rgba(255,255,255,.7);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 28px;
}
.ak-footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.ak-footer-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: color .2s;
}
.ak-footer-links a:hover { color: var(--ak-yellow); }
.ak-footer-copy { color: rgba(255,255,255,.4); font-size: 13px; font-weight: 600; }

/* ── Animações ──────────────────────────────────────────────────────────── */
@keyframes ak-spin {
  to { transform: rotate(360deg); }
}
@keyframes ak-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}
@keyframes ak-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-10px) scale(1.04); }
}
@keyframes ak-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ak-fade-up  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ak-pop      { 0% { transform: scale(1); } 55% { transform: scale(1.22); } 100% { transform: scale(1.06); } }
@keyframes ak-pop-up   { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ak-shake    {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
@keyframes ak-star-pop { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0deg); } }
@keyframes ak-fall     { 0% { transform: translateY(-60px) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* ── Responsivo ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ak-hero { padding: 48px 18px 56px; }
  .ak-hero-emoji { font-size: 64px; }
  .ak-image-emoji { font-size: 80px; }
  .ak-slot, .ak-syl-btn { min-width: 62px; height: 62px; font-size: 18px; }
  .ak-success-card { padding: 36px 24px; }
  .ak-success-card .s-title { font-size: 34px; }
  .ak-success-card .s-word  { font-size: 34px; }
  .ak-nav-btn { font-size: 12px; padding: 6px 14px; }
  .ak-logo { font-size: 20px; }
  .ak-trophy-big { font-size: 72px; }
  .ak-big-number { font-size: 54px; }
}
@media (max-width: 400px) {
  .ak-age-btn { width: 68px; height: 68px; }
  .ak-age-btn .num { font-size: 28px; }
}
