/* 全局基础 */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  background: #1c1e26;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 40px;
}

/* 容器整体居中 */
.container {
  width: 360px;
  background: #2b2f3a;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* 标题 */
h1 {
  text-align: center;
  margin: 0 0 20px;
  font-size: 22px;
}

/* 输入区 */
.todo-input {
  display: flex;
  gap: 8px;
  justify-content: center;
}

#todoInput {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #444;
  border-radius: 6px;
  outline: none;
  font-size: 14px;
  background: #1f2230;
  color: #fff;
}
#todoInput:focus {
  border-color: #4caf50;
}

/* 按钮：小巧 + 圆角 */
button {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* 添加按钮 */
#addButton {
  background: #4caf50;
  color: #fff;
}
#addButton:hover {
  background: #3e9142;
}

/* 删除按钮 */
#todoList button {
  background: #e74c3c;
  color: #fff;
}
#todoList button:hover {
  background: #c0392b;
}

/* 列表区整体 */
#todoList {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 单个任务项 */
#todoList > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1f2230;
  padding: 8px 10px;
  border-radius: 8px;
}
#todoList span {
  font-size: 14px;
}
