:root {
    --font-family: 'Courier New', Courier, monospace;
    --font-size: 14px;
    --background-color-light: #ffffff;
    --background-color-dark: #2e2e2e;
    --text-color-light: #000000;
    --text-color-dark: #ffffff;
    --line-number-color-light: #d3d3d3;
    --line-number-color-dark: #666666;
    --editor-border: #cccccc;
    --button-background-light: #e7e7e7;
    --button-background-dark: #444444;
    --button-hover-light: #d4d4d4;
    --button-hover-dark: #555555;
}

body.light-mode {
    background-color: var(--background-color-light);
    color: var(--text-color-light);
}

body.dark-mode {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--editor-border);
}

.container {
    display: flex;
    height: calc(100vh - 120px);
}

.editor {
    width: 50%;
    display: flex;
    position: relative;
    border-right: 1px solid var(--editor-border);
}

#code-editor {
    width: calc(100% - 40px);
    height: 100%;
    border: none;
    resize: none;
    outline: none;
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.5;
    padding: 0 10px;
    box-sizing: border-box;
    background-color: inherit;
    color: inherit;
    position: absolute;
    left: 40px;
}

#line-numbers {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    border-right: 1px solid var(--editor-border);
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.5;
    color: var(--line-number-color-light);
    padding: 0;
    text-align: right;
    background-color: inherit;
}

.results {
    width: 50%;
    display: flex;
    flex-direction: column;
}

.output, .info-arrays {
    padding: 10px;
    overflow-y: auto;
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.5;
}

.output {
    flex: 1;
    border-bottom: 1px solid var(--editor-border);
}

.info-arrays {
    flex: 1;
}

footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--editor-border);
    font-family: var(--font-family);
    font-size: var(--font-size);
}

body.light-mode footer a {
    font-family: var(--font-family);
    font-size: var(--font-size);
    color: var(--text-color-light);
    text-decoration: underline;
}

body.dark-mode footer a {
    color: var(--text-color-dark);
}


button {
    font-family: var(--font-family);
    font-size: var(--font-size);
    padding: 5px 10px;
    margin: 5px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

body.light-mode button {
    background-color: var(--button-background-light);
}

body.dark-mode button {
    background-color: var(--button-background-dark);
    color: var(--text-color-dark);
}

body.light-mode button:hover {
    background-color: var(--button-hover-light);
}

body.dark-mode button:hover {
    background-color: var(--button-hover-dark);
}

.theme-toggle .caption {
    font-family: var(--font-family);
    font-size: var(--font-size);
}
.theme-toggle .switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.theme-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.theme-toggle .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.theme-toggle input:checked + .slider {
    background-color: #2196F3;
}

.theme-toggle input:checked + .slider:before {
    transform: translateX(14px);
}

#run-button {
    width: 30px;
    height: 30px;
    border: none;
    cursor: pointer;
    position: relative;
    background: none;
}

#run-button:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 0;
    height: 0;
    border-left: 10px solid black;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

body.light-mode #run-button:before {
    border-left-color: var(--text-color-light);
}

body.dark-mode #run-button:before {
    border-left-color: var(--text-color-dark);
}

#clear-button {
    width: 30px;
    height: 30px;
    border: none;
    cursor: pointer;
    position: relative;
    background: none;
}

#clear-button:before {
    content: '⎚';
    font-size: 24px;
    color: black;
}

body.light-mode #clear-button:before {
    color: var(--text-color-light);
}

body.dark-mode #clear-button:before {
    color: var(--text-color-dark);
}

#test-button {
    background-color: #ffcc00;
    border-radius: 5px;
}
