/* ========================================
   ESTILOS BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* ✅ NUEVO: Prevenir selección de texto en móvil */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    /* ✅ NUEVO: Prevenir scroll en móvil */
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* ✅ NUEVO: Soporte para notch en iPhone */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    background: #0a0015;
    font-family: 'Orbitron', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: 
        radial-gradient(ellipse at top, #1a0033 0%, transparent 60%),
        radial-gradient(ellipse at bottom, #0d0020 0%, transparent 60%),
        #0a0015;
}

/* ========================================
   CONTENEDOR DEL JUEGO
   ======================================== */

#game-container {
    position: relative;
    box-shadow: 
        0 0 60px rgba(147, 51, 234, 0.4),
        0 0 120px rgba(59, 130, 246, 0.2),
        inset 0 0 40px rgba(147, 51, 234, 0.1);
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-radius: 8px;
    overflow: hidden;
    /* ✅ NUEVO: Asegurar que el canvas no se desborde en móvil */
    max-width: 100vw;
    max-height: 100vh;
}

/* ========================================
   CANVAS RESPONSIVO
   ======================================== */

canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    /* ✅ NUEVO: Prevenir zoom en móvil */
    touch-action: none;
}

/* ========================================
   ANIMACIONES GLOBALES
   ======================================== */

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.6);
    }
    50% { 
        box-shadow: 0 0 40px rgba(147, 51, 234, 0.9);
    }
}