:root {
    --bg-color: #050510;
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff00;
    --text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

#score-board {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    text-shadow: 0 0 10px var(--neon-blue);
}

#level-board {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    text-shadow: 0 0 10px var(--neon-green);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 16, 0.7);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    text-align: center;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

h1 {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--text-color);
    text-shadow: 0 0 20px var(--neon-pink), 0 0 40px var(--neon-pink);
    letter-spacing: 4px;
}

p {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ccc;
}

.key {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--neon-blue);
    padding: 5px 15px;
    border-radius: 5px;
    color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    font-weight: bold;
}

.instructions {
    font-size: 16px;
    margin-top: 30px;
    opacity: 0.8;
}
/* Mobile Controls */
#mobile-controls {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: auto; /* Enable clicks on buttons */
    justify-content: space-between;
    padding: 0 20px;
    align-items: flex-end;
    box-sizing: border-box;
    z-index: 10;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    outline: none;
    touch-action: manipulation; /* Prevent zoom */
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active, .control-btn.active {
    background: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 15px var(--neon-blue);
}

.big-btn {
    width: 80px;
    height: 80px;
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    font-size: 30px;
}

.big-btn:active, .big-btn.active {
    background: rgba(255, 0, 255, 0.3);
    box-shadow: 0 0 15px var(--neon-pink);
}

#joystick-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-row {
    display: flex;
}

@media (max-width: 1024px) {
    #mobile-controls {
        display: flex;
    }
    
    .instructions {
        display: none;
    }
    
    h1 {
        font-size: 40px;
    }
}
