/* ===== .math11 Markdown 数学公式样式 ===== */
/* 支持数学公式渲染的 Markdown 容器样式 */

/* .math11 容器基础样式 */
body .math11,
.math11 {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 18px;
    margin: 12px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', -apple-system, sans-serif;
    font-size: 0.9em;
    line-height: 1.7;
    overflow-x: auto;
    color: #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* .math11 标题样式 */
body .math11 h1,
body .math11 h2,
body .math11 h3,
body .math11 h4,
body .math11 h5,
body .math11 h6,
.math11 h1,
.math11 h2,
.math11 h3,
.math11 h4,
.math11 h5,
.math11 h6 {
    margin-top: 14px !important;
    margin-bottom: 10px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.math11 h1 {
    font-size: 1.6em !important;
    border-bottom: 2px solid #4da6ff !important;
    padding-bottom: 8px !important;
    margin-top: 20px !important;
}

.math11 h2 {
    font-size: 1.4em !important;
    border-bottom: 1px solid #3a8ccf !important;
    padding-bottom: 6px !important;
    margin-top: 18px !important;
}

.math11 h3 { font-size: 1.25em !important; color: #7eb8ff !important; }
.math11 h4 { font-size: 1.15em !important; color: #a3d3ff !important; }
.math11 h5 { font-size: 1.05em !important; color: #c7e1ff !important; }
.math11 h6 { font-size: 0.95em !important; color: #dbeaff !important; }

/* .math11 段落样式 */
body .math11 p,
.math11 p {
    margin: 10px 0 !important;
    line-height: 1.7 !important;
    text-align: justify !important;
    color: #e8e8e8 !important;
}

/* .math11 列表样式 */
body .math11 ul,
body .math11 ol,
.math11 ul,
.math11 ol {
    margin: 8px 0 !important;
    padding-left: 20px !important;
    list-style: disc outside !important;
    color: #e8e8e8 !important;
}

.math11 ul {
    list-style-type: disc !important;
    list-style-position: outside !important;
}

.math11 ol {
    list-style-type: decimal !important;
    list-style-position: outside !important;
}

body .math11 li,
.math11 li {
    margin: 4px 0 !important;
    line-height: 1.5 !important;
    padding-left: 2px !important;
    list-style-position: outside !important;
    display: list-item !important;
    color: #e8e8e8 !important;
}

/* .math11 嵌套列表样式 */
body .math11 ul ul,
.math11 ul ul {
    list-style-type: circle !important;
    margin: 4px 0 !important;
    padding-left: 20px !important;
}

body .math11 ul ul ul,
.math11 ul ul ul {
    list-style-type: square !important;
    padding-left: 20px !important;
}

body .math11 ol ol,
.math11 ol ol {
    list-style-type: lower-alpha !important;
    margin: 4px 0 !important;
    padding-left: 20px !important;
}

/* .math11 代码块样式 */
body .math11 pre,
.math11 pre {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    border: 1px solid #4a9eff !important;
    border-radius: 10px !important;
    padding: 18px !important;
    margin: 16px 0 !important;
    overflow-x: auto !important;
    font-size: 1.1232em !important;
    line-height: 1.7 !important;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', monospace !important;
    color: #e8e8e8 !important;
}

body .math11 pre code,
.math11 pre code {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 0.9em !important;
    color: #e8e8e8 !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', monospace !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    display: block !important;
    white-space: pre !important;
}

/* .math11 内联代码样式 - 最高优先级选择器 */
html body div.math11 > code,
html body div.math11 p > code,
html body div.math11 li > code,
html body div.math11 td > code,
html body div.math11 th > code,
html body table td div.math11 > code,
html body table tr td div.math11 > code,
body .math11 > code,
body .math11 p > code,
body .math11 li > code,
body .math11 td > code,
body .math11 th > code,
.math11 > code,
.math11 p > code,
.math11 li > code,
.math11 td > code,
.math11 th > code {
    background: linear-gradient(135deg, #1a1a2e 0%, #1e3a5f 100%) !important;
    border: 1px solid rgba(74, 158, 255, 0.12) !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', monospace !important;
    font-size: 0.729em !important;
    color: #e8e8e8 !important;
    box-shadow: 0 3px 8px rgba(74, 158, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    display: inline !important;
    white-space: nowrap !important;
}

/* .math11 引用样式 */
body .math11 blockquote,
.math11 blockquote {
    border-left: 4px solid #4da6ff !important;
    margin: 12px 0 !important;
    padding: 8px 16px !important;
    background-color: rgba(77, 166, 255, 0.05) !important;
    color: #bbb !important;
    font-style: italic !important;
}

/* .math11 表格样式 */
body .math11 table,
.math11 table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 12px 0 !important;
    font-size: 0.95em !important;
}

body .math11 th,
body .math11 td,
.math11 th,
.math11 td {
    border: 1px solid #555 !important;
    padding: 8px 12px !important;
    text-align: left !important;
}

.math11 th {
    background-color: #1e1e1e !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.math11 td {
    color: #e8e8e8 !important;
}

/* .math11 链接样式 */
body .math11 a,
.math11 a {
    color: #4da6ff !important;
    text-decoration: none !important;
    border-bottom: 1px dotted #4da6ff !important;
}

.math11 a:hover {
    color: #6bb8ff !important;
    border-bottom-style: solid !important;
}

/* .math11 加粗和斜体 */
body .math11 strong,
body .math11 b,
.math11 strong,
.math11 b {
    font-weight: 600 !important;
    color: #f8f8f2 !important;
}

body .math11 em,
body .math11 i,
.math11 em,
.math11 i {
    font-style: italic !important;
    color: #e8e8e8 !important;
}

/* .math11 分隔线 */
body .math11 hr,
.math11 hr {
    border: none !important;
    border-top: 1px solid #555 !important;
    margin: 16px 0 !important;
}

/* .math11 图片样式 */
body .math11 img,
.math11 img {
    max-width: 100% !important;
    height: auto !important;
    margin: 12px 0 !important;
    border-radius: 4px !important;
}

/* ===== .math11 KaTeX 数学公式样式 ===== */

/* 行内数学公式 - 高优先级 */
body .math11 .katex,
.math11 .katex {
    font: 1.15em KaTeX_Main, Times New Roman, 'Microsoft YaHei', 'PingFang SC', serif !important;
    line-height: 1.25 !important;
    text-indent: 0 !important;
    text-rendering: auto !important;
    display: inline-block !important;
    margin: 0 4px !important;
    color: #f5f5f5 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* 行内数学公式在段落中的特殊处理 */
body .math11 p .katex,
.math11 p .katex {
    margin: 0 3px !important;
    vertical-align: baseline !important;
}

/* 行内数学公式在标题中的特殊处理 */
body .math11 h1 .katex,
body .math11 h2 .katex,
body .math11 h3 .katex,
body .math11 h4 .katex,
body .math11 h5 .katex,
body .math11 h6 .katex,
.math11 h1 .katex,
.math11 h2 .katex,
.math11 h3 .katex,
.math11 h4 .katex,
.math11 h5 .katex,
.math11 h6 .katex {
    font-size: 1em !important;
    color: #ffffff !important;
    margin: 0 4px !important;
}

/* 行内数学公式在代码中的特殊处理 */
body .math11 code .katex,
body .math11 pre .katex,
.math11 code .katex,
.math11 pre .katex {
    font-family: KaTeX_Main, Times New Roman, 'Microsoft YaHei', serif !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: #f5f5f5 !important;
}

/* 块级数学公式 - 高优先级 */
body .math11 .katex-display,
.math11 .katex-display {
    display: block !important;
    margin: 18px 0 !important;
    padding: 16px 12px !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.25) 100%) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(77, 166, 255, 0.3) !important;
    border-left: 4px solid #4da6ff !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* .katex-display 内的 .katex 元素 */
body .math11 .katex-display > .katex,
.math11 .katex-display > .katex {
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
    font-size: 1.15em !important;
    color: #f8f8f8 !important;
}

/* 数学公式的字体样式 */
body .math11 .katex-mathml,
.math11 .katex-mathml {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
}

body .math11 .katex-html,
.math11 .katex-html {
    color: #f5f5f5 !important;
    white-space: nowrap !important;
}

/* 数学公式的主要样式 */
body .math11 .katex .base,
.math11 .katex .base {
    position: relative !important;
    display: inline-block !important;
    white-space: nowrap !important;
    width: -moz-min-content !important;
    width: min-content !important;
}

body .math11 .katex .strut,
.math11 .katex .strut {
    display: inline-block !important;
}

/* 数学公式文本样式 */
body .math11 .katex .textbf,
.math11 .katex .textbf {
    font-weight: 700 !important;
    color: #ffffff !important;
}

body .math11 .katex .textit,
.math11 .katex .textit {
    font-style: italic !important;
}

body .math11 .katex .textrm,
.math11 .katex .textrm {
    font-family: KaTeX_Main, 'Microsoft YaHei', 'PingFang SC', serif !important;
}

body .math11 .katex .textsf,
.math11 .katex .textsf {
    font-family: KaTeX_SansSerif, 'Microsoft YaHei', 'PingFang SC', sans-serif !important;
}

body .math11 .katex .texttt,
.math11 .katex .texttt {
    font-family: KaTeX_Typewriter, monospace !important;
}

/* 数学公式数学字体 */
body .math11 .katex .mathnormal,
.math11 .katex .mathnormal {
    font-family: KaTeX_Math, Times New Roman, serif !important;
    font-style: italic !important;
    color: #f5f5f5 !important;
}

body .math11 .katex .mathit,
.math11 .katex .mathit {
    font-family: KaTeX_Main, Times New Roman, serif !important;
    font-style: italic !important;
}

body .math11 .katex .mathrm,
.math11 .katex .mathrm {
    font-style: normal !important;
}

body .math11 .katex .mathbf,
.math11 .katex .mathbf {
    font-family: KaTeX_Main, 'Microsoft YaHei', serif !important;
    font-weight: 700 !important;
}

body .math11 .katex .boldsymbol,
.math11 .katex .boldsymbol {
    font-family: KaTeX_Math, Times New Roman, serif !important;
    font-weight: 700 !important;
    font-style: italic !important;
}

/* 数学公式特殊符号 */
body .math11 .katex .amsrm,
body .math11 .katex .mathbb,
body .math11 .katex .textbb,
.math11 .katex .amsrm,
.math11 .katex .mathbb,
.math11 .katex .textbb {
    font-family: KaTeX_AMS, 'Microsoft YaHei', serif !important;
}

body .math11 .katex .mathcal,
.math11 .katex .mathcal {
    font-family: KaTeX_Caligraphic !important;
}

body .math11 .katex .mathfrak,
body .math11 .katex .textfrak,
.math11 .katex .mathfrak,
.math11 .katex .textfrak {
    font-family: KaTeX_Fraktur !important;
}

body .math11 .katex .mathboldfrak,
body .math11 .katex .textboldfrak,
.math11 .katex .mathboldfrak,
.math11 .katex .textboldfrak {
    font-family: KaTeX_Fraktur !important;
    font-weight: 700 !important;
}

body .math11 .katex .mathtt,
.math11 .katex .mathtt {
    font-family: KaTeX_Typewriter, monospace !important;
}

body .math11 .katex .mathscr,
body .math11 .katex .textscr,
.math11 .katex .mathscr,
.math11 .katex .textscr {
    font-family: KaTeX_Script !important;
}

body .math11 .katex .mathsf,
body .math11 .katex .textsf,
.math11 .katex .mathsf,
.math11 .katex .textsf {
    font-family: KaTeX_SansSerif, 'Microsoft YaHei', sans-serif !important;
}

body .math11 .katex .mathboldsf,
body .math11 .katex .textboldsf,
.math11 .katex .mathboldsf,
.math11 .katex .textboldsf {
    font-family: KaTeX_SansSerif, 'Microsoft YaHei', sans-serif !important;
    font-weight: 700 !important;
}

body .math11 .katex .mathsfit,
body .math11 .katex .textitsfit,
.math11 .katex .mathsfit,
.math11 .katex .textitsfit {
    font-family: KaTeX_SansSerif, 'Microsoft YaHei', sans-serif !important;
    font-style: italic !important;
}

body .math11 .katex .mainit,
.math11 .katex .mainit {
    font-family: KaTeX_Main, Times New Roman, serif !important;
    font-style: italic !important;
}

body .math11 .katex .mainrm,
.math11 .katex .mainrm {
    font-family: KaTeX_Main, Times New Roman, serif !important;
    font-style: normal !important;
}

/* 数学公式大小 */
body .math11 .katex .tiny,
.math11 .katex .tiny {
    font-size: 50% !important;
}

body .math11 .katex .scriptsize,
.math11 .katex .scriptsize {
    font-size: 70% !important;
}

body .math11 .katex .footnotesize,
.math11 .katex .footnotesize {
    font-size: 80% !important;
}

body .math11 .katex .small,
.math11 .katex .small {
    font-size: 85% !important;
}

body .math11 .katex .normalsize,
.math11 .katex .normalsize {
    font-size: 100% !important;
}

body .math11 .katex .large,
.math11 .katex .large {
    font-size: 115% !important;
}

body .math11 .katex .Large,
.math11 .katex .Large {
    font-size: 130% !important;
}

body .math11 .katex .LARGE,
.math11 .katex .LARGE {
    font-size: 145% !important;
}

body .math11 .katex .huge,
.math11 .katex .huge {
    font-size: 175% !important;
}

body .math11 .katex .Huge,
.math11 .katex .Huge {
    font-size: 200% !important;
}

/* 数学公式颜色支持 */
body .math11 .katex .style-wrap,
.math11 .katex .style-wrap {
    position: relative !important;
}

body .math11 .katex .op-symbol,
.math11 .katex .op-symbol {
    position: relative !important;
}

body .math11 .katex .mord,
.math11 .katex .mord {
    color: #f5f5f5 !important;
}

body .math11 .katex .mop,
.math11 .katex .mop {
    color: #e8e8e8 !important;
}

body .math11 .katex .mbin,
.math11 .katex .mbin {
    color: #f5f5f5 !important;
}

body .math11 .katex .mrel,
.math11 .katex .mrel {
    color: #5ab0ff !important;
}

body .math11 .katex .minner,
.math11 .katex .minner {
    color: #f5f5f5 !important;
}

body .math11 .katex .mpunct,
.math11 .katex .mpunct {
    color: #e8e8e8 !important;
}

body .math11 .katex .mopen,
.math11 .katex .mopen {
    color: #f5f5f5 !important;
}

body .math11 .katex .mclose,
.math11 .katex .mclose {
    color: #f5f5f5 !important;
}

/* 数学公式括号和定界符 */
body .math11 .katex .delimsizing,
.math11 .katex .delimsizing {
    display: inline-block !important;
}

body .math11 .katex .delim-size1,
.math11 .katex .delim-size1 {
    font-size: 1em !important;
}

body .math11 .katex .delim-size2,
.math11 .katex .delim-size2 {
    font-size: 1.2em !important;
}

body .math11 .katex .delim-size3,
.math11 .katex .delim-size3 {
    font-size: 1.4em !important;
}

body .math11 .katex .delim-size4,
.math11 .katex .delim-size4 {
    font-size: 1.7em !important;
}

/* 数学公式分数 */
body .math11 .katex .mfrac,
.math11 .katex .mfrac {
    display: inline-block !important;
    vertical-align: middle !important;
    text-align: center !important;
}

body .math11 .katex .mfrac > span,
.math11 .katex .mfrac > span {
    display: block !important;
}

body .math11 .katex .mfrac .frac-line,
.math11 .katex .mfrac .frac-line {
    border-bottom: 1px solid #5ab0ff !important;
    margin: 0.1em 0 !important;
}

/* 数学公式根号 */
body .math11 .katex .sqrt > .root,
.math11 .katex .sqrt > .root {
    margin-left: 0.27em !important;
    margin-right: -0.55em !important;
}

body .math11 .katex .sqrt > .sqrt-sign,
.math11 .katex .sqrt > .sqrt-sign {
    color: #5ab0ff !important;
}

/* 数学公式上下标 */
body .math11 .katex .msupsub,
.math11 .katex .msupsub {
    display: inline-block !important;
    vertical-align: middle !important;
}

body .math11 .katex .msup,
.math11 .katex .msup {
    display: inline-block !important;
    vertical-align: middle !important;
}

body .math11 .katex .msub,
.math11 .katex .msub {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* 数学公式矩阵 */
body .math11 .katex .mtable,
.math11 .katex .mtable {
    display: inline-table !important;
    vertical-align: middle !important;
}

body .math11 .katex .mtable .col-align-c,
.math11 .katex .mtable .col-align-c {
    text-align: center !important;
}

body .math11 .katex .mtable .col-align-l,
.math11 .katex .mtable .col-align-l {
    text-align: left !important;
}

body .math11 .katex .mtable .col-align-r,
.math11 .katex .mtable .col-align-r {
    text-align: right !important;
}

body .math11 .katex .arraycolsep,
.math11 .katex .arraycolsep {
    display: inline-block !important;
    width: 0.5em !important;
}

/* 确保数学公式在不同元素中正确显示 */
body .math11 h1 .katex,
body .math11 h2 .katex,
body .math11 h3 .katex,
body .math11 h4 .katex,
body .math11 h5 .katex,
body .math11 h6 .katex,
.math11 h1 .katex,
.math11 h2 .katex,
.math11 h3 .katex,
.math11 h4 .katex,
.math11 h5 .katex,
.math11 h6 .katex {
    color: #ffffff !important;
}

body .math11 strong .katex,
body .math11 b .katex,
.math11 strong .katex,
.math11 b .katex {
    color: #ffffff !important;
}

body .math11 em .katex,
body .math11 i .katex,
.math11 em .katex,
.math11 i .katex {
    font-style: italic !important;
}

body .math11 a .katex,
.math11 a .katex {
    color: #5ab0ff !important;
}

/* 修复数学公式在列表中的显示 */
body .math11 li .katex,
.math11 li .katex {
    display: inline-block !important;
    vertical-align: baseline !important;
}

body .math11 td .katex,
body .math11 th .katex,
.math11 td .katex,
.math11 th .katex {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* 修复数学公式在代码块中的显示 */
body .math11 pre .katex,
body .math11 code .katex,
.math11 pre .katex,
.math11 code .katex {
    color: #f5f5f5 !important;
    font-family: KaTeX_Main, Times New Roman, 'Microsoft YaHei', serif !important;
}

/* 确保数学公式的换行正确处理 */
body .math11 .katex-display,
.math11 .katex-display {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}

body .math11 .katex,
.math11 .katex {
    white-space: nowrap !important;
}

/* 适配响应式设计 */
@media (max-width: 768px) {
    .math11 {
        padding: 12px !important;
        font-size: 0.85em !important;
    }

    .math11 .katex-display {
        padding: 8px !important;
        margin: 12px 0 !important;
        font-size: 0.95em !important;
        overflow-x: auto !important;
    }

    .math11 .katex {
        font-size: 1em !important;
    }
}

/* 打印样式优化 */
@media print {
    .math11 .katex,
    .math11 .katex-display {
        color: #000000 !important;
        background-color: transparent !important;
        border-color: #000000 !important;
    }

    .math11 .katex-display {
        border-left: 3px solid #000000 !important;
        background-color: transparent !important;
    }
}

/* ===== .math11 简化数学公式样式（来自 math-render.js） ===== */
/* 当没有 KaTeX 库时，使用简化的数学公式渲染 */

/* 行内数学公式 */
.math11 .math-inline {
    font-family: 'Times New Roman', serif !important;
    font-size: 1.05em !important;
    color: #f5f5f5 !important;
    background: rgba(77, 166, 255, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    display: inline !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin: 0 3px !important;
}

/* 块级数学公式 */
.math11 .math-block {
    font-family: 'Times New Roman', serif !important;
    font-size: 1.15em !important;
    color: #f8f8f8 !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.25) 100%) !important;
    border: 1px solid rgba(77, 166, 255, 0.3) !important;
    border-left: 4px solid #4da6ff !important;
    border-radius: 8px !important;
    padding: 16px 12px !important;
    margin: 18px 0 !important;
    display: block !important;
    text-align: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* 数学公式中的希腊字母 */
.math11 .math-inline .greek,
.math11 .math-block .greek {
    font-style: italic !important;
    color: #7eb8ff !important;
}

/* 数学公式中的运算符 */
.math11 .math-inline .operator,
.math11 .math-block .operator {
    color: #5ab0ff !important;
    font-weight: 500 !important;
}

/* 数学公式中的上下标 */
.math11 .math-inline sub,
.math11 .math-block sub {
    color: #e8e8e8 !important;
    font-size: 0.8em !important;
}

.math11 .math-inline sup,
.math11 .math-block sup {
    color: #e8e8e8 !important;
    font-size: 0.8em !important;
}

/* 数学公式中的分数 */
.math11 .math-inline .fraction,
.math11 .math-block .fraction {
    display: inline-block !important;
    vertical-align: middle !important;
    text-align: center !important;
}

.math11 .math-inline .fraction .numerator,
.math11 .math-block .fraction .numerator {
    display: block !important;
    border-bottom: 1px solid #5ab0ff !important;
    padding: 2px 4px !important;
}

.math11 .math-inline .fraction .denominator,
.math11 .math-block .fraction .denominator {
    display: block !important;
    padding: 2px 4px !important;
}

/* 数学公式中的根号 */
.math11 .math-inline .sqrt,
.math11 .math-block .sqrt {
    color: #5ab0ff !important;
    font-weight: bold !important;
}

/* 数学公式中的绝对值 */
.math11 .math-inline .abs,
.math11 .math-block .abs {
    color: #f5f5f5 !important;
    padding: 0 2px !important;
}

/* 数学公式中的括号 */
.math11 .math-inline .parentheses,
.math11 .math-block .parentheses {
    color: #f5f5f5 !important;
    font-weight: 500 !important;
}

/* 块级公式中的运算符限制 */
.math11 .math-block .operator-limit {
    font-size: 0.85em !important;
    color: #e8e8e8 !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .math11 .math-inline {
        font-size: 1em !important;
        padding: 2px 4px !important;
    }

    .math11 .math-block {
        font-size: 1em !important;
        padding: 12px 8px !important;
        margin: 14px 0 !important;
        overflow-x: auto !important;
    }
}

/* 打印样式 */
@media print {
    .math11 .math-inline,
    .math11 .math-block {
        color: #000000 !important;
        background-color: transparent !important;
        border-color: #000000 !important;
    }

    .math11 .math-block {
        border-left: 3px solid #000000 !important;
    }
}

/* ===== .math11 Python 风格数学公式优化 ===== */
/* 支持类似 ((y_pred - y_test) ** 2).mean() 的 Python 数学表达式 */

/* 数学公式容器中的代码样式优化 - 最高优先级 */
html body div.math11 > code.math,
html body div.math11 > code.math-inline,
html body div.math11 > code.math-block,
html body div.math11 p > code.math,
html body div.math11 p > code.math-inline,
html body div.math11 p > code.math-block,
.math11 code.math,
.math11 code.math-inline,
.math11 code.math-block {
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.15) 0%, rgba(77, 166, 255, 0.08) 100%) !important;
    border: 1px solid rgba(77, 166, 255, 0.4) !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 1.05em !important;
    color: #f8f8f8 !important;
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 4px auto !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(77, 166, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Python 运算符高亮 - 最高优先级 */
html body div.math11 code span.python-op,
html body div.math11 code.math span.python-op,
html body div.math11 code.math-inline span.python-op,
.math11 code .python-op,
.math11 code.math .python-op {
    color: #ff79c6 !important;
    font-weight: bold !important;
}

/* Python 函数调用高亮 - 最高优先级 */
html body div.math11 code span.python-func,
html body div.math11 code.math span.python-func,
html body div.math11 code.math-inline span.python-func,
.math11 code .python-func,
.math11 code.math .python-func {
    color: #50fa7b !important;
    font-weight: 500 !important;
}

/* Python 变量高亮 - 最高优先级 */
html body div.math11 code span.python-var,
html body div.math11 code.math span.python-var,
html body div.math11 code.math-inline span.python-var,
.math11 code .python-var,
.math11 code.math .python-var {
    color: #f8f8f8 !important;
}

/* Python 括号高亮 - 最高优先级 */
html body div.math11 code span.python-paren,
html body div.math11 code.math span.python-paren,
html body div.math11 code.math-inline span.python-paren,
.math11 code .python-paren,
.math11 code.math .python-paren {
    color: #8be9fd !important;
    font-weight: bold !important;
}

/* Python 数字高亮 - 最高优先级 */
html body div.math11 code span.python-num,
html body div.math11 code.math span.python-num,
html body div.math11 code.math-inline span.python-num,
.math11 code .python-num,
.math11 code.math .python-num {
    color: #bd93f9 !important;
}

/* Python 字符串高亮 - 最高优先级 */
html body div.math11 code span.python-string,
html body div.math11 code.math span.python-string,
html body div.math11 code.math-inline span.python-string,
.math11 code .python-string,
.math11 code.math .python-string {
    color: #f1fa8c !important;
}

/* 块级数学公式居中显示 - 最高优先级 */
html body div.math11 .math-block,
.math11 .math-block {
    display: block !important;
    margin: 16px auto !important;
    padding: 12px !important;
    text-align: center !important;
    max-width: 90% !important;
    overflow-x: auto !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
    html body div.math11 code.math,
    html body div.math11 code.math-inline,
    html body div.math11 code.math-block,
    .math11 code.math,
    .math11 code.math-inline,
    .math11 code.math-block {
        font-size: 0.95em !important;
        padding: 4px 8px !important;
        white-space: normal !important;
        word-break: break-all !important;
    }
}
