/* 流程图协作演示样式 */

.flowchart-demo {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.flowchart-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flowchart-interface {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 2fr 280px;
    min-height: 480px;
    overflow: hidden;
}

/* 流程图画布区域 */
.flowchart-canvas {
    padding: 20px;
    background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flowchart-image {
    border-radius: 12px;
   
}


/* AI分析面板 */
.ai-analysis-panel {
    background: #f8fafc;
    padding: 16px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    font-size: 13px;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.ai-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--neural-purple));
}

.ai-info {
    display: flex;
    flex-direction: column;
}

.ai-name {
    font-weight: 600;
    color: var(--text-primary);
}

.ai-status {
    font-size: 11px;
    color: var(--text-secondary);
}

.analysis-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analysis-message {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    line-height: 1.4;
}

.typing-text {
    margin: 0;
    color: var(--text-primary);
    animation: fadeInUp 1s ease;
}

.file-creation-status {
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
}

.status-item.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neural-green);
    animation: statusComplete 0.6s ease 2s forwards;
}

.status-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neural-green);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
}

.check-icon {
    font-weight: bold;
    margin-left: auto;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neural-green);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    opacity: 0;
    animation: successReveal 0.5s ease 3s forwards;
}

.success-icon {
    width: 20px;
    height: 20px;
    background: var(--neural-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.analysis-details {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    opacity: 0;
    animation: detailsReveal 0.5s ease 4s forwards;
}

.analysis-details h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 14px;
}

.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analysis-step {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.analysis-step.highlight {
    background: rgba(79, 70, 229, 0.05);
    border-left: 2px solid var(--primary-color);
    padding-left: 10px;
}

.step-text {
    color: var(--text-secondary);
    flex: 1;
}

/* 动画效果 */
@keyframes statusComplete {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes successReveal {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes detailsReveal {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .flowchart-interface {
        grid-template-columns: 1fr;
        grid-template-rows: 400px auto;
    }
    
    .flowchart-canvas {
        padding: 20px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(20, 25px);
        gap: 3px;
    }
    
    .flow-node {
        font-size: 10px;
        padding: 6px 12px;
        min-width: 100px;
    }
    
    .ai-analysis-panel {
        padding: 16px;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .analysis-step {
        font-size: 10px;
    }
}