/* ===== MOBILE CONTROLS HUD ===== */
#mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 130px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 8px env(safe-area-inset-bottom, 8px);
    box-sizing: border-box;
    z-index: 200;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.mc-left, .mc-center, .mc-right {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    pointer-events: all;
}

.mc-left {
    align-items: center;
}

.mc-jump-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-center {
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mc-right {
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Base button */
.mc-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    backdrop-filter: blur(4px);
    transition: background 0.1s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    outline: none;
    padding: 0;
}

.mc-btn:active {
    background: rgba(52,152,219,0.5);
    transform: scale(0.92);
}

/* Movement buttons */
.mc-move {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

/* Jump buttons */
.mc-jump {
    width: 44px;
    height: 44px;
    font-size: 16px;
    background: rgba(39,174,96,0.3);
    border-color: rgba(39,174,96,0.5);
}

.mc-flip {
    width: 44px;
    height: 44px;
    font-size: 16px;
    background: rgba(243,156,18,0.3);
    border-color: rgba(243,156,18,0.5);
}

/* Aim buttons */
.mc-aim {
    width: 44px;
    height: 44px;
    font-size: 16px;
    background: rgba(155,89,182,0.3);
    border-color: rgba(155,89,182,0.5);
}

/* Fire button — big red */
.mc-fire {
    width: 64px;
    height: 64px;
    font-size: 26px;
    background: rgba(231,76,60,0.5);
    border-color: rgba(231,76,60,0.8);
    border-width: 3px;
    box-shadow: 0 0 16px rgba(231,76,60,0.5);
}

.mc-fire:active {
    background: rgba(231,76,60,0.9);
    box-shadow: 0 0 24px rgba(231,76,60,0.8);
}

/* Weapon buttons */
.mc-weapon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    background: rgba(52,152,219,0.3);
    border-color: rgba(52,152,219,0.5);
}

/* Landscape orientation adjustments */
@media (orientation: landscape) {
    #mobile-controls {
        height: 110px;
    }

    .mc-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .mc-fire {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .mc-move {
        width: 50px;
        height: 50px;
    }
}

/* Скрываем на десктопе */
@media (hover: hover) and (pointer: fine) {
    #mobile-controls {
        display: none;
    }
}
