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

body {
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  max-width: 540px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #444;
}

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

#todo-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

#todo-input:focus {
  outline: none;
  border-color: #6c8ebf;
  box-shadow: 0 0 0 2px rgba(108,142,191,0.25);
}

button {
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}

#todo-form button {
  background: #6c8ebf;
  color: #fff;
}

#todo-form button:hover { background: #5a7aab; }

.filters {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-btn {
  background: #e0e0e0;
  color: #555;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
}

.filter-btn:hover { background: #cacaca; }
.filter-btn.active { background: #6c8ebf; color: #fff; }

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

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}

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

.todo-title {
  flex: 1;
  font-size: 1rem;
  word-break: break-word;
}

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

.delete-btn {
  background: transparent;
  color: #c0392b;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

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

#empty-msg {
  text-align: center;
  color: #999;
  margin-top: 1.5rem;
}

.hidden { display: none; }
