/* GLOBAL */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    transition: background 0.25s, color 0.25s;
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg2);
    border-bottom: 2px solid var(--border);
}

.header h1 {
    margin: 0;
    font-weight: 600;
}

.theme-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #00000022;
}

/* LAYOUT */
.app {
    display: flex;
    height: calc(100vh - 60px);
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--bg2);
    color: var(--text);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--border);
}

#notesList {
    flex: 1;
    overflow-y: auto;
}

.note-item {
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 6px;
}

.note-item:hover {
    background: var(--hover);
}

.add-btn {
    width: 100%;
    padding: 10px;
    font-size: 22px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* EDITOR */
.editor {
    flex: 1;
    padding: 20px;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

#noteTitle,
#noteContent {
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 6px;
}

#noteTitle {
    font-size: 22px;
    margin-bottom: 10px;
}

#noteContent {
    flex: 1;
    resize: none;
}

.save-btn {
    margin-top: 10px;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* THEMES */
:root {
    --bg: #ffffff;
    --bg2: #f2f2f2;
    --text: #000000;
    --border: #cccccc;
    --hover: #e6e6e6;
    --accent: #007bff;
}

body.dark {
    --bg: #1e1e1e;
    --bg2: #2a2a2a;
    --text: #ffffff;
    --border: #444;
    --hover: #333;
    --accent: #4a90e2;
}

body.red { --accent:#ff4d4d; --bg:#fff5f5; --bg2:#ffe5e5; }
body.blue { --accent:#4d79ff; --bg:#f5f7ff; --bg2:#e5e9ff; }
body.yellow { --accent:#ffcc00; --bg:#fffbe6; --bg2:#fff4b3; }
body.green { --accent:#33cc66; --bg:#f2fff5; --bg2:#d9ffe5; }
body.purple { --accent:#b366ff; --bg:#faf5ff; --bg2:#f0e0ff; }
body.pink { --accent:#ff66b3; --bg:#fff5fa; --bg2:#ffe0f0; }
body.orange { --accent:#ff944d; --bg:#fff7f0; --bg2:#ffe3cc; }
body.brown { --accent:#a97458; --bg:#f7f2ef; --bg2:#e8dcd5; }

.delete-note {
    float: right;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.delete-note:hover {
    opacity: 1;
}

.note-item {
    transition: background 0.2s, transform 0.15s;
}

.note-item:hover {
    background: var(--hover);
    transform: translateX(3px);
}

.add-btn, .save-btn {
    transition: transform 0.15s, opacity 0.2s;
}

.add-btn:hover, .save-btn:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.color-btn {
    transition: transform 0.15s, box-shadow 0.2s;
}

.color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 6px #0003;
}

.editor {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

:root {
    --bg: #ffffff;
    --bg2: #f2f2f2;
    --text: #000000;
    --border: #cccccc;
    --hover: #e6e6e6;
    --accent: #007bff;
}

body.brown {
    --accent:#a97458;
    --bg:#f7f2ef;
    --bg2:#e8dcd5;
    --text:#2b1c14;
    --border:#c8b6a8;
    --hover:#e1d3c8;
}
