* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#app {
  width: 100%;
  max-width: 550px;
}

.todo-container {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px;
  overflow: hidden;
}

h1 {
  color: #4a6ee0;
  text-align: center;
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 600;
}

/* 搜索和添加区域 */
.todo-header {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  margin-bottom: 15px;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: none;
  background-color: #f5f7fa;
  border-radius: 10px;
  font-size: 15px;
  color: #333;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 110, 224, 0.3);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0a0a0;
}

.add-box {
  display: flex;
  gap: 10px;
}

.add-box input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  color: #333;
  transition: all 0.3s ease;
}

.add-box input:focus {
  outline: none;
  border-color: #4a6ee0;
  box-shadow: 0 0 0 2px rgba(74, 110, 224, 0.2);
}

.add-btn {
  background-color: #4a6ee0;
  color: white;
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-btn:hover {
  background-color: #3a5ecc;
  transform: translateY(-2px);
}

.add-btn i {
  font-size: 18px;
}

/* 分类标签 */
.todo-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.todo-tabs span {
  padding: 8px 16px;
  cursor: pointer;
  color: #666;
  font-size: 15px;
  border-radius: 20px;
  transition: all 0.3s ease;
  margin-right: 8px;
}

.todo-tabs span:hover {
  color: #4a6ee0;
  background-color: rgba(74, 110, 224, 0.08);
}

.todo-tabs span.active {
  color: #4a6ee0;
  background-color: rgba(74, 110, 224, 0.12);
  font-weight: 500;
}

/* 待办列表 */
.todo-list {
  margin-bottom: 20px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.todo-list::-webkit-scrollbar {
  width: 6px;
}

.todo-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.todo-list::-webkit-scrollbar-thumb {
  background: #c3cfe2;
  border-radius: 3px;
}

.empty-state {
  text-align: center;
  padding: 40px 0;
  color: #a0a0a0;
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.todo-list ul {
  list-style: none;
}

.todo-list li {
  margin-bottom: 12px;
  border-radius: 10px;
  background-color: #f9fafc;
  overflow: hidden;
  transition: all 0.3s ease;
}

.todo-list li:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 15px;
}

.todo-check {
  margin-right: 15px;
}

.todo-check input[type="checkbox"] {
  display: none;
}

.todo-check label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid #d1d1d1;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.todo-check label i {
  color: white;
  font-size: 12px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.todo-check input[type="checkbox"]:checked + label {
  background-color: #4a6ee0;
  border-color: #4a6ee0;
}

.todo-check input[type="checkbox"]:checked + label i {
  opacity: 1;
  transform: scale(1);
}

.todo-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.todo-text {
  font-size: 16px;
  color: #333;
  transition: all 0.3s ease;
  word-break: break-word;
}

.completed .todo-text {
  text-decoration: line-through;
  color: #a0a0a0;
}

.todo-actions {
  display: flex;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.todo-item:hover .todo-actions {
  opacity: 1;
}

.edit-btn, .delete-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-btn {
  color: #4a6ee0;
}

.edit-btn:hover {
  background-color: rgba(74, 110, 224, 0.1);
}

.delete-btn {
  color: #e74c3c;
}

.delete-btn:hover {
  background-color: rgba(231, 76, 60, 0.1);
}

.todo-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.todo-edit input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  margin-right: 10px;
}

.todo-edit input:focus {
  outline: none;
  border-color: #4a6ee0;
}

.edit-actions {
  display: flex;
  gap: 5px;
}

.save-btn, .cancel-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn {
  color: #2ecc71;
}

.save-btn:hover {
  background-color: rgba(46, 204, 113, 0.1);
}

.cancel-btn {
  color: #e74c3c;
}

.cancel-btn:hover {
  background-color: rgba(231, 76, 60, 0.1);
}

/* 统计信息 */
.todo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
}

.clear-btn {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background-color: rgba(231, 76, 60, 0.1);
}

/* 动画效果 */
.todo-enter-active, .todo-leave-active {
  transition: all 0.5s ease;
}

.todo-enter-from, .todo-leave-to {
  opacity: 0;
  transform: translateY(30px);
}

/* 响应式设计 */
@media (max-width: 600px) {
  .todo-container {
    padding: 20px;
    border-radius: 12px;
  }
  
  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .todo-tabs span {
    padding: 6px 12px;
    font-size: 14px;
  }
  
  .todo-text {
    font-size: 15px;
  }
  
  .todo-item {
    padding: 12px;
  }
}