/* assets/css/style.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #121212;
    color: #f5f5f5;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1f1f1f;
    border-bottom: 1px solid #333;
}

.topbar-left h1 {
    margin: 0;
    font-size: 20px;
}

.subtitle {
    display: block;
    font-size: 12px;
    color: #aaa;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.topbar-right select {
    padding: 4px 6px;
    background: #181818;
    color: #f5f5f5;
    border: 1px solid #444;
    border-radius: 4px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px;
    background: #181818;
    border-bottom: 1px solid #333;
}

.toolbar-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.toolbar button {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #262626;
    color: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
}

.toolbar button:hover {
    background: #333;
}

.toolbar select,
.toolbar input[type="text"] {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #181818;
    color: #f5f5f5;
    font-size: 13px;
}

.toolbar input::placeholder {
    color: #777;
}

.editor-container {
    display: flex;
    min-height: calc(100vh - 120px);
}

.editor-pane,
.preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
}

.preview-pane {
    border-right: none;
}

.editor-pane h2,
.preview-pane h2 {
    margin: 0;
    padding: 8px 12px;
    background: #181818;
    border-bottom: 1px solid #333;
    font-size: 14px;
    color: #ddd;
}

#editor {
    flex: 1;
    width: 100%;
    border: none;
    padding: 12px;
    resize: none;
    outline: none;
    background: #151515;
    color: #f5f5f5;
    font-family: "Fira Code", "Consolas", monospace;
    font-size: 16px;
    line-height: 1.45;
}

#preview {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #121212;
    color: #f5f5f5;
    font-size: 16px;
    line-height: 1.6;
}

/* Basic Markdown Styling */
#preview h1 {
    font-size: 1.8em;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}

#preview h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #333;
    padding-bottom: 3px;
}

#preview h3 {
    font-size: 1.3em;
}

#preview code {
    background: #1e1e1e;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: "Fira Code", "Consolas", monospace;
}

#preview pre {
    background: #1e1e1e;
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
}

#preview pre code {
    background: transparent;
    padding: 0;
}

#preview blockquote {
    border-left: 3px solid #555;
    padding-left: 10px;
    color: #ccc;
    margin-left: 0;
}

#preview a {
    color: #4ea1ff;
    text-decoration: none;
}

#preview a:hover {
    text-decoration: underline;
}

#preview ul,
#preview ol {
    padding-left: 24px;
}

@media (max-width: 900px) {
    .editor-container {
        flex-direction: column;
    }
    .editor-pane,
    .preview-pane {
        border-right: none;
        border-bottom: 1px solid #333;
    }
}
