body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #007bff;
    margin-bottom: 30px;
}

/* --- Форма добавления --- */
.note-form-container {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    background-color: #fafafa;
}

.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 600;
    }

input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

textarea {
    resize: vertical;
}

/* Кнопки */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.primary-btn {
    background-color: #007bff;
    color: white;
}

    .primary-btn:hover {
        background-color: #0056b3;
    }

/* --- Список заметок --- */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

    .note-item:hover {
        transform: translateY(-2px);
    }

.note-content {
    flex-grow: 1;
    margin-right: 15px;
}

.note-text {
    font-size: 16px;
    margin-bottom: 8px;
    white-space: pre-wrap; /* Сохраняем переносы строк */
}

.note-date {
    font-size: 0.9em;
    color: #6c757d;
    display: block;
    margin-bottom: 10px;
}

.note-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кнопка "Готово" (Чекбокс) */
.complete-btn {
    background: #e9ecef;
    color: #6c757d;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 2px solid #ccc;
    transition: all 0.2s;
}

    .complete-btn.completed {
        background-color: #28a745; /* Зеленый */
        color: white;
        border-color: #1e7e34;
    }

.note-item.completed .note-text {
    text-decoration: line-through;
    color: #999;
}

/* Кнопка "Удалить" */
.delete-btn {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

    .delete-btn:hover {
        background-color: #c82333;
    }



/* Стили для Drag and Drop */
.note-item[draggable="true"] {
    cursor: grab;
}

.note-item.dragging {
    opacity: 0.5;
    border: 2px dashed #007bff;
    transform: scale(1.02);
}

/* Стили для редактирования */
.edit-btn {
    background: #ffc107;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

    .edit-btn:hover {
        background: #e0a800;
    }

/* --- Модальное окно Редактирования --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

    .close-btn:hover,
    .close-btn:focus {
        color: #000;
        text-decoration: none;
        cursor: pointer;
    }