body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: 'Microsoft JhengHei', sans-serif;
    touch-action: none; /* Prevent browser zoom/scroll */
}

#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; /* Let clicks pass through to game container if needed, but buttons need events */
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(0, 255, 0, 0.8);
    pointer-events: none;
}

#hud-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 24px;
    text-shadow: 2px 2px 0 #000;
}

#hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    text-shadow: 2px 2px 0 #000;
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    pointer-events: auto;
}

button {
    padding: 15px 30px;
    font-size: 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background: #45a049;
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 0px;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Only enable pointer events on actual interactive zones if needed, 
   or we handle touch on whole screen in JS. 
   But usually: Left half = move, Right half = look 
*/

#joystick-zone {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: 150px;
    height: 150px;
    /* border: 2px solid rgba(255, 255, 255, 0.2); */
    border-radius: 50%;
    pointer-events: auto; /* Catch touches */
    background: rgba(255,255,255,0.1);
    display: none; /* Show only if mobile */
}

#shoot-btn {
    position: absolute;
    bottom: 80px;
    right: 50px;
    width: 80px;
    height: 80px;
    background: rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    pointer-events: auto;
    display: none; /* Show only if mobile */
}

@media (max-width: 1024px) {
    #mobile-controls {
        display: block !important;
    }
    #joystick-zone, #shoot-btn {
        display: flex;
    }
    #start-screen p {
        font-size: 18px;
    }
}
