/* Dungeon Synth Prism Theme
 * Dark palette with gold and warm tones.
 */

:root {
  --code-bg: hsl(0, 0%, 6%);
  --code-fg: hsl(40, 20%, 85%);
  --code-comment: hsl(40, 10%, 40%);
  --code-keyword: hsl(43, 50%, 55%);
  --code-string: hsl(30, 50%, 65%);
  --code-number: hsl(20, 60%, 60%);
  --code-function: hsl(40, 30%, 75%);
  --code-operator: hsl(40, 15%, 60%);
  --code-punctuation: hsl(40, 10%, 50%);
  --code-border: hsl(0, 0%, 15%);
}

pre[class*="language-"], code[class*="language-"] {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  line-height: 1.6;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  -moz-tab-size: 2;
  tab-size: 2;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  color: var(--code-fg);
}

/* Block code */
pre[class*="language-"] {
  padding: 1.1rem 1.5rem;
  margin: 1.5rem 0;
  overflow: auto;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 2px;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  color: var(--code-fg);
  background: var(--code-bg);
  padding: 0.18em 0.45em;
  border: 1px solid var(--code-border);
  border-radius: 2px;
  white-space: normal;
}

/* Comments */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--code-comment);
  font-style: italic;
}

/* Punctuation */
.token.punctuation {
  color: var(--code-punctuation);
}

/* Properties, tags, booleans, numbers */
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: var(--code-number);
}

/* Strings, chars */
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: var(--code-string);
}

/* Operators, URLs, variables */
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: var(--code-operator);
}

/* Functions, class names, attr values */
.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: var(--code-function);
  font-weight: 500;
}

/* Keywords */
.token.keyword {
  color: var(--code-keyword);
  text-shadow: 0 0 4px hsl(43 50% 55% / 0.1);
}

/* Regex, important */
.token.regex,
.token.important {
  color: var(--code-string);
}

.token.important,
.token.bold {
  font-weight: 700;
}

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

.token.entity {
  cursor: help;
}

/* Line highlight */
.line-highlight {
  background: hsl(43 50% 55% / 0.06);
}

.line-numbers .line-numbers-rows {
  border-right: 1px solid var(--code-border);
}

/* Scrollbar */
pre[class*="language-"]::-webkit-scrollbar {
  height: 8px;
}
pre[class*="language-"]::-webkit-scrollbar-track {
  background: var(--code-bg);
}
pre[class*="language-"]::-webkit-scrollbar-thumb {
  background: var(--code-border);
  border-radius: 4px;
}
pre[class*="language-"]::-webkit-scrollbar-thumb:hover {
  background: var(--code-keyword);
}
