* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* 左侧导航栏 */
aside {
    padding-left: 1.5rem;
    background: white;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

aside h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f5ff;
}

aside p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* 导航列表 */
nav ul {
    list-style: none;
}

nav ul ul {
    margin-left: 1rem;
    border-left: 1px solid #eaeaea;
}

nav li {
    margin-bottom: 0.25rem;
}

nav a {
    display: block;
    padding: 0rem 0.75rem;
    text-decoration: none;
    color: #555;
    border-radius: 4px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

nav a:hover {
    background-color: #f8fafc;
    color: #2c3e50;
    border-left-color: #c2d4f0;
}

nav a.active {
    background-color: #f0f5ff;
    color: #4a6fa5;
    border-left-color: #4a6fa5;
    font-weight: 500;
}

/* 层级样式 */
nav li.level-1 > a {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    padding-left: 0.5rem;
}

nav li.level-2 > a {
    font-size: 0.95rem;
    padding-left: 1.25rem;
}

nav li.level-3 > a {
    font-size: 0.9rem;
    padding-left: 2rem;
    color: #666;
}

nav li.level-4 > a {
    font-size: 0.85rem;
    padding-left: 2.75rem;
    color: #777;
}

nav li.level-5 > a {
    font-size: 0.8rem;
    padding-left: 3.5rem;
    color: #888;
}

/* 主内容区域 */
main {
    padding: 2rem 3rem;
    background: white;
    overflow-y: auto;
}

/* 标题样式 */
h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #f0f5ff;
    font-weight: 800;
}

h2 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f5f5f5;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    color: #3a3a3a;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    color: #444;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

h5 {
    font-size: 1.1rem;
    color: #555;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 段落和文本 */
p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

strong {
    color: #2c3e50;
}

/* 列表 */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 代码块 */
pre {
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

code {
    font-family: 'Courier New', monospace;
    background-color: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* 引用/提示框 */
blockquote {
    background-color: #f0f5ff;
    border-left: 4px solid #4a6fa5;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

blockquote.warning {
    background-color: #fff8e6;
    border-left-color: #ffc107;
}

blockquote.note {
    background-color: #f9f9f9;
    border-left-color: #ddd;
}

blockquote p {
    margin-bottom: 0.5rem;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #333;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
}

mark {
    background-color: yellow;
    padding: 3px;
}

td {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

/* 页脚 */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
    }

    aside {
        position: static;
        height: auto;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }

    main {
        padding: 1.5rem;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

