/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: "微软雅黑", "PingFang SC", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px 0;
}

.container {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

.footer {
    text-align: center;
    margin-top: 50px;
    color: #666;
    font-size: 0.9rem;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

/* 待办事项应用样式 */
.todo-app {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 30px;
}

/* 添加任务区域 */
.add-todo {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.todo-input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    outline: none;
}

.todo-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.add-btn {
    padding: 0 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.add-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 筛选区域 */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 15px;
    background-color: #f8f9fa;
    color: #333;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
}

.filter-btn:hover:not(.active) {
    background-color: #e9ecef;
}

.todo-count {
    color: #666;
    font-size: 0.9rem;
}

/* 待办事项列表 */
.todo-list {
    margin-bottom: 20px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.todo-item.completed {
    opacity: 0.8;
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3498db;
}

.todo-text {
    flex: 1;
    font-size: 1.1rem;
    cursor: pointer;
}

.todo-item.completed .todo-text {
    color: #95a5a6;
    text-decoration: line-through;
}

.todo-edit-input {
    flex: 1;
    height: 40px;
    padding: 0 10px;
    border: 2px solid #3498db;
    border-radius: 6px;
    font-size: 1.1rem;
    outline: none;
}

.todo-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
}

.edit-btn {
    color: #2ecc71;
}

.delete-btn {
    color: #e74c3c;
}

.edit-btn:hover, .delete-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #95a5a6;
    font-size: 1.1rem;
}

.empty-state i {
    margin-left: 8px;
    color: #f39c12;
}

.empty-tip {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 清除已完成按钮 */
.clear-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    background-color: #f8f9fa;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.clear-btn:hover {
    background-color: #e9ecef;
    color: #e74c3c;
}

/* 响应式适配 */
@media (max-width: 576px) {
    .todo-app {
        padding: 20px;
    }
    
    .add-todo {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
    }
}