/* Prism.js Base Styles */
code[class*="language-"],
pre[class*="language-"] {
  color: var(--code-text);
  background: none;
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  font-size: 1em;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  tab-size: 4;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  background: var(--code-bg);
  padding: 20px;
  margin: 0;
  overflow: auto;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: normal;
}

/* ===== LIGHT THEME TOKENS (Default) ===== */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #708090;
  font-style: italic;
}

.token.punctuation {
  color: #999999;
}

.token.property {
  color: #905;
}

.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
  color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
  color: #690;
}

.token.operator,
.token.entity,
.token.url {
  color: #9a6e3a;
  background: transparent;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #07a;
}

.token.function,
.token.class-name {
  color: #dd4a68;
}

.token.regex,
.token.important,
.token.variable {
  color: #e90;
}

/* ===== DARK THEME TOKENS ===== */
.theme-dark .token.comment,
.theme-dark .token.prolog,
.theme-dark .token.doctype,
.theme-dark .token.cdata {
  color: #6a9955;
  font-style: italic;
}

.theme-dark .token.punctuation {
  color: #d4d4d4;
}

.theme-dark .token.property {
  color: #9cdcfe;
}

.theme-dark .token.tag,
.theme-dark .token.boolean,
.theme-dark .token.number,
.theme-dark .token.constant,
.theme-dark .token.symbol {
  color: #b5cea8;
}

.theme-dark .token.selector,
.theme-dark .token.attr-name,
.theme-dark .token.string,
.theme-dark .token.char,
.theme-dark .token.builtin {
  color: #ce9178;
}

.theme-dark .token.operator,
.theme-dark .token.entity,
.theme-dark .token.url {
  color: #d4d4d4;
  background: transparent;
}

.theme-dark .token.atrule,
.theme-dark .token.attr-value,
.theme-dark .token.keyword {
  color: #c586c0;
}

.theme-dark .token.function,
.theme-dark .token.class-name {
  color: #dcdcaa;
}

.theme-dark .token.regex,
.theme-dark .token.important,
.theme-dark .token.variable {
  color: #d16969;
}

/* Bold and italic */
.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}
