Spaces:
Running
Running
| /* Reset and Base Styles */ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; | |
| } | |
| :root { | |
| --primary-color: #0084ff; | |
| --secondary-color: #e7f2ff; | |
| --text-color: #333; | |
| --text-light: #777; | |
| --bg-color: #fff; | |
| --bg-light: #f5f7f9; | |
| --border-color: #eaeaea; | |
| --shadow-color: rgba(0, 0, 0, 0.1); | |
| } | |
| body { | |
| background-color: var(--bg-light); | |
| color: var(--text-color); | |
| line-height: 1.6; | |
| } | |
| /* Chat Container */ | |
| .chat-container { | |
| max-width: 100%; | |
| height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| background-color: var(--bg-color); | |
| position: relative; | |
| box-shadow: 0 0 20px var(--shadow-color); | |
| } | |
| /* Chat Header */ | |
| .chat-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 16px 20px; | |
| background-color: var(--bg-color); | |
| border-bottom: 1px solid var(--border-color); | |
| box-shadow: 0 2px 8px var(--shadow-color); | |
| z-index: 10; | |
| } | |
| .chat-header h1 { | |
| font-size: 18px; | |
| font-weight: 600; | |
| color: var(--text-color); | |
| } | |
| .header-actions { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| } | |
| .menu-btn, .new-chat-btn, .theme-toggle-btn { | |
| background: none; | |
| border: none; | |
| font-size: 18px; | |
| color: var(--text-light); | |
| cursor: pointer; | |
| padding: 8px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 36px; | |
| height: 36px; | |
| transition: all 0.2s ease; | |
| } | |
| .menu-btn:hover, .new-chat-btn:hover, .theme-toggle-btn:hover { | |
| background-color: var(--bg-light); | |
| color: var(--text-color); | |
| } | |
| /* Welcome Message */ | |
| .welcome-message { | |
| text-align: center; | |
| max-width: 400px; | |
| padding: 24px; | |
| background-color: var(--bg-color); | |
| border-radius: 12px; | |
| box-shadow: 0 2px 12px var(--shadow-color); | |
| margin: auto; | |
| } | |
| .welcome-logo { | |
| width: 90px; | |
| height: 90px; | |
| margin-bottom: 20px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| box-shadow: 0 2px 8px var(--shadow-color); | |
| } | |
| .welcome-message h2 { | |
| font-size: 24px; | |
| margin-bottom: 12px; | |
| color: var(--text-color); | |
| } | |
| .welcome-message p { | |
| color: var(--text-light); | |
| font-size: 16px; | |
| margin-bottom: 16px; | |
| } | |
| .context-info { | |
| font-size: 13px; | |
| color: var(--text-light); | |
| background-color: var(--bg-light); | |
| padding: 8px 12px; | |
| border-radius: 8px; | |
| margin-top: 16px; | |
| } | |
| /* Dark Theme */ | |
| [data-theme="dark"] { | |
| --primary-color: #1a91ff; | |
| --secondary-color: #2c4763; | |
| --text-color: #e1e1e1; | |
| --text-light: #999; | |
| --bg-color: #1a1a1a; | |
| --bg-light: #2c2c2c; | |
| --border-color: #333; | |
| --shadow-color: rgba(0, 0, 0, 0.3); | |
| } | |
| /* Status Bar */ | |
| .status-bar { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 4px 16px; | |
| background-color: #fff; | |
| font-size: 14px; | |
| height: 24px; | |
| } | |
| .status-icons { | |
| display: flex; | |
| gap: 8px; | |
| align-items: center; | |
| } | |
| .network { | |
| font-size: 12px; | |
| color: #666; | |
| } | |
| /* Chat Messages */ | |
| .chat-messages { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 16px; | |
| display: flex; | |
| flex-direction: column; | |
| background-color: #f5f7f9; | |
| } | |
| /* Chat Input */ | |
| .chat-input { | |
| padding: 16px; | |
| background-color: #fff; | |
| border-top: 1px solid #eaeaea; | |
| box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); | |
| } | |
| .input-container { | |
| background-color: #f5f7f9; | |
| border-radius: 24px; | |
| padding: 10px 16px; | |
| display: flex; | |
| align-items: center; | |
| transition: all 0.3s ease; | |
| } | |
| .input-container:focus-within { | |
| background-color: #fff; | |
| box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); | |
| border: 1px solid #d0e3ff; | |
| } | |
| #message-input { | |
| width: 100%; | |
| border: none; | |
| outline: none; | |
| font-size: 15px; | |
| padding: 8px 0; | |
| background: transparent; | |
| color: #333; | |
| } | |
| #message-input::placeholder { | |
| color: #999; | |
| } | |
| .input-actions { | |
| display: flex; | |
| align-items: center; | |
| justify-content: flex-end; | |
| gap: 12px; | |
| margin-left: 10px; | |
| } | |
| .more-btn, .send-btn { | |
| background: none; | |
| border: none; | |
| padding: 8px; | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 50%; | |
| transition: all 0.2s ease; | |
| } | |
| .more-btn { | |
| color: #666; | |
| width: 32px; | |
| height: 32px; | |
| } | |
| .more-btn:hover { | |
| background-color: #eaeaea; | |
| color: #333; | |
| } | |
| .send-btn { | |
| background-color: #0084ff; | |
| color: white; | |
| width: 36px; | |
| height: 36px; | |
| } | |
| .send-btn:hover { | |
| background-color: #0078e7; | |
| transform: scale(1.05); | |
| } | |
| .send-btn:disabled { | |
| background-color: #ccc; | |
| cursor: not-allowed; | |
| opacity: 0.7; | |
| transform: none; | |
| } | |
| .send-btn i { | |
| font-size: 16px; | |
| } | |
| /* Dark Theme Chat Input */ | |
| [data-theme="dark"] .chat-input { | |
| background-color: #1e1e1e; | |
| border-color: #333; | |
| box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); | |
| } | |
| [data-theme="dark"] .input-container { | |
| background-color: #2c2c2c; | |
| } | |
| [data-theme="dark"] .input-container:focus-within { | |
| background-color: #333; | |
| box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3); | |
| border-color: #555; | |
| } | |
| [data-theme="dark"] #message-input { | |
| color: #e1e1e1; | |
| } | |
| [data-theme="dark"] #message-input::placeholder { | |
| color: #777; | |
| } | |
| [data-theme="dark"] .more-btn { | |
| color: #aaa; | |
| } | |
| [data-theme="dark"] .more-btn:hover { | |
| background-color: #444; | |
| color: #fff; | |
| } | |
| /* Message Bubbles */ | |
| .message { | |
| margin: 16px 0; | |
| max-width: 85%; | |
| animation: fadeIn 0.3s ease; | |
| position: relative; | |
| } | |
| /* User Message Styling */ | |
| .message.user-message { | |
| align-self: flex-start; | |
| } | |
| .question-bubble { | |
| background-color: #fff; | |
| color: #1a1a1a; | |
| padding: 12px 16px; | |
| border-radius: 18px; | |
| border-top-left-radius: 4px; | |
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); | |
| font-size: 15px; | |
| line-height: 1.5; | |
| position: relative; | |
| } | |
| /* Bot Message Styling */ | |
| .message.bot-message { | |
| align-self: flex-end; | |
| } | |
| .answer-container { | |
| display: flex; | |
| gap: 12px; | |
| align-items: flex-start; | |
| margin-left: auto; | |
| } | |
| .bot-icon { | |
| flex-shrink: 0; | |
| width: 36px; | |
| height: 36px; | |
| border-radius: 50%; | |
| overflow: hidden; | |
| background-color: transparent; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | |
| } | |
| .bot-icon img { | |
| width: 100%; | |
| height: 100%; | |
| object-fit: contain; | |
| display: block; | |
| } | |
| .answer-content { | |
| background-color: #e7f2ff; | |
| padding: 16px; | |
| border-radius: 18px; | |
| border-top-right-radius: 4px; | |
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); | |
| color: #333; | |
| font-size: 15px; | |
| line-height: 1.6; | |
| max-width: calc(100% - 48px); | |
| } | |
| /* Response Formatting */ | |
| .response-heading { | |
| font-size: 20px; | |
| font-weight: 600; | |
| margin: 16px 0 12px; | |
| color: #1a1a1a; | |
| border-bottom: 1px solid rgba(0, 0, 0, 0.1); | |
| padding-bottom: 8px; | |
| } | |
| .definition { | |
| margin: 12px 0; | |
| line-height: 1.6; | |
| } | |
| .term { | |
| font-weight: 600; | |
| color: #1a1a1a; | |
| } | |
| .definition-text { | |
| color: #444; | |
| } | |
| .numbered-list { | |
| margin: 12px 0; | |
| } | |
| .list-item { | |
| display: flex; | |
| margin: 12px 0; | |
| align-items: flex-start; | |
| } | |
| .number { | |
| font-weight: 600; | |
| margin-right: 8px; | |
| color: #1a1a1a; | |
| min-width: 25px; | |
| } | |
| .list-content { | |
| flex: 1; | |
| } | |
| .list-term { | |
| font-weight: 600; | |
| color: #1a1a1a; | |
| } | |
| .list-definition { | |
| color: #444; | |
| display: block; | |
| margin-top: 4px; | |
| } | |
| .response-paragraph { | |
| margin: 12px 0; | |
| color: #333; | |
| } | |
| /* Message Timestamp */ | |
| .message-time { | |
| font-size: 11px; | |
| color: #999; | |
| margin-top: 4px; | |
| text-align: right; | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| /* Dark Theme Adjustments */ | |
| [data-theme="dark"] .chat-messages { | |
| background-color: #1a1a1a; | |
| } | |
| [data-theme="dark"] .question-bubble { | |
| background-color: #2c2c2c; | |
| color: #e1e1e1; | |
| } | |
| [data-theme="dark"] .answer-content { | |
| background-color: #383838; | |
| color: #e1e1e1; | |
| border-color: #444; | |
| } | |
| [data-theme="dark"] .response-heading { | |
| color: #e1e1e1; | |
| border-color: rgba(255, 255, 255, 0.1); | |
| } | |
| [data-theme="dark"] .term, | |
| [data-theme="dark"] .number, | |
| [data-theme="dark"] .list-term { | |
| color: #e1e1e1; | |
| } | |
| [data-theme="dark"] .definition-text, | |
| [data-theme="dark"] .list-definition, | |
| [data-theme="dark"] .response-paragraph { | |
| color: #b4b4b4; | |
| } | |
| [data-theme="dark"] .message-time { | |
| color: #777; | |
| } | |
| /* Typing indicator adjustments */ | |
| .typing-indicator { | |
| background: transparent ; | |
| margin-bottom: 8px; | |
| } | |
| .typing-indicator span { | |
| background-color: var(--text-secondary); | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .chat-container { | |
| height: 100vh; | |
| } | |
| .welcome-message { | |
| padding: 0 16px; | |
| } | |
| .input-container { | |
| margin-bottom: env(safe-area-inset-bottom, 0); | |
| } | |
| } | |
| /* Error Message */ | |
| .error-message { | |
| background-color: #ffebee; | |
| color: #c62828; | |
| border: 1px solid #ffcdd2; | |
| padding: 12px 16px; | |
| margin: 8px 0; | |
| border-radius: 8px; | |
| font-size: 14px; | |
| text-align: center; | |
| animation: shake 0.5s ease-in-out; | |
| } | |
| @keyframes shake { | |
| 0%, 100% { transform: translateX(0); } | |
| 25% { transform: translateX(-4px); } | |
| 75% { transform: translateX(4px); } | |
| } | |
| /* Menu Overlay Styles */ | |
| .menu-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: -100%; | |
| width: 100%; | |
| height: 100%; | |
| background-color: rgba(0, 0, 0, 0.5); | |
| z-index: 1000; | |
| opacity: 0; | |
| visibility: hidden; | |
| transition: opacity 0.3s ease, visibility 0.3s ease; | |
| } | |
| .menu-overlay.active { | |
| left: 0; | |
| opacity: 1; | |
| visibility: visible; | |
| } | |
| .menu-content { | |
| position: absolute; | |
| top: 0; | |
| left: -300px; | |
| width: 300px; | |
| height: 100%; | |
| background-color: #fff; | |
| box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1); | |
| transition: left 0.3s ease-in-out; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .menu-overlay.active .menu-content { | |
| left: 0; | |
| } | |
| .menu-header { | |
| padding: 20px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| border-bottom: 1px solid #eee; | |
| } | |
| .menu-logo { | |
| height: 40px; | |
| width: 40px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| } | |
| .close-menu-btn { | |
| background: none; | |
| border: none; | |
| font-size: 24px; | |
| color: #666; | |
| cursor: pointer; | |
| padding: 8px; | |
| transition: color 0.2s ease; | |
| } | |
| .close-menu-btn:hover { | |
| color: #333; | |
| } | |
| .menu-nav { | |
| padding: 20px 0; | |
| flex-grow: 1; | |
| } | |
| .menu-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 15px 20px; | |
| color: #333; | |
| text-decoration: none; | |
| transition: background-color 0.2s ease; | |
| } | |
| .menu-item:hover { | |
| background-color: #f5f5f5; | |
| } | |
| .menu-item i { | |
| width: 24px; | |
| margin-right: 15px; | |
| color: #4285f4; | |
| } | |
| .menu-item span { | |
| font-size: 16px; | |
| } | |
| /* Recent Conversations Styles */ | |
| .recent-conversations { | |
| padding: 16px 0; | |
| } | |
| .recent-conversations h3 { | |
| font-size: 14px; | |
| color: #666; | |
| padding: 0 20px; | |
| margin-bottom: 12px; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| } | |
| .conversation-list { | |
| margin-bottom: 8px; | |
| } | |
| .conversation-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 12px 20px; | |
| color: #333; | |
| text-decoration: none; | |
| cursor: pointer; | |
| transition: background-color 0.2s ease; | |
| } | |
| .conversation-item:hover { | |
| background-color: #f5f5f5; | |
| } | |
| .conversation-item i { | |
| width: 24px; | |
| margin-right: 15px; | |
| color: #4285f4; | |
| } | |
| .conversation-item span { | |
| font-size: 15px; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .see-more-btn { | |
| display: flex; | |
| align-items: center; | |
| width: 100%; | |
| padding: 12px 20px; | |
| background: none; | |
| border: none; | |
| color: #4285f4; | |
| cursor: pointer; | |
| font-size: 15px; | |
| transition: background-color 0.2s ease; | |
| } | |
| .see-more-btn:hover { | |
| background-color: #f5f5f5; | |
| } | |
| .see-more-btn i { | |
| width: 24px; | |
| margin-right: 15px; | |
| } | |
| .menu-divider { | |
| height: 1px; | |
| background-color: #eee; | |
| margin: 8px 0; | |
| } | |
| /* Conversation Overlay Styles */ | |
| .conversation-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background-color: var(--overlay-bg); | |
| z-index: 2000; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| animation: fadeIn 0.3s ease; | |
| } | |
| .conversation-overlay-content { | |
| background-color: var(--bg-color); | |
| width: 90%; | |
| max-width: 600px; | |
| max-height: 80vh; | |
| border-radius: 12px; | |
| box-shadow: 0 4px 24px var(--shadow-color); | |
| overflow: hidden; | |
| animation: slideIn 0.3s ease; | |
| } | |
| .overlay-header { | |
| padding: 20px; | |
| border-bottom: 1px solid var(--border-color); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .overlay-header h2 { | |
| font-size: 20px; | |
| color: var(--text-color); | |
| } | |
| .close-overlay-btn { | |
| background: none; | |
| border: none; | |
| color: var(--icon-color); | |
| font-size: 24px; | |
| cursor: pointer; | |
| padding: 8px; | |
| transition: color 0.2s ease; | |
| } | |
| .close-overlay-btn:hover { | |
| color: var(--text-color); | |
| } | |
| .conversation-list-full { | |
| overflow-y: auto; | |
| max-height: calc(80vh - 70px); | |
| padding: 12px 0; | |
| } | |
| /* Enhanced Conversation Item Styles */ | |
| .conversation-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 16px 20px; | |
| transition: background-color 0.2s ease; | |
| cursor: pointer; | |
| border-bottom: 1px solid var(--border-color); | |
| } | |
| .conversation-item:last-child { | |
| border-bottom: none; | |
| } | |
| .conversation-item:hover { | |
| background-color: var(--hover-bg); | |
| } | |
| .conversation-details { | |
| flex-grow: 1; | |
| margin-left: 16px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| .conversation-title { | |
| font-size: 16px; | |
| font-weight: 500; | |
| color: var(--text-color); | |
| } | |
| .message-count { | |
| font-size: 14px; | |
| color: var(--secondary-text); | |
| } | |
| .conversation-date { | |
| font-size: 12px; | |
| color: var(--secondary-text); | |
| } | |
| @keyframes slideIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(20px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } |