/* Retro-neon space shooter theme. System font stack (no external font dependency). */

:root {
    --neon-cyan: #00f9ff;
    --neon-pink: #ff00aa;
    --neon-purple: #7b00ff;
}

body {
    background: #05050f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.title-font {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -3px;
}

#game-canvas {
    image-rendering: crisp-edges;
    box-shadow:
        0 0 40px rgba(0, 249, 255, 0.35),
        0 0 80px rgba(123, 0, 255, 0.15);
    border: 3px solid #00f9ff;
    border-radius: 16px;
    background: #000011;
}

.neon-text {
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-pink);
}

.overlay {
    backdrop-filter: blur(20px);
}

.hud-value {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-shadow: 0 0 15px currentColor;
}

.game-container {
    box-shadow: 0 0 100px rgba(0, 249, 255, 0.1);
}

.particle {
    position: absolute;
    pointer-events: none;
}

.ml-active {
    animation: neural-pulse 1.5s ease-in-out infinite;
}

.overlay button:focus-visible,
#instructions-modal button:focus-visible {
    outline: 2px solid #00f9ff;
    outline-offset: 2px;
}

@keyframes neural-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
    .ml-active,
    .animate-pulse {
        animation: none;
    }
    .ml-active {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .title-font {
        font-size: 3rem;
        letter-spacing: -1px;
    }
    #hud {
        padding: 0.5rem 1rem;
    }
    #hud .text-3xl {
        font-size: 1.25rem;
    }
    #hud .text-sm {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    #hud .gap-x-8 {
        gap: 0.75rem;
    }
    #hud .gap-x-6 {
        gap: 0.5rem;
    }
    .game-container {
        padding: 0 0.5rem;
    }
    #game-canvas {
        border-width: 2px;
        border-radius: 8px;
    }
    .overlay .text-6xl,
    .overlay .text-7xl {
        font-size: 2.5rem;
    }
    .overlay .text-2xl {
        font-size: 1rem;
    }
    .overlay button {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.875rem !important;
    }
}

@media (max-width: 480px) {
    .title-font {
        font-size: 2.25rem;
    }
    #hud .gap-x-3 {
        gap: 0.25rem;
    }
    #hud .gap-x-8 {
        gap: 0.5rem;
    }
    .overlay button {
        min-width: 140px;
    }
}

/* Phones: the start screen used to live inside the (short, 4:3) canvas box, so
   the title, buttons and footer overflowed it and overlapped each other. Give
   it the whole viewport and let the footer flow under the buttons. */
@media (max-width: 768px) {
    #start-screen {
        position: fixed;
        background: rgba(5, 5, 15, 0.96);
        overflow-y: auto;
        padding-top: 1.5rem;
        padding-bottom: 5rem;
    }
    #start-screen > .absolute {
        position: static;
        margin-top: 1.75rem;
    }
}
