body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    touch-action: none;
    /* Prevent pull-to-refresh and scrolling */
}

canvas {
    display: block;
}

/* Touch Controls */
.touch-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 120px;
    pointer-events: none;
    display: none;
    /* Hidden by default */
    z-index: 100;
    user-select: none;
    -webkit-user-select: none;
}

.touch-controls.visible {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.joystick-zone {
    width: 100px;
    height: 100px;
    position: relative;
    pointer-events: auto;
}

.joystick-base {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
}

.joystick-stick {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    top: 50px;
    left: 50px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.1s;
}

.button-zone {
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
    margin-bottom: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    touch-action: manipulation;
    user-select: none;
}

.control-btn:active {
    background: rgba(255, 255, 255, 0.3);
}