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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

h1 {
  font-size: 1.6rem;
  color: #4a90d9;
  margin-bottom: 20px;
  text-align: center;
}

.input-area {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-area input:focus {
  border-color: #4a90d9;
}

.input-area button {
  padding: 10px 18px;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.input-area button:hover {
  background: #357abd;
}

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

.filter-btn {
  flex: 1;
  padding: 7px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

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

#taskList {
  list-style: none;
  min-height: 60px;
}

#taskList li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-bottom: 1px solid #f0f0f0;
  transition: opacity 0.2s;
}

#taskList li:last-child {
  border-bottom: none;
}

#taskList li.done .task-text {
  text-decoration: line-through;
  color: #aaa;
}

.check-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #4a90d9;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  transition: all 0.2s;
}

li.done .check-btn {
  background: #4a90d9;
}

.task-text {
  flex: 1;
  font-size: 1rem;
  word-break: break-word;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

#remaining {
  font-size: 0.85rem;
  color: #888;
}

#clearDoneBtn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}

#clearDoneBtn:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.empty-msg {
  text-align: center;
  color: #bbb;
  padding: 30px 0;
  font-size: 0.95rem;
}

@media (max-width: 400px) {
  .container {
    padding: 16px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .filter-btn {
    font-size: 0.78rem;
    padding: 6px 4px;
  }
}
