/* Enhanced Combat Animations - Dynamic Human-like Combat */

/* Replace existing combat animations with more dramatic versions */

/* Combat Effect Elements */
.combat-effect {
  position: absolute;
  font-size: 4rem;
  z-index: 3;
  pointer-events: none;
  animation: effectFade 0.9s ease-out forwards;
}

@keyframes effectFade {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(0);
  }
  30% {
    opacity: 1;
    transform: scale(1.5) translateY(-20px);
  }
  70% {
    opacity: 0.8;
    transform: scale(2) translateY(-40px) rotate(20deg);
  }
  100% {
    opacity: 0;
    transform: scale(2.5) translateY(-60px) rotate(45deg);
  }
}

/* Pawn - Knife slash and stab */
.combat-attack-p {
  animation: pawnKnifeStab 0.9s cubic-bezier(0.6, 0.0, 0.2, 1) forwards !important;
}

@keyframes pawnKnifeStab {
  0% {
    transform: translateX(-80px) translateY(10px) scale(1) rotate(-15deg);
  }
  15% {
    transform: translateX(-60px) translateY(5px) scale(1.05) rotate(-10deg);
  }
  35% {
    transform: translateX(-20px) translateY(-5px) scale(1.15) rotate(10deg);
  }
  50% {
    transform: translateX(5px) translateY(0) scale(1.2) rotate(25deg);
    filter: drop-shadow(0 0 12px rgba(255, 100, 100, 0.8));
  }
  65% {
    transform: translateX(10px) translateY(3px) scale(1.1) rotate(15deg);
  }
  80% {
    transform: translateX(-10px) translateY(0) scale(1.05) rotate(-5deg);
  }
  100% {
    transform: translateX(0) translateY(0) scale(1) rotate(0deg);
  }
}

.combat-defend-p {
  animation: pawnStabbed 0.9s cubic-bezier(0.6, 0.0, 0.2, 1) forwards !important;
}

@keyframes pawnStabbed {
  0% {
    transform: scale(1) rotate(0deg) translateY(0);
    opacity: 1;
  }
  20% {
    transform: scale(0.98) rotate(-5deg) translateX(3px) translateY(2px);
  }
  40% {
    transform: scale(0.9) rotate(-15deg) translateX(8px) translateY(25px);
    opacity: 0.85;
  }
  60% {
    transform: scale(0.7) rotate(-45deg) translateX(15px) translateY(45px);
    opacity: 0.6;
  }
  80% {
    transform: scale(0.4) rotate(-75deg) translateX(20px) translateY(55px);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.15) rotate(-90deg) translateX(25px) translateY(60px);
    opacity: 0;
  }
}

/* Knight - Charging lance attack */
.combat-attack-n {
  animation: knightCharge 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes knightCharge {
  0% {
    transform: translate(-100px, 40px) scale(0.8) rotate(-30deg);
  }
  20% {
    transform: translate(-70px, 10px) scale(0.9) rotate(-15deg);
  }
  40% {
    transform: translate(-30px, -30px) scale(1.2) rotate(90deg);
    filter: drop-shadow(0 0 15px rgba(100, 150, 255, 0.9));
  }
  60% {
    transform: translate(10px, -20px) scale(1.3) rotate(180deg);
  }
  80% {
    transform: translate(20px, 10px) scale(1.1) rotate(270deg);
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
  }
}

.combat-defend-n {
  animation: knightTrampled 0.9s ease-out forwards !important;
}

@keyframes knightTrampled {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  25% {
    transform: scale(0.95) rotate(10deg) translateX(-10px) translateY(5px);
  }
  50% {
    transform: scale(0.75) rotate(-30deg) translateX(15px) translateY(40px);
    opacity: 0.7;
  }
  75% {
    transform: scale(0.4) rotate(-70deg) translateX(20px) translateY(55px);
    opacity: 0.4;
  }
  100% {
    transform: scale(0.1) rotate(-110deg) translateX(25px) translateY(65px);
    opacity: 0;
  }
}

/* Bishop - Holy smite from above */
.combat-attack-b {
  animation: bishopSmite 0.9s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
}

@keyframes bishopSmite {
  0% {
    transform: translate(-60px, -80px) rotate(-45deg) scale(0.9);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
  }
  25% {
    transform: translate(-40px, -60px) rotate(-35deg) scale(1);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7));
  }
  50% {
    transform: translate(-10px, -20px) rotate(-10deg) scale(1.3);
    filter: drop-shadow(0 0 20px rgba(255, 255, 100, 1));
  }
  65% {
    transform: translate(5px, 0) rotate(5deg) scale(1.35);
    filter: drop-shadow(0 0 25px rgba(255, 255, 150, 1));
  }
  85% {
    transform: translate(0, 5px) rotate(0deg) scale(1.1);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
  }
}

.combat-defend-b {
  animation: bishopVanquished 0.9s ease-out forwards !important;
}

@keyframes bishopVanquished {
  0% {
    transform: scale(1) rotate(0deg) translateY(0);
    opacity: 1;
    filter: brightness(1);
  }
  30% {
    transform: scale(0.95) rotate(-10deg) translateY(10px);
    filter: brightness(1.5);
  }
  60% {
    transform: scale(0.6) rotate(-40deg) translateY(40px);
    opacity: 0.6;
    filter: brightness(2);
  }
  85% {
    transform: scale(0.3) rotate(-70deg) translateY(55px);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.1) rotate(-90deg) translateY(65px);
    opacity: 0;
  }
}

/* Rook - Crushing overhead slam */
.combat-attack-r {
  animation: rookCrush 0.9s cubic-bezier(0.6, 0.04, 0.2, 1) forwards !important;
}

@keyframes rookCrush {
  0% {
    transform: translateY(-100px) translateX(-20px) scale(0.9);
  }
  25% {
    transform: translateY(-110px) translateX(-10px) scale(1);
  }
  45% {
    transform: translateY(-50px) translateX(0) scale(1.1);
  }
  60% {
    transform: translateY(5px) translateX(0) scale(1.4);
    filter: drop-shadow(0 0 20px rgba(150, 75, 50, 1));
  }
  75% {
    transform: translateY(10px) translateX(0) scale(1.35);
  }
  90% {
    transform: translateY(0) translateX(0) scale(1.1);
  }
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
}

.combat-defend-r {
  animation: rookCrushed 0.9s ease-out forwards !important;
}

@keyframes rookCrushed {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  35% {
    transform: scale(0.95) translateY(5px);
  }
  55% {
    transform: scale(0.7) translateY(35px) scaleY(0.5);
    opacity: 0.7;
  }
  75% {
    transform: scale(0.4) translateY(50px) scaleY(0.3);
    opacity: 0.4;
  }
  100% {
    transform: scale(0.1) translateY(60px) scaleY(0.1);
    opacity: 0;
  }
}

/* Queen - Devastating multi-strike combo */
.combat-attack-q {
  animation: queenCombo 0.9s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
}

@keyframes queenCombo {
  0% {
    transform: scale(1) rotate(0deg) translateX(-40px);
    filter: drop-shadow(0 0 10px rgba(200, 50, 200, 0.7));
  }
  15% {
    transform: scale(1.15) rotate(120deg) translateX(-20px) translateY(-10px);
    filter: drop-shadow(0 0 15px rgba(200, 50, 200, 0.85));
  }
  30% {
    transform: scale(1.25) rotate(240deg) translateX(10px) translateY(-15px);
    filter: drop-shadow(0 0 20px rgba(255, 100, 255, 1));
  }
  45% {
    transform: scale(1.35) rotate(360deg) translateX(20px) translateY(-5px);
    filter: drop-shadow(0 0 25px rgba(255, 150, 255, 1));
  }
  60% {
    transform: scale(1.4) rotate(480deg) translateX(15px) translateY(5px);
    filter: drop-shadow(0 0 30px rgba(255, 200, 255, 1));
  }
  75% {
    transform: scale(1.3) rotate(600deg) translateX(5px) translateY(0);
  }
  90% {
    transform: scale(1.1) rotate(700deg) translateX(0) translateY(0);
  }
  100% {
    transform: scale(1) rotate(720deg) translateX(0) translateY(0);
    filter: drop-shadow(0 0 10px rgba(200, 50, 200, 0.7));
  }
}

.combat-defend-q {
  animation: queenDestroyed 0.9s ease-out forwards !important;
}

@keyframes queenDestroyed {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  20% {
    transform: scale(0.98) rotate(-10deg) translateX(5px);
  }
  40% {
    transform: scale(0.85) rotate(-30deg) translateX(15px) translateY(20px);
    opacity: 0.8;
  }
  60% {
    transform: scale(0.6) rotate(-60deg) translateX(25px) translateY(40px);
    opacity: 0.5;
  }
  80% {
    transform: scale(0.3) rotate(-100deg) translateX(30px) translateY(55px);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.05) rotate(-140deg) translateX(35px) translateY(65px);
    opacity: 0;
  }
}

/* King - Royal command slash */
.combat-attack-k {
  animation: kingSwordSwing 0.9s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
}

@keyframes kingSwordSwing {
  0% {
    transform: translateX(-50px) rotate(-120deg) scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  }
  20% {
    transform: translateX(-40px) rotate(-100deg) scale(1.05);
  }
  45% {
    transform: translateX(0) rotate(0deg) scale(1.3);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
  }
  60% {
    transform: translateX(15px) rotate(45deg) scale(1.4);
    filter: drop-shadow(0 0 25px rgba(255, 230, 100, 1));
  }
  75% {
    transform: translateX(20px) rotate(60deg) scale(1.35);
  }
  90% {
    transform: translateX(5px) rotate(20deg) scale(1.1);
  }
  100% {
    transform: translateX(0) rotate(0deg) scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  }
}

.combat-defend-k {
  animation: kingDefeated 0.9s ease-out forwards !important;
}

@keyframes kingDefeated {
  0% {
    transform: scale(1) rotate(0deg) translateY(0);
    opacity: 1;
  }
  25% {
    transform: scale(0.97) rotate(-8deg) translateX(5px) translateY(8px);
  }
  50% {
    transform: scale(0.8) rotate(-30deg) translateX(12px) translateY(35px);
    opacity: 0.75;
  }
  70% {
    transform: scale(0.55) rotate(-60deg) translateX(18px) translateY(50px);
    opacity: 0.45;
  }
  90% {
    transform: scale(0.25) rotate(-85deg) translateX(22px) translateY(60px);
    opacity: 0.15;
  }
  100% {
    transform: scale(0.1) rotate(-95deg) translateX(25px) translateY(65px);
    opacity: 0;
  }
}
