* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 480px;
  padding: 32px 28px 20px;
}

/* 头部 */
header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 24px;
  color: #1d1d1f;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: #999;
}

/* 添加区域 */
.add-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.add-section input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.add-section input:focus {
  border-color: #667eea;
}

.add-section button {
  padding: 12px 20px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.add-section button:hover {
  background: #5a6fd6;
}

/* 筛选按钮 */
.filter-section {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 6px 16px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.filter-btn.active {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}

.filter-btn:hover:not(.active) {
  border-color: #667eea;
  color: #667eea;
}

/* 任务列表 */
.task-list {
  list-style: none;
  min-height: 100px;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 10px;
  background: #f9f9fb;
  margin-bottom: 8px;
  transition: all 0.2s;
  animation: slideIn 0.25s ease;
}

.task-list li:hover {
  background: #f0f0f8;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 复选框 */
.task-list input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #667eea;
  cursor: pointer;
  flex-shrink: 0;
}

/* 任务文字 */
.task-list .text {
  flex: 1;
  font-size: 15px;
  color: #333;
  word-break: break-all;
}

.task-list li.done .text {
  text-decoration: line-through;
  color: #bbb;
}

/* 删除按钮 */
.task-list .delete-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #ccc;
  flex-shrink: 0;
  padding: 4px;
  transition: color 0.2s;
  line-height: 1;
}

.task-list .delete-btn:hover {
  color: #e74c3c;
}

/* 空状态 */
.empty-state {
  text-align: center;
  color: #ccc;
  padding: 40px 0;
  font-size: 14px;
}

/* 底部 */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #999;
}

#clearDone {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 13px;
}

#clearDone:hover {
  color: #e74c3c;
}
