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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.container {
  width: 100%;
  max-width: 520px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #f8fafc;
}

/* Form */
#task-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#task-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#task-input:focus {
  border-color: #3b82f6;
}

#task-form button {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#task-form button:hover {
  background: #2563eb;
}

/* Filters */
#filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter {
  padding: 0.4rem 0.75rem;
  border: 1px solid #334155;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter:hover {
  color: #e2e8f0;
  border-color: #475569;
}

.filter.active {
  background: #334155;
  color: #e2e8f0;
  border-color: #475569;
}

/* Task list */
#task-list {
  list-style: none;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #1e293b;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: opacity 0.2s;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: #64748b;
}

.task-item input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #3b82f6;
  cursor: pointer;
  flex-shrink: 0;
}

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

.task-delete {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.task-delete:hover {
  color: #ef4444;
  background: #1e293b;
}

/* Empty state */
#empty-state {
  text-align: center;
  color: #64748b;
  padding: 2rem 0;
  font-size: 0.95rem;
}

#empty-state.hidden {
  display: none;
}
