/* ========== Reset & Base ========== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f7fa;
  color: #333;
}

/* ========== App Layout ========== */
.app {
  max-width: 480px;
  margin: 40px auto;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ========== Header ========== */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
}

header p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #666;
}

/* ========== Task Input ========== */
.task-input {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.task-input input {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.task-input button {
  padding: 10px 14px;
  border-radius: 6px;
  border: none;
  background: #4f46e5;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
}

.task-input button:hover {
  background: #4338ca;
}

/* ========== Task List ========== */
.task-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

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

.task-list input[type="checkbox"] {
  cursor: pointer;
}

.task-list span {
  flex: 1;
  font-size: 14px;
  cursor: pointer;
}

/* Completed task */
.task-list input:checked + span {
  text-decoration: line-through;
  color: #999;
}

/* Delete button */
.deleteBtn {
  cursor: pointer;
  color: #e11d48;
  font-size: 14px;
}

.deleteBtn:hover {
  color: #be123c;
}

/* ========== Footer ========== */
footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #555;
}

/* ========== Filters ========== */
.filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.filter-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
  .app {
    margin: 20px;
    padding: 16px;
  }
}
