:root { /* Premium Dark Theme (Default) */ --bg-main: #0b0c10; --bg-sidebar: #12131a; --bg-input: #1a1c23; --bg-user-msg: #1f212a; --bg-hover: rgba(255, 255, 255, 0.06); --bg-active: rgba(255, 255, 255, 0.1); --text-primary: #e2e4e9; --text-secondary: #9499a6; --text-placeholder: #6a6f7d; --border-light: rgba(255, 255, 255, 0.06); --border-medium: rgba(255, 255, 255, 0.12); --accent-color: #8b5cf6; --accent-hover: #7c3aed; --accent-glow: rgba(139, 92, 246, 0.25); --accent-btn: #8b5cf6; --accent-btn-text: #ffffff; --accent-btn-disabled: #2d2f3a; --accent-btn-disabled-text: #6a6f7d; --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2); --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3); --logo-bg: linear-gradient(135deg, #1e2029, #2d303e); } .light-theme { /* Premium High-Contrast Light Theme */ --bg-main: #ffffff; --bg-sidebar: #f9fafb; --bg-input: #ffffff; --bg-user-msg: #f3f4f6; --bg-hover: #f3f4f6; --bg-active: #e5e7eb; --text-primary: #030712; --text-secondary: #4b5563; --text-placeholder: #9ca3af; --border-light: #f3f4f6; --border-medium: #e5e7eb; --accent-color: #6d28d9; --accent-hover: #5b21b6; --accent-glow: rgba(109, 40, 217, 0.15); --accent-btn: #6d28d9; --accent-btn-text: #ffffff; --accent-btn-disabled: #f3f4f6; --accent-btn-disabled-text: #9ca3af; --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05); --logo-bg: #ffffff; } :root { /* Semantic Colors */ --sev-critical: #ef4444; --sev-high: #f97316; --sev-medium: #eab308; --sev-low: #10b981; /* Typography */ --font-primary: 'Inter', -apple-system, sans-serif; --font-mono: 'JetBrains Mono', monospace; } * { box-sizing: border-box; margin: 0; padding: 0; } body, html { height: 100%; width: 100%; background-color: var(--bg-main); color: var(--text-primary); font-family: var(--font-primary); font-size: 15px; line-height: 1.6; overflow: hidden; -webkit-font-smoothing: antialiased; transition: background-color 0.3s ease, color 0.3s ease; } /* Global Custom Scrollbars */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background-color: var(--border-medium); border-radius: 3px; transition: background-color 0.2s; } ::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); } ::-webkit-scrollbar-corner { background: transparent; } #app-container { display: flex; height: 100%; height: 100dvh; /* Modern mobile viewport fix */ width: 100%; } /* --- Sidebar --- */ #sidebar { width: 280px; margin-left: 0; background-color: var(--bg-sidebar); border-right: 1px solid var(--border-light); display: flex; flex-direction: column; flex-shrink: 0; transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease; z-index: 20; } #app-container.sidebar-closed #sidebar { margin-left: -280px; opacity: 0; pointer-events: none; } #app-container.sidebar-closed-init #sidebar { margin-left: -280px; opacity: 0; pointer-events: none; transition: none; /* Instant on load */ } .sidebar-header { padding: 20px 16px 12px; } .new-chat-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: var(--bg-main); border: 1px solid var(--border-medium); border-radius: 12px; color: var(--text-primary); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: all 0.2s ease; box-shadow: var(--shadow-sm); } .new-chat-btn:hover { border-color: var(--accent-color); box-shadow: 0 4px 12px var(--accent-glow); transform: translateY(-1px); } .new-chat-icon { display: flex; align-items: center; justify-content: center; color: var(--accent-color); } .sidebar-scroll { flex: 1; overflow-y: auto; padding: 8px 16px; } .sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 16px; } .history-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); padding: 8px 4px; margin-top: 12px; margin-bottom: 4px; } .history-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; margin-bottom: 2px; border-radius: 8px; color: var(--text-primary); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.2s ease; position: relative; } .history-item-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; } .history-edit-input { flex: 1; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--accent-color); border-radius: 4px; font-family: inherit; font-size: 13px; font-weight: 500; padding: 2px 6px; outline: none; width: 100%; min-width: 0; } .history-item-actions { position: relative; opacity: 0; transition: opacity 0.2s; display: flex; align-items: center; } .history-item:hover .history-item-actions, .history-item-menu.open ~ .history-item-actions, .history-item.active .history-item-actions { opacity: 1; } .history-item-btn-dots { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s, color 0.2s; } .history-item-btn-dots:hover { background-color: var(--bg-hover); color: var(--text-primary); } .history-item-menu { position: absolute; top: 100%; right: 0; margin-top: 4px; background-color: var(--bg-input); border: 1px solid var(--border-medium); border-radius: 8px; padding: 4px; box-shadow: var(--shadow-md); display: none; flex-direction: column; z-index: 200; min-width: 120px; } .history-item-menu.open { display: flex; animation: fade-in 0.1s ease-out; } .history-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: transparent; border: none; border-radius: 4px; color: var(--text-primary); font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer; text-align: left; transition: background-color 0.2s; } .history-menu-item:hover { background-color: var(--bg-hover); } .history-menu-item.delete-btn { color: var(--sev-critical); } .history-menu-item.delete-btn:hover { background-color: rgba(239, 68, 68, 0.1); } .history-item:hover { background-color: var(--bg-hover); } .history-item.active { background-color: var(--bg-active); color: var(--accent-color); font-weight: 600; } .sidebar-footer { padding: 12px 16px 20px; display: flex; flex-direction: column; } .profile-dropdown-container { position: relative; width: 100%; } .dropdown-menu { position: absolute; bottom: calc(100% + 8px); left: 0; width: 100%; background-color: var(--bg-input); border: 1px solid var(--border-medium); border-radius: 12px; padding: 8px; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(10px); pointer-events: none; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; } .dropdown-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; } .dropdown-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: transparent; border: none; border-radius: 8px; color: var(--text-primary); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; transition: background-color 0.2s; } .dropdown-item:hover { background-color: var(--bg-hover); } .theme-icon-container { position: relative; width: 16px; height: 16px; flex-shrink: 0; } .theme-icon { position: absolute; top: 0; left: 0; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); } /* Default Dark Theme Active -> Button says "Switch to Light Mode" (Sun icon) */ .icon-for-dark { opacity: 0; transform: rotate(90deg) scale(0.5); } .icon-for-light { opacity: 1; transform: rotate(0deg) scale(1); } /* Light Theme Active -> Button says "Switch to Dark Mode" (Moon icon) */ .light-theme .icon-for-dark { opacity: 1; transform: rotate(0deg) scale(1); } .light-theme .icon-for-light { opacity: 0; transform: rotate(-90deg) scale(0.5); } .dropdown-divider { height: 1px; background-color: var(--border-medium); margin: 4px 0; } .sidebar-action-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: transparent; border: none; border-radius: 8px; color: var(--text-primary); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; transition: background-color 0.2s; } .sidebar-action-btn:hover { background-color: var(--bg-hover); } .avatar-placeholder { width: 24px; height: 24px; border-radius: 6px; background: linear-gradient(135deg, #4f46e5, #8b5cf6); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-sm); } /* --- Main Content --- */ #main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; } #topbar { height: 60px; display: flex; align-items: center; padding: 0 24px; background: linear-gradient(180deg, var(--bg-main) 0%, transparent 100%); position: absolute; top: 0; left: 0; right: 0; z-index: 10; } .icon-btn { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s, color 0.2s; margin-right: 12px; } .icon-btn:hover { background-color: var(--bg-hover); color: var(--text-primary); } .model-selector { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; } .model-version { font-size: 11px; font-weight: 600; background-color: var(--bg-hover); padding: 2px 8px; border-radius: 6px; color: var(--accent-color); } /* --- Chat Container --- */ #chat-container { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-top: 60px; scroll-behavior: smooth; } #messages-area { display: flex; flex-direction: column; padding-bottom: 40px; } .welcome-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 65vh; text-align: center; animation: fade-in 0.6s ease-out; } @keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .welcome-logo { width: 64px; height: 64px; border-radius: 16px; background: var(--logo-bg); border: 1px solid var(--border-medium); color: var(--accent-color); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; box-shadow: var(--shadow-md); } .welcome-screen h1 { font-size: 28px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; } /* Chat Messages */ .message-row { padding: 24px; display: flex; justify-content: center; animation: slide-up 0.4s ease-out; } @keyframes slide-up { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } } .message-inner { width: 100%; max-width: 800px; display: flex; gap: 20px; } .message-avatar { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); } .message-avatar.user { background: linear-gradient(135deg, #4f46e5, #8b5cf6); color: white; font-weight: 600; font-size: 14px; } .message-avatar.ai { background: var(--bg-input); border: 1px solid var(--border-medium); color: var(--accent-color); } .message-content { flex: 1; min-width: 0; font-size: 15px; line-height: 1.7; } /* User Message styling */ .user-message-bubble { background-color: var(--bg-user-msg); border: 1px solid var(--border-light); padding: 16px 20px; border-radius: 16px; border-top-right-radius: 4px; color: var(--text-primary); font-family: var(--font-mono); font-size: 13px; max-height: 300px; max-width: 100%; overflow-y: auto; overflow-x: auto; white-space: pre-wrap; word-break: break-word; width: fit-content; margin-left: auto; box-shadow: var(--shadow-sm); } .message-row.user-row .message-inner { justify-content: flex-end; } /* AI Message styling */ .ai-message-content { color: var(--text-primary); } .ai-message-content h3 { font-size: 18px; margin-bottom: 16px; font-weight: 600; color: var(--text-primary); } .ai-message-content p { margin-bottom: 16px; } .ai-message-content ol { padding-left: 20px; margin-bottom: 20px; } .ai-message-content li { margin-bottom: 10px; padding-left: 8px; } .ai-message-content li::marker { color: var(--accent-color); font-weight: 600; } .ai-link { color: var(--accent-color); text-decoration: none; font-weight: 500; transition: color 0.2s, text-decoration 0.2s; } .ai-link:hover { color: var(--accent-hover); text-decoration: underline; } .ai-code { background-color: var(--bg-hover); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; color: var(--accent-color); } .severity-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 16px; margin-right: 10px; box-shadow: var(--shadow-sm); } .severity-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background-color: currentColor; margin-right: 6px; } .severity-pill.critical { background-color: rgba(239, 68, 68, 0.15); color: var(--sev-critical); border: 1px solid rgba(239, 68, 68, 0.3); } .severity-pill.high { background-color: rgba(249, 115, 22, 0.15); color: var(--sev-high); border: 1px solid rgba(249, 115, 22, 0.3); } .severity-pill.medium { background-color: rgba(234, 179, 8, 0.15); color: var(--sev-medium); border: 1px solid rgba(234, 179, 8, 0.3); } .severity-pill.low { background-color: rgba(16, 185, 129, 0.15); color: var(--sev-low); border: 1px solid rgba(16, 185, 129, 0.3); } .mod-pill { display: inline-block; padding: 4px 12px; border-radius: 12px; background-color: var(--bg-hover); border: 1px solid var(--border-medium); font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 16px; } /* --- Premium AI Elements --- */ .ai-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; border: 1px solid var(--border-medium); border-radius: 8px; overflow: hidden; } .ai-table th { background-color: var(--bg-hover); padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--border-medium); } .ai-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); } .ai-table tr:last-child td { border-bottom: none; } .ai-code-block { background-color: #0d1117; border: 1px solid var(--border-medium); border-radius: 12px; padding: 16px; margin: 16px 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; overflow-x: auto; position: relative; } .ai-code-block::before { content: attr(data-lang); position: absolute; top: 0; right: 16px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); padding: 4px 8px; background: var(--bg-hover); border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } .ai-message-content p { margin-bottom: 12px; } .ai-message-content hr { border: none; height: 1px; background: var(--border-medium); margin: 24px 0; } /* --- Input Area --- */ #input-container { padding: 0 24px 24px; background: linear-gradient(0deg, var(--bg-main) 60%, transparent 100%); } .input-wrapper { max-width: 800px; margin: 0 auto; position: relative; } .queue-bar { display: none; align-items: center; gap: 8px; padding: 8px 0; font-size: 12px; font-weight: 500; color: var(--accent-color); justify-content: center; animation: fade-in 0.3s; } .queue-bar.visible { display: flex; } .input-box { background-color: var(--bg-input); border: 1px solid var(--border-medium); border-radius: 20px; padding: 12px 16px; padding-right: 56px; display: flex; align-items: flex-end; position: relative; box-shadow: var(--shadow-md); transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s; } .input-box:focus-within { border-color: var(--accent-color); box-shadow: var(--shadow-md), var(--shadow-glow); } #crash-log-input { width: 100%; background: transparent; border: none; outline: none; color: var(--text-primary); font-family: var(--font-mono); font-size: 14px; line-height: 24px; max-height: 240px; resize: none; padding: 6px 0; } #crash-log-input::placeholder { color: var(--text-placeholder); font-family: var(--font-primary); } #crash-log-input::placeholder { color: var(--text-placeholder); font-family: var(--font-primary); } .send-btn { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 12px; background-color: var(--accent-btn); color: var(--accent-btn-text); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 10px var(--accent-glow); } .send-btn:hover:not(:disabled) { background-color: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px var(--accent-glow); } .send-btn:disabled { background-color: var(--accent-btn-disabled); color: var(--accent-btn-disabled-text); cursor: not-allowed; box-shadow: none; transform: none; } .disclaimer { text-align: center; font-size: 11px; color: var(--text-placeholder); margin-top: 12px; } /* --- Toast --- */ .toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-100px); background-color: var(--bg-input); border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: 0 8px 30px rgba(239, 68, 68, 0.2); color: var(--sev-critical); padding: 12px 24px; border-radius: 12px; font-size: 13px; font-weight: 500; opacity: 0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; } .toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; } /* Three.js Loading Canvas Container */ .loading-canvas-container { display: flex; align-items: center; gap: 16px; } .loading-text-glow { font-size: 14px; font-weight: 500; color: var(--text-secondary); background: linear-gradient(90deg, var(--text-secondary) 0%, var(--text-primary) 50%, var(--text-secondary) 100%); background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; animation: shine 2s linear infinite; } @keyframes shine { to { background-position: 200% center; } } /* --- Mobile Responsiveness --- */ @media (max-width: 768px) { #sidebar { position: absolute; height: 100%; left: 0; top: 0; box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5); } #app-container.sidebar-closed #sidebar, #app-container.sidebar-closed-init #sidebar { margin-left: -280px; } /* Force the Topbar (and its buttons) to the front layer */ #topbar { z-index: 50; background: var(--bg-main); border-bottom: 1px solid var(--border-light); } #btn-toggle-sidebar { background: var(--bg-hover); } /* Message padding on mobile */ .message-row { padding: 16px 12px; } .message-inner { gap: 12px; } .message-avatar { width: 32px; height: 32px; } .welcome-screen h1 { font-size: 22px; padding: 0 20px; } /* Input area on mobile */ #input-container { padding: 0 12px 12px; } .input-box { padding: 10px 14px; padding-right: 50px; border-radius: 16px; } .send-btn { right: 8px; bottom: 8px; width: 32px; height: 32px; } .dropdown-menu { max-height: 40vh; overflow-y: auto; } /* Ensure disclaimer is visible and centered */ .disclaimer { display: block !important; visibility: visible !important; margin-top: 10px; font-size: 10px; color: var(--text-secondary); text-align: center; width: 100%; } }