/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f4f9;
    padding: 20px;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Input Section */
.input-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    align-self: flex-start;
}

button:hover {
    background-color: #218838;
}

/* Error Message  */
#error-msg {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}
.hidden {
    display: none;
}

/* Notes Grid - Responsive Design  */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Note Card [cite: 18] */
.note-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}

.note-content {
    margin-bottom: 15px;
    white-space: pre-wrap; /* Preserves line breaks */
}

.note-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.edit-btn {
    background-color: #ffc107;
    color: #000;
}

.delete-btn {
    background-color: #dc3545;
}

/* Edit  Textarea */
.edit-textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
}