/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
  background-color: #f8f9fa;
}

h1 {
  margin-bottom: 20px;
  color: #333;
}

/* Add Task Section */
.add-task {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

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

.add-task input:focus {
  outline: none;
  border-color: #4A90E2;
}

.add-task button {
  padding: 10px 20px;
  background-color: #4A90E2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.add-task button:hover {
  background-color: #357ABD;
}

.add-task button:active {
  background-color: #2868A6;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-buttons button {
  padding: 8px 16px;
  border: 2px solid #ccc;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

.filter-buttons button:hover {
  background-color: #f5f5f5;
}

.view-selected {
  border: 4px solid red !important;
}

/* Task List */
.task-list {
  list-style: none;
  background: white;
  border-radius: 4px;
  overflow: hidden;
}

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

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

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

.task-text {
  flex: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.task-text:hover {
  background-color: #f5f5f5;
}

.task-text.completed {
  text-decoration: line-through;
  color: #999;
}

.task-edit-input {
  flex: 1;
  padding: 4px 8px;
  border: 2px solid #4A90E2;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}

.task-edit-input:focus {
  outline: none;
  border-color: #357ABD;
}

.delete-btn {
  padding: 6px 12px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

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

.delete-btn:active {
  background-color: #bd2130;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}
