/* General styles */
body {
  font-family: sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  flex: 1;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 24px;
  margin: 0;
}

.settings-icon {
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.3s;
}

.settings-icon:hover {
  transform: rotate(90deg);
}

/* Task Form */
#taskForm {
  margin-bottom: 20px;
}

#taskInput {
  width: 100%;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

/* Task List */
#taskList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#taskList li {
  display: flex;
  align-items: center;
  padding: 15px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s, border-bottom-color 0.3s;
}

#taskList li:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#taskList li:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border-bottom: none;
}

#taskList li input[type="checkbox"] {
  margin-right: 15px;
  width: 20px;
  height: 20px;
}

#taskList li.completed label {
  text-decoration: line-through;
  color: #aaa;
}

#taskList li .editInput {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

#taskList li .buttons {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #fff;
}

body.dark-mode #taskInput {
  background-color: #333;
  color: #fff;
  border-color: #444;
}

body.dark-mode #taskList li {
  background-color: #222;
  border-bottom-color: #333;
}

body.dark-mode #taskList li.completed label {
  color: #888;
}
