/* 引入霞鹜文楷字体 */
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.1.0/style.css');

/* 全站使用霞鹜文楷字体 */
body, article, .markdown-body {
    font-family: "LXGW WenKai", sans-serif;
}

/* 图片整体居中，增加间距 */
figure {
    text-align: center;
    margin: 30px auto;
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: block; /* 确保 figure 是块级元素 */
}

/* 确保内部图片居中且自适应，并设置为 0.7 大小 */
figure img, .markdown-body img {
    max-width: 70%;
    height: auto;
    display: block;
    margin: 0 auto; /* 核心居中代码 */
}

/* 设置图片标题风格 */
figcaption h4 {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
    color: #333;
}

/* 设置详情描述风格 */
figcaption p {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
    margin-top: 5px;
}

/* 作者名字字体风格 */
.header-title a {
    font-family: "LXGW WenKai", sans-serif; /* 霞鹜文楷 */
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 0.1em; /* 字母间距 */
    background: linear-gradient(135deg, #ecf15f 0%, #74c78d 100%); /* 渐变色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* 让行内公式稍微大一点，并增加间距，同时确保字体不被全局覆盖 */
.katex {
    font-family: KaTeX_Main, "Times New Roman", serif !important;
    font-size: 1.1em; 
    text-rendering: auto;
    margin: 0 0.15em;
}

/* 优化整行大公式（Display Mode） */
.katex-display {
    font-family: KaTeX_Main, "Times New Roman", serif !important;
    margin: 1.8em 0;
    padding: 15px;
    overflow-x: auto;
```
    overflow-y: hidden;
    /* 增加一个非常淡的底色和圆角，看起来更有深度 */
    background-color: rgba(0, 0, 0, 0.02); 
    border-radius: 6px;
    transition: background-color 0.3s;
}

/* 鼠标悬停时稍微加深，增加交互感 */
.katex-display:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* 解决深色模式下的适配 */
[data-theme='dark'] .katex-display {
    background-color: rgba(255, 255, 255, 0.05);
}
/* 学术风格表格模板样式 */
.academic-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    border-radius: 8px !important;
    overflow: hidden;
    margin: 20px 0;
}

.academic-table thead {
    background-color: #f2f2f2;
}

.academic-table th, .academic-table td {
    border: 1px solid #ddd;
    padding: 12px;
}

[data-theme='dark'] .academic-table thead {
    background-color: #333;
}


/* 目录大纲样式 */
.toc-sidebar {
    display: none;
}

@media screen and (min-width: 64em) {
    article {
        max-width: 1200px !important; /* 稍微放宽文章整体宽度 */
    }
    .toc-sidebar {
        display: block;
        position: sticky;
        top: 10rem; /* 距离顶部更近 */
        left: 0px;
        width: 200px; 
        margin-top: 0rem;
        height: fit-content;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        padding-right: 10px;
        border-right: 1px solid #eee;
    }
}

.toc-wrapper {
    background: #fdfdfd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.toc-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #ecf15f;
    color: #333;
}

#TableOfContents ul {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0;
}

#TableOfContents > ul {
    padding-left: 0;
}

#TableOfContents li {
    margin: 8px 0;
}

#TableOfContents a {
    color: #666;
    font-size: 0.95em;
    text-decoration: none;
    transition: color 0.2s;
}

#TableOfContents a:hover {
    color: #74c78d;
    text-decoration: underline;
}

[data-theme='dark'] .toc-wrapper {
    background: #252525;
    border-color: #444;
}

[data-theme='dark'] .toc-title {
    color: #eee;
    border-bottom-color: #74c78d;
}
