* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Press Start 2P', monospace;
    background-color: #050510;
    color: #0ff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    text-shadow: 0 0 10px #0ff;
    font-size: 14px;
}

#btn-sound {
    background: transparent;
    color: #0ff;
    border: 1px solid #0ff;
    padding: 5px 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    text-shadow: 0 0 5px #0ff;
    box-shadow: 0 0 5px #0ff inset;
}

#btn-sound:hover {
    background: rgba(0, 255, 255, 0.2);
}

.controls-hint {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 10px;
    color: rgba(0, 255, 255, 0.7);
    line-height: 1.5;
    text-shadow: 0 0 5px #0ff;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border: 2px solid #f0f;
    border-radius: 10px;
    box-shadow: 0 0 20px #f0f, inset 0 0 20px #f0f;
    pointer-events: auto;
}

#game-over.hidden {
    display: none;
}

#game-over h2 {
    color: #f0f;
    text-shadow: 0 0 10px #f0f;
    margin-bottom: 20px;
    font-size: 24px;
}

#game-over p {
    color: #ff0;
    text-shadow: 0 0 10px #ff0;
    margin-bottom: 30px;
    font-size: 16px;
}

#play-again-btn {
    background: transparent;
    color: #0ff;
    border: 2px solid #0ff;
    padding: 15px 30px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    text-shadow: 0 0 5px #0ff;
    box-shadow: 0 0 10px #0ff inset;
    transition: all 0.2s;
}

#play-again-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px #0ff inset, 0 0 10px #0ff;
}

#startup-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border: 2px solid #0ff;
    border-radius: 10px;
    box-shadow: 0 0 20px #0ff, inset 0 0 20px #0ff;
    pointer-events: auto;
}

#startup-screen.hidden {
    display: none;
}

#startup-screen h2 {
    color: #ff0;
    text-shadow: 0 0 10px #ff0;
    margin-bottom: 30px;
    font-size: 32px;
}

#start-game-btn {
    background: transparent;
    color: #0ff;
    border: 2px solid #0ff;
    padding: 15px 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    cursor: pointer;
    text-shadow: 0 0 5px #0ff;
    box-shadow: 0 0 10px #0ff inset;
    transition: all 0.2s;
}

#start-game-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px #0ff inset, 0 0 10px #0ff;
}

#mobile-controls {
    display: none; /* Hide on desktop, show via JS if mobile */
    position: absolute;
    bottom: 20px;
    right: 20px;
    pointer-events: auto;
    width: 150px;
    height: 150px;
}

.btn {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #0ff;
    color: #0ff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    cursor: pointer;
    text-shadow: 0 0 5px #0ff;
}

.btn:active {
    background: rgba(0, 255, 255, 0.5);
}

#btn-up { top: 0; left: 55px; }
#btn-left { top: 55px; left: 0; }
#btn-down { top: 110px; left: 55px; }
#btn-right { top: 55px; left: 110px; }

@media (max-width: 768px) {
    #mobile-controls {
        display: block;
    }
    .controls-hint {
        display: none;
    }
}
