body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef2f7;
  color: #222;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
}

.container h1 {
  margin: 0;
}

.subtitle {
  margin: 0;
  color: #555;
}

.todo-app {
  width: 100%;
  max-width: 500px;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.input-row {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.remaining-count {
  margin: 0 0 1rem;
  color: #555;
  text-align: left;
}

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

input:focus {
  outline: 2px solid #a8d1ff;
  border-color: #0078d4;
}

button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #0078d4;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: #005ea6;
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e7e7e7;
}

.todo-text {
  flex: 1;
  text-align: left;
  line-height: 1.4;
}

.todo-item.completed .todo-text {
  color: #777;
  text-decoration: line-through;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.delete-button {
  background: #d9534f;
}

.delete-button:hover {
  background: #b63d39;
}

.filter-button {
  padding: 0.6rem 1rem;
  background: #d9e9fb;
  color: #12426f;
}

.filter-button:hover {
  background: #bfdcff;
}

.active-filter {
  background: #0078d4;
  color: #fff;
}

.active-filter:hover {
  background: #005ea6;
}

@media (max-width: 520px) {
  .input-row,
  .todo-item {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    justify-content: stretch;
  }

  .actions button {
    width: 100%;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-row button {
    width: 100%;
  }

  .remaining-count {
    text-align: center;
  }
}
