.mls-container {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.mls-current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mls-current:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mls-current .mls-flag {
    font-size: 22px;
}

.mls-current .mls-abbr {
    display: inline-block;
    margin-left: 2px;
    font-size: 12px;
    font-weight: 600;
}

.mls-button {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border-radius: 15px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mls-container:not(.mls-collapsed) .mls-button {
    display: flex;
}

.mls-container:not(.mls-collapsed) .mls-current {
    display: none;
}

.mls-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 50px;
    justify-content: flex-start;
}

.mls-item:hover {
    background: #f0f0f0;
}

.mls-item.active {
    background: #0073aa;
    color: #fff;
}

.mls-flag {
    font-size: 20px;
    line-height: 1;
}

.mls-abbr {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
}

.mls-full {
    font-size: 14px;
    display: none;
}

.mls-container:not(.mls-collapsed) .mls-item .mls-full {
    display: inline;
}

.mls-container:not(.mls-collapsed) .mls-item .mls-abbr {
    display: none;
}

@media (max-width: 767px) {
    .mls-container {
        left: 10px;
    }

    .mls-current {
        width: 60px;
        height: 60px;
    }

    .mls-current .mls-flag {
        font-size: 28px;
    }

    .mls-button {
        padding: 5px;
    }

    /* 修复移动端触摸区域：padding 确保总高度 ≥ 60px */
    .mls-item {
        min-width: 60px;
        min-height: 60px;
        padding: 16px 10px; /* 上下 padding 各16px，总高度=16+28+16=60px */
        justify-content: center;
    }

    .mls-item .mls-abbr,
    .mls-item .mls-full {
        display: none !important;
    }

    .mls-flag {
        font-size: 28px;
    }

    .mls-position-top {
        top: 10px;
        left: 10px;
        transform: none;
    }

    .mls-position-right {
        right: 10px;
        left: auto;
        transform: none;
        top: auto;
        bottom: 20px;
    }
}

.mls-position-top {
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
}

.mls-position-right {
    left: auto;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.mls-position-right .mls-button {
    flex-direction: column;
}