/* 任务清单页面样式 */

/* 头部布局 - 与现有页面保持一致 */
.header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

@media screen and (min-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
}

.header-left h1 {
    color: #333;
    font-size: clamp(18px, 5vw, 24px);
    margin-bottom: 5px;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .header-left h1 {
        text-align: left;
    }
}

.header-left p {
    color: #666;
    font-size: clamp(13px, 3vw, 16px);
    text-align: center;
}

@media screen and (min-width: 768px) {
    .header-left p {
        text-align: left;
    }
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    width: 100%;
}

@media screen and (min-width: 768px) {
    .header-actions {
        justify-content: flex-end;
        width: auto;
    }
}

/* 任务统计卡片 */
.task-summary {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    color: white;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: clamp(12px, 3vw, 14px);
    opacity: 0.9;
    margin-bottom: 4px;
}

.summary-value {
    display: block;
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
}

.summary-value.completed {
    color: #67c23a;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.summary-value.pending {
    color: #e6a23c;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

/* 添加任务区域 */
.add-task-section {
    margin-bottom: var(--spacing-lg);
}

.add-task-section .form-group {
    display: flex;
    gap: var(--spacing-sm);
}

.add-task-section .form-control {
    flex: 1;
    padding: clamp(8px, 3vw, 10px) clamp(12px, 4vw, 16px);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: clamp(13px, 3vw, 15px);
    transition: border-color 0.3s;
}

.add-task-section .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-task-section .btn {
    min-width: 80px;
}

/* 任务列表 */
.task-list {
    margin-bottom: var(--spacing-lg);
}

.task-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    transition: all 0.3s;
}

.task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
    background: #f5f7fa;
    opacity: 0.7;
}

.task-item.completed .task-content {
    text-decoration: line-through;
    color: #999;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-sm);
    cursor: pointer;
    accent-color: var(--success-color);
}

.task-content {
    flex: 1;
    font-size: clamp(14px, 3vw, 16px);
    color: #333;
}

.task-time {
    font-size: clamp(11px, 2.5vw, 13px);
    color: #999;
    margin-left: var(--spacing-sm);
}

.task-delete {
    width: 32px;
    height: 32px;
    border: none;
    background: #f56c6c;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-left: var(--spacing-sm);
    transition: background 0.3s;
}

.task-delete:hover {
    background: #f24949;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 0;
    color: #999;
    font-size: clamp(14px, 3vw, 16px);
}

/* 使用提示 */
.task-tips {
    background: #f5f7fa;
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.task-tips h3 {
    font-size: clamp(14px, 3vw, 16px);
    color: #333;
    margin-bottom: var(--spacing-sm);
}

.task-tips ul {
    padding-left: 20px;
    margin: 0;
}

.task-tips li {
    font-size: clamp(12px, 2.5vw, 14px);
    color: #666;
    margin-bottom: 4px;
    line-height: 1.6;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .task-item {
        flex-wrap: wrap;
    }
    
    .task-time {
        width: 100%;
        margin-left: 28px;
        margin-top: 4px;
    }
    
    .task-summary {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .add-task-section .form-group {
        flex-direction: column;
    }
    
    .add-task-section .btn {
        width: 100%;
    }
}