/* ============================================================
   ANIMAÇÕES — Pokémon Modern Theme
   Inspirado em Pokémon Scarlet/Violet, Pokédex moderna
   ============================================================ */

/* --- Fade In --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Fade In Up --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Fade In Down --- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Fade In Left --- */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Fade In Right --- */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Scale In --- */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Glow Pulse (para elementos destaque) --- */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(108, 60, 225, 0.3),
                0 0 20px rgba(108, 60, 225, 0.1);
  }
  50% {
    box-shadow: 0 0 16px rgba(108, 60, 225, 0.5),
                0 0 40px rgba(108, 60, 225, 0.2);
  }
}

/* --- Text Glow (gradiente animado) --- */
@keyframes textShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Float (elemento flutuando) --- */
@keyframes float {
	0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
	50%      { transform: translateY(calc(var(--float-dist, -10px) * -1)) rotate(var(--rot, 0deg)); }
}

/* --- Spin (loading) --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Pokébola Capture (loading) --- */
@keyframes pokeballShake {
  0%   { transform: rotate(0); }
  20%  { transform: rotate(15deg); }
  40%  { transform: rotate(-15deg); }
  60%  { transform: rotate(10deg); }
  80%  { transform: rotate(-10deg); }
  100% { transform: rotate(0); }
}

@keyframes pokeballOpen {
  0%   { transform: rotate(0) scale(1); opacity: 1; }
  50%  { transform: rotate(360deg) scale(1.2); opacity: 0.8; }
  100% { transform: rotate(720deg) scale(0); opacity: 0; }
}

@keyframes captureGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.3); }
  50%      { box-shadow: 0 0 30px rgba(255, 0, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.4); }
}

/* --- Particle Float (fundo) --- */
@keyframes particleFloat {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* --- Shimmer (skeleton loading) --- */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Border Glow Animado --- */
@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(108, 60, 225, 0.3);
    box-shadow: 0 0 8px rgba(108, 60, 225, 0.1), inset 0 0 8px rgba(108, 60, 225, 0.05);
  }
  50% {
    border-color: rgba(233, 64, 87, 0.5);
    box-shadow: 0 0 20px rgba(233, 64, 87, 0.3), inset 0 0 12px rgba(233, 64, 87, 0.1);
  }
}

/* --- Slide In (para modais/offcanvas) --- */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Heartbeat (para destaques) --- */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

/* --- Gradient Shift (fundo animado) --- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Type Badge Glow (cores tipos Pokémon) --- */
@keyframes typeGlow {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.3); }
}

/* --- Aplicando animações às classes utilitárias --- */
.anim-fadeIn       { animation: fadeIn 0.6s ease forwards; }
.anim-fadeInUp     { animation: fadeInUp 0.6s ease forwards; }
.anim-fadeInDown   { animation: fadeInDown 0.6s ease forwards; }
.anim-fadeInLeft   { animation: fadeInLeft 0.6s ease forwards; }
.anim-fadeInRight  { animation: fadeInRight 0.6s ease forwards; }
.anim-scaleIn      { animation: scaleIn 0.5s ease forwards; }
.anim-float        { animation: float 3s ease-in-out infinite; }
.anim-glowPulse    { animation: glowPulse 2s ease-in-out infinite; }
.anim-spin         { animation: spin 1s linear infinite; }
.anim-heartbeat    { animation: heartbeat 1.5s ease-in-out infinite; }

/* Delay utilitários */
.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-600  { animation-delay: 0.6s; }
.delay-700  { animation-delay: 0.7s; }
.delay-800  { animation-delay: 0.8s; }
.delay-900  { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Classe para elementos invisíveis até animar */
.anim-hidden {
  opacity: 0;
}

/* --- Pokébola Loading Spinner --- */
.pokeball-loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid #ff1744;
  border-bottom: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  position: relative;
  margin: 0 auto;
}

.pokeball-loader::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  border: 2px solid #333;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-title {
  height: 24px;
  margin-bottom: 12px;
  width: 60%;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
