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

.container {
  width: 500px;
  margin: 20px auto;
}
header {
  margin: 10px auto 10px;
  padding: 10px 0;
  width: 450px;
  border: 2px solid #aaa;
  background-color: #fff;
  border-radius: 5px;
  position: relative;
}

header > h1 {
  text-align: center;
  padding: 5px 0;
  font-size: 55px;
  font-weight: 800;
  letter-spacing: -1;
}
.form {
  background-color: #eee;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  align-items: center;
}

.input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  flex: 1;
}

.input:focus {
  outline: none;
}

.add {
  border: none;
  background-color: #f44336;
  color: white;
  padding: 10px;
  border-radius: 6px;
  margin-left: 10px;
  cursor: pointer;
}

.tasks {
  background-color: #eee;
  margin-top: 20px;
  border-radius: 6px;
  padding: 20px;
}

.tasks .task {
  background-color: white;
  padding: 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s;
  cursor: pointer;
  border: 1px solid #ccc;
}
.tasks .task:not(:last-child) {
  margin-bottom: 15px;
}
.tasks .task:hover {
  background-color: #f7f7f7;
}
.tasks .task.done {
  opacity: 0.5;
}
.tasks .task span {
  font-weight: bold;
  font-size: 10px;
  background-color: red;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.footer {
  padding: 12px 15px;
  background-color: #ffffff;
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 6px;
  margin-top: 15px;
  border: 1px solid #ddd;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}
.count {
  font-weight: 600;
}
.delete-complete {
  background: #ff4d4d;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: 0.3s;
}

.delete-complete:hover {
  background: #e60000;
}
.delete-complete:active {
  transform: scale(0.95);
}

/*DARK MODE */

body.dark {
  background: #121212;
  color: #eee;
}

body.dark .container {
  background: #1e1e1e;
}

body.dark header {
  background: #1e1e1e;
  border-color: #333;
}

body.dark .form {
  background: #2a2a2a;
}

body.dark .input {
  background: #333;
  color: white;
  border: 1px solid #555;
}

body.dark .tasks {
  background: #2a2a2a;
}

body.dark .task {
  background: #1e1e1e;
  border-color: #444;
}

body.dark .task:hover {
  background: #2a2a2a;
}

body.dark .footer {
  background: #1e1e1e;
  border-color: #333;
  color: #ccc;
}

body.dark .filters button {
  background: #333;
  color: #eee;
}

body.dark .filters button.active {
  background: #ff5722;
}

body.dark .delete-complete {
  background: #b71c1c;
}

.dark-toggle {
  position: absolute;
  right: 15px;
  top: 15px;
  border: none;
  background: #333;
  color: white;
  padding: 6px 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

.dark-toggle:hover {
  background: #555;
}

@media (max-width: 400px) {
  .container {
    padding: 15px;
  }
  header h1 {
    font-size: 24px;
  }
}
