:root { --bg-main: #060606; --bg-card: #0e0e0e; --bg-hover: #161616; --border-color: #222222; --border-glow: #ff2a2a; --text-primary: #f5f5f5; --text-secondary: #a0a0a0; --text-muted: #666666; --red-accent: #e60012; --red-hover: #ff3344; --red-glow: rgba(230, 0, 18, 0.2); --red-glow-strong: rgba(230, 0, 18, 0.5); --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; background-color: var(--bg-main); color: var(--text-primary); font-family: var(--font-sans); font-size: 15px; line-height: 1.6; margin: 0; padding: 0; box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } html { height: 100%; overflow: hidden; } body { margin: 0; padding: 0; background-color: var(--bg-main); overflow: hidden; height: 100%; /* Prevent any rubber-band / overscroll on iOS */ overscroll-behavior: none; position: fixed; width: 100%; } #root { height: 100%; width: 100%; overflow: hidden; display: flex; flex-direction: column; } /* App container */ .app-container { display: flex; /* 100dvh = dynamic viewport height (accounts for mobile browser chrome) */ height: 100dvh; /* Fallback for browsers that don't support dvh */ height: 100vh; height: 100dvh; width: 100%; max-width: 100vw; background-color: var(--bg-main); overflow: hidden; } /* Sidebar styling */ .sidebar { width: 320px; background-color: var(--bg-card); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; height: 100%; } .sidebar-header { padding: 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; } .sidebar-header h2 { font-size: 1.2rem; margin: 0; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-primary); } .sidebar-header h2 span { color: var(--red-accent); text-shadow: 0 0 8px var(--red-glow-strong); } /* Uploader */ .upload-section { padding: 20px; border-bottom: 1px solid var(--border-color); } .upload-dropzone { border: 1px dashed var(--border-color); border-radius: 6px; padding: 20px; text-align: center; cursor: pointer; background-color: rgba(0, 0, 0, 0.2); transition: all 0.2s ease-in-out; } .upload-dropzone:hover { border-color: var(--red-accent); box-shadow: 0 0 10px var(--red-glow); background-color: rgba(230, 0, 18, 0.02); } .upload-dropzone p { margin: 0 0 8px 0; font-size: 0.9rem; color: var(--text-secondary); } .upload-dropzone span { font-size: 0.75rem; color: var(--text-muted); } .upload-progress { margin-top: 10px; padding: 8px 12px; background-color: rgba(230, 0, 18, 0.05); border: 1px solid rgba(230, 0, 18, 0.2); border-radius: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; } .upload-spinner { width: 12px; height: 12px; border: 2px solid transparent; border-top-color: var(--red-accent); border-radius: 50%; animation: spin 0.8s linear infinite; } /* Documents List */ .documents-container { flex: 1; overflow-y: auto; padding: 15px; } .documents-container h3 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; margin-top: 0; margin-bottom: 12px; } .document-list { display: flex; flex-direction: column; gap: 8px; } .document-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background-color: rgba(0, 0, 0, 0.15); border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; transition: all 0.2s ease-in-out; } .document-item:hover { border-color: var(--text-muted); background-color: var(--bg-hover); } .document-item.active { border-color: var(--red-accent); background-color: rgba(230, 0, 18, 0.05); box-shadow: inset 0 0 5px rgba(230, 0, 18, 0.05); } .document-info { display: flex; flex-direction: column; gap: 4px; overflow: hidden; flex-grow: 1; } .document-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); } .document-meta { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; } .status-badge { display: inline-block; padding: 1px 4px; border-radius: 3px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; } .status-badge.ready { background-color: rgba(0, 200, 100, 0.1); color: #00ff88; } .status-badge.chunking, .status-badge.embedding, .status-badge.extracting { background-color: rgba(230, 150, 0, 0.1); color: #ffaa00; animation: pulse 1.5s infinite; } .delete-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; } .delete-btn:hover { color: var(--red-hover); background-color: rgba(230, 0, 18, 0.1); } /* Chat Main Area */ .chat-area { flex: 1; display: flex; flex-direction: column; height: 100%; background-color: var(--bg-main); position: relative; } .chat-header { height: 65px; border-bottom: 1px solid var(--border-color); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background-color: rgba(14, 14, 14, 0.8); backdrop-filter: blur(10px); } .chat-header-info { display: flex; align-items: center; gap: 10px; } .target-badge { font-size: 0.75rem; background-color: rgba(230, 0, 18, 0.1); border: 1px solid rgba(230, 0, 18, 0.3); color: var(--red-hover); padding: 3px 8px; border-radius: 12px; } .clear-chat-btn { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.8rem; padding: 6px 12px; border-radius: 4px; cursor: pointer; transition: all 0.2s; } .clear-chat-btn:hover { border-color: var(--red-accent); color: var(--text-primary); background-color: rgba(230, 0, 18, 0.05); } /* Messages container */ .messages-container { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); text-align: center; max-width: 500px; margin: 0 auto; } .empty-state h3 { color: var(--text-primary); font-size: 1.4rem; margin-bottom: 8px; } .empty-state h3 span { color: var(--red-accent); } .empty-state p { font-size: 0.9rem; margin-bottom: 24px; } .message-bubble-wrapper { display: flex; flex-direction: column; max-width: 80%; } .message-bubble-wrapper.user { align-self: flex-end; } .message-bubble-wrapper.assistant { align-self: flex-start; } .message-bubble { display: flex; gap: 16px; width: 100%; padding: 14px 18px; border-radius: 10px; line-height: 1.5; font-size: 0.95rem; } .message-bubble.user { background-color: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-primary); border-bottom-right-radius: 2px; } .message-bubble.assistant { background-color: rgba(230, 0, 18, 0.02); border: 1px solid rgba(230, 0, 18, 0.15); color: var(--text-primary); border-bottom-left-radius: 2px; } /* Quota error styling */ .message-bubble.quota-error { background-color: rgba(230, 0, 18, 0.08); border-color: var(--red-accent); color: var(--text-primary); } .message-bubble.quota-error .message-content { color: var(--red-accent); font-weight: 500; } /* Sources section under assistant message */ .sources-container { margin-top: 8px; padding: 0 4px; } .sources-title { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block; } .sources-list-inline { display: flex; flex-wrap: wrap; gap: 8px; } .source-pill { display: inline-flex; align-items: center; gap: 6px; background-color: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; color: var(--text-secondary); transition: all 0.2s ease; max-width: 280px; text-align: left; } .source-pill:hover { border-color: var(--red-accent); color: var(--text-primary); background-color: rgba(230, 0, 18, 0.05); transform: translateY(-1px); } .source-icon { flex-shrink: 0; color: var(--red-hover); } .source-filename { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; max-width: 120px; } .source-index { color: var(--text-muted); font-size: 0.7rem; background-color: rgba(255, 255, 255, 0.03); padding: 2px 6px; border-radius: 4px; } /* Premium Modal Styles */ .modal-backdrop { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.25s ease-out; } .modal-content { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; width: 100%; max-width: 700px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(230, 0, 18, 0.15); animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; } .modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; } .modal-title-container { display: flex; align-items: center; gap: 10px; overflow: hidden; flex-grow: 1; } .modal-title-container h3 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .modal-badge { font-size: 0.7rem; background-color: rgba(230, 0, 18, 0.1); border: 1px solid rgba(230, 0, 18, 0.2); color: var(--red-hover); padding: 2px 8px; border-radius: 12px; flex-shrink: 0; } .modal-close-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; } .modal-close-btn:hover { color: var(--text-primary); background-color: var(--bg-hover); } .modal-body { padding: 20px; overflow-y: auto; background-color: #060606; } .source-snippet { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.6; color: #d8d8d8; padding: 16px; background-color: #0a0a0a; border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 6px; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideUp { from { transform: translateY(20px) scale(0.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } } .message-content { white-space: pre-wrap; word-break: break-word; } /* Chat Input styling */ .chat-input-container { padding: 24px; border-top: 1px solid var(--border-color); background-color: var(--bg-main); } .chat-input-form { position: relative; display: flex; background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 12px; transition: all 0.2s ease-in-out; } .chat-input-form:focus-within { border-color: var(--red-accent); box-shadow: 0 0 12px var(--red-glow); } .chat-input { flex: 1; background: none; border: none; color: var(--text-primary); font-family: inherit; font-size: 0.95rem; padding: 10px 4px; outline: none; resize: none; } .send-btn { background-color: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 8px 12px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; } .send-btn.active { color: var(--red-accent); } .send-btn.active:hover { color: var(--red-hover); transform: scale(1.05); } .send-btn:disabled { opacity: 0.5; cursor: not-allowed; } /* Scrollbars */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #252525; border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--red-accent); } /* Animations */ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } } /* Sidebar Toggle & Collapsed State */ .sidebar-toggle-arrow { position: absolute; left: -18px; top: 210px; transform: none; width: 36px; height: 36px; border: 1px solid var(--border-color); background-color: var(--bg-card); color: var(--text-secondary); cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; backdrop-filter: blur(10px); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); } .sidebar-toggle-arrow:hover { color: var(--text-primary); background-color: var(--bg-hover); border-color: var(--red-accent); box-shadow: 0 4px 16px rgba(230, 0, 18, 0.2); transform: scale(1.1); } .sidebar-toggle-arrow:active { color: var(--red-accent); transform: scale(0.95); } /* Collapsed Sidebar State */ .app-container.sidebar-collapsed .sidebar { width: 80px; transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1); } .app-container.sidebar-collapsed .sidebar-header { padding: 16px 8px; justify-content: center; } .app-container.sidebar-collapsed .sidebar-header h2 { font-size: 0.9rem; letter-spacing: 0px; } .app-container.sidebar-collapsed .upload-section { padding: 12px 8px; } .app-container.sidebar-collapsed .upload-dropzone { padding: 12px; display: flex; align-items: center; justify-content: center; min-height: 40px; } .app-container.sidebar-collapsed .upload-dropzone p { display: none; } .app-container.sidebar-collapsed .upload-dropzone span { display: none; } .app-container.sidebar-collapsed .upload-dropzone::after { content: '📤'; font-size: 1.4rem; } .app-container.sidebar-collapsed .documents-container { padding: 10px 4px; } .app-container.sidebar-collapsed .documents-container h3 { font-size: 0.7rem; text-align: center; } .app-container.sidebar-collapsed .document-item { padding: 8px; justify-content: center; position: relative; } .app-container.sidebar-collapsed .document-info { display: none; } .app-container.sidebar-collapsed .delete-btn { position: absolute; right: 0; top: 0; opacity: 0; transition: opacity 0.2s; } .app-container.sidebar-collapsed .document-item:hover .delete-btn { opacity: 1; } .app-container.sidebar-collapsed .document-item::before { content: '📄'; font-size: 1.2rem; } /* Expanded Chat Area on Sidebar Collapse */ .chat-area.sidebar-collapsed { flex: 1; transition: flex 0.35s cubic-bezier(0.4, 0, 0.2, 1); } .app-container.sidebar-collapsed .settings-info-wrapper { display: none !important; } /* ===== Mobile: Overlay Drawer Sidebar ===== */ /* The mobile hamburger toggle — hidden on desktop */ .mobile-sidebar-toggle { display: none; } /* The mobile backdrop — hidden on desktop, shown on mobile via media query */ .mobile-backdrop { display: none; } @media (max-width: 768px) { /* --- Hide the desktop floating arrow toggle --- */ .sidebar-toggle-arrow { display: none; } /* --- Show the hamburger in the chat header --- */ .mobile-sidebar-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: none; border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-secondary); cursor: pointer; flex-shrink: 0; transition: all 0.2s; } .mobile-sidebar-toggle:hover { color: var(--text-primary); border-color: var(--red-accent); background-color: rgba(230, 0, 18, 0.05); } /* --- Sidebar becomes a fixed overlay drawer --- */ .sidebar { position: fixed; top: 0; left: 0; height: 100dvh; height: 100vh; height: 100dvh; width: 280px; z-index: 500; /* Slide in/out */ transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease; /* Always keep the full sidebar visible (not width:0 trick) */ overflow: hidden; } /* When sidebar is open on mobile, slide it into view */ .app-container:not(.sidebar-collapsed) .sidebar { transform: translateX(0); box-shadow: 4px 0 32px rgba(0, 0, 0, 0.8); } /* When collapsed, slide completely off-screen */ .app-container.sidebar-collapsed .sidebar { transform: translateX(-100%); width: 280px; /* Keep width so transition is smooth */ min-width: unset; border-right: none; } /* --- Backdrop overlay when sidebar is open --- */ /* This is a real div injected by React so it can receive click events */ .mobile-backdrop { display: block; position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); z-index: 499; animation: fadeIn 0.25s ease-out forwards; } /* --- Chat area always fills full width on mobile --- */ .chat-area { width: 100%; flex: 1; } /* Reduce desktop collapsed sidebar styles that would interfere */ .app-container.sidebar-collapsed .sidebar-header, .app-container.sidebar-collapsed .upload-dropzone, .app-container.sidebar-collapsed .documents-container, .app-container.sidebar-collapsed .document-item { /* Reset any collapsed-state tweaks so drawer looks normal when opened */ all: revert; } /* Re-apply base sidebar structure after revert */ .app-container.sidebar-collapsed .sidebar-header { padding: 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; } .app-container.sidebar-collapsed .sidebar-header h2 { font-size: 1.2rem; margin: 0; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-primary); } .app-container.sidebar-collapsed .upload-dropzone { border: 1px dashed var(--border-color); border-radius: 6px; padding: 20px; text-align: center; cursor: pointer; background-color: rgba(0, 0, 0, 0.2); } .app-container.sidebar-collapsed .upload-dropzone p, .app-container.sidebar-collapsed .upload-dropzone span { display: block; } .app-container.sidebar-collapsed .upload-dropzone::after { display: none; } .app-container.sidebar-collapsed .documents-container { flex: 1; overflow-y: auto; padding: 15px; } .app-container.sidebar-collapsed .document-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; } .app-container.sidebar-collapsed .document-info { display: flex; } .app-container.sidebar-collapsed .document-item::before { display: none; } .app-container.sidebar-collapsed .delete-btn { position: static; opacity: 1; } .app-container.sidebar-collapsed .settings-info-wrapper { display: flex !important; } /* --- Chat header & input adjustments --- */ .chat-header { padding: 0 14px; gap: 10px; } .messages-container { padding: 14px; } .chat-input-container { padding: 10px 14px; } .message-bubble-wrapper { max-width: 95%; } } @media (max-width: 480px) { .sidebar { width: 260px; } .app-container.sidebar-collapsed .sidebar { width: 260px; } }