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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

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

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 24px;
}

#todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

#todo-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  color: #111827;
}

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

#todo-form button {
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

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

#todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.15s;
}

.todo-item:hover {
  border-color: #c7d2fe;
}

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

.todo-item label {
  flex: 1;
  font-size: 0.95rem;
  color: #374151;
  cursor: pointer;
  word-break: break-word;
}

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

.delete-btn {
  background: none;
  border: none;
  color: #d1d5db;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.delete-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

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