* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 16px;
  background: #f2f4f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  color: #1f2430;
}

.app {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 28px;
}

h1 {
  margin: 0 0 20px;
  font-size: 24px;
  text-align: center;
}

.todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

#todo-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d7dbe0;
  border-radius: 8px;
  outline: none;
}

#todo-input:focus {
  border-color: #4a6bff;
}

.todo-form button {
  padding: 10px 16px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  background: #4a6bff;
  color: #fff;
  cursor: pointer;
}

.todo-form button:hover {
  background: #3956d6;
}

.filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid #d7dbe0;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
}

.filter-btn.active {
  background: #4a6bff;
  border-color: #4a6bff;
  color: #fff;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 40px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #eef0f3;
}

.todo-item:last-child {
  border-bottom: none;
}

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

.todo-text {
  flex: 1;
  font-size: 15px;
  word-break: break-word;
  cursor: pointer;
}

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

.delete-btn {
  border: none;
  background: transparent;
  color: #c0c4cc;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}

.delete-btn:hover {
  color: #ff4d4f;
}

.empty-msg {
  text-align: center;
  color: #b0b4bb;
  font-size: 14px;
  padding: 24px 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef0f3;
  font-size: 13px;
  color: #888;
}

#clear-completed {
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 13px;
}

#clear-completed:hover {
  color: #ff4d4f;
}
