/* ==========================================
   社会化分享组件样式
   ========================================== */

.share-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.share-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.share-panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* 分享按钮网格 */
.share-buttons-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.share-btn:active {
    transform: translateY(-2px);
}

/* 各平台颜色 */
.share-btn.wechat::before { background: rgba(7, 193, 96, 0.12); }
.share-btn.wechat:hover { border-color: #07c160; }
.share-btn.wechat:hover::before { opacity: 1; }

.share-btn.qq::before { background: rgba(18, 183, 245, 0.12); }
.share-btn.qq:hover { border-color: #12b7f5; }
.share-btn.qq:hover::before { opacity: 1; }

.share-btn.weibo::before { background: rgba(230, 22, 45, 0.12); }
.share-btn.weibo:hover { border-color: #e6162d; }
.share-btn.weibo:hover::before { opacity: 1; }

.share-btn.douban::before { background: rgba(0, 180, 20, 0.12); }
.share-btn.douban:hover { border-color: #00b414; }
.share-btn.douban:hover::before { opacity: 1; }

.share-btn.copy-link::before { background: rgba(108, 92, 231, 0.12); }
.share-btn.copy-link:hover { border-color: #6c5ce7; }
.share-btn.copy-link:hover::before { opacity: 1; }

/* 图标 */
.share-btn-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.share-btn:hover .share-btn-icon {
    transform: scale(1.15);
}

.share-btn.wechat .share-btn-icon { background: rgba(7, 193, 96, 0.15); }
.share-btn.qq .share-btn-icon { background: rgba(18, 183, 245, 0.15); }
.share-btn.weibo .share-btn-icon { background: rgba(230, 22, 45, 0.15); }
.share-btn.douban .share-btn-icon { background: rgba(0, 180, 20, 0.15); }
.share-btn.copy-link .share-btn-icon { background: rgba(108, 92, 231, 0.15); }

/* SVG 图标样式 */
.share-btn-icon svg {
    width: 22px;
    height: 22px;
}

.share-btn.wechat .share-btn-icon svg { fill: #07c160; }
.share-btn.qq .share-btn-icon svg { fill: #12b7f5; }
.share-btn.weibo .share-btn-icon svg { fill: #e6162d; }
.share-btn.douban .share-btn-icon svg { fill: #00b414; }
.share-btn.copy-link .share-btn-icon svg { fill: #6c5ce7; }

/* 平台名 */
.share-btn-label {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.share-btn.wechat:hover .share-btn-label { color: #07c160; }
.share-btn.qq:hover .share-btn-label { color: #12b7f5; }
.share-btn.weibo:hover .share-btn-label { color: #e6162d; }
.share-btn.douban:hover .share-btn-label { color: #00b414; }
.share-btn.copy-link:hover .share-btn-label { color: #6c5ce7; }

/* 微信二维码弹窗 */
.share-wechat-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.share-wechat-modal.visible {
    display: flex;
}

.share-wechat-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.share-wechat-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.share-wechat-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.share-wechat-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 1.25rem;
    max-height: 200px;
    overflow-y: auto;
    word-break: break-all;
}

.share-wechat-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.share-wechat-actions button {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-wechat-actions button.share-wechat-copy-btn {
    background: #07c160;
    border-color: #07c160;
    color: #fff;
}

.share-wechat-actions button.share-wechat-copy-btn:hover {
    background: #06ad56;
    transform: translateY(-1px);
}

.share-wechat-actions button.share-wechat-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* 分享成功提示 */
.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.share-toast.success {
    border-color: rgba(0, 184, 148, 0.3);
}

/* 分享结果预览 */
.share-result-preview {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.share-preview-type {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.share-preview-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
    .share-buttons-grid {
        gap: 0.75rem;
    }
    
    .share-btn {
        min-width: 65px;
        padding: 0.75rem 1rem;
    }
    
    .share-btn-icon {
        width: 36px;
        height: 36px;
    }
    
    .share-btn-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .share-buttons-grid {
        gap: 0.5rem;
    }

    .share-btn {
        min-width: 56px;
        padding: 0.6rem 0.75rem;
    }
}
