:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #262b36;
  --text: #e6e8ec;
  --muted: #8b93a3;
  --accent: #4f8cff;
  --danger: #ff5c5c;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

header h1 { margin: 0 0 4px; font-size: 26px; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

form#task-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1 1 160px;
  background: #0f1115;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { opacity: 0.9; }
button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.row-header h2 { margin: 0; font-size: 16px; }

ul#task-list { list-style: none; padding: 0; margin: 14px 0 0; }

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }

.task-item .title { flex: 1; }
.task-item.completed .title { text-decoration: line-through; color: var(--muted); }

.task-item button.delete {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border);
  padding: 4px 10px;
  font-size: 12px;
}

.muted { color: var(--muted); font-size: 13px; }

.card.debug { border-color: #3a2b2b; }
.card.debug h2 { margin: 0 0 4px; font-size: 15px; }
.debug-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.debug-actions button { background: #2a2f3a; }
.debug-actions button:hover { background: #363c49; }

footer { margin-top: 30px; }