.todo-app {
max-width: 500px;
margin: 2rem auto;
padding: 1.5rem;
border: 1px solid #ddd;
border-radius: 8px;
background: white;
}
.todo-app h2 {
text-align: center;
margin-bottom: 1.25rem;
}
#addTaskForm {
display: flex;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
#addTaskForm input {
flex: 1;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
#addTaskForm button {
padding: 0.5rem 1rem;
background: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
#taskList {
list-style: none;
padding: 0;
}
#taskList li {
display: flex;
align-items: center;
padding: 0.75rem 0;
border-bottom: 1px solid #eee;
}
#taskList input[type="checkbox"] {
margin-right: 0.75rem;
}
.task-text {
flex: 1;
font-size: 1rem;
}
.task-text.completed {
text-decoration: line-through;
color: #888;
}
.delete-btn {
background: none;
border: none;
color: #dc3545;
font-size: 1.2rem;
cursor: pointer;
padding: 0 0.5rem;
}
.todo-app {
max-width: 500px;
margin: 2rem auto;
padding: 1.5rem;
border: 1px solid #ddd;
border-radius: 8px;
background: white;
}
.todo-app h2 {
text-align: center;
margin-bottom: 1.25rem;
}
#addTaskForm {
display: flex;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
#addTaskForm input {
flex: 1;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
#addTaskForm button {
padding: 0.5rem 1rem;
background: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
#taskList {
list-style: none;
padding: 0;
}
#taskList li {
display: flex;
align-items: center;
padding: 0.75rem 0;
border-bottom: 1px solid #eee;
}
#taskList input[type="checkbox"] {
margin-right: 0.75rem;
}
.task-text {
flex: 1;
font-size: 1rem;
}
.task-text.completed {
text-decoration: line-through;
color: #888;
}
.delete-btn {
background: none;
border: none;
color: #dc3545;
font-size: 1.2rem;
cursor: pointer;
padding: 0 0.5rem;
}