:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --done: #94a3b8;
  --shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.2), 0 4px 10px -4px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #f1f5f9 50%, #ecfeff 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 20px;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
}

.card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card__header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

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

.todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

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

.todo-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn {
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:active { transform: translateY(1px); }

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.todo-item:hover {
  background: #f8fafc;
  border-color: var(--border);
}

.todo-item__checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.todo-item__text {
  flex: 1;
  font-size: 15px;
  word-break: break-word;
}

.todo-item.is-done .todo-item__text {
  text-decoration: line-through;
  color: var(--done);
}

.todo-item__delete {
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.todo-item__delete:hover {
  background: #fee2e2;
  color: var(--danger-hover);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 4px;
}
