/* ============================================
   MELHORIAS VISUAIS - ANIMAÇÕES AVANÇADAS
   ============================================ */

/* === LOADING SCREENS CUSTOMIZADOS === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.loading-screen.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  position: relative;
  margin-bottom: 30px;
}

.loading-spinner::before,
.loading-spinner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.loading-spinner::before {
  width: 80px;
  height: 80px;
  border: 4px solid transparent;
  border-top-color: #6366f1;
  border-right-color: #6366f1;
  animation: spin 1s linear infinite;
}

.loading-spinner::after {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  border: 4px solid transparent;
  border-bottom-color: #a855f7;
  border-left-color: #a855f7;
  animation: spin 0.7s linear infinite reverse;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  background-size: 200% 100%;
  animation: loading-gradient 1.5s ease infinite;
  width: 0%;
  transition: width 0.3s ease;
}

@keyframes loading-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* === TRANSIÇÕES ENTRE TELAS === */
.view-transition-enter {
  animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-transition-exit {
  animation: slideOutDown 0.3s cubic-bezier(0.6, 0, 0.8, 0.2);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
}

.fade-transition {
  animation: fadeInOut 0.3s ease;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* === EFEITOS DE PARTÍCULAS === */
.particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  animation: particle-float 2s ease-out forwards;
}

@keyframes particle-float {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-150px) scale(0);
  }
}

.particle-burst {
  animation: particle-burst 0.6s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0);
  }
}

/* === ANIMAÇÕES DE BATALHA ELABORADAS === */
.battle-intro {
  animation: battle-intro 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes battle-intro {
  0% {
    opacity: 0;
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.character-enter-left {
  animation: character-enter-left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes character-enter-left {
  0% {
    opacity: 0;
    transform: translateX(-200px) translateY(var(--p-y)) translateZ(var(--p-z))
      scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateX(var(--p-x)) translateY(var(--p-y))
      translateZ(var(--p-z)) scale(1);
  }
}

.character-enter-right {
  animation: character-enter-right 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes character-enter-right {
  0% {
    opacity: 0;
    transform: translateX(200px) translateY(var(--e-y)) translateZ(var(--e-z))
      scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateX(var(--e-x)) translateY(var(--e-y))
      translateZ(var(--e-z)) scale(1);
  }
}

/* Animação de ataque melhorada */
.attack-slash {
  animation: attack-slash 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes attack-slash {
  0% {
    transform: translateX(0) rotateZ(0deg);
  }
  30% {
    transform: translateX(-30px) rotateZ(-15deg) scale(1.1);
  }
  60% {
    transform: translateX(50px) rotateZ(15deg) scale(1.2);
  }
  100% {
    transform: translateX(0) rotateZ(0deg) scale(1);
  }
}

.attack-thrust {
  animation: attack-thrust 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

@keyframes attack-thrust {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(100px) scale(1.3);
  }
}

.attack-spin {
  animation: attack-spin 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes attack-spin {
  0% {
    transform: rotateY(0deg) scale(1);
  }
  50% {
    transform: rotateY(360deg) scale(1.2);
  }
  100% {
    transform: rotateY(720deg) scale(1);
  }
}

/* Efeito de dano crítico melhorado */
.critical-hit {
  animation: critical-hit 0.5s ease-out;
}

@keyframes critical-hit {
  0% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
  20% {
    filter: brightness(3) saturate(2) hue-rotate(45deg);
    transform: scale(1.15) rotate(-5deg);
  }
  40% {
    filter: brightness(5) saturate(3) hue-rotate(-45deg);
    transform: scale(1.1) rotate(5deg);
  }
  60% {
    filter: brightness(2) saturate(1.5);
    transform: scale(1.05) rotate(-2deg);
  }
  100% {
    filter: brightness(1) saturate(1);
    transform: scale(1) rotate(0deg);
  }
}

/* Efeito de skill ultimate */
.ultimate-charge {
  animation: ultimate-charge 1.5s ease-in-out;
}

@keyframes ultimate-charge {
  0% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
  50% {
    filter: brightness(2) drop-shadow(0 0 40px #fbbf24);
    transform: scale(1.2);
  }
  100% {
    filter: brightness(1.5) drop-shadow(0 0 20px #fbbf24);
    transform: scale(1.1);
  }
}

.ultimate-release {
  animation: ultimate-release 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes ultimate-release {
  0% {
    transform: scale(1.1);
    filter: brightness(1.5);
  }
  50% {
    transform: scale(2) translateZ(200px);
    filter: brightness(3);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Ondas de choque */
.shockwave {
  position: absolute;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: shockwave 0.6s ease-out forwards;
}

@keyframes shockwave {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Efeito de cura */
.heal-effect {
  animation: heal-pulse 1s ease-out;
}

@keyframes heal-pulse {
  0%,
  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: brightness(1.5) drop-shadow(0 0 30px #22c55e);
  }
}

/* Efeito de buff */
.buff-aura {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
  animation: buff-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes buff-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Efeito de debuff */
.debuff-aura {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.3), transparent 70%);
  animation: debuff-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes debuff-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Rastro de movimento */
.motion-trail {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  filter: blur(5px);
  animation: trail-fade 0.3s ease-out forwards;
}

@keyframes trail-fade {
  to {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Efeitos elementais melhorados */
.fire-burst {
  animation: fire-burst 0.8s ease-out;
}

@keyframes fire-burst {
  0% {
    filter: brightness(1) hue-rotate(0deg);
    transform: scale(1);
  }
  50% {
    filter: brightness(2) hue-rotate(15deg);
    transform: scale(1.3);
  }
  100% {
    filter: brightness(1) hue-rotate(0deg);
    transform: scale(1);
  }
}

.water-splash {
  animation: water-splash 0.6s ease-out;
}

@keyframes water-splash {
  0% {
    filter: brightness(1) saturate(1);
    transform: scale(1) rotateZ(0deg);
  }
  50% {
    filter: brightness(1.5) saturate(2);
    transform: scale(1.2) rotateZ(180deg);
  }
  100% {
    filter: brightness(1) saturate(1);
    transform: scale(1) rotateZ(360deg);
  }
}

.lightning-strike-effect {
  animation: lightning-strike-effect 0.3s ease-out;
}

@keyframes lightning-strike-effect {
  0%,
  100% {
    filter: brightness(1);
    opacity: 1;
  }
  10%,
  30%,
  50% {
    filter: brightness(5);
    opacity: 0.8;
  }
  20%,
  40%,
  60% {
    filter: brightness(1);
    opacity: 1;
  }
}

/* Efeito de vitória */
.victory-celebration {
  animation: victory-bounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes victory-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-30px) scale(1.1);
  }
  50% {
    transform: translateY(-15px) scale(1.05);
  }
  75% {
    transform: translateY(-5px) scale(1.02);
  }
}

/* Efeito de derrota */
.defeat-fall {
  animation: defeat-fall 1s ease-in forwards;
}

@keyframes defeat-fall {
  0% {
    transform: translateY(0) rotateZ(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotateZ(90deg);
    opacity: 0;
  }
}

/* Efeito de combo */
.combo-flash {
  animation: combo-flash 0.2s ease-out;
}

@keyframes combo-flash {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(3) saturate(2);
  }
}

/* Partículas de estrelas */
.star-particle {
  position: absolute;
  color: #fbbf24;
  font-size: 20px;
  animation: star-twinkle 1s ease-out forwards;
  pointer-events: none;
}

@keyframes star-twinkle {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translate(var(--tx), var(--ty)) scale(1) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--tx) * 2), calc(var(--ty) * 2)) scale(0)
      rotate(360deg);
  }
}

/* Efeito de level up */
.levelup-glow {
  animation: levelup-glow 2s ease-out;
}

@keyframes levelup-glow {
  0% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
  50% {
    filter: brightness(2) drop-shadow(0 0 50px #fbbf24);
    transform: scale(1.2);
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
}

/* Efeito de summon épico */
.summon-epic-aura {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.4), transparent 70%);
  animation: summon-epic-pulse 2s ease-in-out infinite;
  pointer-events: none;
  border-radius: 50%;
}

@keyframes summon-epic-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
  }
}

/* === ANIMAÇÃO DE DANO FLUTUANTE === */
/* Usado para mostrar números de dano/cura acima da cabeça dos personagens */
.animate-float-damage {
  animation: float-damage 1s ease-out forwards;
}

@keyframes float-damage {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-40px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-80px) scale(0.8);
  }
}

/* ============================================
   NOVOS FEEDBACKS VISUAIS - FASE 2
   ============================================ */

/* === RIPPLE EFFECT (Botões) === */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* === BUTTON GLOW (Hover) === */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.btn-glow:hover::before {
  width: 300px;
  height: 300px;
}

.btn-glow-active {
  box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
  animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 10px currentColor;
  }
  50% {
    box-shadow: 0 0 30px currentColor, 0 0 50px currentColor;
  }
}

/* === CONFETE (Summons Lendários) === */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fbbf24;
  animation: confetti-fall 3s ease-out forwards;
  pointer-events: none;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* === PORTAL SUMMON === */
.summon-portal {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.8),
    rgba(168, 85, 247, 0.4),
    transparent
  );
  animation: portal-spin 2s linear infinite;
  pointer-events: none;
}

@keyframes portal-spin {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.1);
  }
}

.summon-portal::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.6), transparent);
  animation: portal-pulse 1s ease-in-out infinite;
}

@keyframes portal-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* === RAIOS DE SUMMON 5 ESTRELAS === */
.summon-lightning {
  position: absolute;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #fbbf24, transparent);
  animation: lightning-strike 0.3s ease-out;
  pointer-events: none;
  box-shadow: 0 0 10px #fbbf24, 0 0 20px #fbbf24;
}

@keyframes lightning-strike {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    opacity: 1;
  }
  20%,
  40%,
  60%,
  80% {
    opacity: 0.3;
  }
}

/* === EXPLOSÃO DE LUZ (Level Up) === */
.light-explosion {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.9),
    rgba(251, 191, 36, 0.4),
    transparent
  );
  animation: light-burst 1s ease-out forwards;
  pointer-events: none;
}

@keyframes light-burst {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* === TEXTO LEVEL UP ANIMADO === */
.levelup-text {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 30px #fbbf24, 3px 3px 0 #000, -3px -3px 0 #000;
  z-index: 10000;
  pointer-events: none;
  animation: levelup-text-appear 2s ease-out forwards;
}

@keyframes levelup-text-appear {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 0;
  }
}

/* === BRILHO DE EQUIPAMENTO === */
.equipment-shine {
  animation: equipment-shine 1s ease-out;
}

@keyframes equipment-shine {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(2) drop-shadow(0 0 20px #fbbf24);
    transform: scale(1.1);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

/* === SHAKE DE FALHA === */
.upgrade-fail-shake {
  animation: upgrade-fail 0.5s ease-in-out;
}

@keyframes upgrade-fail {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(10px);
  }
}

/* === PARTÍCULAS DE UPGRADE === */
.upgrade-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fbbf24;
  border-radius: 50%;
  animation: upgrade-particle-rise 1.5s ease-out forwards;
  pointer-events: none;
  box-shadow: 0 0 10px #fbbf24;
}

@keyframes upgrade-particle-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-200px) scale(0);
    opacity: 0;
  }
}

/* === GLOW DE NOTIFICAÇÃO === */
.notification-glow {
  animation: notification-pulse 2s ease-in-out infinite;
}

@keyframes notification-pulse {
  0%,
  100% {
    box-shadow: 0 0 5px currentColor;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    transform: scale(1.05);
  }
}

/* === PULSE DE NOVO ITEM === */
.new-item-pulse {
  position: relative;
}

.new-item-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #fbbf24;
  border-radius: inherit;
  animation: new-item-pulse-ring 1.5s ease-out infinite;
}

@keyframes new-item-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* === PARTÍCULAS DE TROCA DE ABA === */
.tab-switch-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #6366f1;
  border-radius: 50%;
  animation: tab-particle-burst 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes tab-particle-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* === COMPRA DE ITEM === */
.purchase-success {
  animation: purchase-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes purchase-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.purchase-particles {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: purchase-particle-burst 0.8s ease-out forwards;
  pointer-events: none;
  box-shadow: 0 0 10px #22c55e;
}

@keyframes purchase-particle-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* === HOVER GLOW SUAVE === */
.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 15px currentColor;
  transform: translateY(-2px);
}

/* === CLICK FEEDBACK === */
.click-feedback {
  animation: click-scale 0.2s ease-out;
}

@keyframes click-scale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* === RUNE UPGRADE BURST === */
@keyframes upgrade-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--end-x), var(--end-y)) scale(0);
    opacity: 0;
  }
}

/* Rune upgrade glow effect */
.rune-upgrade-glow {
  animation: rune-upgrade-flash 0.5s ease-out;
}

@keyframes rune-upgrade-flash {
  0% {
    filter: brightness(1);
    box-shadow: none;
  }
  50% {
    filter: brightness(2);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.8),
      0 0 80px rgba(236, 72, 153, 0.6);
  }
  100% {
    filter: brightness(1);
    box-shadow: none;
  }
}

/* Rune value counter animation */
.rune-value-counting {
  animation: value-pulse 0.5s ease-out;
}

@keyframes value-pulse {
  0%,
  100% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
  }
}

/* Upgrade fail shake animation */
@keyframes upgrade-fail {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Upgrade success pulse */
@keyframes upgrade-success {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
  }
}

/* New substat reveal animation */
@keyframes substat-reveal {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    background-color: rgba(251, 191, 36, 0.3);
  }
  50% {
    background-color: rgba(251, 191, 36, 0.2);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background-color: transparent;
  }
}

.substat-new {
  animation: substat-reveal 0.8s ease-out;
}

/* Stat increase glow */
.stat-increased {
  animation: stat-glow 1s ease-out;
}

@keyframes stat-glow {
  0% {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
  }
  100% {
    color: inherit;
    text-shadow: none;
  }
}
