project_codebase / ui /static /style.css
muhammad7456's picture
server and ui fixed
5f07df7
Raw
History Blame Contribute Delete
16.8 kB
/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg-base: #0e0e10;
--bg-surface: #141416;
--bg-elevated: #1a1a1e;
--bg-hover: #202026;
--bg-active: #25252d;
--border: #2a2a32;
--border-focus: #4a90e8;
--text-primary: #d4d4d8;
--text-secondary: #71717a;
--text-muted: #3f3f46;
--text-bright: #f4f4f5;
--accent: #4a90e8;
--accent-dim: #1e3a5f;
--accent-glow: rgba(74, 144, 232, 0.15);
--green: #4ade80;
--yellow: #facc15;
--red: #f87171;
--purple: #c084fc;
--topbar-h: 60px;
--sidebar-w: 320px;
--radius: 6px;
--radius-lg: 10px;
--font-ui: 'Syne', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--transition: 150ms ease;
}
html, body {
height: 100%;
overflow: hidden;
background: var(--bg-base);
color: var(--text-primary);
font-family: var(--font-ui);
font-size: 16px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
/* ── Topbar ────────────────────────────────────────────────────────────────── */
.topbar {
position: fixed;
top: 0; left: 0; right: 0;
height: var(--topbar-h);
background: var(--bg-surface);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
gap: 16px;
padding: 0 20px;
z-index: 100;
}
.topbar__brand {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.topbar__icon {
font-size: 20px;
color: var(--accent);
animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.topbar__title {
font-weight: 800;
font-size: 15px;
letter-spacing: 0.04em;
color: var(--text-bright);
white-space: nowrap;
}
.topbar__index {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
max-width: 680px;
}
.path-input {
flex: 1;
height: 34px;
background: var(--bg-base);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text-primary);
font-family: var(--font-mono);
font-size: 12px;
padding: 0 12px;
outline: none;
transition: border-color var(--transition), box-shadow var(--transition);
}
.path-input:focus {
border-color: var(--border-focus);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.path-input::placeholder { color: var(--text-muted); }
.topbar__zip {
display: flex;
align-items: center;
gap: 8px;
padding-left: 16px;
border-left: 1px solid var(--border);
flex-shrink: 0;
}
.btn--zip {
height: 34px;
padding: 0 14px;
background: var(--bg-elevated);
border: 1px solid var(--border);
color: var(--text-secondary);
font-family: var(--font-ui);
font-weight: 600;
font-size: 13px;
gap: 6px;
cursor: pointer;
transition: all var(--transition);
}
.btn--zip:hover { border-color: var(--accent); color: var(--text-primary); }
.btn--zip.has-file { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-family: var(--font-ui);
font-weight: 600;
font-size: 13px;
transition: background var(--transition), transform var(--transition);
white-space: nowrap;
outline: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--primary {
height: 34px;
padding: 0 18px;
background: var(--accent);
color: #fff;
}
.btn--primary:hover:not(:disabled) { background: #3b7dd8; }
.btn--send {
width: 40px; height: 40px;
background: var(--accent);
color: #fff;
border-radius: var(--radius);
flex-shrink: 0;
}
.btn--send:hover:not(:disabled) { background: #3b7dd8; }
/* ── Status Badge ──────────────────────────────────────────────────────────── */
.status-badge {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 12px;
border-radius: 999px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.05em;
white-space: nowrap;
flex-shrink: 0;
border: 1px solid transparent;
font-family: var(--font-mono);
}
.status-badge__dot {
width: 6px; height: 6px;
border-radius: 50%;
}
.status-badge--idle { background: var(--bg-elevated); border-color: var(--border); color: var(--text-secondary); }
.status-badge--idle .status-badge__dot { background: var(--text-muted); }
.status-badge--indexing { background: rgba(250,204,21,.08); border-color: rgba(250,204,21,.3); color: var(--yellow); }
.status-badge--indexing .status-badge__dot { background: var(--yellow); animation: blink .8s ease-in-out infinite; }
.status-badge--ready { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.3); color: var(--green); }
.status-badge--ready .status-badge__dot { background: var(--green); }
.status-badge--error { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); color: var(--red); }
.status-badge--error .status-badge__dot { background: var(--red); }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.2; } }
/* ── Workspace ─────────────────────────────────────────────────────────────── */
.workspace {
display: flex;
position: fixed;
top: var(--topbar-h); left: 0; right: 0; bottom: 0;
}
/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
width: var(--sidebar-w);
flex-shrink: 0;
background: var(--bg-surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.sidebar__label {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--text-secondary);
}
.sidebar__count {
font-family: var(--font-mono);
font-size: 10px;
color: var(--text-muted);
}
.tree-container {
flex: 1;
overflow-y: auto;
padding: 8px 0;
}
.tree-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 12px;
padding: 40px 20px;
text-align: center;
}
.tree-placeholder__icon { font-size: 32px; color: var(--text-muted); opacity: .5; }
.tree-placeholder p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
/* ── Tree Nodes ────────────────────────────────────────────────────────────── */
.tree-node { user-select: none; }
.tree-node__row {
display: flex;
align-items: center;
gap: 5px;
padding: 3px 8px;
cursor: pointer;
border-radius: 4px;
margin: 0 6px;
transition: background var(--transition);
min-height: 24px;
}
.tree-node__row:hover { background: var(--bg-hover); }
.tree-node__row.selected { background: var(--accent-dim); }
.tree-node__toggle {
width: 14px; text-align: center;
font-size: 9px;
color: var(--text-muted);
flex-shrink: 0;
transition: transform var(--transition);
}
.tree-node__toggle.open { transform: rotate(90deg); }
.tree-node__icon { font-size: 12px; flex-shrink: 0; }
.tree-node__name {
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree-node__children { display: none; }
.tree-node__children.open { display: block; }
.tree-node[data-depth="1"] .tree-node__row { padding-left: 20px; }
.tree-node[data-depth="2"] .tree-node__row { padding-left: 34px; }
.tree-node[data-depth="3"] .tree-node__row { padding-left: 48px; }
.icon-module { color: var(--yellow); }
.icon-file { color: #60a5fa; }
.icon-class { color: var(--purple); }
.icon-function { color: var(--green); }
/* ── Chat ──────────────────────────────────────────────────────────────────── */
.chat {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* ── Query Controls ────────────────────────────────────────────────────────── */
.query-controls {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px 20px;
border-bottom: 1px solid var(--border);
background: var(--bg-surface);
flex-shrink: 0;
}
.query-type-group, .macro-subtypes {
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.query-type-btn, .subtype-btn {
padding: 7px 18px;
border-radius: 999px;
border: 1px solid var(--border);
background: transparent;
color: var(--text-secondary);
font-family: var(--font-ui);
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all var(--transition);
letter-spacing: 0.02em;
}
.query-type-btn:hover, .subtype-btn:hover {
border-color: var(--accent);
color: var(--text-primary);
}
.query-type-btn.active, .subtype-btn.active {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}
.context-inputs {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.context-field {
height: 30px;
background: var(--bg-base);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text-primary);
font-family: var(--font-mono);
font-size: 12px;
padding: 0 10px;
outline: none;
min-width: 160px;
transition: border-color var(--transition), box-shadow var(--transition);
}
.context-field:focus {
border-color: var(--border-focus);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.context-field::placeholder { color: var(--text-muted); }
/* ── Messages ──────────────────────────────────────────────────────────────── */
.messages {
flex: 1;
overflow-y: auto;
padding: 24px 20px;
display: flex;
flex-direction: column;
gap: 20px;
}
.message {
display: flex;
flex-direction: column;
gap: 6px;
animation: fadeSlideIn 200ms ease both;
}
@keyframes fadeSlideIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.message__meta {
display: flex;
align-items: center;
gap: 8px;
}
.message__role {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
font-family: var(--font-mono);
}
.message--user .message__role { color: var(--accent); }
.message--system .message__role { color: var(--text-muted); }
.message--assistant .message__role { color: var(--green); }
.message--error .message__role { color: var(--red); }
.message--thinking .message__role { color: var(--yellow); }
.message__badge {
font-size: 10px;
font-family: var(--font-mono);
padding: 2px 8px;
border-radius: 999px;
background: var(--bg-elevated);
color: var(--text-muted);
border: 1px solid var(--border);
}
.message__content {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 14px 18px;
line-height: 1.7;
}
.message--user .message__content {
background: var(--accent-dim);
border-color: rgba(74,144,232,.3);
align-self: flex-end;
max-width: 80%;
}
.message--error .message__content {
background: rgba(248,113,113,.06);
border-color: rgba(248,113,113,.25);
color: var(--red);
}
.message--thinking .message__content {
color: var(--text-muted);
font-family: var(--font-mono);
font-size: 12px;
display: flex;
align-items: center;
gap: 10px;
}
/* ── Markdown ──────────────────────────────────────────────────────────────── */
.message__content h1,
.message__content h2,
.message__content h3 {
font-family: var(--font-ui);
font-weight: 700;
color: var(--text-bright);
margin-top: 20px;
margin-bottom: 8px;
line-height: 1.3;
}
.message__content h1 { font-size: 18px; }
.message__content h2 { font-size: 15px; color: var(--accent); }
.message__content h3 { font-size: 13px; }
.message__content h1:first-child,
.message__content h2:first-child { margin-top: 0; }
.message__content p { margin-bottom: 10px; font-size: 15px; }
.message__content p:last-child { margin-bottom: 0; }
.message__content ul,
.message__content ol { padding-left: 20px; margin-bottom: 10px; }
.message__content li { margin-bottom: 4px; font-size: 15px; }
.message__content strong { color: var(--text-bright); font-weight: 700; }
.message__content em { color: var(--text-secondary); }
.message__content code {
font-family: var(--font-mono);
font-size: 12px;
background: var(--bg-active);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 6px;
color: var(--purple);
}
.message__content pre {
background: #0d0d10 !important;
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 14px 16px;
overflow-x: auto;
margin: 12px 0;
}
.message__content pre code {
background: none; border: none; padding: 0;
color: var(--text-primary); font-size: 12px;
}
.message__content table {
width: 100%;
border-collapse: collapse;
margin: 12px 0;
font-size: 12.5px;
font-family: var(--font-mono);
}
.message__content th {
background: var(--bg-active);
color: var(--text-bright);
font-weight: 700;
padding: 8px 12px;
text-align: left;
border: 1px solid var(--border);
}
.message__content td {
padding: 7px 12px;
border: 1px solid var(--border);
}
.message__content tr:hover td { background: var(--bg-hover); }
.message__content blockquote {
border-left: 3px solid var(--accent);
padding-left: 14px;
margin: 10px 0;
color: var(--text-secondary);
font-style: italic;
}
.message__content hr {
border: none;
border-top: 1px solid var(--border);
margin: 16px 0;
}
/* ── Input Bar ─────────────────────────────────────────────────────────────── */
.input-bar {
display: flex;
align-items: flex-end;
gap: 10px;
padding: 14px 20px;
border-top: 1px solid var(--border);
background: var(--bg-surface);
flex-shrink: 0;
}
.query-textarea {
flex: 1;
background: var(--bg-base);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text-primary);
font-family: var(--font-mono);
font-size: 15px;
padding: 10px 14px;
resize: none;
outline: none;
min-height: 40px;
max-height: 160px;
overflow-y: auto;
line-height: 1.5;
transition: border-color var(--transition), box-shadow var(--transition);
}
.query-textarea:focus {
border-color: var(--border-focus);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.query-textarea::placeholder { color: var(--text-muted); }
/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
width: 14px; height: 14px;
border: 2px solid rgba(255,255,255,0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }