* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background-color: #f4f4f4;
  color: #333;
  transition: all 0.3s ease;
}

.container {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  background: #fff;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.top-bar {
  display: flex;
  gap: 10px;
}

#taskInput {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#addBtn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background-color: #007bff;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.filters {
  margin: 15px 0;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.filter {
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background: #eee;
  transition: 0.3s;
}

.filter.active {
  background-color: #007bff;
  color: white;
}

ul#taskList {
  list-style: none;
  margin-top: 10px;
}

ul#taskList li {
  display: flex;
  justify-content: space-between;
  background: #f9f9f9;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  align-items: center;
  transition: all 0.2s ease;
}

ul#taskList li.completed {
  text-decoration: line-through;
  opacity: 0.6;
}

.actions button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  font-size: 16px;
}

.bottom-bar {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#clearAll {
  cursor: pointer;
  color: red;
  font-weight: bold;
}

.dark {
  background-color: #121212;
  color: #f0f0f0;
}

.dark .container {
  background-color: #1e1e1e;
}

.dark input, .dark button, .dark li {
  background-color: #2c2c2c;
  color: #f0f0f0;
}

.dark .filter.active {
  background-color: #00bcd4;
}
body.dark #toggleMode::before {
  content: '☀️';
}

body:not(.dark) #toggleMode::before {
  content: '🌙';
}
