.mf-share {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;

    /* 缩小整排图标上下留白 */
    margin: 6px auto;
    padding: 3px 0;

    box-sizing: border-box;
}

.mf-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 48px;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 5px;

    cursor: pointer;
}

.mf-share-icon svg {
    display: block;

    width: 23px;
    height: 23px;

    color: #fff;
    fill: currentColor;

    pointer-events: none;
}



.mf-share-icon:hover {
    opacity: .9;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,.14);
}

.mf-share-icon.wechat {
    background: #2dc100;
}

.mf-share-icon.qzone {
    background: #ffc400;
}

.mf-share-icon.weibo {
    background: #ff8a28;
}

.mf-share-icon.douban {
    background: #26943f;
}

.mf-share-icon.facebook {
    background: #4267b2;
}

.mf-share-icon.twitter {
    background: #000;
}

.mf-share-icon.linkedin {
    background: #087fb5;
}

.mf-share-icon.email {
    background: #888;
}

.mf-share-icon.share {
    background: #80d329;
}

@media (max-width: 768px) {

    .mf-share {
        gap: 6px;
        margin: 5px auto;
        padding: 2px 0;
    }

    .mf-share-icon {
        width: 39px;
        height: 41px;
    }

    .mf-share-icon svg {
        width: 21px;
        height: 21px;
    }
}

/* =========================================================
   微信二维码分享弹窗
   ========================================================= */

#mf-wechat-mask {
    display: none;
    position: fixed;
    z-index: 2147483000;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .55);

    box-sizing: border-box;
}

.mf-wechat-box {
    position: relative;

    width: 300px;
    max-width: calc(100vw - 40px);

    padding: 28px 20px 24px;

    background: #fff;

    border-radius: 12px;

    text-align: center;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, .28);

    box-sizing: border-box;
}


/* 关闭按钮 */

.mf-wechat-close {
    position: absolute;

    top: 8px;
    right: 9px;

    width: 32px;
    height: 32px;

    padding: 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: #999;

    font-size: 26px;
    line-height: 32px;

    text-align: center;

    cursor: pointer;
}

.mf-wechat-close:hover {
    color: #333;
}


/* 标题 */

.mf-wechat-title {
    margin: 0 0 5px;

    color: #222;

    font-size: 19px;
    font-weight: 600;
    line-height: 28px;
}


/* 提示文字 */

.mf-wechat-desc {
    margin: 0 0 16px;

    color: #888;

    font-size: 13px;
    line-height: 22px;
}


/* 二维码区域 */

#mf-wechat-qrcode {
    display: flex;

    width: 240px;
    height: 240px;

    margin: 0 auto;

    align-items: center;
    justify-content: center;

    background: #fff;

    box-sizing: border-box;
}


#mf-wechat-qrcode img,
#mf-wechat-qrcode canvas {
    width: auto;
    height: auto;

    max-width: none;

    margin: 0 auto;

    image-rendering: pixelated;
}

/* 二维码加载失败 */

.mf-qr-error {
    display: flex;

    width: 100%;
    height: 180px;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: #888;

    font-size: 13px;
    line-height: 22px;
}

.mf-qr-error button {
    margin-top: 12px;

    padding: 8px 15px;

    border: 0;
    border-radius: 5px;

    background: #07c160;

    color: #fff;

    font-size: 13px;

    cursor: pointer;
}


/* =========================================================
   本地 Toast
   如果页面有 layer，mf-share.js 会优先使用 layer
   ========================================================= */

#mf-share-tip {
    position: fixed;

    z-index: 2147483647;

    top: 50%;
    left: 50%;

    padding: 11px 20px;

    border-radius: 6px;

    background: rgba(0, 0, 0, .82);

    color: #fff;

    font-size: 14px;
    line-height: 22px;

    white-space: nowrap;

    opacity: 0;

    transform:
        translate(-50%, -50%)
        scale(.92);

    transition:
        opacity .2s ease,
        transform .2s ease;

    pointer-events: none;
}

#mf-share-tip.show {
    opacity: 1;

    transform:
        translate(-50%, -50%)
        scale(1);
}


/* =========================================================
   手机端微信弹窗
   ========================================================= */

@media (max-width: 768px) {

    #mf-wechat-mask {
        padding: 15px;
    }

    .mf-wechat-box {
        width: 280px;
        max-width: calc(100vw - 30px);

        padding:
            26px 15px
            21px;
    }

    .mf-wechat-title {
        font-size: 18px;
    }

    #mf-wechat-qrcode {
        width: 190px;
        height: 190px;
    }

    #mf-wechat-qrcode img,
    #mf-wechat-qrcode canvas {
        width: 170px !important;
        height: 170px !important;
    }
}

/* =========================================================
   分享图标视觉尺寸微调
   按钮尺寸不变，只放大前四个 Logo
   ========================================================= */

/* 微信：略微放大 */
.mf-share-icon.wechat svg {
    width: 27px;
    height: 27px;
}

/* QQ空间：原始 SVG 留白较多，需要放大更多 */
.mf-share-icon.qzone svg {
    width: 31px;
    height: 31px;
}

/* 新浪微博：适当放大 */
.mf-share-icon.weibo svg {
    width: 28px;
    height: 28px;
}

/* 豆瓣：原始 SVG 留白较多，需要明显放大 */
.mf-share-icon.douban svg {
    width: 31px;
    height: 31px;
}


/* 手机端同步调整 */
@media (max-width: 768px) {

    .mf-share-icon.wechat svg {
        width: 24px;
        height: 24px;
    }

    .mf-share-icon.qzone svg {
        width: 27px;
        height: 27px;
    }

    .mf-share-icon.weibo svg {
        width: 25px;
        height: 25px;
    }

    .mf-share-icon.douban svg {
        width: 27px;
        height: 27px;
    }
}

/* ========================================
   手机系统原生分享
   PC隐藏
   ======================================== */

.mf-native-share {
    display: none;
}

@media (max-width: 768px) {

    .mf-native-share {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 7px auto 3px;
    }

    .mf-native-share-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;

        min-height: 40px;
        padding: 0 18px;

        border: 0;
        border-radius: 20px;

        background: #07c160;
        color: #fff;

        font-size: 14px;
        line-height: 40px;

        cursor: pointer;
        box-sizing: border-box;
    }

    .mf-native-share-icon {
        font-size: 18px;
        line-height: 1;
    }
}