/* 阅读进度条样式 */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #007bff;
    z-index: 9999;
    transition: width 0.2s ease;
}

/* 文章标题锚点滚动偏移量 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6,
.markdown-body [id^="heading-"] {
    scroll-margin-top: 100px; /* 增加偏移量确保完全不被导航栏遮挡 */
}

/* 社交分享样式 */
.social-share {
    margin: 0 !important;
    text-align: center;
    padding: 0 !important;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 版权信息中的分享按钮容器 */
.share-buttons-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
}

/* 版权信息中的分享按钮样式 */
.copyright-info .share-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
    margin: 0;
}

.copyright-info .share-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.copyright-info .share-icon {
    font-size: 1.25em;
    color: #666;
}

.copyright-info .share-btn:hover .share-icon {
    color: #333;
}

/* 暗色模式下的分享按钮 */
.dark .copyright-info .share-btn {
    background: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark .copyright-info .share-btn:hover {
    background: #3d3d3d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.dark .copyright-info .share-icon {
    color: #e0e0e0;
}

.dark .copyright-info .share-btn:hover .share-icon {
    color: #ffffff;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.share-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.share-icon {
    font-size: 1.5em;
    color: #666;
}

.share-btn:hover .share-icon {
    color: #333;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .share-buttons {
        gap: 12px;
    }

    .share-btn {
        width: 36px;
        height: 36px;
    }

    .share-icon {
        font-size: 1.3em;
    }

    /* 在移动端隐藏版权信息中的分享按钮 */
    .share-buttons-container {
        display: none;
    }
}

/* 微信分享弹窗样式 */
.wechat-modal {
    position: fixed;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity, visibility;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.wechat-modal.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.wechat-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: absolute;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.wechat-modal.show .wechat-modal-content {
    opacity: 1;
}

.wechat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wechat-modal-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.wechat-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.wechat-modal-close:hover {
    color: #333;
}

.wechat-modal-body {
    text-align: center;
}

#wechat-qrcode {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.wechat-tip {
    font-size: 0.9em;
    color: #666;
    margin: 10px 0 0;
}

/* 暗色模式适配 */
.dark .share-btn {
    background: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark .share-btn:hover {
    background: #3d3d3d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.dark .share-icon {
    color: #e0e0e0;
}

.dark .share-btn:hover .share-icon {
    color: #ffffff;
}

.dark .wechat-modal-content {
    background: #1a1b1f;
    color: #e0e0e0;
}

.dark .wechat-modal-close {
    color: #e0e0e0;
}

.dark .wechat-modal-close:hover {
    color: #fff;
}

.dark .wechat-tip {
    color: #999;
}

/* 确保二维码在暗色模式下依然清晰可见 */
.dark #wechat-qrcode {
    background: #fff;
}

/* 复制成功提示样式 */
.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* 优化二维码图片显示 */
#wechat-qrcode img {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark #wechat-qrcode img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 版权信息移动端优化 */
@media (max-width: 768px) {
    .copyright-info {
        padding: 12px !important;
    }

    .copyright-item {
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .copyright-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        max-width: calc(100% - 30px);
        overflow: hidden;
    }

    .copyright-info a {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
        display: inline-block;
    }

    .copyright-info .font-medium {
        font-size: 0.9rem;
        white-space: nowrap;
        margin-right: 4px;
    }

    .copyright-notice {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
        display: inline-block;
    }
}

/* 分享按钮容器调整 */
.share-buttons-container {
    margin-top: -13px;
}

.copyright-notice {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.dark .copyright-notice {
    color: #999;
}

.emoji {
    display: inline-block;
    margin-right: 2px;
}


