body {
    font-family: monospace;
    background: #fafafa;
    padding: 40px;
    color: #333;
}

.top-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav a {
    background: #333;
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.top-nav a:hover {
    background: #555;
}

.top-nav a.active {
    background: #0b63d6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

#noteTitle {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    font-family: monospace;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    margin-bottom: 10px;
    font-family: monospace;
}

button {
    background: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: monospace;
}

button:hover {
    background: #555;
}

#notesContainer {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.note-item {
    padding: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    background: #fff;
}

.note-item:hover {
    background: #f5f5f5;
}

.note-item.active {
    background: #e6f0ff;
    border-color: #a6c8ff;
}

.no-notes {
    color: #666;
    font-style: italic;
    padding: 6px;
}

/* Note list layout */
.note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.note-left {
    flex: 1 1 auto;
    padding-right: 10px;
    cursor: pointer;
}

.note-title {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-preview {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.note-controls button {
    background: transparent;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    font-family: monospace;
    border-radius: 4px;
    color: #333;
}

.note-controls button:hover {
    background: #f0f0f0;
}

.note-item.drag-over {
    border-style: dashed;
}

.note-item.drag-after {
    box-shadow: inset 0 -3px 0 0 rgba(0, 123, 255, 0.25);
}

.note-item.dragging {
    opacity: 0.5;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    width: 92%;
    max-width: 720px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal .modal-close {
    position: absolute;
    right: 8px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
}

.modal input,
.modal textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    font-family: monospace;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@media (min-width: 800px) {
    .container {
        max-width: 900px;
    }
}

.notes-hint {
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}
