@charset "utf-8";
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.containera {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
    padding-top: 5%;
}


.nav-sidebara {
            width: 280px;
            position: sticky;
            top: 20px;
            /* height: fit-content; */
            background: rgb(255, 255, 255);
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-radius: 10px;
            border-left: 4px solid #3498db;
            display: flex;
            flex-direction: column;
            height: 80vh; 
        }
        
        .nav-titlea {
            padding: 20px;
            font-size: 18px;
            font-weight: 600;
            background-color: rgba(0,0,0,0.2);
            border-bottom: 1px solid rgba(255,255,255,0.1);
            flex-shrink: 0; /* 防止标题被压缩 */
        }
        
        .nav-lista {
            list-style: none;
            padding: 0;
            margin: 0;
            overflow-y: auto; /* 添加垂直滚动条 */
            flex-grow: 1; /* 占据剩余空间 */
            
            /* 自定义滚动条样式 */
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.3) rgba(0,0,0,0.1);
        }
        
        /* Webkit浏览器滚动条样式 */
        .nav-lista::-webkit-scrollbar {
            width: 6px;
        }
        
        .nav-lista::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.1);
            border-radius: 3px;
        }
        
        .nav-lista::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.3);
            border-radius: 3px;
        }
        
        .nav-lista::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.5);
        }

/* .nav-sidebara {
            width: 280px;
            position: sticky;
            top: 20px;
            height: fit-content;
            background: rgb(255, 255, 255);
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-radius: 10px;
            border-left: 4px solid #3498db;
        }
::-webkit-scrollbar {
    height: 8px;
    background: #e0e0e0;
  }
  ::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
  }
.nav-titlea {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.nav-titlea::before {
    content: "📋";
    margin-right: 10px;
    font-size: 18px;
}

.nav-lista {
    list-style: none;
} */

.nav-lista li {
    margin-bottom: 5px;
}

.nav-lista .level-1 > a {
    font-weight: 600;
    color: #2c3e50;
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-lista .level-1 > a:hover {
    background-color: #e9ecef;
    border-left-color: #3498db;
}

.nav-lista .level-1 > a.active {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left-color: #1565c0;
}

.nav-lista .level-1 > a::after {
    content: "▶";
    font-size: 12px;
    transition: transform 0.3s;
    color: #7b8a8b;
}

.nav-lista .level-1.expanded > a::after {
    transform: rotate(90deg);
    color: #1565c0;
}

.nav-lista .level-2 {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 10px;
}

.nav-lista .level-1.expanded .level-2 {
    max-height: 500px;
}

.nav-lista .level-2 a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    margin-left: 10px;
    border-left: 2px solid transparent;
}

.nav-lista .level-2 a:hover {
    background-color: #f1f8ff;
    color: #1976d2;
    border-left-color: #90caf9;
}

.nav-lista .level-2 a.active {
    background-color: #e3f2fd;
    color: #1565c0;
    font-weight: 600;
    border-left-color: #42a5f5;
}

.contenta {
    flex: 1;
    background: white;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 10px;
}

.contentb {
            margin: 0 auto;
            text-align: center;
            width: 1350px;
            flex: 1;
            background: white;
            padding: 40px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-radius: 10px;
        }

h1, h2, h3, h4 {
    margin-top: 30px;
    margin-bottom: 20px;
    color: #2c3e50;
    scroll-margin-top: 80px;
}

h1 {
    font-size: 32px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 40px;
    color: #2c3e50;
}

h2 {
    font-size: 26px;
    border-left: 5px solid #3498db;
    padding-left: 15px;
    margin-top: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

h3 {
    font-size: 22px;
    margin-left: 10px;
    margin-top: 30px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e0e0e0;
}

h4 {
    font-size: 18px;
    margin-left: 20px;
    margin-top: 25px;
    color: #555;
}

p {
    margin-bottom: 20px;
    text-align: justify;
    font-size: 16px;
    line-height: 1.7;
}

.figure {
    width: 100%;
    margin: 30px 0;
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.figure img {
    max-width: 100%;
    text-align: center;
    /* width: 100%; */
    height: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    background: white;
}

.figure-caption {
    font-style: italic;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #3498db;
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #f1f8ff;
}

.math {
    text-align: center;
    margin: 20px 0;
    overflow-x: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 18px;
}

.math mjx-container {
    outline: none;
}

.highlight {
    background-color: #fff9c4;
    padding: 2px 5px;
    border-radius: 3px;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .nav-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
}