/* Shared Mobile Game Controls */
.mobile-game-controls {
    display: none;
    /* Hidden on desktop */
    width: 100%;
    max-width: 500px;
    margin: 15px auto 0;
    padding: 0 10px;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    /* Allow clicks to pass through container */
    position: relative;
    z-index: 100;
}

@media (max-width: 800px) {
    .mobile-game-controls {
        display: flex;
    }
}

/* D-Pad Container */
.d-pad {
    position: relative;
    width: 160px;
    height: 160px;
    pointer-events: auto;
}

.d-pad-btn {
    position: absolute;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 26px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: background 0.1s, transform 0.1s;
}

.d-pad-btn i {
    pointer-events: none;
}

.d-pad-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}

/* D-Pad Positions */
.d-pad-up {
    top: 0;
    left: 54px;
}

.d-pad-down {
    bottom: 0;
    left: 54px;
}

.d-pad-left {
    top: 54px;
    left: 0;
}

.d-pad-right {
    top: 54px;
    right: 0;
}

/* Action Buttons Container (Right Side) */
.action-buttons {
    display: flex;
    gap: 15px;
    pointer-events: auto;
    align-items: center;
}

.action-btn {
    width: 78px;
    height: 78px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: pointer;
}

.action-btn.rotate-btn {
    background: rgba(0, 200, 255, 0.2);
    border-color: rgba(0, 200, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.3);
    font-size: 12px;
}

.action-btn:active {
    filter: brightness(1.5);
    transform: scale(0.95);
}

/* Specific Adjustment for Center Overlay if needed */
.mobile-game-controls.overlay-mode {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    pointer-events: none;
}