
@font-face {
    font-family: 'jetbrains-mono';
    src: url('/font/JetBrainsMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

code {
    font-family: 'jetbrains-mono';
    font-size: 0.85em;
    background-color: #f4f4f4;
}

pre code {
    font-family: 'jetbrains-mono';
    font-size: 0.85em;
    background-color: rgba(0, 0, 0, 0);
}

.content {
    margin-left: 0px;
    padding: 20px;
}

.content #md {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    /* 或者固定宽度 */
}

p {
    font-size: 1.05em;
}

section {
    margin-bottom: 20px;
}

body {
    counter-reset: h2;
    font-size: 0.97em;
    font-family: 微软雅黑;
    /* 初始化h2计数器 */
}

li {
    margin: 0.3em;
}

h1 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 1.2em;
}

h2 {
    font-size: 1.6em;
    counter-reset: h3;
    /* 为每个h2重置h3计数器 */
    counter-increment: h2;
    /* h2计数器加1 */
}

h3 {
    font-size: 1.4em;
    counter-reset: h4;
    counter-increment: h3;
}

h4 {
    font-size: 1.25em;
    counter-increment: h4;
}

h5 {
    font-size: 1.15em;
}


h2:before {
    content: counter(h2) ". ";
    /* 显示h2序号 */
    font-weight: normal;
    /* 序号不使用粗体 */
}

h3:before {
    content: counter(h2) "." counter(h3) " ";
    /* 显示h2和h3序号 */
    font-weight: normal;
}

h4:before {
    content: counter(h2) "." counter(h3) "." counter(h4) " ";
    /* 显示h2和h3序号 */
    font-weight: normal;
}

blockquote {
    background-color: #f8f8f8;
    /* 背景色 */
    border-left: 4px solid #ccc;
    /* 左侧边框 */
    margin: 20px 0;
    /* 外边距 */
    padding: 10px 20px;
    /* 内边距 */
    color: #555;
    /* 字体颜色 */
    quotes: "\201C" "\201D" "\2018" "\2019";
    /* 引用符号 */
    /* white-space: pre-wrap; */
    /* 保留空格和换行符 */
    word-wrap: break-word;
    /* 长单词或URL断行 */
    /* overflow: auto; */
}

blockquote:before {
    font-family: 宋体;
    content: open-quote;
    /* 开始引号 */
    font-size: 3em;
    /* 字体大小 */
    line-height: 0.1em;
    /* 行高 */
    margin-right: 0.25em;
    /* 右边距 */
    vertical-align: -0.4em;
    /* 垂直对齐 */
    white-space: pre-wrap;
    /* 保留空格和换行符 */
    word-wrap: break-word;
    /* 长单词或URL断行 */
    overflow: auto;
}

blockquote:after {
    /* color: #666666; */
    font-family: 宋体;
    content: close-quote;
    /* 结束引号 */
    font-size: 3em;
    /* 字体大小 */
    line-height: 0.1em;
    /* 行高 */
    margin-left: 0.25em;
    /* 左边距 */
    vertical-align: -0.4em;
    /* 垂直对齐 */
}

nav {
    display: flex;
    justify-content: center; /* 水平居中 */
}

a {
    white-space: pre-wrap;
    /* 保留空格和换行符 */
    word-wrap: break-word;
}

pre {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    /* 保留空格和换行符 */
    word-wrap: break-word;
    /* 长单词或URL断行 */
    overflow: auto;
    /* 添加滚动条 */

}
.dropdown {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 255;
}

.dropbtn {
    background-color: #e6e5e5;
    border: 1px solid rgb(161, 161, 161);
    color: rgb(136, 136, 136);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 12px;
    font-size: 1.2em;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0px;
    background-color: #fafafa;
    border: 1px solid rgb(161, 161, 161);
    color: rgb(136, 136, 136);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    min-width: 160px;
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
    display: block;
}

.sticky-element a {
    font-size: 1em;
    color: black;
    margin: 0.2em;
    /* padding: 12px 16px; */
    text-decoration: none;
    display: block;
}

.sticky-element a:hover {background-color: #f1f1f1}

a {
    color: #666666;
}

/* 元素的滚动条整体样式 */
.toc::-webkit-scrollbar {
    width: 6px; /* 垂直滚动条的宽度 */
}

/* 元素的滚动条滑块部分 */
.toc::-webkit-scrollbar-thumb {
    background-color: #ccc; /* 滑块的背景颜色 */
    border-radius: 3px; /* 滑块的圆角 */
}

/* 元素的滚动条轨道部分 */
.toc::-webkit-scrollbar-track {
    background-color: #f1f1f1; /* 轨道的背景颜色 */
    border-radius: 3px; /* 轨道的圆角 */
}

.toc {
    position: relative;
    max-height: calc(80vh - 100px);
    overflow-y: scroll;
    /* width: 300px; */
    background-color: #fff;
    border: 1px solid #ccc;
    /* padding: 20px; */
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* margin-bottom: 20px; */
    /* 初始距离左侧10px */
    /* transition: opacity 0.3s ease; */
    /* 平滑过渡效果 */
    background-color: #f8f9fa;
    /* 背景颜色 */
    padding-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    /* 内边距 */
    border-radius: 5px;
    /* 边框圆角 */
}

.sticky-element {
    display: none;
    position: absolute;
    /* 初始位置固定 */
    top: 90px;
    /* 初始距离顶部10px */
    left: 50px;
    width: 300px;
}

.toc a {
    font-size: 1em;
    color: black;
    margin: 0.2em;
    /* padding: 12px 16px; */
    text-decoration: none;
    display: block;
}

.toc a:hover {background-color: #f1f1f1}

.indent-1 {
    font-weight: bolder;
    font-size: 1.3em;
    padding-left: 0em;
    padding-bottom: 0.5em;
}

.indent-2 {
    padding-left: 0em;
}

.indent-3 {
    padding-left: 1em;
}

.indent-4 {
    padding-left: 2em;
}

.indent-5 {
    padding-left: 3em;
}

.indent-6 {
    padding-left: 4em;
}

.toc-buttons {
    position: relative;
    display: flex;
    margin-bottom: -0.5em;
}

.toc-buttons p {
    margin-right: 0.5em;
    bottom: 0px;
    font-weight: 400;
    font-size: 1.0em;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.toc-buttons .selected {
    font-weight: bolder;
}

.toc-buttons p:hover {background-color: #e2e2e2;cursor:pointer;}

/* 重置表格默认样式 */
table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    margin: 20px 0; /* 外边距 */
}

/* 表格头部样式 */
th {
    background-color: #f7f7f7; /* 背景颜色 */
    color: #333; /* 文字颜色 */
    padding: 10px; /* 内边距 */
    font-weight: bold; /* 字体加粗 */
    text-align: left; /* 文字左对齐 */
    border-bottom: 2px solid #ddd; /* 底部边框 */
}

/* 表格单元格样式 */
td {
    padding: 10px; /* 内边距 */
    border-bottom: 1px solid #eee; /* 底部边框 */
}

/* 表格行悬停效果 */
tr:hover {
    background-color: #f5f5f5; /* 悬停时的背景颜色 */
}
