* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f1f3f4;
}

.app {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 230px;
    background: white;
    padding: 20px;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar h2 {
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.sidebar li.active,
.sidebar li:hover {
    background: #e8f0fe;
}

#darkModeBtn {
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.main {
    flex: 1;
    padding: 20px 40px;
    overflow-y: auto;
}

.topbar {
    margin-bottom: 20px;
}

.topbar input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.create-note {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.create-note textarea {
    width: 100%;
    border: none;
    resize: none;
    outline: none;
    font-size: 16px;
    min-height: 60px;
}

#addNoteBtn {
    margin-top: 10px;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #1a73e8;
    color: white;
    cursor: pointer;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.note-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.note-card:hover {
    transform: translateY(-5px);
}

.note-card p {
    white-space: pre-wrap;
}

.card-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.card-actions button {
    padding: 5px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn {
    background: #34a853;
    color: white;
}

.delete-btn {
    background: #ea4335;
    color: white;
}
