.editor {
    height: 450px;
}

#editor *, .editor * {
    font-family: monospace !important;
    font-size: 16px !important;
    direction: ltr !important;
    text-align: left !important;
}

/* Dark mode styles for Ace editor */
[data-theme="dark"] .ace_editor,
.dark .ace_editor {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
}

[data-theme="dark"] .ace_editor .ace_gutter,
.dark .ace_editor .ace_gutter {
    background-color: #1e1f1c !important;
    color: #90908a !important;
}

[data-theme="dark"] .ace_editor .ace_gutter-active-line,
.dark .ace_editor .ace_gutter-active-line {
    background-color: #2c2c2c !important;
}

[data-theme="dark"] .ace_editor .ace_cursor,
.dark .ace_editor .ace_cursor {
    color: #ffffff !important;
    border-left: 2px solid #ffffff !important;
}

[data-theme="dark"] .ace_editor .ace_marker-layer .ace_selection,
.dark .ace_editor .ace_marker-layer .ace_selection {
    background-color: #264f78 !important;
}

[data-theme="dark"] .ace_editor .ace_line,
.dark .ace_editor .ace_line {
    color: #d4d4d4 !important;
}

[data-theme="dark"] .ace_editor .ace_keyword,
.dark .ace_editor .ace_keyword {
    color: #569cd6 !important;
}

[data-theme="dark"] .ace_editor .ace_string,
.dark .ace_editor .ace_string {
    color: #ce9178 !important;
}

[data-theme="dark"] .ace_editor .ace_comment,
.dark .ace_editor .ace_comment {
    color: #6a9955 !important;
}

[data-theme="dark"] .ace_editor .ace_meta,
.dark .ace_editor .ace_meta {
    color: #d4d4d4 !important;
}

[data-theme="dark"] .ace_editor .ace_entity,
.dark .ace_editor .ace_entity {
    color: #4ec9b0 !important;
}

[data-theme="dark"] .ace_editor .ace_attribute-name,
.dark .ace_editor .ace_attribute-name {
    color: #9cdcfe !important;
}

[data-theme="dark"] .ace_editor .ace_constant,
.dark .ace_editor .ace_constant {
    color: #4fc1ff !important;
}

[data-theme="dark"] .ace_editor .ace_variable,
.dark .ace_editor .ace_variable {
    color: #9cdcfe !important;
}

[data-theme="dark"] .ace_editor .ace_support,
.dark .ace_editor .ace_support {
    color: #4ec9b0 !important;
}

/* Active line styles */
[data-theme="dark"] .ace_editor .ace_active-line,
.dark .ace_editor .ace_active-line {
    background-color: #2c2c2c !important;
}

[data-theme="dark"] .ace_editor .ace_text-input,
.dark .ace_editor .ace_text-input {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Additional dark mode fixes */
[data-theme="dark"] .ace_scroller,
.dark .ace_scroller {
    background-color: #1e1e1e !important;
}

[data-theme="dark"] .ace_text-layer,
.dark .ace_text-layer {
    color: #d4d4d4 !important;
    background-color: transparent !important;
}

/* Editor container styles */
.ace-editor-dark {
    border-radius: 4px;
}

/* Dark mode specific container styles */
[data-theme="dark"] .ace-editor-dark,
.dark .ace-editor-dark {
    background-color: #1e1e1e !important;
    border: 1px solid #2c2c2c !important;
}

[data-theme="dark"] .ace-editor-dark .ace_gutter,
.dark .ace-editor-dark .ace_gutter {
    background-color: #1e1f1c !important;
    color: #90908a !important;
    border-right: 1px solid #2c2c2c !important;
}

[data-theme="dark"] .ace-editor-dark .ace_content,
.dark .ace-editor-dark .ace_content {
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
}