:root {
    --primary-color: #FF1493;
    --secondary-color: #00ff00;
    --energy-color: #4ecdc4;
    --danger-color: #ff0000;
}

body {
    margin: 0;
    background: radial-gradient(circle, #1a1a1a 0%, #000 100%);
    font-family: 'Bangers', cursive;
    color: white;
    touch-action: manipulation;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    flex: 1;
    padding: 20px;
}

.game-header {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(90deg, #ff6b6b 0%, #4ecdc4 100%);
    border-bottom: 3px solid var(--primary-color);
    border-radius: 15px 15px 0 0;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 3px 3px 0 #000;
    letter-spacing: 2px;
    color: white;
    -webkit-text-stroke: 2px var(--primary-color);
}

.score-display {
    display: flex;
    justify-content: space-around;
    font-size: 1.2rem;
    margin-top: 10px;
}

#gameBoard {
    position: relative;
    height: 60vh;
    background: radial-gradient(circle, #000428 0%, #004e92 100%);
    overflow: hidden;
    border: 2px solid var(--primary-color);
    border-radius: 0 0 15px 15px;
}

#playerShip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    transition: left 0.3s ease;
    filter: drop-shadow(0 0 10px #00ffff);
    z-index: 100;
}

.game-controls {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid var(--primary-color);
    border-radius: 15px;
    margin-top: 20px;
}

.controls-top {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:active {
    transform: scale(0.9);
}

.shoot-btn {
    background: var(--danger-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.energy-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
}

.energy-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--energy-color), #00FF00);
    transition: width 0.5s ease;
}

.bomb-btn {
    background: #FFD700;
    color: #000;
}

.bomb-btn.active {
    animation: bombReady 1s infinite;
}

@keyframes bombReady {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.meteor {
    position: absolute;
    width: 80px;
    height: 80px;
    background: url('../assets/img/meteoro.png') no-repeat center/contain;
    animation: meteorFall 8s linear, rotate 4s linear infinite;
    filter: drop-shadow(0 0 10px orange);
    z-index: 50;
}

@keyframes meteorFall {
    from { top: -100px; }
    to { top: 100%; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.meteor-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    -webkit-text-stroke: 2px var(--primary-color);
    text-shadow: 0 0 10px rgba(255,20,147,0.8);
}

.alien {
    position: absolute;
    width: 120px;
    height: auto;
    animation: alienFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px #00ff00);
}

@keyframes alienFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.explosion {
    position: absolute;
    width: 100px;
    height: 100px;
    background: url('../assets/img/explosion.png') no-repeat center/contain;
    animation: explosionAnim 0.8s forwards;
    z-index: 200;
}
.meteor-explosion {
    /*animation: meteorExplosion 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;*/
    position: absolute;
    width: 100px;
    height: 100px;
    background: url('../assets/img/explosion.png') no-repeat center/contain;
    animation: explosionAnim 0.8s forwards;
    z-index: 200;
}

@keyframes explosionAnim {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

.alien-explosion {
    animation: alienExplosion 1.5s forwards;
}

@keyframes alienExplosion {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

.victory-hidden {
    display: none;
    opacity: 0;
}

#victoryMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255,215,0,0.8);
    animation: victoryAnim 2s ease-out forwards;
    z-index: 300;
}

@keyframes victoryAnim {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.game-message {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.5rem;
    animation: messageSlide 1s ease-out;
    z-index: 150;
}

@keyframes messageSlide {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 200px; opacity: 1; }
}

.hidden {
    display: none;
}

.game-btn {
    background: var(--primary-color);
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s;
}

.game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

@media (max-width: 600px) {
    .game-container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    #playerShip {
        width: 50px;
    }
}

@keyframes meteorExplosion {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
        filter: brightness(1.5);
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
        filter: brightness(0);
    }
}

.shockwave {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 4px solid rgba(255, 165, 0, 0.8);
    border-radius: 50%;
    animation: shockwave 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes shockwave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.meteor-particle {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255,165,0,0.5);
    animation: 
        meteorParticleFly 0.8s ease-out forwards,
        particleFade 0.8s linear forwards;
}

@keyframes meteorParticleFly {
    to {
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        );
    }
}

@keyframes particleFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
.correct-hit {
    animation: correctHitGlow 0.5s ease-out;
}

@keyframes correctHitGlow {
    0% { box-shadow: 0 0 30px rgba(0,255,0,0.5); }
    100% { box-shadow: none; }
}
.correct-hit {
    animation: correctHitGlow 0.5s ease-out;
}

@keyframes correctHitGlow {
    0% { box-shadow: 0 0 30px rgba(0,255,0,0.5); }
    100% { box-shadow: none; }
}
/* Animación de impactos */
@keyframes hitPulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Estilo de bomba activa */
.bomb-ready {
    animation: bombGlow 1s infinite;
}

@keyframes bombGlow {
    0% { box-shadow: 0 0 20px #FF0000; }
    50% { box-shadow: 0 0 40px #FF4500; }
    100% { box-shadow: 0 0 20px #FF0000; }
}

/* Proyectil bomba */
.bomb-projectile {
    width: 30px;
    height: 30px;
    background: radial-gradient(#FF0000, #FFA500);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 20px #FF0000;
    animation: bombLaunch 2s linear forwards;
}

@keyframes bombLaunch {
    0% { 
        transform: translateY(0);
        opacity: 1;
    }
    100% { 
        transform: translateY(-100vh);
        opacity: 0;
    }
}

/* Animación de bomba en movimiento */
@keyframes bombTravel {
    from { bottom: 85px; }
    to { bottom: 100%; }
}

/* Explosión alienígena */
.alien-explosion {
    animation: alienExplode 1.5s forwards;
    filter: drop-shadow(0 0 30px #00ff00);
}

@keyframes alienExplode {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(3) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

