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

body {
    background: linear-gradient(120deg, #a1c4fd, #c2e9fb);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    padding: 25px;
    background: #6c7ae0;
    color: white;
}

h1 {
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.input-section {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

button {
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #303f9f;
}

.todos-container {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

#todo-list {
    list-style-type: none;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.todo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #6c757d;
}

.todo-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.todo-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.todo-text {
    font-size: 16px;
    word-break: break-word;
}

.todo-actions {
    display: flex;
    gap: 10px;
}

.todo-actions button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    color: #6c7ae0;
}

.todo-actions button:hover {
    color: #3f51b5;
    background: none;
}

.edit-btn {
    color: #ffc107 !important;
}

.delete-btn {
    color: #dc3545 !important;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 25px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

#edit-input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#save-edit {
    width: 100%;
    padding: 12px;
}

/* Created date display */
.todo-date {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

/* Loading indicator */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3f51b5;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}