/* ═══════════════════════════════════════════════════════════════
   社交分享弹窗 (share-modal.js / .csm-*)
   桌面居中卡片 / 移动端底部抽屉
   ═══════════════════════════════════════════════════════════════ */
.csm-wrap {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.csm-wrap.csm-open { opacity: 1; pointer-events: auto; }

.csm-mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 34, 0.55);
    backdrop-filter: blur(3px);
}

.csm-panel {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: 380px;
    max-width: calc(100vw - 32px);
    padding: 28px 26px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    transform: translateY(8px) scale(0.96);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.csm-wrap.csm-open .csm-panel { transform: translateY(0) scale(1); }

.csm-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f3f4f7;
    color: #8a94a6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.csm-close:hover { background: #e7eaf1; color: #1a1a2e; }

.csm-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 20px;
}

/* 6 个平台图标 */
.csm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 10px;
    margin-bottom: 22px;
}
.csm-item {
    --c-bg: #667eea;
    --c-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s;
}
.csm-item:hover { transform: translateY(-2px); }
/* 首个 SVG = 圆形图标 */
.csm-item > svg:first-of-type {
    width: 44px; height: 44px;
    border-radius: 14px;
    background: var(--c-bg);
    color: var(--c-color);
    padding: 12px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.csm-item span {
    font-size: 11.5px;
    color: #5a6270;
    font-weight: 500;
    white-space: nowrap;
}

/* 底部按钮 */
.csm-actions {
    display: flex;
    gap: 10px;
}
.csm-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s;
}
.csm-btn svg { width: 16px; height: 16px; }
.csm-btn-copy {
    background: #f3f4ff;
    color: #667eea;
    border: 1px solid #e0e3f7;
}
.csm-btn-copy:hover { background: #eaf0ff; }
.csm-btn-more {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}
.csm-btn-more:hover { transform: translateY(-1px); }
.csm-btn-copied {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* ── 移动端：底部抽屉 ── */
@media (max-width: 480px) {
    .csm-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 20px 20px 28px;
        transform: translateY(100%);
    }
    .csm-wrap.csm-open .csm-panel { transform: translateY(0); }
    .csm-wrap { align-items: flex-end; }
    .csm-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 8px;
    }
    .csm-item > svg:first-of-type {
        width: 42px; height: 42px;
        padding: 11px;
        border-radius: 13px;
    }
    .csm-item span { font-size: 11px; }
    .csm-title { font-size: 16px; margin-bottom: 16px; }
}
