/* Reset and base styles */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; background-color: #f5f5f5; color: #333; height: 100vh; overflow: hidden; } /* Chat container */ .chat-container { display: flex; flex-direction: column; height: 100vh; max-width: 1200px; margin: 0 auto; background: white; box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); } /* Header */ .chat-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .header-left h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; } .connection-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; opacity: 0.9; } .status-indicator { width: 8px; height: 8px; border-radius: 50%; background-color: #fbbf24; animation: pulse 2s infinite; } .status-indicator.connected { background-color: #10b981; animation: none; } .status-indicator.disconnected { background-color: #ef4444; animation: none; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .language-selector { display: flex; align-items: center; gap: 0.5rem; } .language-selector label { font-size: 0.875rem; font-weight: 500; } .language-dropdown { padding: 0.5rem 0.75rem; border: none; border-radius: 6px; background: rgba(255, 255, 255, 0.2); color: white; font-size: 0.875rem; cursor: pointer; transition: background-color 0.2s; } .language-dropdown:hover { background: rgba(255, 255, 255, 0.3); } .language-dropdown option { background: #333; color: white; } /* Messages area */ .chat-messages { flex: 1; overflow-y: auto; padding: 1rem; scroll-behavior: smooth; } .chat-messages::-webkit-scrollbar { width: 6px; } .chat-messages::-webkit-scrollbar-track { background: #f1f1f1; } .chat-messages::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; } .chat-messages::-webkit-scrollbar-thumb:hover { background: #a8a8a8; } /* Messages */ .message { margin-bottom: 1.5rem; display: flex; flex-direction: column; } .user-message { align-items: flex-end; } .assistant-message { align-items: flex-start; } .message-content { max-width: 80%; padding: 1rem 1.25rem; border-radius: 18px; line-height: 1.5; word-wrap: break-word; } .user-message .message-content { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-bottom-right-radius: 6px; } .assistant-message .message-content { background: #f8f9fa; color: #333; border: 1px solid #e9ecef; border-bottom-left-radius: 6px; } .message-timestamp { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; padding: 0 0.5rem; } /* Welcome message */ .welcome-message .message-content { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; border: none; } .welcome-message ul { margin: 0.5rem 0; padding-left: 1.5rem; } .welcome-message li { margin-bottom: 0.25rem; } /* Code blocks */ .message-content pre { background: #2d3748; color: #e2e8f0; padding: 1rem; border-radius: 8px; margin: 0.5rem 0; overflow-x: auto; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 0.875rem; line-height: 1.4; position: relative; cursor: pointer; transition: background-color 0.2s; } .message-content pre:hover { background: #4a5568; } .message-content pre::after { content: 'Click to copy'; position: absolute; top: 0.5rem; right: 0.5rem; background: rgba(0, 0, 0, 0.7); color: white; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; } .message-content pre:hover::after { opacity: 1; } .message-content code { background: rgba(0, 0, 0, 0.1); padding: 0.125rem 0.25rem; border-radius: 3px; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 0.875rem; } .message-content pre code { background: none; padding: 0; } /* Typing indicator */ .typing-indicator { padding: 0 1rem; } .typing-animation { display: inline-flex; align-items: center; gap: 0.25rem; margin-right: 0.5rem; } .typing-animation span { width: 6px; height: 6px; border-radius: 50%; background-color: #6b7280; animation: typing 1.4s infinite ease-in-out; } .typing-animation span:nth-child(1) { animation-delay: -0.32s; } .typing-animation span:nth-child(2) { animation-delay: -0.16s; } @keyframes typing { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } } .typing-text { font-style: italic; color: #6b7280; font-size: 0.875rem; } /* Input area */ .chat-input-container { border-top: 1px solid #e5e7eb; background: white; padding: 1rem 1.5rem; } .error-message { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; } .error-close { background: none; border: none; color: #dc2626; font-size: 1.25rem; cursor: pointer; padding: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; } .chat-input-wrapper { display: flex; align-items: flex-end; gap: 0.75rem; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 12px; padding: 0.75rem; transition: border-color 0.2s; } .chat-input-wrapper:focus-within { border-color: #667eea; } .message-input { flex: 1; border: none; background: none; resize: none; outline: none; font-family: inherit; font-size: 1rem; line-height: 1.5; min-height: 24px; max-height: 120px; overflow-y: auto; } .message-input::placeholder { color: #9ca3af; } .send-button { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; } .send-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); } .send-button:disabled { background: #d1d5db; cursor: not-allowed; transform: none; box-shadow: none; } .input-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; font-size: 0.75rem; color: #6b7280; } .character-count { font-weight: 500; } .character-count.warning { color: #f59e0b; } .character-count.error { color: #dc2626; } /* Responsive design */ @media (max-width: 768px) { .chat-header { flex-direction: column; gap: 1rem; padding: 1rem; } .header-left, .header-right { width: 100%; } .header-right { display: flex; justify-content: center; } .message-content { max-width: 90%; } .chat-input-container { padding: 1rem; } .input-footer { flex-direction: column; gap: 0.25rem; align-items: flex-start; } } @media (max-width: 480px) { .chat-header h1 { font-size: 1.25rem; } .message-content { max-width: 95%; padding: 0.875rem 1rem; } .chat-input-wrapper { padding: 0.5rem; } .send-button { width: 36px; height: 36px; } } /* Dark mode support */ @media (prefers-color-scheme: dark) { body { background-color: #1f2937; color: #f9fafb; } .chat-container { background: #111827; } .assistant-message .message-content { background: #374151; color: #f9fafb; border-color: #4b5563; } .chat-input-container { background: #111827; border-color: #374151; } .chat-input-wrapper { background: #1f2937; border-color: #4b5563; } .message-input::placeholder { color: #6b7280; } .error-message { background: #1f2937; border-color: #dc2626; color: #fca5a5; } } /* Loading animation for streaming responses */ .streaming-response { position: relative; } .streaming-response::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1s infinite; margin-left: 2px; } @keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } /* Notification toast */ .notification-toast { position: fixed; top: 20px; right: 20px; background: #10b981; color: white; padding: 0.75rem 1rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); z-index: 1000; animation: slideIn 0.3s ease-out; } .notification-toast.error { background: #dc2626; } .notification-toast.warning { background: #f59e0b; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }