/* --- 右侧文章目录样式 --- */

/* 目录整体容器 */
#catalog {
    position: fixed;
    top: 120px; /* 距离页面顶部的位置 */
    right: 20px; /* 距离页面右侧的位置 */
    width: 260px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 80vh; /* 最大高度，超出部分会滚动 */
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* 当屏幕宽度小于1200px时，自动隐藏目录 */
@media (max-width: 1200px) {
    #catalog {
        display: none;
    }
}

/* "文章目录" 这几个字 */
#catalog h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

/* 目录列表 */
#catalog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 目录的每一项链接 */
#catalog-list a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent; /* 左侧高亮边框的占位 */
}

/* 鼠标悬停在链接上时的效果 */
#catalog-list a:hover {
    background-color: #f7f7f7;
    color: #000;
}

/* 当前激活（正在阅读）章节的链接样式 */
#catalog-list a.active {
    background-color: #f0f6ff; /* 浅蓝色背景 */
    color: #0d6efd; /* 蓝色字体 */
    font-weight: bold;
    border-left: 3px solid #0d6efd; /* 左侧蓝色高亮边框 */
}