/* 分享按钮 */
.share-btn {
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

/* 分享弹窗遮罩 */
.share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 分享弹窗 */
.share-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.share-overlay.active .share-modal {
    transform: scale(1) translateY(0);
}

.share-modal-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.share-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.share-modal-body {
    padding: 24px 20px;
}

/* 二维码容器 */
.share-qrcode {
    text-align: center;
    margin-bottom: 20px;
}

.share-qrcode canvas {
    border: 8px solid #f8f8f8;
    border-radius: 8px;
}

.share-qrcode-tip {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

/* 链接复制 */
.share-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.share-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-link-copy {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-link-copy:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.share-link-copy.copied {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* 分享平台 */
.share-platforms {
    margin-bottom: 16px;
}

.share-platforms-title {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    text-align: center;
}

.share-platforms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.share-platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.share-platform-item:hover {
    background: #f1f5f9;
}

.share-platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.share-platform-icon.wechat { background: #07c160; color: #fff; }
.share-platform-icon.qq { background: #12b7f5; color: #fff; }
.share-platform-icon.weibo { background: #e6162d; color: #fff; }
.share-platform-icon.poster { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

.share-platform-name {
    font-size: 12px;
    color: #475569;
}

/* 海报预览 */
.share-poster-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-poster-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-poster-container {
    position: relative;
    max-width: 320px;
    width: 90%;
}

.share-poster-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.share-poster-tip {
    text-align: center;
    color: #fff;
    font-size: 14px;
    margin-top: 16px;
}

.share-poster-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 关闭按钮 */
.share-modal-close {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.share-modal-close:hover {
    background: #e2e8f0;
}

/* 响应式 */
@media (max-width: 480px) {
    .share-btn {
        right: 16px;
        bottom: 80px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .share-platforms-grid {
        gap: 8px;
    }

    .share-platform-icon {
        width: 44px;
        height: 44px;
    }
}
