/* ==============================================================================
   墨花网 (mohuawang.com) 一键分享与海报样式库
   ============================================================================== */

/* 1. 分享操作栏 (PC/移动端通用卡片) */
.mayi-share-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.mayi-share-card-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #166534;
    font-weight: bold;
}
.mayi-share-card-left .mayi-badge {
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}
.mayi-share-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mayi-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.mayi-share-btn-poster {
    background: #2563eb;
    color: #fff !important;
}
.mayi-share-btn-poster:hover {
    background: #1d4ed8;
}
.mayi-share-btn-copy {
    background: #fff;
    color: #0f172a !important;
    border-color: #cbd5e1;
}
.mayi-share-btn-copy:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.mayi-share-btn-wechat {
    background: #16a34a;
    color: #fff !important;
}
.mayi-share-btn-wechat:hover {
    background: #15803d;
}
.mayi-share-btn-qq {
    background: #0284c7;
    color: #fff !important;
}
.mayi-share-btn-weibo {
    background: #e11d48;
    color: #fff !important;
}

/* 2. 轻量 Toast 提示 */
.mayi-share-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mayi-share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 3. 模态遮罩与海报弹窗 */
.mayi-share-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    backdrop-filter: blur(3px);
}
.mayi-share-modal-box, .mayi-poster-dialog {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: mayiFadeUp 0.25s ease-out;
}
@keyframes mayiFadeUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.mayi-modal-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}
.mayi-modal-header h4 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
    font-weight: bold;
}
.mayi-modal-close {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}
.mayi-modal-close:hover {
    color: #334155;
}
.mayi-poster-preview-body {
    padding: 16px 20px;
    text-align: center;
    max-height: 70vh;
    overflow-y: auto;
    background: #f8fafc;
}
.mayi-poster-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    display: inline-block;
}
.mayi-poster-tip {
    font-size: 13px;
    color: #64748b;
    margin-top: 10px;
    line-height: 1.5;
}
.mayi-poster-actions {
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    justify-content: center;
}
.mayi-btn-primary {
    background: #2563eb;
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.mayi-btn-primary:hover {
    background: #1d4ed8;
}
.mayi-btn-secondary {
    background: #f1f5f9;
    color: #334155 !important;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}
.mayi-btn-secondary:hover {
    background: #e2e8f0;
}

/* 4. 移动端自适应 */
@media (max-width: 768px) {
    .mayi-share-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
    }
    .mayi-share-btn-group {
        width: 100%;
    }
    .mayi-share-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 13px;
    }
    .mayi-poster-actions {
        flex-direction: column;
    }
    .mayi-btn-primary, .mayi-btn-secondary {
        width: 100%;
        text-align: center;
    }
}
