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

body {
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

#add-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#new-todo {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#new-todo:focus { border-color: #4f46e5; }

button[type="submit"] {
  padding: 0.6rem 1.2rem;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover { background: #4338ca; }

#todo-list { list-style: none; }

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.todo-item:last-child { border-bottom: none; }

.todo-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4f46e5;
}

.todo-item label {
  flex: 1;
  font-size: 1rem;
  color: #1a1a1a;
  cursor: pointer;
  transition: color 0.2s;
}

.todo-item.done label {
  text-decoration: line-through;
  color: #aaa;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 0 0.2rem;
}

.delete-btn:hover { color: #e53e3e; }

.empty {
  text-align: center;
  color: #aaa;
  padding: 2rem 0;
  font-size: 0.95rem;
}
