:root { --bg: #202124; --card: #2d2e30; --text: #e8eaed; --primary: #f1c40f; }

body { background-color: var(--bg); color: var(--text); font-family: 'Segoe UI', sans-serif; display: flex; justify-content: center; padding: 40px; }
.notes-app { width: 600px; }

.note-input { background: var(--card); padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.3); margin-bottom: 30px; display: flex; flex-direction: column; gap: 10px; }
.note-input input { background: transparent; border: none; color: white; font-weight: bold; font-size: 1.1rem; }
.note-input textarea { background: transparent; border: none; color: #ccc; resize: none; outline: none; font-size: 0.9rem; }
.note-input button { background: var(--primary); border: none; padding: 8px; border-radius: 4px; font-weight: bold; cursor: pointer; align-self: flex-end; }

/* The masonry grid layout */
.notes-grid { column-count: 2; column-gap: 15px; }

.note-card {
    background: var(--card);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    break-inside: avoid;
    position: relative;
    transition: box-shadow 0.2s;
}

.note-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.note-card h4 { margin: 0 0 10px 0; color: #fff; }
.note-card p { font-size: 0.9rem; color: #aaa; white-space: pre-wrap; }
.note-card .meta { font-size: 0.7rem; color: #666; margin-top: 10px; }

.note-delete { position: absolute; top: 10px; right: 10px; color: #ff4757; cursor: pointer; opacity: 0; }
.note-card:hover .note-delete { opacity: 1; }