/* PrismJS 1.29.0 - Lightweight Code Highlighting */
/* Custom Lumina Theme */

code[class*="language-"],
pre[class*="language-"] {
    color: #383a42;
    background: none;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.6;
    tab-size: 4;
    hyphens: none;
}

pre[class*="language-"] {
    padding: 1.25em;
    margin: 1.5em 0;
    overflow: auto;
    border-radius: 8px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
}

html.dark-mode pre[class*="language-"],
html.auto-mode pre[class*="language-"] {
    background: #1e1e1e;
    border-color: #2e2e2e;
    color: #abb2bf;
}

@media (prefers-color-scheme: dark) {
    html.auto-mode pre[class*="language-"] {
        background: #1e1e1e;
        border-color: #2e2e2e;
        color: #abb2bf;
    }
}

:not(pre) > code[class*="language-"] {
    padding: .1em .3em;
    border-radius: .3em;
    white-space: normal;
    background: #f0f0f0;
}

/* Code Block Header */
.code-block-wrapper {
    position: relative;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1.25em;
    background: #f0f0f0;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 0.75em;
    color: #666;
}

html.dark-mode .code-block-header,
html.auto-mode .code-block-header {
    background: #252525;
    border-color: #2e2e2e;
    color: #888;
}

.code-lang-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    color: #666;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.code-copy-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.code-copy-btn.copied {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

html.dark-mode .code-copy-btn,
html.auto-mode .code-copy-btn {
    background: #333;
    border-color: #444;
    color: #aaa;
}

.code-block-header + pre[class*="language-"] {
    margin-top: 0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #a0a1a7;
    font-style: italic;
}

.token.punctuation {
    color: #383a42;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #c18401;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #50a14f;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #383a42;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #a626a4;
}

.token.function,
.token.class-name {
    color: #4078f2;
}

.token.regex,
.token.important,
.token.variable {
    color: #e45649;
}

/* Dark Mode Tokens */
html.dark-mode .token.comment,
html.dark-mode .token.prolog,
html.dark-mode .token.doctype,
html.dark-mode .token.cdata {
    color: #5c6370;
}

html.dark-mode .token.punctuation {
    color: #abb2bf;
}

html.dark-mode .token.property,
html.dark-mode .token.tag,
html.dark-mode .token.boolean,
html.dark-mode .token.number,
html.dark-mode .token.constant,
html.dark-mode .token.symbol,
html.dark-mode .token.deleted {
    color: #d19a66;
}

html.dark-mode .token.selector,
html.dark-mode .token.attr-name,
html.dark-mode .token.string,
html.dark-mode .token.char,
html.dark-mode .token.builtin,
html.dark-mode .token.inserted {
    color: #98c379;
}

html.dark-mode .token.operator,
html.dark-mode .token.entity,
html.dark-mode .token.url {
    color: #abb2bf;
}

html.dark-mode .token.atrule,
html.dark-mode .token.attr-value,
html.dark-mode .token.keyword {
    color: #c678dd;
}

html.dark-mode .token.function,
html.dark-mode .token.class-name {
    color: #61afef;
}

html.dark-mode .token.regex,
html.dark-mode .token.important,
html.dark-mode .token.variable {
    color: #e06c75;
}
