Spaces:
Sleeping
Sleeping
| :root { | |
| --primary: #7c3aed; | |
| --primary-light: #a855f7; | |
| --primary-dark: #5b21b6; | |
| --background: #0f172a; | |
| --surface: #1e293b; | |
| --card: #334155; | |
| --text: #f8fafc; | |
| --text-secondary: #cbd5e1; | |
| --text-muted: #94a3b8; | |
| --border: #334155; | |
| --border-light: #475569; | |
| --success: #10b981; | |
| --warning: #f59e0b; | |
| --danger: #ef4444; | |
| --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2); | |
| --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2); | |
| --composer-height: 80px; | |
| } | |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| body { | |
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; | |
| background: var(--background); | |
| color: var(--text); | |
| height: 100vh; | |
| overflow: hidden; | |
| } | |
| .app { | |
| display: flex; | |
| height: 100vh; | |
| background: var(--background); | |
| } | |
| /* Sidebar */ | |
| .sidebar { | |
| width: 320px; | |
| background: linear-gradient(180deg, #111827 0%, #0f172a 60%); | |
| border-right: 1px solid var(--border); | |
| display: flex; | |
| flex-direction: column; | |
| flex-shrink: 0; | |
| } | |
| .sidebar-header { | |
| padding: 24px; | |
| border-bottom: 1px solid var(--border); | |
| } | |
| .user-info { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| margin-bottom: 20px; | |
| background: rgba(255,255,255,0.02); | |
| padding: 10px; | |
| border-radius: 12px; | |
| } | |
| .avatar { | |
| width: 40px; | |
| height: 40px; | |
| background: var(--primary); | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 18px; | |
| color: white; | |
| } | |
| .user-details .username { | |
| font-weight: 600; | |
| color: var(--text); | |
| font-size: 16px; | |
| } | |
| .user-details .status { | |
| font-size: 12px; | |
| color: var(--success); | |
| } | |
| .new-chat-btn { | |
| width: 100%; | |
| padding: 12px 16px; | |
| background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); | |
| color: white; | |
| border: none; | |
| border-radius: 10px; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25); | |
| } | |
| .new-chat-btn:hover { | |
| background: var(--primary-dark); | |
| transform: translateY(-1px); | |
| } | |
| .history-section { | |
| flex: 1; | |
| padding: 20px 24px; | |
| overflow-y: auto; | |
| } | |
| .history-section h3 { | |
| font-size: 14px; | |
| font-weight: 600; | |
| color: #a5b4fc; | |
| margin-bottom: 16px; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| } | |
| .history-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| .history-item { | |
| padding: 12px 16px; | |
| border-radius: 8px; | |
| cursor: pointer; | |
| color: var(--text-secondary); | |
| transition: all 0.2s ease; | |
| font-size: 14px; | |
| border: 1px solid transparent; | |
| } | |
| .history-item:hover { | |
| background: rgba(124,58,237,0.12); | |
| border-color: rgba(124,58,237,0.25); | |
| color: var(--text); | |
| } | |
| .history-item.active { | |
| background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); | |
| color: white; | |
| border-color: transparent; | |
| box-shadow: 0 6px 16px rgba(124,58,237,0.35); | |
| } | |
| .history-preview { | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| /* three-dot menu */ | |
| .history-menu-btn { | |
| position: absolute; | |
| right: 8px; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| background: transparent; | |
| border: none; | |
| color: var(--text-secondary); | |
| display: none; | |
| cursor: pointer; | |
| padding: 4px 6px; | |
| border-radius: 6px; | |
| } | |
| .history-item:hover .history-menu-btn, | |
| .history-item.active .history-menu-btn { display: inline-flex; } | |
| .history-menu-btn:hover { background: var(--card); } | |
| .history-menu { | |
| position: absolute; | |
| right: 8px; | |
| top: calc(100% - 6px); | |
| min-width: 140px; | |
| background: linear-gradient(180deg, #1f2937 0%, #111827 100%); | |
| border: 1px solid var(--border); | |
| border-radius: 8px; | |
| box-shadow: var(--shadow-lg); | |
| display: none; | |
| z-index: 10; | |
| } | |
| .history-menu.open { display: block; } | |
| .history-menu button { | |
| width: 100%; | |
| text-align: left; | |
| background: transparent; | |
| border: none; | |
| color: var(--text-secondary); | |
| padding: 10px 12px; | |
| cursor: pointer; | |
| } | |
| .history-menu button:hover { background: #374151; color: var(--text); } | |
| .history-menu .danger { color: #f87171; } | |
| .history-menu .danger:hover { background: rgba(248, 113, 113, 0.15); } | |
| /* inline delete button for history items */ | |
| .history-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| position: relative; | |
| padding-right: 36px; /* reserve space for delete icon */ | |
| } | |
| .history-delete { | |
| display: none; | |
| color: var(--text-muted); | |
| background: transparent; | |
| border: none; | |
| cursor: pointer; | |
| padding: 4px; | |
| border-radius: 6px; | |
| position: absolute; | |
| right: 8px; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } | |
| .history-item:hover .history-delete { | |
| display: inline-flex; | |
| } | |
| /* Always show delete on the active item */ | |
| .history-item.active .history-delete { | |
| display: inline-flex; | |
| } | |
| .history-delete:hover { | |
| color: #fff; | |
| background: rgba(239, 68, 68, 0.18); | |
| } | |
| .sidebar-footer { | |
| padding: 24px; | |
| border-top: 1px solid var(--border); | |
| } | |
| .logout-btn { | |
| width: 100%; | |
| padding: 10px; | |
| background: transparent; | |
| color: var(--text-secondary); | |
| border: 1px solid var(--border); | |
| border-radius: 8px; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| } | |
| .logout-btn:hover { | |
| background: var(--danger); | |
| color: white; | |
| border-color: var(--danger); | |
| } | |
| /* Chat Area */ | |
| .chat-area { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--background); | |
| height: 100vh; | |
| position: relative; | |
| } | |
| .chat-header { | |
| padding: 20px 24px; | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| background: var(--surface); | |
| flex-shrink: 0; | |
| } | |
| .chat-title h2 { | |
| font-size: 24px; | |
| font-weight: 700; | |
| color: var(--primary); | |
| margin-bottom: 4px; | |
| } | |
| .chat-subtitle { | |
| font-size: 14px; | |
| color: var(--text-secondary); | |
| } | |
| .chat-actions { | |
| display: flex; | |
| gap: 8px; | |
| align-items: center; | |
| } | |
| .action-btn { | |
| padding: 8px 16px; | |
| border: 1px solid var(--border); | |
| background: var(--surface); | |
| color: var(--text-secondary); | |
| border-radius: 8px; | |
| cursor: pointer; | |
| font-size: 14px; | |
| transition: all 0.2s ease; | |
| } | |
| .action-btn:hover { | |
| background: var(--card); | |
| color: var(--text); | |
| } | |
| .action-btn.danger:hover { | |
| background: var(--danger); | |
| color: white; | |
| border-color: var(--danger); | |
| } | |
| /* Messages Container - Fixed height calculation */ | |
| .messages-container { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 24px; | |
| padding-bottom: calc(var(--composer-height) + 24px); | |
| background: var(--background); | |
| } | |
| .messages { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 16px; | |
| width: 100%; | |
| min-height: 0; | |
| } | |
| .msg { | |
| display: flex; | |
| max-width: 80%; | |
| animation: fadeIn 0.3s ease; | |
| } | |
| .msg.user { | |
| align-self: flex-end; | |
| flex-direction: row-reverse; | |
| } | |
| .msg.bot { | |
| align-self: flex-start; | |
| } | |
| .msg-content { | |
| background: var(--surface); | |
| padding: 16px 20px; | |
| border-radius: 18px; | |
| box-shadow: var(--shadow); | |
| position: relative; | |
| border: 1px solid var(--border); | |
| } | |
| .msg.user .msg-content { | |
| background: var(--primary); | |
| color: white; | |
| border-bottom-right-radius: 6px; | |
| border-color: var(--primary-dark); | |
| } | |
| .msg.bot .msg-content { | |
| border-bottom-left-radius: 6px; | |
| } | |
| .msg-meta { | |
| font-size: 12px; | |
| color: var(--text-muted); | |
| margin-bottom: 8px; | |
| font-weight: 500; | |
| } | |
| .msg.user .msg-meta { | |
| color: rgba(255, 255, 255, 0.8); | |
| } | |
| .msg-text { | |
| line-height: 1.5; | |
| white-space: pre-wrap; | |
| word-break: break-word; | |
| } | |
| /* Message Composer - Fixed positioning */ | |
| .message-composer { | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| right: 0; | |
| padding: 20px 24px; | |
| background: var(--surface); | |
| border-top: 1px solid var(--border); | |
| height: var(--composer-height); | |
| display: flex; | |
| align-items: center; | |
| z-index: 100; | |
| } | |
| .composer-input { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| display: flex; | |
| align-items: flex-end; | |
| gap: 12px; | |
| background: var(--background); | |
| border: 2px solid var(--border); | |
| border-radius: 24px; | |
| padding: 12px 8px 12px 20px; | |
| transition: all 0.2s ease; | |
| width: 100%; | |
| min-height: 56px; | |
| } | |
| .composer-input:focus-within { | |
| border-color: var(--primary); | |
| box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); | |
| } | |
| .composer-input textarea, | |
| .composer-input input[type="text"] { | |
| flex: 1; | |
| border: none; | |
| background: transparent; | |
| font-size: 16px; | |
| color: var(--text); | |
| outline: none; | |
| resize: none; | |
| min-height: 24px; | |
| max-height: 120px; | |
| line-height: 1.5; | |
| font-family: inherit; | |
| padding: 8px 0; | |
| } | |
| .composer-input textarea::placeholder, | |
| .composer-input input[type="text"]::placeholder { | |
| color: var(--text-muted); | |
| } | |
| .composer-input textarea { | |
| overflow-y: auto; | |
| } | |
| .file-upload-btn { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background: var(--card); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| font-size: 18px; | |
| color: var(--text-secondary); | |
| border: 1px solid var(--border); | |
| } | |
| .file-upload-btn:hover { | |
| background: var(--primary); | |
| color: white; | |
| border-color: var(--primary); | |
| } | |
| .file-upload-btn input { | |
| display: none; | |
| } | |
| .send-btn { | |
| width: 40px; | |
| height: 40px; | |
| border-radius: 50%; | |
| background: var(--primary); | |
| color: white; | |
| border: none; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 18px; | |
| font-weight: bold; | |
| } | |
| .send-btn:hover { | |
| background: var(--primary-dark); | |
| transform: scale(1.05); | |
| } | |
| .send-btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| transform: none; | |
| } | |
| /* Typing Indicator */ | |
| .typing { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 16px 20px; | |
| background: var(--surface); | |
| border-radius: 18px; | |
| border-bottom-left-radius: 6px; | |
| box-shadow: var(--shadow); | |
| max-width: 80px; | |
| border: 1px solid var(--border); | |
| } | |
| .typing-dots { | |
| display: flex; | |
| gap: 4px; | |
| } | |
| .typing-dot { | |
| width: 8px; | |
| height: 8px; | |
| background: var(--text-muted); | |
| border-radius: 50%; | |
| animation: typing 1.5s infinite; | |
| } | |
| .typing-dot:nth-child(2) { animation-delay: 0.2s; } | |
| .typing-dot:nth-child(3) { animation-delay: 0.4s; } | |
| /* Drag and Drop */ | |
| .app.dragging::after { | |
| content: "Drop PDF file here"; | |
| position: absolute; | |
| inset: 0; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 24px; | |
| font-weight: 600; | |
| color: var(--primary); | |
| background: rgba(124, 58, 237, 0.1); | |
| border: 3px dashed var(--primary); | |
| z-index: 1000; | |
| pointer-events: none; | |
| animation: pulse 2s infinite; | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| @keyframes typing { | |
| 0%, 60%, 100% { transform: translateY(0); } | |
| 30% { transform: translateY(-10px); } | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { background: rgba(124, 58, 237, 0.05); } | |
| 50% { background: rgba(124, 58, 237, 0.1); } | |
| } | |
| /* Scrollbar */ | |
| ::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: var(--border); | |
| border-radius: 3px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: var(--text-muted); | |
| } | |
| /* Responsive */ | |
| @media (max-width: 768px) { | |
| .sidebar { | |
| width: 280px; | |
| } | |
| .chat-header { | |
| padding: 16px; | |
| } | |
| .messages-container { | |
| padding: 16px; | |
| padding-bottom: calc(var(--composer-height) + 16px); | |
| } | |
| .message-composer { | |
| padding: 16px; | |
| } | |
| } |