/* 分享主按钮美化：圆形灰底+居中图标 */
.post-share-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 50px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.post-share-toggler:hover {
    background-color: #e9ecef;
    color: #495057;
}

.post-share-toggler i {
    margin-right: 0;
}

/* 分享模态框容器 */
.news-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    box-sizing: border-box;
    overflow-y: auto;
}

.news-share-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框内容 - 新设计 */
.nice-popup-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 560px;
    width: 90%;
    margin: 0 auto;
    padding: 0;
    animation: popupFadeIn 0.3s ease;
    opacity: 1;
    transform: scale(1);
    overflow: hidden;
}

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

/* 弹窗头部 */
.share-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.share-popup-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 关闭按钮 */
.close-share-modal {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.close-share-modal:hover {
    background: #f5f5f5;
    color: #333;
}

/* 弹窗主体 */
.share-popup-body {
    padding: 32px 28px;
}

/* 分享选项 - 新设计：4个横排 */
.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: #f8f9fa;
    border-radius: 16px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

.share-option:hover {
    background: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #f0f0f0;
}

.share-option i {
    font-size: 40px;
    transition: transform 0.3s ease;
}

.share-option:hover i {
    transform: scale(1.1);
}

.share-option span {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

/* 各平台品牌色 */
.share-option[data-action="weibo"] i {
    color: #e6162d;
}

.share-option[data-action="wechat"] i {
    color: #09bb07;
}

.share-option[data-action="qq"] i {
    color: #12b7f5;
}

.share-option[data-action="copy-link"] i {
    color: #8c8c8c;
}

/* 提示消息样式 */
.news-flash-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 10000;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
}

.news-flash-toast.error {
    background-color: #e74c3c;
}

.news-flash-toast.success {
    background-color: #27ae60;
}

.news-flash-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 深色模式适配 */
body.dark-mode .nice-popup-content {
    background-color: #2d2d2d;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-mode .share-popup-header {
    border-bottom-color: #404040;
}

body.dark-mode .share-popup-header h4 {
    color: #e0e0e0;
}

body.dark-mode .close-share-modal {
    background: transparent;
    color: #999;
}

body.dark-mode .close-share-modal:hover {
    background: #404040;
    color: #e0e0e0;
}

body.dark-mode .share-option {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: transparent;
}

body.dark-mode .share-option:hover {
    background: #404040;
    border-color: #4a4a4a;
}

body.dark-mode .share-option span {
    color: #adb5bd;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nice-popup-content {
        width: 95%;
        max-width: 420px;
        border-radius: 16px;
    }
    
    .share-popup-header {
        padding: 20px 24px;
    }
    
    .share-popup-body {
        padding: 24px;
    }
    
    .share-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .share-option {
        padding: 20px 12px;
    }
    
    .share-option i {
        font-size: 36px;
    }
    
    .share-option span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .nice-popup-content {
        width: 95%;
        border-radius: 16px;
    }
    
    .share-popup-header {
        padding: 16px 20px;
    }
    
    .share-popup-header h4 {
        font-size: 16px;
    }
    
    .share-popup-body {
        padding: 20px;
    }
    
    .share-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .share-option {
        padding: 16px 8px;
        border-radius: 12px;
    }
    
    .share-option i {
        font-size: 32px;
    }
    
    .share-option span {
        font-size: 11px;
    }
}
