* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(160deg, #f4f6fb 0%, #e9edf7 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.app {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(30, 40, 80, 0.12);
  padding: 32px;
}

h1 {
  margin: 0 0 24px;
  font-size: 28px;
  font-weight: 700;
  color: #1f2440;
  text-align: center;
}

#add-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#task-input {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #e2e5f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
}

#task-input:focus {
  border-color: #6c5ce7;
}

#add-form button {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: #6c5ce7;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
}

#add-form button:hover {
  background: #5849c4;
}

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

.filter-btn {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 20px;
  background: #f0f1f7;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn.active {
  background: #6c5ce7;
  color: white;
}

#task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 60px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid #eef0f7;
}

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

.task-checkbox {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #6c5ce7;
}

.task-text {
  flex: 1;
  font-size: 16px;
  color: #1f2440;
  word-break: break-word;
  cursor: text;
}

.task-item.done .task-text {
  text-decoration: line-through;
  color: #a6a9bd;
}

.delete-btn {
  border: none;
  background: transparent;
  color: #c7c9d9;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.delete-btn:hover {
  color: #e05656;
  background: #fdeeee;
}

.empty-state {
  text-align: center;
  color: #a6a9bd;
  padding: 40px 0;
  font-size: 15px;
}

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

#clear-completed {
  border: none;
  background: transparent;
  color: #8a8da3;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

#clear-completed:hover {
  color: #6c5ce7;
}
