.ai-chatbot-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef7 100%);
    min-height: 100vh;
}

/* Header Styles */
.ai-chatbot-header {
    text-align: center;
    margin-bottom: 40px;
}

.ai-chatbot-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.ai-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-chatbot-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Card Styles */
.ai-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.ai-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.ai-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.ai-card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.ai-card-header p {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
}

/* Form Styles */
.ai-form-group {
    margin-bottom: 24px;
}

.ai-form-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.ai-icon-small {
    margin-right: 8px;
    font-size: 1rem;
}

.ai-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ai-form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Upload Area */
.ai-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.ai-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.ai-upload-icon {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 12px;
}

.ai-upload-text {
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.ai-upload-subtext {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.ai-upload-info {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Start Button */
.ai-start-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.ai-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.ai-btn-icon {
    font-size: 1.1rem;
}

/* Features */
.ai-features {
    display: flex;
    justify-content: space-around;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.ai-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 500;
}

.ai-check {
    font-size: 1rem;
}

/* Training Progress */
.ai-training-progress {
    text-align: center;
}

.ai-loading-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 24px 0 16px 0;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.ai-progress-text {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.ai-progress-percentage {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
}

/* Chat Section Layout */
.ai-chat-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

/* Chat Panel */
.ai-chat-panel {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.ai-chat-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-icon {
    font-size: 1.5rem;
}

.ai-chat-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

/* Chat Box */
.ai-chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

.ai-message {
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message-content {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    white-space: pre-wrap;
    word-break: keep-all;
}

.ai-bot-message .ai-message-content {
    background: white;
    color: #374151;
    border: 1px solid #e2e8f0;
    margin-left: 0;
    border-bottom-left-radius: 4px;
}

.ai-user-message {
    text-align: right;
}

.ai-user-message .ai-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ai-message-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 16px;
}

.ai-user-message .ai-message-time {
    text-align: right;
}

/* Typing Animation */
.ai-typing .ai-message-content {
    padding: 16px;
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-typing-dots span {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Chat Input */
.ai-chat-input-container {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.ai-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-right: 12px;
    transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-send-btn:hover {
    transform: scale(1.05);
}

.ai-send-icon {
    font-size: 1rem;
}

/* Embed Panel */
.ai-embed-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.ai-embed-header {
    margin-bottom: 20%;
}

.ai-embed-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.ai-embed-icon {
    font-size: 1.3rem;
}

.ai-embed-header p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Code Container */
.ai-code-container {
    position: relative;
    background: #1a202c;
    border-radius: 8px;
    margin-bottom: 24px;
}

.ai-embed-code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    background: transparent;
}

.ai-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #374151;
    color: #e2e8f0;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
}

.ai-copy-btn:hover {
    background: #4b5563;
}

.ai-copy-icon {
    font-size: 0.9rem;
}

/* Deploy Status */
.ai-deploy-status {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 8px;
    padding: 20px;
}

.ai-deploy-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.ai-deploy-status h4 {
    color: #065f46;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.ai-deploy-status p {
    color: #047857;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Status Messages */
.ai-status-message {
    margin-top: 16px;
    text-align: center;
}

.ai-error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-chatbot-container {
        padding: 20px 16px;
    }
    
    .ai-chatbot-header h1 {
        font-size: 2rem;
    }
    
    .ai-card {
        padding: 24px 20px;
    }
    
    .ai-chat-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .ai-chat-panel {
        height: 500px;
    }
    
    .ai-features {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .ai-upload-area {
        padding: 24px 16px;
    }
    
    .ai-embed-code {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .ai-chatbot-header h1 {
        font-size: 1.75rem;
    }
    
    .ai-chatbot-description {
        font-size: 1rem;
    }
    
    .ai-card {
        padding: 20px 16px;
    }
    
    .ai-chat-panel {
        height: 400px;
    }
    
    .ai-message-content {
        max-width: 90%;
    }
    
    .ai-chat-input-container {
        padding: 16px;
    }
    
    .ai-embed-panel {
        padding: 20px 16px;
    }
}

/* Loading States */
.ai-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ai-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Styling */
.ai-chat-box::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-box::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.ai-chat-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ai-chat-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus States */
.ai-form-input:focus,
.ai-chat-input:focus {
    transform: translateY(-1px);
}

.ai-start-btn:focus,
.ai-send-btn:focus,
.ai-copy-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Hover Effects */
.ai-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ai-message {
    transition: all 0.2s ease;
}

.ai-message:hover .ai-message-content {
    transform: translateY(-1px);
}

/* Initial Message Styling */
.ai-initial-message {
    margin-bottom: 20px;
}

.ai-initial-message .ai-message-content {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    color: #0369a1;
}

/* Animations */
.ai-training-section,
.ai-training-progress,
.ai-chat-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar for Code */
.ai-embed-code::-webkit-scrollbar {
    height: 6px;
}

.ai-embed-code::-webkit-scrollbar-track {
    background: #374151;
}

.ai-embed-code::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

.ai-embed-code::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) { 
    .ai-card-header p {
        text-align: center;
    }
}

.ai-chat-input-container .clearMessage.blue-btn.copy-btn {
    margin-left:10px;
}