* {
    box-sizing: border-box;
}

html,
body,
#game {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background: #010107;
    user-select: none;
}

#game {
    position: relative;
}

#space {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #010107;
    cursor: grab;
    touch-action: none;
}

#space.is-dragging {
    cursor: grabbing;
}

#thrust {
    display: none;
    position: fixed;
    left: 50%;
    bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
    z-index: 10;
    width: 3.1rem;
    height: 3.1rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(210, 222, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 12px rgba(180, 200, 255, 0.08);
    transform: translateX(-50%);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
}

/* Show via CSS so the control appears even before JS finishes. */
@media (pointer: coarse), (hover: none), (max-width: 820px) {
    #thrust {
        display: block;
    }
}

#thrust.is-active,
#thrust:active {
    background: rgba(190, 210, 255, 0.14);
    border-color: rgba(220, 230, 255, 0.34);
    box-shadow: inset 0 0 16px rgba(190, 210, 255, 0.18);
}
