/* =========================================
   GLOBAL LAYOUT (Obsidian Simulator)
   ========================================= */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1e1e1e;
    color: #dcddde;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    height: 40px;
    background-color: #2f3136;
    border-bottom: 1px solid #202225;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    flex-shrink: 0;
}

.header-title {
    font-weight: bold;
    font-size: 0.9em;
}

.header-controls button {
    background: #4f545c;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 5px;
}
.header-controls button:hover { background: #5d6269; }

.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.pane {
    flex: 1;
    height: 100%;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}

.editor-pane {
    border-right: 1px solid #202225;
    background-color: #202225;
}

.preview-pane {
    background-color: #2f3136;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-content-wrapper {
    width: 100%;
    max-width: 800px;
}

/* MARKDOWN EDITOR & PREVIEW TEXT */
#mdEditor {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #dcddde;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

#mdPreview { color: #dcddde; width: 100%; }
#mdPreview h1, #mdPreview h2, #mdPreview h3 { border-bottom: 1px solid #444; padding-bottom: 5px; margin-top: 20px; }
#mdPreview p { line-height: 1.6; margin-bottom: 15px; }
#mdPreview ul, #mdPreview ol { padding-left: 20px; line-height: 1.6; }
#mdPreview code { background: #202225; padding: 2px 4px; border-radius: 3px; font-family: monospace; color: #e06c75; }
#mdPreview pre { background: #202225; padding: 10px; border-radius: 5px; overflow-x: auto; }
#mdPreview pre code { background: transparent; color: #abb2bf; padding: 0; }

/* PRINT STYLES */
@media print {
    .app-header, .editor-pane, .full-screen-modal, .modal, .btn-edit-block, .plot-controls, .simpletable-toolbar { display: none !important; }
    body, html, .app-container, .workspace { height: auto !important; overflow: visible !important; background: white !important; color: black !important; display: block !important; }
    .preview-pane { width: 100% !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; background: white !important; position: static !important; display: block !important; }
    .preview-content-wrapper { max-width: 100% !important; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}