Spaces:
Running
Running
| /* Custom styles for Claude Chat Interface - Dark Mode */ | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
| :root { | |
| --primary-color: #60A5FA; | |
| --primary-hover: #3B82F6; | |
| --success-color: #34D399; | |
| --error-color: #F87171; | |
| --warning-color: #FBBF24; | |
| --text-primary: #F9FAFB; | |
| --text-secondary: #D1D5DB; | |
| --border-color: #374151; | |
| --bg-secondary: #1F2937; | |
| --bg-tertiary: #111827; | |
| --message-user-bg: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%); | |
| } | |
| * { | |
| font-family: 'Inter', system-ui, -apple-system, sans-serif; | |
| } | |
| body { | |
| overscroll-behavior: contain; | |
| background: var(--bg-tertiary); | |
| } | |
| /* Update Tailwind background class */ | |
| body.bg-gray-50 { | |
| background: var(--bg-tertiary) ; | |
| } | |
| /* Message Styles */ | |
| .message { | |
| animation: messageSlideIn 0.3s ease-out; | |
| transition: all 0.2s ease; | |
| } | |
| @keyframes messageSlideIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| .message-user { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| margin-left: auto; | |
| max-width: 70%; | |
| border-radius: 18px 18px 4px 18px; | |
| } | |
| .message-assistant { | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| color: var(--text-primary); | |
| margin-right: auto; | |
| max-width: 85%; | |
| border-radius: 18px 18px 18px 4px; | |
| } | |
| .message-system { | |
| background: var(--bg-secondary); | |
| border-left: 3px solid var(--warning-color); | |
| color: var(--text-primary); | |
| text-align: center; | |
| max-width: 100%; | |
| border-radius: 8px; | |
| } | |
| .message-header { | |
| font-size: 0.75rem; | |
| font-weight: 600; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| opacity: 0.8; | |
| } | |
| .message-content { | |
| line-height: 1.6; | |
| word-wrap: break-word; | |
| } | |
| /* Markdown Styles */ | |
| .message-content h1, | |
| .message-content h2, | |
| .message-content h3, | |
| .message-content h4, | |
| .message-content h5, | |
| .message-content h6 { | |
| font-weight: 600; | |
| margin: 1rem 0 0.5rem; | |
| } | |
| .message-content h1 { font-size: 1.5rem; } | |
| .message-content h2 { font-size: 1.25rem; } | |
| .message-content h3 { font-size: 1.125rem; } | |
| .message-content p { | |
| margin: 0.75rem 0; | |
| } | |
| .message-content ul, | |
| .message-content ol { | |
| margin: 0.75rem 0; | |
| padding-left: 1.5rem; | |
| } | |
| .message-content li { | |
| margin: 0.25rem 0; | |
| } | |
| .message-content code { | |
| background: #374151; | |
| padding: 0.125rem 0.375rem; | |
| border-radius: 4px; | |
| font-family: 'Courier New', monospace; | |
| font-size: 0.875em; | |
| color: #FBBF24; | |
| } | |
| .message-content pre { | |
| background: #111827; | |
| color: #F9FAFB; | |
| border: 1px solid var(--border-color); | |
| padding: 1rem; | |
| border-radius: 8px; | |
| overflow-x: auto; | |
| margin: 1rem 0; | |
| } | |
| .message-content pre code { | |
| background: none; | |
| color: inherit; | |
| padding: 0; | |
| } | |
| .message-content a { | |
| color: var(--primary-color); | |
| text-decoration: underline; | |
| transition: color 0.2s; | |
| } | |
| .message-content a:hover { | |
| color: var(--primary-hover); | |
| } | |
| /* Textarea Styles */ | |
| #messageInput { | |
| min-height: 44px; | |
| max-height: 150px; | |
| scrollbar-width: thin; | |
| scrollbar-color: #CBD5E1 transparent; | |
| } | |
| #messageInput::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| #messageInput::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| #messageInput::-webkit-scrollbar-thumb { | |
| background-color: #CBD5E1; | |
| border-radius: 3px; | |
| } | |
| #messageInput:focus { | |
| outline: none; | |
| box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); | |
| } | |
| /* Chat Container Scrollbar */ | |
| #chatContainer { | |
| scrollbar-width: thin; | |
| scrollbar-color: #CBD5E1 transparent; | |
| } | |
| #chatContainer::-webkit-scrollbar { | |
| width: 8px; | |
| } | |
| #chatContainer::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| #chatContainer::-webkit-scrollbar-thumb { | |
| background-color: #CBD5E1; | |
| border-radius: 4px; | |
| } | |
| #chatContainer::-webkit-scrollbar-thumb:hover { | |
| background-color: #9CA3AF; | |
| } | |
| /* Button States */ | |
| .btn-primary:active:not(:disabled) { | |
| transform: scale(0.95); | |
| } | |
| .btn-secondary:active:not(:disabled) { | |
| transform: scale(0.95); | |
| } | |
| /* Mobile Responsive Adjustments */ | |
| @media (max-width: 767px) { | |
| .message-user { | |
| max-width: 85%; | |
| } | |
| .message-assistant { | |
| max-width: 90%; | |
| } | |
| #examplesSection .flex-wrap { | |
| flex-direction: column; | |
| } | |
| #examplesSection button { | |
| width: 100%; | |
| justify-content: center; | |
| } | |
| } | |
| /* Accessibility */ | |
| @media (prefers-reduced-motion: reduce) { | |
| * { | |
| animation-duration: 0.01ms ; | |
| animation-iteration-count: 1 ; | |
| transition-duration: 0.01ms ; | |
| } | |
| } | |
| /* Focus Styles for Accessibility */ | |
| button:focus-visible, | |
| textarea:focus-visible, | |
| select:focus-visible { | |
| outline: 2px solid var(--primary-color); | |
| outline-offset: 2px; | |
| } | |
| /* Loading Animation */ | |
| .loading-dots { | |
| display: inline-flex; | |
| gap: 4px; | |
| } | |
| .loading-dots span { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background-color: currentColor; | |
| animation: loadingBounce 1.4s infinite ease-in-out both; | |
| } | |
| .loading-dots span:nth-child(1) { | |
| animation-delay: -0.32s; | |
| } | |
| .loading-dots span:nth-child(2) { | |
| animation-delay: -0.16s; | |
| } | |
| @keyframes loadingBounce { | |
| 0%, 80%, 100% { | |
| transform: scale(0); | |
| opacity: 0.5; | |
| } | |
| 40% { | |
| transform: scale(1); | |
| opacity: 1; | |
| } | |
| } | |
| /* Tooltip */ | |
| .tooltip { | |
| position: relative; | |
| } | |
| .tooltip::before { | |
| content: attr(data-tooltip); | |
| position: absolute; | |
| bottom: 100%; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| background: #374151; | |
| color: var(--text-primary); | |
| border: 1px solid var(--border-color); | |
| padding: 0.5rem 0.75rem; | |
| border-radius: 6px; | |
| font-size: 0.875rem; | |
| white-space: nowrap; | |
| opacity: 0; | |
| pointer-events: none; | |
| transition: opacity 0.2s; | |
| margin-bottom: 0.5rem; | |
| } | |
| .tooltip:hover::before { | |
| opacity: 1; | |
| } | |
| /* Selection highlight */ | |
| ::selection { | |
| background-color: rgba(96, 165, 250, 0.3); | |
| } | |
| /* Dark mode specific styles */ | |
| .bg-white { | |
| background-color: var(--bg-secondary) ; | |
| } | |
| .text-gray-700 { | |
| color: var(--text-primary) ; | |
| } | |
| .text-gray-500 { | |
| color: var(--text-secondary) ; | |
| } | |
| .border-gray-200 { | |
| border-color: var(--border-color) ; | |
| } | |
| .border-gray-300 { | |
| border-color: var(--border-color) ; | |
| } | |
| .hover\:bg-gray-100:hover { | |
| background-color: var(--bg-secondary) ; | |
| } | |
| .hover\:bg-gray-50:hover { | |
| background-color: var(--bg-tertiary) ; | |
| } | |
| .hover\:border-gray-300:hover { | |
| border-color: var(--border-color) ; | |
| } | |
| .placeholder-gray-400::placeholder { | |
| color: var(--text-secondary) ; | |
| } | |
| .focus\:border-blue-500:focus { | |
| border-color: var(--primary-color) ; | |
| } | |
| .focus\:ring-blue-200:focus { | |
| --tw-ring-color: rgba(96, 165, 250, 0.2) ; | |
| } | |
| .shadow-sm { | |
| box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) ; | |
| } | |
| /* Chat container dark mode */ | |
| #chatContainer { | |
| background: var(--bg-secondary) ; | |
| border-color: var(--border-color) ; | |
| } | |
| /* Input area dark mode */ | |
| #messageInput { | |
| background: var(--bg-secondary) ; | |
| color: var(--text-primary) ; | |
| border-color: var(--border-color) ; | |
| } | |
| #messageInput:focus { | |
| background: var(--bg-secondary) ; | |
| color: var(--text-primary) ; | |
| } | |
| /* Example buttons dark mode */ | |
| .example-btn { | |
| background: var(--bg-secondary) ; | |
| color: var(--text-primary) ; | |
| border-color: var(--border-color) ; | |
| } | |
| .example-btn:hover { | |
| background: var(--bg-tertiary) ; | |
| border-color: var(--border-color) ; | |
| } | |
| /* Typing indicator dark mode */ | |
| #typingIndicator { | |
| color: var(--text-secondary) ; | |
| } | |
| /* Character counter dark mode */ | |
| #charCounter { | |
| color: var(--text-secondary) ; | |
| } | |
| /* Scroll to bottom button dark mode */ | |
| #scrollToBottom { | |
| background: var(--primary-color) ; | |
| } | |
| #scrollToBottom:hover { | |
| background: var(--primary-hover) ; | |
| } | |
| /* Send and Stream buttons */ | |
| #sendBtn, #streamBtn { | |
| background: var(--primary-color) ; | |
| } | |
| #sendBtn:hover, #streamBtn:hover { | |
| background: var(--primary-hover) ; | |
| } | |
| #streamBtn { | |
| background: var(--success-color) ; | |
| } | |
| #streamBtn:hover { | |
| background: #10B981 ; | |
| } | |