/* 社交分享和免责声明共用CSS文件 */

/* 社交分享按钮样式 */
.sticky-sidebar .nav-link {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-sidebar .nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.sticky-sidebar .nav-link i {
    transition: color 0.3s ease;
    font-size: 14px;
}

.sticky-sidebar .nav-link:hover i {
    color: #007bff !important;
}

/* 文档导航样式 */
#nav-scroll .nav-link {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    width: auto;
    height: auto;
    display: block;
    text-align: left;
}

#nav-scroll .nav-link:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

#nav-scroll .nav-link.active {
    background-color: #007bff;
    color: #fff;
    font-weight: 500;
}

#nav-scroll .nav-link i {
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

/* 文档统计卡片样式 */
.doc-stats .stat-card {
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid #e9ecef !important;
}

.doc-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff !important;
}

.doc-stats .stat-card h6 {
    font-weight: 600;
    color: #495057;
}

/* 购买提示区域样式 */
.purchase-prompt {
    max-width: 600px;
    margin: 0 auto;
}

.purchase-prompt .alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.purchase-prompt .btn {
    min-width: 200px;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.purchase-prompt .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.purchase-prompt .btn-warning {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    border: none;
    color: #fff;
}

.purchase-prompt .btn-warning:hover {
    background: linear-gradient(135deg, #ff8f00, #ff6f00);
    color: #fff;
}

.purchase-prompt .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: #fff;
}

.purchase-prompt .btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    color: #fff;
}

.purchase-prompt .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: #fff;
}

.purchase-prompt .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: #fff;
}

/* 下载按钮样式 */
.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: #fff;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮组样式 */
.d-flex.gap-3 .btn {
    min-width: 180px;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* 下载按钮禁用状态 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 下载按钮加载状态 */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 微信二维码模态框样式 */
.qr-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.qr-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.qr-modal-header h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.qr-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.qr-close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.qr-modal-body {
    padding: 0 20px 20px 20px;
    text-align: center;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px;
}

.qr-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
}

.qr-error {
    padding: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 邮件分享样式 */
.email-options {
    text-align: left;
}

.email-option h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.email-option .input-group {
    margin-bottom: 0;
}

.email-option .form-control {
    font-size: 0.875rem;
    border-color: #dee2e6;
}

.email-option .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.email-option .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.email-actions {
    text-align: center;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.email-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* 邮件发送模态框样式 */
.email-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.preview-content {
    font-size: 0.875rem;
    line-height: 1.5;
}

.preview-body {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-top: 8px;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border-color: #ced4da;
    border-radius: 6px;
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-text {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.btn-loading {
    display: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 免责声明区域样式 */
.disclaimer-section {
    padding: 0 2rem;
    margin: 1rem 0;
}

.disclaimer-section .bg-light {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
}

.disclaimer-section small {
    line-height: 1.5;
    display: block;
}

.disclaimer-section strong {
    color: #495057;
}

/* 文章标签区域样式 */
.article-tags-section {
    padding: 0 2rem;
    margin: 1rem 0;
    text-align: center;
}

.article-tags-main {
    text-align: center;
    margin-bottom: 0;
}

.article-tags-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.article-tag-link {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.article-tag-link:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-tag-link:focus {
    color: #495057;
    text-decoration: none;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
    outline: none;
}

/* 随机标签样式 - 高对比度蓝色系 */
.article-tag-link.tags0 { background: #e3f2fd; color: #0d47a1; border-color: #1976d2; }
.article-tag-link.tags1 { background: #e8eaf6; color: #1a237e; border-color: #3f51b5; }
.article-tag-link.tags2 { background: #e1f5fe; color: #01579b; border-color: #0277bd; }
.article-tag-link.tags3 { background: #e0f7fa; color: #004d40; border-color: #006064; }
.article-tag-link.tags4 { background: #f3e5f5; color: #4a148c; border-color: #7b1fa2; }
.article-tag-link.tags5 { background: #e8f5e8; color: #1b5e20; border-color: #2e7d32; }
.article-tag-link.tags6 { background: #fff3e0; color: #e65100; border-color: #f57c00; }
.article-tag-link.tags7 { background: #fce4ec; color: #880e4f; border-color: #c2185b; }
.article-tag-link.tags8 { background: #f1f8e9; color: #33691e; border-color: #558b2f; }
.article-tag-link.tags9 { background: #e3f2fd; color: #0d47a1; border-color: #1976d2; }

/* 随机大小变化 */
.article-tag-link.tags0 { font-size: 0.65rem; }
.article-tag-link.tags1 { font-size: 0.70rem; }
.article-tag-link.tags2 { font-size: 0.78rem; }
.article-tag-link.tags3 { font-size: 0.85rem; }
.article-tag-link.tags4 { font-size: 0.76rem; }
.article-tag-link.tags5 { font-size: 0.94rem; }
.article-tag-link.tags6 { font-size: 0.79rem; }
.article-tag-link.tags7 { font-size: 0.81rem; }
.article-tag-link.tags8 { font-size: 0.77rem; }
.article-tag-link.tags9 { font-size: 1.03rem; }

/* 目录样式优化 */
#toc-container {
    max-height: none;
    overflow: visible;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.3rem;
}

.toc-list a {
    display: block;
    padding: 0.25rem 0.5rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.toc-list a:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.toc-list a.active {
    background-color: #e9ecef;
    color: #495057;
    font-weight: 500;
}

/* 不同级别标题的缩进 */
.toc-h1 { padding-left: 0; }
.toc-h2 { padding-left: 0.5rem; }
.toc-h3 { padding-left: 1rem; }
.toc-h4 { padding-left: 1.5rem; }
.toc-h5 { padding-left: 2rem; }
.toc-h6 { padding-left: 2.5rem; }

/* 自定义滚动条样式 - 仅在需要时显示 */
.card-body::-webkit-scrollbar {
    width: 0px;
}

.card-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.card-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* 当容器悬停时显示滚动条 */
.card-body:hover::-webkit-scrollbar-thumb {
    opacity: 1;
}

/* 当容器获得焦点时显示滚动条 */
.card-body:focus::-webkit-scrollbar-thumb {
    opacity: 1;
}

/* 滚动时显示滚动条 */
.card-body.scrolling::-webkit-scrollbar-thumb {
    opacity: 1;
}

/* 响应式优化 */
@media (max-width: 767px) {
    .article-tags-section {
        padding: 0 1rem;
        margin: 0.5rem 0;
    }
    
    .article-tags-main {
        margin-bottom: 0;
    }
    
    .article-tags-list {
        gap: 0.25rem;
    }
    
    .article-tag-link {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .disclaimer-section {
        padding: 0 1rem;
        margin: 0.5rem 0;
    }
}
