/* 文章目录样式 */
#article-toc {
    display: none; /* 默认隐藏，通过JS控制显示 */
}

.toc-content {
    padding: 0 8px;
    margin-top: 10px;
}

.toc-content a {
    display: block;
    padding: 5px 12px;
    color: rgb(75, 85, 99);
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    margin: 4px 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.toc-content a:hover {
    background-color: #333333 !important;
    color: white !important;
    transform: translateY(-1px);
}

.dark .toc-content a {
    color: rgb(156, 163, 175);
}

.dark .toc-content a:hover {
    background-color: #1a1a1a !important;
    color: white !important;
}

/* 折叠效果 - 默认隐藏所有子标题 */
.toc-h2 {
    font-weight: 600;
}

.toc-h3, .toc-h4 {
    display: none;
}

/* 二级标题前面添加小箭头 */
.toc-h2 {
    position: relative;
    padding-left: 20px !important;
}

.toc-h2::before {
    content: '▶';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    color: #777;
}

.toc-h2.expanded::before {
    transform: translateY(-50%) rotate(90deg);
    color: #333;
}

.dark .toc-h2::before {
    color: #aaa;
}

.dark .toc-h2.expanded::before {
    color: #fff;
}

/* 三级标题前面添加小点 */
.toc-h3 {
    position: relative;
    padding-left: 28px !important;
}

.toc-h3::before {
    content: '•';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #777;
}

.dark .toc-h3::before {
    color: #aaa;
}

.toc-h4 { 
    padding-left: 44px !important; 
} 