/* Highlight active line in CodeMirror */
.CodeMirror-activeline-background {
    background: #353b45;
}
body.light-theme .CodeMirror-activeline-background {
    background: #e0eaff;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #181a1b;
    color: #eee;
    transition: background 0.2s, color 0.2s;
}
body.light-theme {
    background: #f5f5f5;
    color: #222;
}
.main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    min-height: 0;
    padding: 0;
    margin: 0;
    height: 100%;
}
.editor-pane {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
    margin: 0;
}
/* Removed custom .CodeMirror background/color to use CodeMirror's theme defaults */
.header {
    background: #222;
    color: #fff;
    padding: 4px 12px;
    font-size: 0.95em;
    font-weight: bold;
    position: relative;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 36px;
}

.header-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-weight: bold;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.filename-display {
    font-weight: normal;
    font-size: 0.98em;
    color: #bbb;
    margin-left: 0.5em;
    pointer-events: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 180px;
}
body.light-theme .filename-display {
    color: #666;
}

.footer {
    width: 100%;
    background: #23272b;
    color: #fff;
    padding: 4px 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-top: 1px solid #333;
    min-height: 28px;
    font-size: 0.95em;
}

.save-btn {
    /* No margin needed, align left in footer */
}

.theme-switcher {
    margin-left: auto;
}

.save-btn {
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 1em;
}

.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    aspect-ratio: 1/1;
    font-size: 1.3em;
    line-height: 1;
    padding: 0;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

body.light-theme .theme-switcher {
    background: #ddd;
    color: #222;
}

body.light-theme .header {
    background: #eaeaea;
    color: #222;
}
