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

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

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

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

#todo-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

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

#todo-input:focus {
  border-color: #666;
}

#todo-form button {
  padding: 12px 24px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

#todo-form button:hover {
  background: #555;
}

#todo-list {
  list-style: none;
}

#todo-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#todo-list li.completed span {
  text-decoration: line-through;
  color: #999;
}

#todo-list li span {
  flex: 1;
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}

.actions button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.toggle {
  background: #e8f5e9;
  color: #4caf50;
}

.toggle:hover {
  background: #c8e6c9;
}

.delete {
  background: #ffebee;
  color: #f44336;
}

.delete:hover {
  background: #ffcdd2;
}
