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

ul, ol {
    list-style: none;
}

body, div, p {
    margin: 0;
}

#doc-content img {
    width: 100%;
    height: auto;
}

/* 对包含图片的段落添加居中对齐 */
#doc-content p:has(img) {
    text-align: center;
}

.header_wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.intercept-doc-page {
    display: flex;
    flex-direction: row;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 60px);
}

.side-nav {
    width: 250px;
    background-color: #f9fafb;
    user-select: none;
    padding: 0 20px 20px;
}

.hover-change:hover {
    cursor: pointer;
    color:  #356AFE;
}

.side-nav-title {
    height: 60px;
    font-weight: bold;
    font-size: 24px;
    border-bottom: 1px solid #F2F2F2;
}


.section-title {
    font-weight: bold;
    margin: 20px 0;
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px; /* 添加与激活状态相同的padding */
    border-radius: 4px; /* 添加与激活状态相同的border-radius */
    transition: all 0.2s ease; /* 添加平滑过渡效果 */
}

.section-title:hover {
    color: #1890ff;
}

.menu {
    padding-left: 20px;
    display: none;
}

.menu.active {
    display: block;
}

.menu > li + li, .submenu > li {
    margin-top: 20px;
}

/* 子菜单项基础样式 */
.submenu li {
    padding: 8px 12px; /* 添加与激活状态相同的padding */
    border-radius: 4px; /* 添加与激活状态相同的border-radius */
    transition: all 0.2s ease; /* 添加平滑过渡效果 */
    cursor: pointer;
}

.menu-item {
    width: 100%;
    cursor: pointer;
    font-size: 14px;
}

.menu-item > div:hover {
    color: #1890ff;
}

.submenu li:hover, .submenu li.active {
    color: #1890ff;
}

/* 菜单项激活状态样式 */
.section-title.active {
    color: #1890ff;
    background-color: rgba(24, 144, 255, 0.1);
    font-weight: 600; /* 激活状态稍微加粗 */
}

.submenu li.active {
    color: #1890ff;
    background-color: rgba(24, 144, 255, 0.1);
    font-weight: 500;
}

.submenu {
    padding-left: 14px;
    display: none;
}

.arrow {
    color: #9BA6B2;
    font-size: 12px;
    transition: transform 0.3s;
}

.arrow.open {
    transform: rotate(90deg);
}

/* Markdown 内容样式 */
.doc-body {
    flex: 1;
    padding: 20px 40px;
    background: #fff;
    min-height: calc(100vh - 60px);
    overflow-y: auto;
}

.doc-body h1 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #eaecef;
    color: #24292e;
}

.doc-body h2 {
    font-size: 2em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
    color: #24292e;
}

.doc-body h3 {
    font-size: 1.5em;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    color: #24292e;
}

.doc-body h4 {
    font-size: 1.25em;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #24292e;
}

.doc-body p {
    margin-bottom: 1em;
    line-height: 1.6;
    color: #24292e;
}

.doc-body ul, .doc-body ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.doc-body li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.doc-body code {
    background-color: #f6f8fa;
    border-radius: 3px;
    padding: 0.2em 0.4em;
    color: #e83e8c;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

.doc-body pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    line-height: 1.45;
    overflow: auto;
    padding: 16px;
    margin: 1em 0;
    border: 1px solid #e1e4e8;
    position: relative;
}

.doc-body pre code {
    background-color: transparent;
    border: 0;
    display: block;
    line-height: inherit;
    margin: 0;
    max-width: initial;
    overflow: visible;
    padding: 0;
    word-wrap: normal;
    color: #24292e;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

/* 代码块语言标识 */
.doc-body pre[class*="language-"]::before {
    content: attr(class);
    position: absolute;
    top: 0;
    right: 0;
    background: #e1e4e8;
    color: #586069;
    padding: 4px 8px;
    font-size: 0.75em;
    border-radius: 0 6px 0 6px;
    text-transform: uppercase;
}

/* 代码高亮样式优化 */

.doc-body .hljs-comment,
.doc-body .hljs-quote {
    color: #6a737d;
    font-style: italic;
}

.doc-body .hljs-keyword,
.doc-body .hljs-selector-tag,
.doc-body .hljs-type {
    color: #d73a49;
}

.doc-body .hljs-string,
.doc-body .hljs-doctag {
    color: #032f62;
}

.doc-body .hljs-number,
.doc-body .hljs-literal {
    color: #005cc5;
}

.doc-body .hljs-variable,
.doc-body .hljs-template-variable {
    color: #e36209;
}

.doc-body .hljs-attribute {
    color: #6f42c1;
}

.doc-body .hljs-function,
.doc-body .hljs-title {
    color: #6f42c1;
}

.doc-body .hljs-built_in {
    color: #005cc5;
}

.doc-body table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
    font-size: 14px;
    border: 1px solid #d0d7de;
    overflow: hidden;
}

.doc-body th, .doc-body td {
    border: 1px solid #d0d7de;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.doc-body th {
    background-color: #f6f8fa;
    font-weight: 600;
    color: #24292e;
    border-bottom: 2px solid #d0d7de;
}

.doc-body tr:nth-child(even) {
    background-color: #f6f8fa;
}

.doc-body tr:hover {
    background-color: #f1f3f4;
}

.doc-body tbody tr:last-child td {
    border-bottom: none;
}

.doc-body blockquote {
    border-left: 4px solid #d0d7de;
    color: #656d76;
    margin: 0 0 1em 0;
    padding: 0 1em;
}

.doc-body a {
    color: #0969da;
    text-decoration: none;
}

.doc-body a:hover {
    text-decoration: underline;
}

.doc-body strong {
    font-weight: 600;
    color: #24292e;
}

.doc-body em {
    font-style: italic;
    color: #24292e;
}

/* 目录样式 */
.doc-catalogue {
    width: 280px;
    background: #f8f9fa;
    border-left: 1px solid #e1e4e8;
    padding: 20px;
    position: sticky;
    top: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    flex-shrink: 0;
}

.toc-title {
    font-size: 16px;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e1e4e8;
}

.toc-content {
    font-size: 14px;
    line-height: 1.5;
}

.toc-empty {
    color: #656d76;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.toc-item {
    margin-bottom: 4px;
}

.toc-item a {
    display: block;
    padding: 6px 12px;
    color: #586069;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.toc-item a:hover {
    background-color: #f1f3f4;
    color: #24292e;
}

.toc-item a.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.toc-item a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #1976d2;
    border-radius: 0 2px 2px 0;
}

/* 不同级别标题的缩进 */
.toc-h1 a {
    padding-left: 12px;
    font-weight: 600;
}

.toc-h2 a {
    padding-left: 24px;
    font-weight: 500;
}

.toc-h3 a {
    padding-left: 36px;
}

.toc-h4 a {
    padding-left: 48px;
}

.toc-h5 a {
    padding-left: 60px;
}

.toc-h6 a {
    padding-left: 72px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .doc-catalogue {
        display: none;
    }
}

@media (max-width: 768px) {
    .intercept-doc-page {
        flex-direction: column;
    }

    .side-nav {
        width: 100%;
        order: 2;
    }

    .doc-body {
        order: 1;
    }
}

.footer {
    margin: 0 auto;
}

#doc-content p:has(img) {
    text-align: center;
}

.express-company {
    width: 120px;
}
