:root {
    --primary-color: #05509F;
    --primary-light: #3a7cc7;
    --primary-dark: #043b73;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f8f9fa;
    --bg-light: #ffffff;
    --border-color: #e9ecef;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

/* 顶部标题区域 */
.header {
    background-color: var(--primary-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.doc-title-area {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.logo i {
    margin-right: 12px;
    font-size: 20px;
}

.doc-title {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: -22px;
}

.header-actions {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 6px 12px;
    margin-right: 16px;
    transition: var(--transition);
}

.search-box:hover {
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 8px;
    font-size: 14px;
    width: 200px;
    color: var(--primary-color);
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-box i {
    color: var(--primary-color);
}

.platform-btn,
.help-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    margin-left: 12px;
    transition: var(--transition);
    color: #ffffff;
    font-weight: 500;
}

.platform-btn:hover,
.help-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* 主内容区 */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    margin-top: 64px;
    height: calc(100vh - 64px - 60px);
}

/* 侧边导航 */
.sidebar {
    width: 220px;
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    overflow-y: auto; 
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 60px;
    height: calc(100vh - 64px - 60px);
    z-index: 900;
}

.nav-category {
    padding: 12px 12px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-category:hover {
    background-color: rgba(5, 80, 159, 0.05);
}

.nav-category i {
    font-size: 12px;
    transition: transform 0.3s;
    color: var(--text-light);
}

.nav-items {
    list-style: none;
    padding: 0;
}

.nav-item {
    padding: 10px 12px 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-light);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.nav-item:hover {
    background: rgba(5, 80, 159, 0.05);
    color: var(--primary-color);
}

.nav-item.active {
    background: rgba(5, 80, 159, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    font-weight: 500;
}

/* 仅针对li内部的a标签 */
.nav-item a {
  color: inherit;          /* 继承父元素（li）的文字颜色 */
  text-decoration: none;   /* 去除下划线 */
}
 
/* 可选：覆盖li内a标签的所有交互状态 */
.nav-item a:link,
.nav-item a:visited,
.nav-item a:hover,
.nav-item a:active {
  color: inherit;
  text-decoration: none;
}

/* 文档内容区 - 支持Markdown */
.doc-content {
    flex: 1;
    padding: 32px 48px;
    overflow-y: auto;
    background: var(--bg-light);
    margin-left: 240px;
    width: calc(100% - 240px);
    position: absolute;
    top: 64px;
    bottom: 60px;
    left: 240px;
    right: 0;
    margin: 0 auto;
}

/* Markdown样式 */
.doc-content h1 {
    font-size: 2em;
    margin: 0.67em 0;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(5, 80, 159, 0.1);
    padding-bottom: 0.3em;
}

.doc-content h2 {
    font-size: 1.5em;
    margin: 1em 0 0.5em;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(5, 80, 159, 0.1);
    padding-bottom: 0.3em;
}

.doc-content h3 {
    font-size: 1.25em;
    margin: 1em 0 0.5em;
    font-weight: 600;
    color: var(--primary-color);
}

.doc-content p {
    margin: 16px 0;
    line-height: 1.8;
    color: var(--text-light);
}

.doc-content ul,
.doc-content ol {
    margin: 16px 0; 
}

.doc-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.doc-content blockquote {
    margin: 16px 0;
    padding: 0 1em;
    color: var(--text-light);
    border-left: 4px solid var(--primary-color);
    background-color: rgba(5, 80, 159, 0.03);
}

.doc-content pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
}

.doc-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 85%;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    padding: 0.2em 0.4em;
}

.doc-content pre code {
    background-color: transparent;
    padding: 0;
    color: #000;
}

.doc-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    display: block;
    overflow-x: auto;
}

.doc-content th,
.doc-content td {
    padding: 12px 16px;
    border: 1px solid #dfe2e5;
}

.doc-content th {
    background-color: rgba(5, 80, 159, 0.08);
    font-weight: 600;
}

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

.doc-section {
    margin-bottom: 40px;
    max-width: 900px;
}

.doc-heading {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(5, 80, 159, 0.1);
    letter-spacing: -0.5px;
    position: relative;
}

.doc-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--primary-color);
}

.doc-description {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.8;
    background-color: rgba(5, 80, 159, 0.03);
    padding: 16px;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

/* 属性表格 */
.property-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-size: 14px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-light);
}

.property-table th,
.property-table td {
    padding: 14px 18px;
    text-align: left;
}

.property-table th {
    background: rgba(5, 80, 159, 0.08);
    font-weight: 500;
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(5, 80, 159, 0.15);
}

.property-table td {
    border-bottom: 1px solid var(--border-color);
}

.property-table tr:last-child td {
    border-bottom: none;
}

.property-table tr:hover {
    background: rgba(5, 80, 159, 0.02);
}

.property-table td:first-child {
    font-weight: 500;
    color: var(--primary-color);
}

/* 代码区域 */
.code-section {
    margin: 28px 0;
    position: relative;
}

.code-title {
    font-weight: 500;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text-color);
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(5, 80, 159, 0.08);
    border-radius: var(--border-radius);
}

pre {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    overflow: auto;
    margin: 12px 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
}

.code-block {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin: 12px 0;
    overflow-x: auto;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.code-line {
    display: flex;
    margin-bottom: 6px;
}

.line-number {
    width: 40px;
    padding-right: 14px;
    text-align: right;
    color: #959da5;
    user-select: none;
    flex-shrink: 0;
    opacity: 0.7;
}

.line-content {
    flex-grow: 1;
}

/* 底部导航 */
.footer-nav {
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.05);
}

.nav-button {
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
    height: 40px;
    margin: 10px 0;
    box-shadow: var(--shadow-sm);
}

.nav-button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 80, 159, 0.2);
}

.nav-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(5, 80, 159, 0.1);
}

.nav-button i {
    margin: 0 5px;
}

.nav-button.prev i {
    margin-right: 8px;
}

.nav-button.next i {
    margin-left: 8px;
}

/* 遮罩层样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗样式 */
.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.modal-message {
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-close {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--primary-light);
}

.left-panel {
    max-width: 256px; 
    flex-grow: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding: 20px;
    right: 100px;
}

.right-panel {
    max-width: 1300px;
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.toc .level-tag {
    display: inline-block;
    width: 28px;
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-right: 8px;
}

.toc a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: color 0.2s;
    cursor: pointer;
}

.toc a:hover {
    color: #2c82ff;
}

.toc .level-2 {
    margin-left: 0px;
}

.toc .level-3 {
    margin-left: 8px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #2c3e50; 
    font-weight: 600;
}

h1 {
    font-size: 26px;
    border-bottom: 3px solid #eee;
    padding-bottom: 14px;
}

h2 {
    font-size: 22px;
}

h3 {
    font-size: 18px;
}

h4 {
    font-size: 16px;
}

h5 {
    font-size: 14px;
}

h6 {
    font-size: 12px;
    color: #777;
}

blockquote {
    margin: 1em 0;
    padding: 10px 15px;
    background: #f9f9f9;
    border-left: 4px solid #2c82ff;
    color: #555;
    border-radius: 4px;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

blockquote p {
    margin: 0;
}

ul,
ol {
    padding-left: 24px; 
}

ul li {
    list-style: none;
    position: relative;
}

ol li {
    margin: 5px 0;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e96900;
    font-size: 0.9em;
    overflow: auto;
}

pre {
    position: relative;
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #666;
}

p {
    margin: 1.2em 0;
}

a {
    color: #2c82ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.error {
    color: #e74c3c;
    padding: 10px;
}

img {
    max-width: 100%;
}

/* 搜索功能样式 */
.clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.3s;
    font-size: 14px;
}

.clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
    z-index: 1001;
}

/* 搜索高亮样式 */
.highlight {
    background-color: #ffeb3b !important;
    color: #333 !important;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(255, 235, 59, 0.3);
    transition: all 0.3s ease;
}

.highlight.current {
    background-color: #ff5722 !important;
    color: white !important;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 搜索导航按钮 */
.search-nav {
    margin: 10px 0;
    text-align: center;
    padding: 8px;
    background: rgba(5, 80, 159, 0.05);
    border-radius: var(--border-radius);
}

.search-nav button {
    margin: 0 5px;
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.search-nav button:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

.search-nav button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin-top: 64px;
        height: calc(100vh - 64px - 60px);
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        position: relative;
        top: 0;
        bottom: auto;
    }

    .doc-content {
        margin-left: 0;
        width: 100%;
        height: calc(100vh - 64px - 60px - 200px);
        position: relative;
        left: 0;
    }

    .header-actions {
        display: none;
    }

    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }

    .nav-button {
        width: 100%;
        justify-content: center;
    }

    .search-results {
        position: relative;
        margin-top: 8px;
    }
}