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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f4f4f5;
  color: #18181b;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.app {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  align-self: flex-start;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

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

#todo-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  font-size: 1rem;
}

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

button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: #6366f1;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

button:hover {
  background: #4f46e5;
}

#todo-list {
  list-style: none;
  margin-bottom: 1rem;
}

#todo-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f2;
}

#todo-list li.completed .task-text {
  text-decoration: line-through;
  color: #a1a1aa;
}

.task-text {
  flex: 1;
  word-break: break-word;
}

.delete-btn {
  background: transparent;
  color: #ef4444;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

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

.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #71717a;
}

.filters button {
  background: transparent;
  color: #71717a;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.filters button:hover {
  background: #f4f4f5;
}

.filters button.active {
  background: #eef2ff;
  color: #4f46e5;
}

#todo-count {
  margin-left: auto;
}