/* style.css */
/* 新增线程3和4的颜色 */
.thread-3 { background-color: #10b981; } /* 绿色 */
.thread-4 { background-color: #f59e0b; } /* 黄色 */

/* 新增四线程布局 */
.thread-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* 新增性能仪表盘 */
.performance-dashboard {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 20px;
    color: white;
}

.thread-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}

.thread-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.thread-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.thread-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 新增四线程均衡指示器 */
.balance-indicator {
    display: flex;
    justify-content: space-between;
    height: 40px;
    margin: 20px 0;
}

.balance-bar {
    width: 18%;
    border-radius: 6px;
    transition: height 0.3s ease;
}

/* 原有样式保持不变 */
@keyframes wave {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.wave-bar {
    width: 6px;
    background: linear-gradient(to top, #3b82f6, #6366f1);
    border-radius: 3px;
    animation: wave 1.2s ease-in-out infinite;
    height: 40%;
}
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }
.wave-bar:nth-child(6) { animation-delay: 0.5s; }
.wave-bar:nth-child(7) { animation-delay: 0.6s; }
.wave-bar:nth-child(8) { animation-delay: 0.7s; }
.wave-bar:nth-child(9) { animation-delay: 0.8s; }
.wave-bar:nth-child(10) { animation-delay: 0.9s; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.download-btn {
    animation: pulse 2s infinite;
}

.progress-container {
    position: relative;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.file-card {
    transition: all 0.3s ease;
}
.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.converting {
    position: relative;
    overflow: hidden;
}
.converting::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.5), 
        transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.performance-gauge {
    height: 10px;
    border-radius: 5px;
    background: #e5e7eb;
    overflow: hidden;
    position: relative;
}
.gauge-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}
.cpu-gauge { background: linear-gradient(90deg, #10b981, #3b82f6); }
.mem-gauge { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

.file-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: #e0f2fe;
    color: #0369a1;
}

.download-all-btn {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.download-all-btn:active {
    transform: translateY(1px);
}

.hidden {
    display: none;
}

/* 文件名截断样式 */
.truncate-filename {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* 文件列表容器优化 */
.file-list-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 自定义滚动条 */
.file-list-container::-webkit-scrollbar {
    width: 8px;
}

.file-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.file-list-container::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 4px;
}

.file-list-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 文件信息布局优化 */
.file-info {
    min-width: 0;
    flex: 1;
}

/* 优化移动端显示 */
@media (max-width: 768px) {
    .truncate-filename {
        max-width: 150px;
    }
    
    .flex-col-mobile {
        flex-direction: column;
    }
    
    .w-full-mobile {
        width: 100% !important;
    }
    
    .thread-grid {
        grid-template-columns: 1fr;
    }
}

.current-converting {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent);
    border-left: 4px solid #3b82f6;
}

.queue-list {
    max-height: 200px;
    overflow-y: auto;
}

.queue-item {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.queue-item:hover {
    background-color: #f9fafb;
}

.active-queue-item {
    background-color: #eff6ff;
    font-weight: 500;
}

.thread-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.thread-1 { background-color: #3b82f6; }
.thread-2 { background-color: #ec4899; }