/* ========================================
   上传进度增强样式 - 精简版 v1.0
   仅包含真实进度显示的增强功能
   与现有 upload.css 配合使用
   ======================================== */

/* ==================== 进度条增强（覆盖默认） ==================== */
.file-progress-bar {
    position: relative;
    overflow: hidden;
}

/* 进度条流光效果 */
.file-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 成功状态的进度条 */
.file-progress-bar.success {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%) !important;
}

/* 错误状态的进度条 */
.file-progress-bar.error {
    background: linear-gradient(90deg, #f44336 0%, #e57373 100%) !important;
}

/* ==================== 上传状态增强 ==================== */
/* 上传中的文件项添加脉冲效果 */
.file-item.uploading {
    border-color: var(--primary-400);
    background: linear-gradient(135deg, #ffffff 0%, rgba(33, 150, 243, 0.03) 100%);
}

/* 成功的文件项 */
.file-item.success {
    border-color: #4CAF50;
}

.file-item.success .file-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
}

/* 错误的文件项 */
.file-item.error {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffffff 0%, rgba(244, 67, 54, 0.03) 100%);
}

.file-item.error .file-icon {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: white;
}

/* ==================== 文件图标动画 ==================== */
/* 上传中的图标脉冲动画 */
.file-item.uploading .file-icon {
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(33, 150, 243, 0);
    }
}

/* 成功的图标弹跳动画 */
.file-item.success .file-icon {
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ==================== 上传速度和时间信息 ==================== */
.upload-speed-info {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.upload-speed-info .speed {
    color: #2196F3;
    font-weight: 600;
}

.upload-speed-info .eta {
    color: #ff9800;
    font-weight: 600;
}

/* ==================== 状态标签增强 ==================== */
.file-status {
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* 上传中状态 */
.file-status.uploading {
    background: rgba(33, 150, 243, 0.1);
}

/* 成功状态动画 */
.file-status.success {
    background: rgba(76, 175, 80, 0.1);
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 错误状态抖动 */
.file-status.error {
    background: rgba(244, 67, 54, 0.1);
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ==================== 上传区域上传中状态 ==================== */
/* 上传中的上传区域添加动画 */
.upload-area.uploading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    animation: uploadingPulse 2s infinite;
    z-index: 0;
}

@keyframes uploadingPulse {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ==================== 文件项进入动画 ==================== */
.file-item {
    animation: fileItemSlideIn 0.3s ease;
}

@keyframes fileItemSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
    .upload-speed-info {
        font-size: 11px;
    }

    .file-status {
        font-size: 12px;
        padding: 3px 8px;
    }
}