:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00de;
    --neon-green: #00ff41;
    --neon-gold: #ffd700;
    --bg-dark: #0a0a12;
    --ui-font: 'Exo 2', sans-serif;
    --title-font: 'Orbitron', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    touch-action: none;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--ui-font);
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 800px; /* Or responsive */
    aspect-ratio: 9/16; /* For mobile-first vertical feel, or responsive */
}

/* Make it fit the screen */
@media (min-aspect-ratio: 9/16) {
    #game-container {
        height: 100%;
        width: auto;
        aspect-ratio: 9/16;
    }
}

/* For desktop wide screens, maybe keep a fixed ratio or fill */
@media (min-width: 768px) {
    #game-container {
        aspect-ratio: 3/4;
        max-width: 600px;
    }
}


canvas {
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
    width: 100%;
    height: 100%;
    display: block;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    border: 2px solid #333;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass to canvas when playing */
    display: flex;
    flex-direction: column;
}

#hud {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    font-family: var(--title-font);
    font-size: 1.2rem;
    text-shadow: 0 0 5px var(--neon-blue);
    pointer-events: none;
    z-index: 10;
}

.hud-item span {
    color: var(--neon-blue);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    pointer-events: auto; /* Catch clicks */
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    display: none; /* remove from flow */
}

.screen.active {
    opacity: 1;
    display: flex;
}

.neon-text {
    font-family: var(--title-font);
    font-size: 3rem;
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink),
        0 0 80px var(--neon-pink);
    margin-bottom: 20px;
    text-align: center;
    animation: pulse 2s infinite alternate;
}

.neon-text.blue-glow {
    text-shadow:
        0 0 5px #fff,
        0 0 20px var(--neon-blue),
        0 0 40px var(--neon-blue);
}

.neon-text.red-glow {
    text-shadow:
        0 0 5px #fff,
        0 0 20px #ff0000,
        0 0 40px #ff0000;
}

.neon-text.green-glow {
    text-shadow:
        0 0 5px #fff,
        0 0 20px var(--neon-green),
        0 0 40px var(--neon-green);
}

.neon-text.gold-glow {
    text-shadow:
        0 0 5px #fff,
        0 0 20px var(--neon-gold),
        0 0 40px var(--neon-gold);
}


.neon-btn {
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 15px 40px;
    font-family: var(--title-font);
    font-size: 1.5rem;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 10px var(--neon-blue) inset, 0 0 20px var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
    transition: all 0.2s ease;
    margin-top: 20px;
    border-radius: 5px;
}

.neon-btn:hover {
    background: var(--neon-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-blue) inset, 0 0 40px var(--neon-blue);
}

.neon-btn:active {
    transform: scale(0.95);
}

@keyframes pulse {
    from {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px var(--neon-pink),
            0 0 40px var(--neon-pink);
    }
    to {
        text-shadow:
            0 0 2px #fff,
            0 0 5px #fff,
            0 0 10px var(--neon-pink),
            0 0 20px var(--neon-pink);
    }
}

p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #ccc;
    text-align: center;
}
