/* Code-Block Styling */
.code-content {
    margin: 1rem 0;
}

.code-content pre {
    background-color: #f6f8fa;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    position: relative;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-content code {
    font-family: inherit;
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
    display: block;
}

/* Line numbers */
.code-content pre.line-numbers {
    counter-reset: line;
    padding-left: 3.5rem;
}

.code-content pre.line-numbers code {
    position: relative;
}

.code-content pre.line-numbers code::before {
    counter-increment: line;
    content: counter(line);
    position: absolute;
    left: -2.5rem;
    color: #8a8a8a;
    text-align: right;
    width: 2rem;
    user-select: none;
}

/* Themes */
.code-content pre.theme-default {
    background-color: #f6f8fa;
    color: #24292e;
    border: 1px solid #e1e4e8;
}

.code-content pre.theme-dark {
    background-color: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #3e3e3e;
}

.code-content pre.theme-light {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #e5e5e5;
}

/* Code Editor Textarea */
.code-editor {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    line-height: 1.5;
    tab-size: 4;
}

/* Backend Preview Styling */
.code-preview {
    background-color: #f6f8fa;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
}

.code-preview-header {
    background-color: #e1e4e8;
    padding: 0.5rem 1rem;
    display: flex;
    font-size: 12px;
    color: #24292e;
    border-bottom: 1px solid #d1d5da;
}

.code-language {
    font-weight: bold;
    margin-right: 1rem;
}

.code-line-numbers {
    margin-right: 1rem;
}

.code-theme {
    margin-left: auto;
}

.code-preview-content {
    margin: 0;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
}