body {
    margin: 0;
    overflow: hidden; /* Prevent scrollbars */
    font-family: sans-serif;
}

canvas {
    display: block; /* Remove scrollbars */
}

#instructions, #winMessage {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 20px;
    color: white;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px #000000;
    z-index: 10;
}

#winMessage {
    display: none;
}

/* --- Mobile Controls --- */
#mobile-controls {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    z-index: 20;
    pointer-events: none; /* Allows clicks to pass through the container */
}

@media (hover: none) and (pointer: coarse) {
    /* Show controls only on touch devices */
    #mobile-controls {
        display: flex;
    }
}

#mobile-controls .control-group {
    display: flex;
    flex-direction: column;
}

#mobile-controls button {
    pointer-events: auto; /* Re-enable pointer events for buttons */
    width: 60px;
    height: 60px;
    margin: 5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard */
}

#mobile-controls button:active {
    background-color: rgba(0, 0, 0, 0.7);
}

#movement-controls {
    align-items: flex-start;
}

#rotation-controls {
    align-items: flex-end;
}