body {
    /*font-family: Arial, sans-serif;*/
    /*line-height: 1.6;*/
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    justify-content: center;
}

.content {
    flex: 1;
    padding: 20px;
    max-width: 800px;
    margin: 40px auto;
}

.sidebar {
    width: 220px;
    max-height: 400px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    position: fixed;
    right: 20px;
    top: 25%;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

#toc {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#toc li {
    margin: 10px 0;
}

#toc a {
    text-decoration: none;
    color: #007BFF;
    font-size: 14px;
    transition: color 0.3s ease;
}

#toc a:hover {
    color: #0056b3;
    text-decoration: underline;
}

#toc a:focus {
    color: #0056b3;
    text-decoration: underline;
    outline: none;
}

/*top箭头*/
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    font-size: 24px;
    color: #000;
    background-color: #fff;
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: 60px;
    border-radius: 12px; /* 调整边角半径以增加设计感 */
    cursor: pointer;
    text-decoration: none;
    border: 2px solid #000; /* 添加黑色边框 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#backToTopBtn:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.1);
}

/*适配手机端*/
@media (max-width: 768px) { /* 根据需要调整最大宽度 */
    .sidebar {
        display: none !important; /* 隐藏悬浮导航栏 */
    }

    #backToTopBtn {
        display: none !important; /* 隐藏回到顶部按钮 */
    }
}
