/* ===== 博客园内容聚焦样式 ===== */

/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css');

/* ===== 基础重置 ===== */
body {
    font-family: 
        "SF Mono", "Cascadia Code", "Fira Code", 
        "JetBrains Mono", "Consolas", "Monaco", 
        "Menlo", "Ubuntu Mono", "PingFang SC", 
        "Microsoft YaHei", monospace !important;
    font-size: 16px;
    line-height: 1.8;
    color: #000000 !important;
    background: #fefefe;
    margin: 0;
    padding: 0;
    font-feature-settings: "calt", "ss01", "ss02", "ss03", "zero";
    font-variant-ligatures: contextual;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 简化布局容器 ===== */
#home {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* ===== 极简头部 ===== */
#header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 30px 0 20px 0;
    margin-bottom: 0;
}

#blogTitle {
    text-align: center;
}

#blogTitle h1 {
    font-size: 2.4em;
    font-weight: 600;
    margin: 0;
    color: #000000 !important;
}

#blogTitle h2 {
    font-size: 1.3em;
    font-weight: 400;
    color: #333333 !important;
    margin: 8px 0 0 0;
}

/* ===== 简化导航栏 ===== */
#navigator {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    margin-bottom: 30px;
}

#navList {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

#navList li {
    margin: 0;
}

#navList li a {
    color: #333333 !important;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.2s ease;
}

#navList li a:hover {
    color: #3498db !important;
}

/* ===== 隐藏侧边栏，全宽主内容 ===== */
#sideBar {
    display: none !important;
}

#main {
    display: block !important;
    padding: 0 20px;
}

#mainContent {
    width: 100% !important;
    float: none !important;
    min-height: auto;
}

/* ===== 文章列表样式 - 内容聚焦 ===== */
.day {
    background: #fff;
    margin-bottom: 40px;
    padding: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    transition: all 0.2s ease;
}

.day:hover {
    border-bottom-color: #3498db;
}

.postTitle {
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.postTitle a {
    color: #000000 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.postTitle a:hover {
    color: #3498db !important;
}

.postDesc {
    color: #666666 !important;
    font-size: 0.85em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f8f9fa;
}

.postDesc a {
    color: #666666 !important;
    text-decoration: none;
}

.postDesc a:hover {
    color: #3498db !important;
}

/* ===== 文章正文样式 - 优化阅读体验 ===== */
.postBody {
    font-size: 17px;
    line-height: 1.9;
    color: #000000 !important;
    max-width: 100%;
    margin: 0 auto;
}

/* 标题样式 */
.postBody h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin: 2em 0 1em 0;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #3498db;
    color: #000000 !important;
    line-height: 1.3;
}

.postBody h2 {
    font-size: 2.2em;
    font-weight: 600;
    margin: 1.8em 0 1em 0;
    color: #000000 !important;
    line-height: 1.3;
}

.postBody h3 {
    font-size: 2.0em;
    font-weight: 600;
    margin: 1.6em 0 0.8em 0;
    color: #000000 !important;
}

.postBody h4 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 1.4em 0 0.6em 0;
    color: #000000 !important;
}

.postBody h5 {
    font-size: 1.6em;
    font-weight: 600;
    margin: 1.3em 0 0.5em 0;
    color: #000000 !important;
}

.postBody h6 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 1.2em 0 0.4em 0;
    color: #000000 !important;
}

/* 段落和列表 */
.postBody p {
    margin-bottom: 1.6em;
    text-align: justify;
    word-wrap: break-word;
    hyphens: auto;
}

.postBody ul, .postBody ol {
    margin-bottom: 1.6em;
    padding-left: 2em;
}

.postBody li {
    margin-bottom: 0.6em;
    line-height: 1.7;
}

.postBody li > p {
    margin-bottom: 0.6em;
}

/* 引用块 */
.postBody blockquote {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    margin: 2em 0;
    padding: 1.5em;
    font-style: normal;
    color: #333333 !important;
    border-radius: 0 4px 4px 0;
}

.postBody blockquote p {
    margin-bottom: 0.8em;
}

.postBody blockquote p:last-child {
    margin-bottom: 0;
}

/* 链接样式 */
.postBody a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

.postBody a:hover {
    color: #2980b9;
    border-bottom-color: #3498db;
}

/* ===== 代码块样式 - 修复高亮 ===== */
.cnblogs_code, .cnblogs_code pre {
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', 'Monaco', 'Menlo', monospace !important;
    background: #f8f9fa !important;
    color: #000000 !important;
    padding: 1.5em !important;
    border: 1px solid #e1e4e8 !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 1.5em 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* 代码高亮修复 - 使用更深的颜色 */
.cnblogs_code .kw1 { color: #d73a49 !important; } /* 关键字 */
.cnblogs_code .kw2 { color: #6f42c1 !important; } /* 类型 */
.cnblogs_code .kw3 { color: #d73a49 !important; } /* 关键字 */
.cnblogs_code .kw4 { color: #d73a49 !important; } /* 关键字 */

.cnblogs_code .st0 { color: #032f62 !important; } /* 字符串 */
.cnblogs_code .st1 { color: #032f62 !important; } /* 字符串 */
.cnblogs_code .st_h { color: #032f62 !important; } /* 字符串 */

.cnblogs_code .nu0 { color: #005cc5 !important; } /* 数字 */
.cnblogs_code .me1 { color: #6f42c1 !important; } /* 方法 */
.cnblogs_code .me2 { color: #6f42c1 !important; } /* 方法 */

.cnblogs_code .co1 { color: #6a737d !important; font-style: italic !important; } /* 注释 */
.cnblogs_code .co2 { color: #6a737d !important; font-style: italic !important; } /* 注释 */
.cnblogs_code .coMULTI { color: #6a737d !important; font-style: italic !important; } /* 多行注释 */

.cnblogs_code .br0 { color: #000000 !important; } /* 括号 */
.cnblogs_code .sy0 { color: #000000 !important; } /* 符号 */

.cnblogs_code .re0 { color: #6f42c1 !important; } /* 变量 */
.cnblogs_code .re1 { color: #005cc5 !important; } /* 变量 */

/* 行内代码 */
.postBody code:not(pre code) {
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', 'Monaco', 'Menlo', monospace !important;
    background: #f1f3f4 !important;
    color: #c7254e !important;
    padding: 0.2em 0.4em !important;
    border-radius: 3px !important;
    font-size: 0.88em !important;
    border: 1px solid #e1e1e1 !important;
}

/* ===== 表格样式 ===== */
.postBody table {
    border-collapse: collapse;
    width: 100%;
    margin: 2em 0;
    font-size: 0.95em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.postBody th {
    background: #f8f9fa;
    font-weight: 600;
    padding: 12px 15px;
    border: 1px solid #e1e4e8;
    text-align: left;
    color: #000000 !important;
}

.postBody td {
    padding: 10px 15px;
    border: 1px solid #e1e4e8;
    color: #000000 !important;
}

.postBody tr:nth-child(even) {
    background: #fafbfc;
}

/* ===== 极简底部 ===== */
#footer {
    background: #f8f9fa;
    color: #666666 !important;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9em;
    margin-top: 50px;
}

#footer-text a {
    color: #3498db;
    text-decoration: none;
}

#footer-text a:hover {
    color: #2980b9;
}

/* ===== 分页样式 ===== */
.topicListFooter {
    margin-top: 40px;
    text-align: center;
}

.pager {
    display: inline-block;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pager li {
    display: inline-block;
    margin: 0 5px;
}

.pager a {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #333333 !important;
    text-decoration: none;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pager a:hover {
    background: #3498db;
    color: white !important;
    border-color: #3498db;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    #home {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    #header {
        padding: 20px 0 15px 0;
    }
    
    #blogTitle h1 {
        font-size: 2.0em;
    }
    
    #blogTitle h2 {
        font-size: 1.1em;
    }
    
    .day {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .postTitle {
        font-size: 1.8em;
    }
    
    .postBody {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .postBody h1 {
        font-size: 2.0em;
    }
    
    .postBody h2 {
        font-size: 1.8em;
    }
    
    .postBody h3 {
        font-size: 1.6em;
    }
    
    .postBody h4 {
        font-size: 1.4em;
    }
    
    .postBody h5 {
        font-size: 1.3em;
    }
    
    .postBody h6 {
        font-size: 1.2em;
    }
    
    #main {
        padding: 0 15px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    #header, #navigator, #sideBar, #footer, .postDesc {
        display: none !important;
    }
    
    #home {
        max-width: none;
        margin: 0;
        box-shadow: none;
    }
    
    .postBody {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
    }
    
    .postBody h1 {
        font-size: 18pt !important;
    }
    
    .postBody h2 {
        font-size: 16pt !important;
    }
    
    .postBody h3 {
        font-size: 14pt !important;
    }
    
    .postBody h4 {
        font-size: 13pt !important;
    }
    
    .postBody h5 {
        font-size: 12pt !important;
    }
    
    .postBody h6 {
        font-size: 11pt !important;
    }
}