/* ==================== 背景移除结果展示 - 全新设计 ==================== */

.bg-result-section {
    margin-top: 2rem;
}

/* 空状态 */
.bg-result-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.empty-icon {
    font-size: 4em;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.bg-result-empty h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.bg-result-empty p {
    color: var(--text-muted);
    font-size: 0.95em;
}

/* 加载状态 */
.bg-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 12px;
}

.loading-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.bg-loading-state h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.loading-progress-bar {
    max-width: 400px;
    height: 6px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.loading-hint {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-top: 10px;
}

/* 处理结果显示 */
.bg-result-display {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* 结果顶部栏 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.credits-badge strong {
    color: #10b981;
    font-size: 1.1em;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.result-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.clear-btn {
    background: #f1f5f9;
    color: #64748b;
}

.clear-btn:hover {
    background: #e2e8f0;
}

/* 图片对比区域 */
.result-compare {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    gap: 1rem;
    align-items: center;
}

.result-image-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 10px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.result-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.result-image-card.processed {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #10b981;
}

.image-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.image-label.success {
    color: #059669;
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

.image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 棋盘格背景 */
.image-wrapper.checkerboard {
    background-image: 
        linear-gradient(45deg, #cbd5e1 25%, transparent 25%),
        linear-gradient(-45deg, #cbd5e1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #cbd5e1 75%),
        linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.image-footer {
    margin-top: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85em;
    color: #94a3b8;
    text-align: center;
}

.image-footer.success {
    color: #10b981;
    border-top-color: rgba(16, 185, 129, 0.3);
}

/* 箭头 */
.result-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    font-size: 1.8em;
}

/* 响应式 */
@media (max-width: 768px) {
    .result-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .result-actions {
        width: 100%;
    }
    
    .result-btn {
        flex: 1;
    }
    
    .result-compare {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .result-arrow {
        transform: rotate(90deg);
    }
}

