/* 前台文章正文排版（Markdown 渲染结果 + CKEditor 富文本通用） */

.post-content {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    word-wrap: break-word;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 1.4em 0 .6em;
    font-weight: 600;
    line-height: 1.35;
}

.post-content h1 { font-size: 1.8em; }
.post-content h2 {
    font-size: 1.5em;
    padding-bottom: .25em;
    border-bottom: 1px solid #eee;
}
.post-content h3 { font-size: 1.28em; }
.post-content h4 { font-size: 1.12em; }

.post-content p {
    margin: .85em 0;
}

.post-content a {
    color: #007bff;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content blockquote {
    margin: 1.1em 0;
    padding: .5em 1.1em;
    border-left: 4px solid #e1e4e8;
    background: #f8f9fa;
    color: #55606a;
}

.post-content ul,
.post-content ol {
    margin: .85em 0;
    padding-left: 2em;
}

.post-content li {
    margin: .3em 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content hr {
    margin: 1.6em 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* 行内代码 */
.post-content code {
    padding: 2px 5px;
    border-radius: 3px;
    background: #f2f3f5;
    color: #c7254e;
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: .9em;
}

/* 代码块 */
.post-content pre {
    margin: 1.1em 0;
    padding: 14px 16px;
    border-radius: 5px;
    background: #f6f8fa;
    overflow-x: auto;
}

.post-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: .88em;
    line-height: 1.6;
}

/* Pygments codehilite 容器 */
.post-content .codehilite {
    margin: 1.1em 0;
    border-radius: 5px;
    background: #f6f8fa;
    overflow-x: auto;
}

.post-content .codehilite pre {
    margin: 0;
    background: transparent;
}

/* 表格 */
.post-content table {
    margin: 1.1em 0;
    border-collapse: collapse;
    width: 100%;
    font-size: .95em;
}

.post-content table th,
.post-content table td {
    padding: 8px 12px;
    border: 1px solid #dfe2e5;
}

.post-content table th {
    background: #f6f8fa;
    font-weight: 600;
}

.post-content table tr:nth-child(2n) {
    background: #fafbfc;
}

/* 目录（markdown.extensions.toc） */
.post-content .toc {
    margin: 1.2em 0;
    padding: .9em 1.2em;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #fafbfc;
}

.post-content .toc ul {
    margin: .3em 0;
    padding-left: 1.4em;
}

.post-content .toc > ul {
    padding-left: 1em;
}

/* Markdown 生成的标题锚点链接 */
.post-content .headerlink {
    margin-left: .4em;
    color: #ccc;
    text-decoration: none;
    font-weight: normal;
}

.post-content .headerlink:hover {
    color: #007bff;
}
