/* =========================================================
   ANIMAÇÕES & MICROINTERAÇÕES - QUÍMICA SEM MISTÉRIO
   ========================================================= */

/* Fade in padrão para troca de telas */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Transição de Etapas de Exercício (Scaffolding) */
@keyframes stepSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-slide-in {
  animation: stepSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulso de Atenção Positiva */
@keyframes softPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.pulse {
  animation: softPulse 2s infinite ease-in-out;
}

/* Efeito de Dica Brilhando */
@keyframes glowSparkle {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.9));
  }
}

.sparkle {
  animation: glowSparkle 1.8s infinite ease-in-out;
}

/* Animação da Lâmpada de Condutibilidade Elétrica */
@keyframes bulbGlow {
  0%, 100% {
    filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.8)) drop-shadow(0 0 45px rgba(250, 204, 21, 0.5));
    opacity: 1;
  }
  50% {
    filter: drop-shadow(0 0 25px rgba(250, 204, 21, 1)) drop-shadow(0 0 65px rgba(250, 204, 21, 0.7));
    opacity: 0.95;
  }
}

.bulb-on {
  animation: bulbGlow 1.2s infinite ease-in-out;
}

/* Animação de Flutuação de Íons na Solução */
@keyframes floatIon {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.floating-ion {
  animation: floatIon 3s infinite ease-in-out;
}

/* Balanço de Erro Acolhedor (Wiggle) */
@keyframes gentleWiggle {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.wiggle {
  animation: gentleWiggle 0.4s ease-in-out;
}

/* Celebração de Acerto (Pop) */
@keyframes popSuccess {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pop-success {
  animation: popSuccess 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Rotação Contínua (Loading / Spinner) */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 1s linear infinite;
}
