/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #74ebd5 0%, #9face6 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: background 0.3s ease;
}

.todo-container {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  width: 400px;
  color: #333;
  transition: background 0.3s ease, color 0.3s ease;
}

h2 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 24px;
}

/* Top Buttons */
.top-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

#toggleTheme, #clearAll {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#toggleTheme {
  background: #333;
  color: #fff;
}

#clearAll {
  background: crimson;
  color: #fff;
}

#toggleTheme:hover {
  background: #555;
}

#clearAll:hover {
  background: darkred;
}

/* Input Section */
.input-section {
  display: flex;
  margin-bottom: 15px;
}

input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px 0 0 10px;
  outline: none;
  font-size: 14px;
}

button {
  padding: 12px 18px;
  border: none;
  background: #28a745;
  color: #fff;
  cursor: pointer;
  border-radius: 0 10px 10px 0;
  font-weight: 600;
}

button:hover {
  background: #218838;
}

/* Task List */
ul {
  list-style: none;
  padding: 0;
  max-height: 250px;
  overflow-y: auto;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.3);
  margin: 6px 0;
  padding: 12px;
  border-radius: 10px;
  font-size: 15px;
  transition: 0.3s;
}

li.completed {
  text-decoration: line-through;
  color: #666;
  background: rgba(200, 200, 200, 0.3);
}

.delete-btn {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: 0.3s;
}

.delete-btn:hover {
  background: #cc0000;
}

/* Task Stats */
.task-stats {
  margin-top: 15px;
  padding: 10px;
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

/* Dark Mode */
body.dark {
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
}

body.dark .todo-container {
  background: rgba(34, 34, 34, 0.8);
  color: #fff;
}

body.dark li {
  background: rgba(60, 60, 60, 0.7);
  color: #fff;
}

body.dark input {
  background: #555;
  color: #fff;
}

body.dark button {
  background: #28a745;
}

body.dark #toggleTheme {
  background: #fff;
  color: #333;
}

body.dark .task-stats {
  background: rgba(80,80,80,0.6);
}
