/* game.css - Estilos del juego MEJORADOS */

#arena {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../assets/images/backgrounds/ring.png') center/cover;
    overflow: hidden;
    background-attachment: fixed;
    transition: transform 0.1s ease-out;
}

#opponentDisplay {
    position: relative;
    max-width: 400px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#opponentImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
    transition: filter 0.3s ease;
}

#damageCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.player-glove {
    position: absolute;
    width: 120px;
    height: 120px;
    background: url('../assets/images/gloves/left.png') center/contain no-repeat;
    bottom: 20%;
    z-index: 5;
    opacity: 0.9;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.8));
}

#leftPlayerGlove {
    left: 10%;
    background-image: url('../assets/images/gloves/left.png');
}

#rightPlayerGlove {
    right: 10%;
    background-image: url('../assets/images/gloves/right.png');
}

.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    gap: 20px;
    position: relative;
    z-index: 100;
}

.health-bar {
    width: 200px;
    height: 30px;
    background: rgba(139, 0, 0, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #E50914 0%, #FF4444 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.8);
}

#controls {
    display: flex;
    gap: 0;
    padding: 0;
    background: rgba(0,0,0,0.9);
    position: relative;
    z-index: 100;
}

.punch-zone {
    flex: 1;
    padding: 40px;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(180deg, #E50914 0%, #B00710 100%);
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    border: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-family: 'Anton', sans-serif;
    position: relative;
    overflow: hidden;
}

.punch-zone:active {
    transform: scale(0.95);
    filter: brightness(1.3);
}

.punch-zone::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, height 0.3s;
}

.punch-zone:active::before {
    width: 300px;
    height: 300px;
}

#leftPunch {
    border-right: 2px solid rgba(0,0,0,0.5);
}

/* Target móvil para timing challenge */
.timing-target {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    border: 4px solid #FFF;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    z-index: 20;
    animation: targetPulse 0.5s infinite;
}

@keyframes targetPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Indicador de golpe del oponente */
.opponent-punch-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #E50914;
    font-weight: bold;
    text-shadow: 0 0 20px #E50914;
    z-index: 999;
    animation: warningFlash 0.5s infinite;
    pointer-events: none;
}

@keyframes warningFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Responsive móvil */
@media (max-width: 768px) {
    .health-bar {
        width: 100px;
    }
    
    #opponentDisplay {
        max-width: 280px;
        max-height: 350px;
    }
    
    .player-glove {
        width: 80px;
        height: 80px;
    }
    
    .punch-zone {
        padding: 30px 20px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hud {
        padding: 10px;
        gap: 10px;
    }
    
    .health-bar {
        width: 80px;
        height: 20px;
    }
    
    #opponentDisplay {
        max-width: 200px;
        max-height: 280px;
    }
}
