/* 基础样式优化 */
body {
    margin: 0;
    padding: 0;
    #font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
}

/* 容器样式 */
.container {
     display: flex;
    flex: 1;
}

/* 左侧文档导航栏样式 */
.left-sidebar {
    width: 280px;
    background-color: #111;
    padding: 2rem 1.5rem;
    border-right: 1px solid #252525;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    margin-top: 84px;
}

.left-sidebar ul {
    padding-left: 0;
    list-style-type: none;
}

.left-sidebar li {
    margin: 8px 0;
    position: relative;
}

.left-sidebar a {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.left-sidebar a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.left-sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.left-sidebar a.active {
    background-color: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    border-left: 3px solid #58a6ff;
}

.left-sidebar h3 {
    color: #888;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2rem 0 1rem;
    padding-left: 16px;
}

.left-sidebar hr {
    border: none;
    border-top: 1px solid #252525;
    margin: 1.5rem 0;
}

/* 内容区域样式 */
.content {
    margin-left: 280px;
    margin-right: 220px;
    width: calc(100% - 500px);
    height: 100vh;
    padding: 2rem;
}

#markdown-content {
    max-width: 800px;
    margin: 0 auto;
}

/* 标题样式 */
h1,
h2,
h3 {
    color: #fff;
    font-weight: 600;
    margin: 2rem 0 1rem;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-top: 3rem;
}

/* 列表样式 */
ul {
    padding-left: 1.5rem;
}

li {
    margin: 0.5rem 0;
    padding-left: 0.5rem;
}

/* 代码块样式 */
pre {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #333;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    background-color: #1a1a1a;
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

/* 链接样式 */
a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #79b8ff;
    text-decoration: underline;
}

/* 特殊区块样式 */
blockquote {
    border-left: 4px solid #333;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    color: #888;
    background-color: #1a1a1a;
    border-radius: 4px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    padding: 0.75rem;
    border: 1px solid #333;
    text-align: left;
}

th {
    background-color: #1a1a1a;
}

/* 图片样式 */
img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 右侧文章导航栏样式 */
.right-sidebar {
    width: 220px;
    background-color: #111;
    padding: 2rem 1.5rem;
    border-left: 1px solid #252525;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    margin-top: 84px;
}

#article-nav {
    margin-top: 2rem;
}

#article-nav h3 {
    color: #888;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2rem 0 1rem;
    padding-left: 16px;
}

#article-nav-list {
    list-style-type: none;
    padding-left: 0;
}

#article-nav-list li {
    margin: 4px 0;
}

#article-nav-list a {
    color: #e0e0e0;
    font-size: 13px;
    padding: 6px 16px 6px 32px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
}

#article-nav-list a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(-4px);
}

#article-nav-list a.active {
    background-color: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    border-right: 3px solid #58a6ff;
    border-left: none;
}

/* 根据标题级别缩进 */
#article-nav-list li.h2 a {
    padding-left: 32px;
}

#article-nav-list li.h3 a {
    padding-left: 48px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .right-sidebar {
        display: none;
    }

    .content {
        margin-right: 0;
        width: calc(100% - 280px);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content {
        margin-left: 0;
        width: 100%;
    }
}

.hljs{
    background: rgba(255, 255, 255, 0.15);
}

/* 确保代码字体使用 Fira Code */
code {
    font-family: 'Fira Code', 'Courier New', monospace !important;
    background: rgba(255, 255, 255, 0.15);
}


.footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #eaeaea;
    text-align: center;
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.copyright-item {
    margin: 0;
    padding: 0;
}
