body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    transition: background-color 0.3s, color 0.3s;
}

#tabs {
    display: flex;
    background-color: #333;
    padding: 10px;
    color: white;
}

.tabButton {
    background-color: #555;
    border: none;
    padding: 10px 20px;
    margin-right: 5px;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s;
}

.tabButton.active {
    background-color: #3498db;
}

#themeToggle {
    margin-left: auto;
    background-color: #3498db;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

#themeToggle:checked {
    background-color: #f39c12; /* Dark mode switch color */
}

#editorContainer {
    display: flex;
    width: 100%;
    height: calc(100vh - 60px);
}

.editor {
    display: none;
    width: 33.33%;
    height: 100%;
    font-size: medium;
}

.editor.active {
    display: block;
}

#preview {
    border: 1px solid #ddd;
    width: 100%;
    height: 50%;
    transition: border-color 0.3s;
}

/* Light mode styles */
body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

body.light-mode .tabButton {
    background-color: #ddd;
    color: black;
}

body.light-mode .tabButton.active {
    background-color: #3498db;
}

body.light-mode .editor {
    background-color: #eaeaea;
    color: #749bf5;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #2e2e2e;
    color: #c5c5c5;
}

body.dark-mode .tabButton {
    background-color: #555;
}

body.dark-mode .tabButton.active {
    background-color: #3498db;
}

body.dark-mode .editor {
    background-color: #1e1e1e;
    color: #457cfc;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
    margin-left: auto;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    border-radius: 50%;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

