/* animations.css - Animaciones mejoradas */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes punchLeft {
    0% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(150px) rotate(-20deg) scale(1.3); }
    100% { transform: translateX(0) rotate(0deg); }
}

@keyframes punchRight {
    0% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(-150px) rotate(20deg) scale(1.3); }
    100% { transform: translateX(0) rotate(0deg); }
}

@keyframes opponentShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-15px) rotate(-3deg); }
    75% { transform: translateX(15px) rotate(3deg); }
}

@keyframes knockout {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-30px) rotate(-10deg); opacity: 0.8; }
    100% { transform: translateY(500px) rotate(45deg); opacity: 0; }
}

@keyframes criticalFlash {
    0%, 100% { filter: brightness(1) saturate(1); }
    50% { filter: brightness(1.5) saturate(2) hue-rotate(45deg); }
}

@keyframes screenFlash {
    0% { background-color: rgba(255, 0, 0, 0); }
    50% { background-color: rgba(255, 0, 0, 0.3); }
    100% { background-color: rgba(255, 0, 0, 0); }
}

@keyframes comboPopup {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes floatUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}

/* Clases de animación */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

.punch-animation-left {
    animation: punchLeft 0.3s ease;
}

.punch-animation-right {
    animation: punchRight 0.3s ease;
}

.opponent-hit {
    animation: opponentShake 0.3s ease;
}

.knockout-animation {
    animation: knockout 1s ease forwards;
}

.critical-flash {
    animation: criticalFlash 0.4s ease;
}

.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    animation: screenFlash 0.3s ease;
}

.combo-text {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 30px #FF4500, 0 0 60px #FF4500;
    z-index: 1000;
    pointer-events: none;
    animation: comboPopup 0.5s ease;
    font-family: 'Anton', sans-serif;
}

.damage-number {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: #E50914;
    text-shadow: 0 0 10px #000;
    z-index: 100;
    pointer-events: none;
    animation: floatUp 1s ease forwards;
    font-family: 'Anton', sans-serif;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 0 10px #FFD700;
}

@keyframes particleExplosion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.power-up-active {
    animation: pulse 0.5s infinite, criticalFlash 1s infinite;
    filter: drop-shadow(0 0 20px #FFD700);
}

/* Animación de esquive */
@keyframes dodgeLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-30px); }
}

@keyframes dodgeRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

.dodge-left {
    animation: dodgeLeft 0.3s ease;
}

.dodge-right {
    animation: dodgeRight 0.3s ease;
}

/* Animación de golpe del oponente que se acerca */
@keyframes opponentPunchApproach {
    0% {
        transform: scale(0.3) translateZ(-500px);
        opacity: 0.5;
    }
    80% {
        transform: scale(2) translateZ(0);
        opacity: 1;
    }
    100% {
        transform: scale(2.5) translateZ(50px);
        opacity: 0;
    }
}

.opponent-punch {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: url('../assets/images/gloves/opponent-punch.png') center/contain no-repeat;
    z-index: 999;
    pointer-events: none;
    animation: opponentPunchApproach 0.6s ease forwards;
}

/* Efecto parallax del fondo */
.arena-parallax {
    transition: transform 0.1s ease-out;
}
