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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #222;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 60px 16px;
}

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

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 24px;
}

#todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

#todo-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s;
}

#todo-input:focus {
  outline: none;
  border-color: #4a90d9;
}

#todo-form button {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  background: #4a90d9;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}

#todo-form button:hover {
  background: #3a7bc8;
}

#todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.todo-item.done {
  opacity: 0.5;
}

.todo-item.done .todo-text {
  text-decoration: line-through;
}

.todo-check {
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.todo-check:hover {
  border-color: #4a90d9;
}

.todo-item.done .todo-check {
  border-color: #4a90d9;
  background: #4a90d9;
}

.todo-item.done .todo-check::after {
  content: "✓";
  color: #fff;
  font-size: 12px;
}

.todo-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.4;
}

.todo-delete {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.todo-delete:hover {
  color: #e55;
}

.empty {
  text-align: center;
  color: #999;
  margin-top: 48px;
  font-size: 0.95rem;
}
