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

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

.container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.1);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
}

h1 {
  font-size: 1.8rem;
  color: #1a1a2e;
  margin-bottom: 1.25rem;
  text-align: center;
  letter-spacing: -0.5px;
}

#todo-form {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

#todo-input {
  flex: 1;
  padding: .6rem .9rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
}

#todo-input:focus { border-color: #6366f1; }

#todo-form button {
  padding: .6rem 1.1rem;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s;
}

#todo-form button:hover { background: #4f46e5; }

#todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .8rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: background .15s;
}

.todo-item:hover { background: #f1f3f9; }

.todo-item input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #6366f1;
  cursor: pointer;
  flex-shrink: 0;
}

.todo-item .text {
  flex: 1;
  font-size: .98rem;
  color: #374151;
  word-break: break-word;
}

.todo-item.done .text {
  text-decoration: line-through;
  color: #9ca3af;
}

.todo-item .delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: .15rem .35rem;
  border-radius: 5px;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.todo-item .delete-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.empty-state {
  text-align: center;
  color: #9ca3af;
  font-size: .95rem;
  padding: 1.5rem 0;
}
