/* ==========================================================
   Aprender e Brincar - Folha de Estilos Principal (CSS)
   Design Lúdico, Responsivo e Moderno para Crianças
   ========================================================== */

:root {
  --font-fun: 'Fredoka', 'Quicksand', system-ui, -apple-system, sans-serif;
  --font-body: 'Quicksand', system-ui, -apple-system, sans-serif;
  
  /* Paleta Alegre Infantil */
  --primary-yellow: #FFD166;
  --primary-pink: #FF6B8B;
  --primary-blue: #4D96FF;
  --primary-green: #6BCB77;
  --primary-purple: #9B5DE5;
  --primary-orange: #FF9248;

  --bg-gradient: linear-gradient(135deg, #FFF9EB 0%, #F0F7FF 50%, #FFF0F5 100%);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: #2D3748;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, .font-fun {
  font-family: var(--font-fun);
  font-weight: 700;
}

/* ==========================================================
   Decorações de Fundo (Nuvens e Bolhas Animadas)
   ========================================================== */
.floating-elements-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 100px;
  filter: drop-shadow(0 8px 15px rgba(100, 149, 237, 0.1));
}

.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-1 {
  width: 140px;
  height: 45px;
  top: 8%;
  left: -150px;
  animation: floatCloud 35s linear infinite;
}
.cloud-1::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud-1::after { width: 50px; height: 50px; top: -20px; right: 20px; }

.cloud-2 {
  width: 180px;
  height: 55px;
  top: 25%;
  right: -200px;
  animation: floatCloudReverse 45s linear infinite;
}
.cloud-2::before { width: 70px; height: 70px; top: -35px; left: 30px; }
.cloud-2::after { width: 60px; height: 60px; top: -25px; right: 30px; }

.cloud-3 {
  width: 120px;
  height: 40px;
  top: 65%;
  left: -150px;
  animation: floatCloud 50s linear infinite 10s;
}
.cloud-3::before { width: 50px; height: 50px; top: -25px; left: 20px; }
.cloud-3::after { width: 40px; height: 40px; top: -18px; right: 15px; }

@keyframes floatCloud {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 300px)); }
}

@keyframes floatCloudReverse {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-100vw - 300px)); }
}

/* ==========================================================
   Header & Banner Principal
   ========================================================== */
.kids-hero-banner {
  position: relative;
  background: linear-gradient(135deg, #FFE8B8 0%, #FFD6E8 50%, #CDE8FF 100%);
  border-radius: 0 0 40px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 -4px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  font-weight: 700;
  color: #D97706;
  font-size: 0.9rem;
  animation: bounceSoft 2.5s infinite ease-in-out;
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.bounce-hover:hover {
  animation: rubberBand 0.8s ease;
}

@keyframes rubberBand {
  0% { transform: scale3d(1, 1, 1); }
  30% { transform: scale3d(1.15, 0.85, 1); }
  40% { transform: scale3d(0.85, 1.15, 1); }
  50% { transform: scale3d(1.05, 0.95, 1); }
  65% { transform: scale3d(0.98, 1.02, 1); }
  75% { transform: scale3d(1.02, 0.98, 1); }
  100% { transform: scale3d(1, 1, 1); }
}

/* ==========================================================
   Filtros de Categoria Estilizados
   ========================================================== */
.category-pill {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  border: 3px solid transparent;
}

.category-pill:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.category-pill.active {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================
   Cartões de Atividades Infantis (3D Playful Cards)
   ========================================================== */
.activity-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 28px;
  border: 4px solid #F1F5F9;
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.06), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}

.activity-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--card-shadow-hover);
}

.card-icon-container {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 8px 16px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.activity-card:hover .card-icon-container {
  transform: scale(1.15) rotate(6deg);
}

.activity-card-btn {
  border-radius: 20px;
  font-family: var(--font-fun);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.activity-card-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: 0.5s;
}

.activity-card:hover .activity-card-btn::after {
  left: 100%;
}

.activity-card:hover .activity-card-btn {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* ==========================================================
   Animações de Confetes e Partículas
   ========================================================== */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 9999;
  border-radius: 3px;
  animation: confettiFall 1.2s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 50px), var(--ty, 120px)) rotate(var(--tr, 360deg)) scale(0.4);
  }
}

/* ==========================================================
   Painel Administrativo & Tabelas
   ========================================================== */
.admin-card {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ==========================================================
   Responsividade e Toque
   ========================================================== */
@media (max-width: 640px) {
  .kids-hero-banner {
    border-radius: 0 0 28px 28px;
  }
  .card-icon-container {
    width: 64px;
    height: 64px;
    font-size: 1.9rem;
  }
}
