/* ============================================================
 * Hexo 代码块高亮适配 —— dl 主题（mkBlog 移植版）
 * Hexo 自带 highlight 输出 figure.highlight > table 结构，
 * 本文件让它套用 mkBlog 的卡片视觉（白卡片 + 浅边框 + 圆角），
 * 并适配主题的 .mk-dark 夜间模式。
 * ============================================================ */

.single-content figure.highlight,
.single-content pre {
    position: relative;
    margin: 1.2em 0;
    border-radius: .3rem;
    overflow: hidden;
    font-size: .85rem;
    line-height: 1.65;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.single-content figure.highlight {
    background: #f7f8f7;
    border: 1px solid #e8e9e7;
}

figure.highlight table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

figure.highlight td {
    border: 0;
    padding: 0;
    background: transparent;
}

figure.highlight .gutter {
    width: 2.4rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

figure.highlight .gutter pre {
    text-align: right;
    padding: .8rem .4rem .8rem .6rem;
    color: #c0c4c8;
    background: transparent;
    border: 0;
    margin: 0;
}

figure.highlight .code pre {
    padding: .8rem 1rem .8rem .8rem;
    margin: 0;
    border: 0;
    background: transparent;
}

figure.highlight pre,
.single-content pre {
    margin: 0;
    border: 0;
    background: transparent;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    color: #444;
}

/* 单个 pre（无高亮）时给出底色 */
.single-content > pre,
.single-content .single-content pre {
    background: #f7f8f7;
    border: 1px solid #e8e9e7;
    padding: .8rem 1rem;
}

/* ---- 简易语法配色（与 prettify 浅色风格接近） ---- */
figure.highlight .comment,
figure.highlight .quote { color: #93a1a1; font-style: italic; }
figure.highlight .keyword,
figure.highlight .selector-tag,
figure.highlight .literal,
figure.highlight .doctag  { color: #859900; }
figure.highlight .string,
figure.highlight .regexp,
figure.highlight .addition{ color: #2aa198; }
figure.highlight .number,
figure.highlight .built_in,
figure.highlight .builtin-name,
figure.highlight .meta     { color: #d33682; }
figure.highlight .variable,
figure.highlight .template-variable,
figure.highlight .type,
figure.highlight .params   { color: #b58900; }
figure.highlight .title,
figure.highlight .section,
figure.highlight .name     { color: #268bd2; }
figure.highlight .tag,
figure.highlight .attribute,
figure.highlight .attr,
figure.highlight .symbol,
figure.highlight .bullet,
figure.highlight .deletion { color: #cb4b16; }
figure.highlight .emphasis { font-style: italic; }
figure.highlight .strong   { font-weight: bold; }

/* ---- 夜间模式 ---- */
.mk-dark figure.highlight,
.mk-dark .single-content > pre {
    background: #151718;
    border: none;
}
.mk-dark figure.highlight .gutter pre { color: #555; }
.mk-dark figure.highlight pre,
.mk-dark .single-content pre { color: #d4d4d4; }
.mk-dark figure.highlight .comment,
.mk-dark figure.highlight .quote { color: #93a1a1; }
.mk-dark figure.highlight .keyword,
.mk-dark figure.highlight .selector-tag,
.mk-dark figure.highlight .literal,
.mk-dark figure.highlight .doctag { color: #a6e22e; }
.mk-dark figure.highlight .string { color: #e6db74; }
.mk-dark figure.highlight .number,
.mk-dark figure.highlight .built_in,
.mk-dark figure.highlight .meta   { color: #ae81ff; }
.mk-dark figure.highlight .title,
.mk-dark figure.highlight .name   { color: #66d9ef; }
.mk-dark figure.highlight .tag,
.mk-dark figure.highlight .attr   { color: #f92672; }
