body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #1e1e1e;
    color: #fff;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #252526;
    color: #d4d4d4;
    border-bottom: 1px solid #3c3c3c;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

.editor-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.panel {
    height: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #3c3c3c;
    overflow: auto;
    flex: 1;
    background-color: #1e1e1e;
}

.CodeMirror {
    height: 100%;
    background-color: #1e1e1e;
    color: #d4d4d4;
}

#preview {
    background-color: #ffffff;
    color: #000;
    width: 100%;
    height: 100%;
    border: none;
}

.resizer {
    width: 2px;
    background: #3c3c3c;
    cursor: col-resize;
    position: relative;
    z-index: 1;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-bottom: 10px;
}

.tab {
    background-color: #252526;
    color: #d4d4d4;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 100;
}

.tab:hover {
    background-color: #2d2d2d;
}

.tab.active {
    font-weight: bold;
    background-color: #1e1e1e;
    border-bottom: 2px solid #4CAF50;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #3c3c3c;
}

@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
    }
    .resizer {
        width: 100%;
        height: 2px;
        cursor: row-resize;
    }
}