:root {
  --bg: #fafafa;
  --card: #fff;
  --text: #333;
  --primary: #0066ff;
  --done: #999;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  font-family: "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.todo-app {
  background: var(--card);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
  margin-bottom: 1rem;
  color: var(--text);
  text-align: center;
}

#todo-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#new-task {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#todo-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

#todo-form button:hover {
  opacity: 0.8;
}

#tasks {
  list-style: none;
}

.task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

.task.done .text {
  color: var(--done);
  text-decoration: line-through;
}

.task .actions button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
  font-size: 1rem;
}
