/* 文章目录样式 */
.toc-container {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.toc-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #adb5bd;
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid #007bff;
    position: relative;
}

.toc-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #0056b3;
    border-radius: 2px;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list .toc-list {
    margin-left: 20px;
    margin-top: 8px;
}

.toc-item {
    margin: 8px 0;
    line-height: 1.6;
    position: relative;
}

.toc-link {
    color: #495057;
    text-decoration: none;
    display: block;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.toc-link:hover {
    color: #007bff;
    background-color: #f0f7ff;
    border-left-color: #007bff;
    padding-left: 12px;
}

.toc-link.active {
    color: #007bff;
    font-weight: 600;
    border-left: 4px solid #007bff;
    padding-left: 12px;
    background-color: #e7f3ff;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.2);
}

.toc-level-1 .toc-link {
    font-weight: 700;
    font-size: 16px;
    border-left: 3px solid #0056b3;
    padding-left: 12px;
    margin-bottom: 4px;
}

.toc-level-1 .toc-link:hover {
    border-left-width: 4px;
    border-left-color: #004085;
}

.toc-level-2 .toc-link {
    font-weight: 600;
    font-size: 15px;
    border-left: 2px solid #6c757d;
    padding-left: 10px;
}

.toc-level-2 .toc-link:hover {
    border-left-color: #007bff;
}

.toc-level-3 .toc-link {
    font-weight: 400;
    font-size: 14px;
}

.toc-level-4 .toc-link,
.toc-level-5 .toc-link,
.toc-level-6 .toc-link {
    font-weight: 400;
    font-size: 13px;
}

/* 平滑滚动时的偏移 */
.toc-heading-anchor {
    scroll-margin-top: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toc-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .toc-title {
        font-size: 16px;
    }
    
    .toc-list .toc-list {
        margin-left: 15px;
    }
}

