/* Demo Page Specific Styles */

/* Demo Header */
.demo-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
}

.demo-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-header p {
    font-size: 1.25rem;
    color: #cbd5e1;
}

/* Demo Interface */
.demo-interface {
    padding: 80px 0;
    background: #f8fafc;
}

.demo-input-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 48px;
}

.input-group {
    margin-bottom: 32px;
}

.input-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.input-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.preset-tasks {
    margin-bottom: 32px;
}

.preset-tasks h3 {
    color: #374151;
    margin-bottom: 16px;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.preset-btn {
    padding: 16px 20px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.preset-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

#startDemo {
    font-size: 1.125rem;
    padding: 16px 32px;
}

#startDemo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Demo Output Section */
.demo-output-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.agents-container {
    padding: 32px;
}

.agent-status {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.agent-status.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.agent-status.completed {
    border-color: #10b981;
    background: #ecfdf5;
}

.agent-status.processing {
    border-color: #f59e0b;
    background: #fffbeb;
    animation: pulse 2s ease-in-out infinite;
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.agent-status .agent-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64748b, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.agent-status.active .agent-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.agent-status.completed .agent-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.agent-status.processing .agent-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.agent-info {
    flex: 1;
}

.agent-info h3 {
    color: #374151;
    margin-bottom: 4px;
    font-size: 1.125rem;
}

.agent-state {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.agent-status.active .agent-state {
    color: #3b82f6;
}

.agent-status.completed .agent-state {
    color: #10b981;
}

.agent-status.processing .agent-state {
    color: #f59e0b;
}

.view-prompt-btn {
    padding: 8px 12px;
    background: #374151;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s ease;
}

.view-prompt-btn:hover {
    background: #4b5563;
}

.agent-message {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

.orchestrator {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05));
}

.orchestrator .agent-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 24px 32px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #374151;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .demo-header {
        padding: 100px 0 40px;
    }
    
    .demo-header h1 {
        font-size: 2rem;
    }
    
    .demo-interface {
        padding: 40px 0;
    }
    
    .demo-input-section {
        padding: 24px;
        margin-bottom: 32px;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .agents-container {
        padding: 20px;
    }
    
    .agent-status {
        padding: 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body pre {
        padding: 16px;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

/* Typing Animation */
@keyframes typing {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typing-indicator::after {
    content: '|';
    animation: typing 1s infinite;
    color: #3b82f6;
}