/* Base Styles (Light Theme) */
body {
    font-family: monospace; /* Use monospace font for vi style */
    background-color: #ffffff;
    color: #000000;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#top-buttons {
    display: flex;
    align-items: center;
}

#top-buttons button {
    margin-right: 0px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    color: inherit;
}

#note-editor {
    position: fixed;
    top: 22px;
    left: 0;
    width: 100%;
    height: calc(100vh - 30px);
    overflow: auto;
    padding: 10px;
}

.text-button {
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0 5px;
    cursor: pointer;
    font-family: monospace;
}

h2 {
    font-weight: bold;
    font-size: inherit;
    color: inherit;
}

#editor-lines {
    list-style: none;
    padding: 0;
}

#editor-lines li,
#notes-list li {
    padding: 0px;
    cursor: pointer;
    min-height: 1.3em; /* Ensure empty lines have height */
    white-space: pre; /* Preserve whitespace */
    color: inherit;
}

#editor-lines li.current-line,
#notes-list li.current-line {
    background-color: #e0e0e0;
}

#editor-lines li.title-line {
    font-weight: bold;
}

#command-buttons {
    margin-top: 5px;
}

#command-buttons button {
    margin-right: 5px;
}

.editor-input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    font-family: monospace;
    font-size: inherit;
    border: 0px solid transparent;
    outline: none;
    background-color: transparent;
    color: inherit;
    padding: 0px;
}

.editor-input:focus {
    border-color: #007BFF;
    border: none;
    padding: 0px;
}

#notes-list {
    list-style: none;
    padding: 0;
}

input[type="text"] {
    font-family: monospace;
    font-size: inherit;
    background-color: transparent;
    color: inherit;
    border: 1px solid #ccc;
    padding: 2px 4px;
}

#status-line {
    background-color: #f0f0f0;
    font-family: monospace;
    border-top: 1px solid #ccc;
    color: #000000;
    margin-left: 10px;
}

/* Dark Theme Styles */
.dark body {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.dark #top-buttons button,
.dark .text-button,
.dark h2,
.dark #editor-lines li,
.dark #notes-list li,
.dark input[type="text"],
.dark #status-line {
    color: #d4d4d4; /* Light text for dark background */
}

.dark #top-buttons button {
    background-color: #333333;
}

.dark .text-button {
    background-color: transparent;
    border-bottom: 1px solid #444444;
}

.dark #editor-lines li.current-line,
.dark #notes-list li.current-line {
    background-color: #333333;
}

.dark #editor-lines li.title-line {
    font-weight: bold;
    color: #ffffff;
}

.dark #command-buttons button {
    background-color: #333333;
    color: #d4d4d4;
    border: 1px solid #444444;
}

.dark .editor-input {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border: 0 solid #444444;
}

.dark input[type="text"] {
    background-color: #2d2d2d;
    color: #d4d4d4;
    border: 1px solid #555555;
}

.dark #status-line {
    background-color: #2d2d2d;
    border-top: 1px solid #444444;
    color: #d4d4d4;
}

/* Button Hover Effects (Dark Theme) */
.dark #top-buttons button:hover,
.dark #command-buttons button:hover {
    background-color: #444444;
}
