/* ====================== 全局代码块样式（Mac风格核心） ====================== */
.cnblogs_code,          /* 富文本代码块 */
.prettyprint,          /* 富文本SyntaxHighlighter容器 */
.cnblogs-markdown .hljs { /* Markdown代码块（Highlight.js容器） */
    background: #f6f8fa !important; /* 浅灰背景，Mac柔和风格 */
    border: 1px solid #dfe2e5 !important; /* 细灰边框 */
    border-radius: 8px !important; /* 圆润边角 */
    padding: 16px !important; /* 内边距 */
    font-family: "SF Mono", "Menlo", "Consolas", "Courier New", monospace !important; /* Mac默认等宽字体， fallback到Windows/Linux */
    font-size: 14px !important; /* 字体大小 */
    line-height: 1.6 !important; /* 行高 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important; /* 轻微阴影，增强层次 */
    color: #24292e !important; /* 主文本颜色（深灰） */
}

/* ====================== 行号样式（仅富文本编辑器，需插入时勾选“显示行号”） ====================== */
.prettyprint.linenums {
    padding-left: 40px !important; /* 给行号留空间 */
    counter-reset: line !important; /* 行号计数器 */
    background: linear-gradient(90deg, #f0f2f4 30px, #f6f8fa 30px) !important; /* 行号区浅灰背景，与代码区分开 */
}
.prettyprint.linenums li {
    list-style: none !important; /* 隐藏默认列表样式 */
    position: relative !important;
}
.prettyprint.linenums li:before {
    content: counter(line) !important; /* 生成行号 */
    counter-increment: line !important;
    position: absolute !important;
    left: -30px !important; /* 行号区宽度30px，左移对齐 */
    top: 0 !important;
    color: #999 !important; /* 行号颜色（浅灰） */
    text-align: right !important;
    width: 24px !important; /* 行号宽度 */
    font-size: 13px !important; /* 行号字体稍小 */
}

/* ====================== 语法高亮（富文本+Markdown通用配色，参考Mac风格） ====================== */
/* 1. 富文本（SyntaxHighlighter） */
.syntaxhighlighter .keyword { color: #0070c1 !important; } /* 关键字 →  Mac蓝 */
.syntaxhighlighter .comments { color: #6a9955 !important; } /* 注释 →  柔和绿 */
.syntaxhighlighter .string { color: #ce9178 !important; }   /* 字符串 → 暖橙 */
.syntaxhighlighter .number { color: #098658 !important; }   /* 数字 →  深绿 */
.syntaxhighlighter .function { color: #d73a49 !important; } /* 函数 →  深红 */
.syntaxhighlighter .variable { color: #24292e !important; } /* 变量 →  主色 */

/* 2. Markdown（Highlight.js） */
.cnblogs-markdown .hljs-keyword { color: #0070c1 !important; }
.cnblogs-markdown .hljs-comment { color: #6a9955 !important; }
.cnblogs-markdown .hljs-string { color: #ce9178 !important; }
.cnblogs-markdown .hljs-number { color: #098658 !important; }
.cnblogs-markdown .hljs-function { color: #d73a49 !important; }
.cnblogs-markdown .hljs-variable { color: #24292e !important; }

/* ====================== 修复Markdown内联代码样式 ====================== */
.cnblogs-markdown code {
    background: #f6f8fa !important;
    border: 1px solid #dfe2e5 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: "SF Mono", "Menlo", "Consolas", monospace !important;
}