/* 视频生成进度页面样式 */
.progress-section {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    gap: 30px;
}

/* 进度概况区域 - 更紧凑的设计 */
.progress-overview {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.progress-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    background: var(--gray);
}

.progress-badge.generating {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.progress-badge.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.progress-badge.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.progress-bar-container {
    margin-top: 10px;
}

.progress-bar-wrapper {
    height: 8px;
    background: var(--gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: progressShimmer 2s infinite linear;
}

.progress-time-estimate {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 分镜预览区域 */
.frames-preview-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 分镜卡片网格布局 */
.frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

/* 分镜卡片 */
.frame-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.frame-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 卡片头部：包含分镜编号和状态 */
.frame-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--gray);
}

.frame-number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.frame-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.frame-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.frame-status-dot.completed {
    background: #4CAF50;
}

.frame-status-dot.generating {
    background: var(--primary);
    animation: pulse 1.5s infinite;
}

/* 卡片主体：分镜预览图 */
.frame-preview {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.frame-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.frame-card:hover .frame-preview img {
    transform: scale(1.05);
}

.frame-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    color: var(--text-secondary);
}

.frame-preview-placeholder svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
    opacity: 0.7;
    margin-bottom: 10px;
}

/* 卡片底部：描述文本 */
.frame-description {
    padding: 12px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.frame-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* 进度条 */
.frame-progress {
    margin-top: auto;
    padding-top: 10px;
}

.frame-progress-bar {
    height: 4px;
    background: var(--gray);
    border-radius: 2px;
    overflow: hidden;
}

.frame-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    background: var(--gray);
    border-radius: 12px;
}

.empty-state svg {
    width: 40px;
    height: 40px;
    fill: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 15px;
    animation: rotate 2s infinite linear;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
}

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

/* 优化移动端显示 */
@media (max-width: 768px) {
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .frames-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .frame-text {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .frames-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .frame-card-header {
        padding: 8px 10px;
    }
    
    .frame-description {
        padding: 10px;
    }
}