body {
    margin: 0;
    overflow: hidden;
    background-color: #0a0e2a;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

canvas {
    display: block;
    background-color: #0a0e2a;
}

/* D-Pad: hidden by default, shown on touch devices */
#dpad {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.dpad-mid {
    display: flex;
    gap: 4px;
    align-items: center;
}

.dpad-center {
    width: 56px;
    height: 56px;
}

.dpad-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}

.dpad-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

@media (pointer: coarse) {
    #dpad {
        display: flex;
    }
}

@media (hover: none) {
    #dpad {
        display: flex;
    }
}
