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

.demo-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.demo-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Demo Interface */
.demo-interface {
    padding: 60px 0;
    background: var(--bg-secondary);
    min-height: 80vh;
}

.demo-layout {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 600px;
}

/* Email Sidebar */
.email-sidebar {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
}

.ai-status i {
    animation: pulse 2s infinite;
}

.email-list {
    overflow-y: auto;
    max-height: calc(100% - 80px);
}

.email-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.email-item:hover {
    background: var(--bg-secondary);
}

.email-item.active {
    background: var(--primary-color);
    color: white;
}

.email-item.active .email-sender,
.email-item.active .email-subject,
.email-item.active .email-preview,
.email-item.active .email-time {
    color: white;
}

.email-sender {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.email-subject {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.email-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.email-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Email Content */
.email-content {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.email-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.email-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.email-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.email-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-ai, .btn-reply {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-ai {
    background: var(--gradient-ai);
    color: white;
}

.btn-reply {
    background: var(--primary-color);
    color: white;
}

.btn-ai:hover, .btn-reply:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.email-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.email-text {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.email-text p {
    margin-bottom: 1rem;
}

/* AI Insights */
.ai-insights {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
}

.insights-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.insights-header i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.insights-content {
    display: grid;
    gap: 1rem;
}

.insight-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.insight-item:nth-child(1) .insight-icon {
    background: #fef3c7;
    color: #d97706;
}

.insight-item:nth-child(2) .insight-icon {
    background: #d1fae5;
    color: #059669;
}

.insight-item:nth-child(3) .insight-icon {
    background: #dbeafe;
    color: #2563eb;
}

.insight-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.insight-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* AI Reply Generator */
.ai-reply-generator {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.generator-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-generate {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.reply-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.option-item input[type="radio"] {
    accent-color: var(--primary-color);
}

.reply-content textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 1rem;
}

.reply-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reply-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-copy, .btn-edit, .btn-send {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-send {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-copy:hover, .btn-edit:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.btn-send:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* AI Assistant */
.ai-assistant {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.assistant-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.assistant-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-ai);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.assistant-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.assistant-info span {
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
}

.assistant-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
}

.message.ai-message {
    align-self: flex-start;
}

.message.user-message {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 1rem 1rem 0.25rem 1rem;
}

.message.ai-message .message-content {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 1rem 1rem 1rem 0.25rem;
    border: 1px solid var(--border-light);
}

.message-content p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.message-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.chat-input {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    font-size: 0.9rem;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-input button {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Demo Features */
.demo-features {
    padding: 80px 0;
    background: var(--bg-primary);
}

.demo-features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.demo-features .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.feature-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Demo CTA */
.demo-cta {
    padding: 80px 0;
    background: var(--bg-secondary);
    text-align: center;
}

.demo-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.demo-cta p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .demo-layout {
        grid-template-columns: 250px 1fr 300px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .demo-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        gap: 1rem;
    }
    
    .email-sidebar {
        height: 300px;
    }
    
    .ai-assistant {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .demo-header h1 {
        font-size: 2rem;
    }
    
    .demo-header p {
        font-size: 1rem;
    }
    
    .email-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .email-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .btn-ai, .btn-reply {
        flex: 1;
        justify-content: center;
    }
    
    .reply-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reply-actions {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .demo-features h2,
    .demo-cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .demo-interface {
        padding: 40px 0;
    }
    
    .email-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .insight-item {
        flex-direction: column;
        text-align: center;
    }
    
    .assistant-header {
        flex-direction: column;
        text-align: center;
    }
} 