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

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

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

h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  text-align: center;
}

/* Input Section */
.input-section {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

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

#todo-input:focus {
  border-color: #667eea;
}

#todo-input::placeholder {
  color: #aaa;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn.primary {
  background: #667eea;
  color: #fff;
}

.btn.primary:hover {
  background: #5a6fd6;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #f0f0f0;
  color: #555;
}

.btn.secondary:hover {
  background: #e0e0e0;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.task-count {
  margin-left: auto;
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

/* Todo List */
.todo-list {
  list-style: none;
  margin-bottom: 16px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  animation: slideIn 0.2s ease;
}

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

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

.todo-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #667eea;
  cursor: pointer;
  flex-shrink: 0;
}

.todo-text {
  flex: 1;
  font-size: 15px;
  color: #333;
  word-break: break-word;
  cursor: pointer;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #aaa;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

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

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

.filter-btn {
  padding: 8px 18px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: #f5f5f5;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.filter-btn:hover:not(.active) {
  background: #eaeaea;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 30px 0;
  color: #aaa;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 20px;
  }
  h1 { font-size: 24px; }
}
