/**
 * 首页任务监控卡片样式
 */

/* 任务进度卡片 - 与文章卡片大小一致 */
.task-progress-card {
    background: linear-gradient(90deg, #1d9b4d 0%, #4c996f 50%, #5eb086 100%); /* 浅绿-深绿渐变 */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    animation: taskCardPulse 3s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    /* 与 article-card-item 保持一致 */
    height: 100%;
}

/* 脉冲动画 */
@keyframes taskCardPulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(45, 95, 63, 0.4);
    }
    50% { 
        box-shadow: 0 8px 30px rgba(74, 157, 111, 0.6);
    }
}

/* 光效动画 */
.task-progress-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
    animation: taskCardShimmer 9s linear infinite; /* 从3秒改为6秒 */
}

@keyframes taskCardShimmer {
    0% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
    100% { 
        transform: translateX(100%) translateY(100%) rotate(45deg); 
    }
}

/* 悬停效果 */
.task-progress-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(74, 157, 111, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 进度图片区域 - 1:1比例，与文章图片一致 */
.task-progress-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    aspect-ratio: 1 / 1;  /* 1:1 正方形，与文章图片一致 */
}

/* 任务数量显示 */
.task-count-display {
    text-align: center;
    color: white;
}

.task-count-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
}

.task-count-label {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 圆形进度条 */
.circular-progress {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 内容区域 - 与文章卡片内容区域一致 */
.task-progress-content {
    color: white;
    padding: 1rem 1.25rem 1.25rem;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* 标题 */
.task-progress-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.task-progress-title i {
    animation: taskIconRotate 2s linear infinite;
}

@keyframes taskIconRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 进度详情 */
.task-progress-details {
    font-size: 0.85rem;
}

/* 主题列表 */
.task-topics-list {
    margin-top: 0.5rem;
}

.task-topic-item {
    font-size: 0.85rem;
    opacity: 0.95;
    margin-bottom: 0.25rem;
    padding: 0.25rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-percent {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-message {
    opacity: 0.9;
    font-size: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 待生成任务提示 */
.task-pending-info {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    opacity: 0.9;
    text-align: center;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 新生成文章的高亮效果 */
.article-card-item.newly-generated {
    animation: newlyGeneratedPulse 1s ease-in-out 3;
    border: 2px solid rgba(74, 157, 111, 0.5); /* 绿色边框 */
}

@keyframes newlyGeneratedPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 20px rgba(74, 157, 111, 0.4); /* 绿色阴影 */
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .task-progress-image {
        padding: 1rem;
    }
    
    .task-progress-content {
        padding: 0.875rem 1rem 1rem;
    }
    
    .task-progress-title {
        font-size: 0.875rem;
    }
    
    .progress-percent {
        font-size: 0.95rem;
    }
    
    .progress-message {
        font-size: 0.75rem;
    }
}

/* 淡出过渡效果 */
.task-progress-card.fading-out {
    opacity: 0;
    transform: scale(0.95);
}

