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

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.add-task {
    display: flex;
    margin-bottom: 20px;
}

#taskInput {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

#addBtn {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#addBtn:hover {
    background: #2980b9;
}

.filter-tasks {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 15px;
    margin: 0 5px;
    background: #f1f1f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

.task-list {
    list-style: none;
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.task-item:hover {
    background: #f9f9f9;
}

.task-item .checkbox {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-item .task-text {
    flex: 1;
    font-size: 16px;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #888;
}

.task-item .delete-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.task-item .delete-btn:hover {
    opacity: 1;
}

.task-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #7f8c8d;
    font-size: 14px;
}

#clearCompleted {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

#clearCompleted:hover {
    color: #e74c3c;
} 