Spaces:
Running
Running
| :root { | |
| --primary: #4F46E5; | |
| --primary-dark: #4338CA; | |
| --secondary: #7C3AED; | |
| --bg-primary: #0F172A; | |
| --bg-secondary: #1E293B; | |
| --bg-tertiary: #334155; | |
| --text-primary: #F8FAFC; | |
| --text-secondary: #94A3B8; | |
| --text-muted: #64748B; | |
| --user-bubble: #4F46E5; | |
| --ai-bubble: #1E293B; | |
| --border: #334155; | |
| --success: #10B981; | |
| --error: #EF4444; | |
| --warning: #F59E0B; | |
| --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3); | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| min-height: 100vh; | |
| overflow: hidden; | |
| } | |
| .app-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| max-width: 900px; | |
| margin: 0 auto; | |
| background: var(--bg-primary); | |
| } | |
| /* Header */ | |
| .header { | |
| background: var(--bg-secondary); | |
| border-bottom: 1px solid var(--border); | |
| padding: 1rem 1.5rem; | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| } | |
| .header-content { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| } | |
| .logo h1 { | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| background: linear-gradient(135deg, var(--primary), var(--secondary)); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| .header-links { | |
| display: flex; | |
| align-items: center; | |
| gap: 1rem; | |
| } | |
| .anycoder-link { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| text-decoration: none; | |
| padding: 0.375rem 0.75rem; | |
| background: var(--bg-tertiary); | |
| border-radius: 9999px; | |
| transition: all 0.2s ease; | |
| } | |
| .anycoder-link:hover { | |
| color: var(--text-primary); | |
| background: var(--primary); | |
| } | |
| /* Status Bar */ | |
| .status-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| padding: 0.5rem 1.5rem; | |
| background: var(--bg-secondary); | |
| border-bottom: 1px solid var(--border); | |
| font-size: 0.75rem; | |
| color: var(--text-secondary); | |
| } | |
| .status-indicator { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: var(--success); | |
| animation: pulse 2s infinite; | |
| } | |
| .status-bar.searching .status-indicator { | |
| background: var(--warning); | |
| } | |
| .status-bar.error .status-indicator { | |
| background: var(--error); | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| } | |
| /* Chat Container */ | |
| .chat-container { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 1.5rem; | |
| scroll-behavior: smooth; | |
| } | |
| .chat-messages { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1.25rem; | |
| } | |
| /* Messages */ | |
| .message { | |
| display: flex; | |
| gap: 0.75rem; | |
| max-width: 85%; | |
| animation: fadeIn 0.3s ease; | |
| } | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| .message.user-message { | |
| flex-direction: row-reverse; | |
| margin-left: auto; | |
| } | |
| .message-avatar { | |
| width: 36px; | |
| height: 36px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| flex-shrink: 0; | |
| background: var(--bg-tertiary); | |
| } | |
| .message.user-message .message-avatar { | |
| background: var(--primary); | |
| } | |
| .message-content { | |
| padding: 0.875rem 1rem; | |
| border-radius: 1rem; | |
| line-height: 1.5; | |
| box-shadow: var(--shadow); | |
| } | |
| .user-message .message-content { | |
| background: var(--user-bubble); | |
| border-bottom-right-radius: 0.25rem; | |
| } | |
| .ai-message .message-content { | |
| background: var(--ai-bubble); | |
| border-bottom-left-radius: 0.25rem; | |
| } | |
| .message-content p { | |
| margin-bottom: 0.5rem; | |
| } | |
| .message-content p:last-child { | |
| margin-bottom: 0; | |
| } | |
| /* Example Queries */ | |
| .example-queries { | |
| margin-top: 0.75rem; | |
| padding-top: 0.75rem; | |
| border-top: 1px solid var(--border); | |
| } | |
| .example-queries p { | |
| font-size: 0.875rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 0.5rem; | |
| } | |
| .example-queries ul { | |
| list-style: none; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.375rem; | |
| } | |
| .example-queries li { | |
| font-size: 0.8125rem; | |
| color: var(--primary); | |
| cursor: pointer; | |
| padding: 0.25rem 0; | |
| transition: color 0.2s; | |
| } | |
| .example-queries li:hover { | |
| color: var(--secondary); | |
| text-decoration: underline; | |
| } | |
| /* Answer Types */ | |
| .answer-section { | |
| margin: 0.75rem 0; | |
| padding: 0.75rem; | |
| background: var(--bg-primary); | |
| border-radius: 0.5rem; | |
| border-left: 3px solid var(--primary); | |
| } | |
| .answer-section.definition { | |
| border-left-color: var(--success); | |
| } | |
| .answer-section.abstract { | |
| border-left-color: var(--secondary); | |
| } | |
| .answer-section.answer { | |
| border-left-color: var(--warning); | |
| } | |
| .answer-section.related { | |
| border-left-color: #3B82F6; | |
| } | |
| .answer-section h4 { | |
| font-size: 0.75rem; | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| color: var(--text-muted); | |
| margin-bottom: 0.5rem; | |
| } | |
| .answer-section p { | |
| color: var(--text-primary); | |
| font-size: 0.9375rem; | |
| } | |
| .source-link { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| margin-top: 0.5rem; | |
| } | |
| .source-link a { | |
| color: var(--primary); | |
| text-decoration: none; | |
| } | |
| .source-link a:hover { | |
| text-decoration: underline; | |
| } | |
| .related-topics { | |
| margin-top: 0.75rem; | |
| } | |
| .related-topics h4 { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| margin-bottom: 0.5rem; | |
| } | |
| .topic-tags { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 0.375rem; | |
| } | |
| .topic-tag { | |
| font-size: 0.75rem; | |
| padding: 0.25rem 0.625rem; | |
| background: var(--bg-tertiary); | |
| border-radius: 9999px; | |
| color: var(--text-secondary); | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| border: none; | |
| font-family: inherit; | |
| } | |
| .topic-tag:hover { | |
| background: var(--primary); | |
| color: var(--text-primary); | |
| } | |
| /* Loading */ | |
| .loading-message .typing-indicator { | |
| display: flex; | |
| gap: 0.25rem; | |
| margin-bottom: 0.5rem; | |
| } | |
| .typing-indicator span { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: var(--text-muted); | |
| animation: bounce 1.4s infinite ease-in-out; | |
| } | |
| .typing-indicator span:nth-child(1) { animation-delay: 0s; } | |
| .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } | |
| .typing-indicator span:nth-child(3) { animation-delay: 0.4s; } | |
| @keyframes bounce { | |
| 0%, 80%, 100% { transform: translateY(0); } | |
| 40% { transform: translateY(-6px); } | |
| } | |
| .loading-text { | |
| font-size: 0.8125rem; | |
| color: var(--text-muted); | |
| } | |
| /* Input Area */ | |
| .input-area { | |
| background: var(--bg-secondary); | |
| border-top: 1px solid var(--border); | |
| padding: 1rem 1.5rem; | |
| } | |
| .chat-form { | |
| margin-bottom: 0.5rem; | |
| } | |
| .input-wrapper { | |
| display: flex; | |
| gap: 0.75rem; | |
| background: var(--bg-primary); | |
| border: 1px solid var(--border); | |
| border-radius: 9999px; | |
| padding: 0.375rem 0.5rem; | |
| transition: border-color 0.2s, box-shadow 0.2s; | |
| } | |
| .input-wrapper:focus-within { | |
| border-color: var(--primary); | |
| box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); | |
| } | |
| .input-wrapper input { | |
| flex: 1; | |
| background: transparent; | |
| border: none; | |
| outline: none; | |
| padding: 0.625rem 1rem; | |
| font-size: 0.9375rem; | |
| color: var(--text-primary); | |
| font-family: inherit; | |
| } | |
| .input-wrapper input::placeholder { | |
| color: var(--text-muted); | |
| } | |
| .input-wrapper button { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| border: none; | |
| background: var(--primary); | |
| color: white; | |
| cursor: pointer; | |
| transition: background 0.2s, transform 0.1s; | |
| } | |
| .input-wrapper button:hover:not(:disabled) { | |
| background: var(--primary-dark); | |
| } | |
| .input-wrapper button:active:not(:disabled) { | |
| transform: scale(0.95); | |
| } | |
| .input-wrapper button:disabled { | |
| background: var(--bg-tertiary); | |
| cursor: not-allowed; | |
| } | |
| .api-info { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 0.375rem; | |
| font-size: 0.6875rem; | |
| color: var(--text-muted); | |
| } | |
| /* Scrollbar */ | |
| .chat-container::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| .chat-container::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| .chat-container::-webkit-scrollbar-thumb { | |
| background: var(--bg-tertiary); | |
| border-radius: 3px; | |
| } | |
| .chat-container::-webkit-scrollbar-thumb:hover { | |
| background: var(--text-muted); | |
| } | |
| /* Responsive */ | |
| @media (max-width: 640px) { | |
| .header { | |
| padding: 0.75rem 1rem; | |
| } | |
| .logo h1 { | |
| font-size: 1.125rem; | |
| } | |
| .chat-container { | |
| padding: 1rem; | |
| } | |
| .message { | |
| max-width: 90%; | |
| } | |
| .input-area { | |
| padding: 0.75rem 1rem; | |
| } | |
| } |