/* ============================================
   语法高亮主题覆盖 (基于 GitHub Dark 微调)
   ============================================ */

.hljs {
  color: var(--text-primary);
  background: transparent;
}

.hljs-comment,
.hljs-quote {
  color: var(--text-muted);
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-type,
.hljs-addition {
  color: #ff7b72;
}

.hljs-string,
.hljs-meta .hljs-string,
.hljs-doctag {
  color: #a5d6ff;
}

.hljs-function .hljs-title,
.hljs-title.function_,
.hljs-section,
.hljs-name {
  color: #d2a8ff;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-selector-class {
  color: #79c0ff;
}

.hljs-built_in,
.hljs-title.class_,
.hljs-class .hljs-title {
  color: var(--accent-cyan);
}

.hljs-variable,
.hljs-template-variable,
.hljs-attr,
.hljs-property,
.hljs-attribute {
  color: var(--accent-orange);
}

.hljs-regexp,
.hljs-deletion {
  color: var(--accent-red);
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}

.hljs-params {
  color: var(--text-primary);
}

.hljs-meta .hljs-keyword {
  color: var(--accent-pink);
}

/* === 白天模式：token 配色适配浅色背景（覆盖上面的硬编码暗色值）=== */
[data-theme="light"] .hljs-keyword,
[data-theme="light"] .hljs-selector-tag,
[data-theme="light"] .hljs-literal,
[data-theme="light"] .hljs-type,
[data-theme="light"] .hljs-addition {
  color: #cf222e;
}

[data-theme="light"] .hljs-string,
[data-theme="light"] .hljs-meta .hljs-string,
[data-theme="light"] .hljs-doctag {
  color: #0a3069;
}

[data-theme="light"] .hljs-function .hljs-title,
[data-theme="light"] .hljs-title.function_,
[data-theme="light"] .hljs-section,
[data-theme="light"] .hljs-name {
  color: #8250df;
}

[data-theme="light"] .hljs-number,
[data-theme="light"] .hljs-symbol,
[data-theme="light"] .hljs-bullet,
[data-theme="light"] .hljs-link,
[data-theme="light"] .hljs-meta,
[data-theme="light"] .hljs-selector-id,
[data-theme="light"] .hljs-selector-class {
  color: #0550ae;
}
