:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #ef4444;
  --success: #10b981;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 2rem 1rem;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

#todo-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

button {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: var(--primary-hover);
}

#todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  transition: all 0.2s;
}

.todo-item.completed span {
  text-decoration: line-through;
  color: var(--muted);
}

.delete-btn {
  background: transparent;
  color: var(--danger);
  padding: 0.4rem 0.6rem;
  font-size: 1.2rem;
  border-radius: 6px;
}

.delete-btn:hover {
  background: #fee2e2;
}

@media (max-width: 480px) {
  .container { padding: 1.25rem; }
  #todo-form { flex-direction: column; }
  button { width: 100%; }
}