html,
body {
  height: 100vh;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Comfortaa", sans-serif;
  background-color: #f4f4f4;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header"
    "main"
    "footer";
  min-height: 100vh;
}
header {
  background-color: #4caf50;
  color: white;
  padding: 10px 0;
  text-align: center;
  grid-area: header;
}

main {
  padding: 20px;
  grid-area: main;
  width: 70%;
  margin: 0 auto;
}
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 10px 0;
  position: relative;
  bottom: 0;
  width: 100%;
  grid-area: footer;
}

.Search-section,
.Add-section,
.taskList-section {
  margin-bottom: 20px;
  padding: 15px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

#searchInput,
#taskInput {
  width: 70%;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}
#addTaskButton {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
}

#addTaskButton:hover {
  background-color: #45a049;
}

#taskList {
  list-style: none;
  padding: 0;
  margin: 0;
}
#taskList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

li {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

li:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-color: #d1d5db;
}

.deleteBtn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.deleteBtn:hover {
  background: #dc2626;
  transform: scale(1.05);
}
li input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}
li p {
  flex-grow: 1;
  margin: 0;
  font-size: 16px;
  color: #374151;
  font-weight: 400;
}

li p[style*="line-through"] {
  color: #9ca3af;
  opacity: 0.7;
}
li:has(input[type="checkbox"]:checked) {
  background: #f9fafb;
  border-color: #d1fae5;
}
