:root {
    --bg-color: #1a1a1a;
    --tab-bg: #2d2d2d;
    --accent: #569cd6;
    --text: #d4d4d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-color);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: calc(100vh - 40px);
    gap: 5px;
    padding: 5px;
}

.editor-pane, .preview-pane {
    background: var(--tab-bg);
    border-radius: 6px;
    overflow: hidden;
}

.tabs-bar {
    display: flex;
    background: #252526;
    padding: 5px 10px 0 10px;
    gap: 5px;
    border-bottom: 1px solid #333;
}

.tab {
    padding: 8px 20px;
    cursor: pointer;
    background: #2d2d2d;
    border-radius: 6px 6px 0 0;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9em;
    transition: all 0.2s;
}

.tab.active {
    background: var(--bg-color);
    color: var(--accent);
}

.toolbar {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: #252526;
    border-bottom: 1px solid #333;
    gap: 10px;
}

button {
    padding: 6px 12px;
    background: #3a3d41;
    border: none;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

button:hover {
    background: var(--accent);
    color: white;
}

.CodeMirror {
    height: calc(100vh - 120px) !important;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    padding: 10px 0;
}

#preview {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.editor {
    display: none;
    height: 100%;
}

.editor.active {
    display: block;
}

.close {
    margin-left: 10px;
    cursor: pointer;
    color: #888;
}

.close:hover {
    color: #fff;
}
