:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1f2330;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --border: #e5e7eb;
  --done: #9ca3af;
  --shadow: 0 10px 30px rgba(20, 20, 50, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.app {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.header h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.summary {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.task-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.task-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.task-form button {
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.filter {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter:hover {
  color: var(--text);
}

.filter.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

.task-list:empty::after {
  content: "Nothing here yet. Add a task above.";
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0;
}

.task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: background 0.15s ease;
}

.task:hover {
  background: #fafafa;
}

.task input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.task .label {
  flex: 1;
  font-size: 15px;
  word-break: break-word;
}

.task.done .label {
  color: var(--done);
  text-decoration: line-through;
}

.task .delete {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.task .delete:hover {
  color: #ef4444;
  background: #fef2f2;
}

.footer {
  display: flex;
  justify-content: flex-end;
}

.link-button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

.link-button:hover {
  color: var(--text);
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
