web3-copilot / static /styles.css
Priyansh Saxena
feat: chat interface upgrades
5c00819
/* ============================================================
Web3 Research Co-Pilot — Styles
Minimalist professional dark UI with Inter font
============================================================ */
/* CSS Variables */
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--primary-glow: rgba(99,102,241,0.15);
--accent: #22d3ee;
--bg: #0d0d14;
--surface: #13131f;
--surface-2: #1c1c2e;
--surface-3: #26263a;
--text: #f1f5f9;
--text-2: #94a3b8;
--text-3: #64748b;
--border: rgba(255,255,255,0.07);
--border-2: rgba(255,255,255,0.11);
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
--shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
--shadow: 0 4px 20px rgba(0,0,0,0.45);
--radius-sm: 6px;
--radius: 10px;
--radius-lg: 16px;
--radius-xl: 20px;
}
[data-theme="light"] {
--bg: #f6f7fb;
--surface: #ffffff;
--surface-2: #f1f3f9;
--surface-3: #e5e8f0;
--text: #0f172a;
--text-2: #475569;
--text-3: #94a3b8;
--border: rgba(0,0,0,0.06);
--border-2: rgba(0,0,0,0.10);
--shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
--shadow: 0 4px 20px rgba(0,0,0,0.10);
}
*, *::before, *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
height: 100vh;
overflow: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transition: background-color 0.25s, color 0.25s;
}
/* App Shell */
.app {
display: flex;
flex-direction: column;
height: 100vh;
max-width: 860px;
margin: 0 auto;
border-left: 1px solid var(--border);
border-right: 1px solid var(--border);
}
/* HEADER */
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1.25rem;
height: 52px;
border-bottom: 1px solid var(--border);
background: var(--surface);
flex-shrink: 0;
gap: 0.75rem;
z-index: 100;
}
.header-left {
display: flex;
align-items: center;
gap: 0.625rem;
min-width: 0;
}
.logo-icon { flex-shrink: 0; }
.header-title {
font-size: 0.9rem;
font-weight: 600;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.brand {
background: linear-gradient(135deg, var(--primary), var(--accent));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.header-right {
display: flex;
align-items: center;
gap: 0.625rem;
flex-shrink: 0;
}
/* Status Badge */
.status-badge {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.25rem 0.625rem;
border-radius: 20px;
font-size: 0.72rem;
font-weight: 500;
border: 1px solid var(--border);
background: var(--surface-2);
color: var(--text-3);
user-select: none;
}
.status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--text-3);
flex-shrink: 0;
transition: background 0.3s, box-shadow 0.3s;
}
.status-badge.online .status-dot { background: var(--success); box-shadow: 0 0 0 2px rgba(16,185,129,0.2); }
.status-badge.offline .status-dot { background: var(--error); }
.status-badge.checking .status-dot { background: var(--warning); animation: pulse-dot 1.4s ease-in-out infinite; }
.status-badge.online { color: var(--text-2); }
@keyframes pulse-dot {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}
/* Model Toggle */
.model-select {
display: flex;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 2px;
gap: 2px;
}
.model-btn {
display: flex;
align-items: center;
gap: 0.3rem;
padding: 0.28rem 0.625rem;
border: none;
border-radius: 4px;
font-size: 0.72rem;
font-weight: 500;
color: var(--text-3);
background: transparent;
cursor: pointer;
transition: all 0.18s;
white-space: nowrap;
font-family: inherit;
}
.model-btn.active {
background: var(--surface);
color: var(--text);
box-shadow: var(--shadow-sm);
}
.model-btn:hover:not(.active) { color: var(--text-2); }
/* Icon Button */
.icon-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface-2);
color: var(--text-3);
cursor: pointer;
font-size: 0.8rem;
transition: all 0.18s;
flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
/* MAIN LAYOUT */
.main {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.chat-wrap {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
/* CHAT MESSAGES */
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 1.5rem 1.25rem;
display: flex;
flex-direction: column;
gap: 1rem;
scroll-behavior: smooth;
background: var(--bg);
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
/* Welcome Screen */
.welcome-screen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 2rem 1rem 1.5rem;
flex: 1;
animation: fadeIn 0.4s ease;
}
.welcome-icon { margin-bottom: 1.25rem; opacity: 0.85; }
.welcome-screen h2 {
font-size: 1.35rem;
font-weight: 600;
margin-bottom: 0.4rem;
color: var(--text);
letter-spacing: -0.02em;
}
.welcome-screen p {
color: var(--text-3);
font-size: 0.875rem;
margin-bottom: 1.75rem;
}
.example-chips {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
justify-content: center;
max-width: 580px;
}
.chip {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.425rem 0.875rem;
background: var(--surface);
border: 1px solid var(--border-2);
border-radius: 20px;
color: var(--text-2);
font-size: 0.78rem;
font-weight: 500;
cursor: pointer;
transition: all 0.18s;
font-family: inherit;
}
.chip:hover {
background: var(--surface-2);
border-color: var(--primary);
color: var(--text);
transform: translateY(-1px);
}
.chip i { color: var(--primary); font-size: 0.72rem; }
/* MESSAGE BUBBLES */
.message {
display: flex;
flex-direction: column;
gap: 0.2rem;
animation: msgSlide 0.28s ease;
}
@keyframes msgSlide {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.message.user { align-items: flex-end; }
.message.assistant { align-items: flex-start; }
.message-bubble {
max-width: 82%;
padding: 0.75rem 1rem;
border-radius: var(--radius-lg);
font-size: 0.875rem;
line-height: 1.65;
word-break: break-word;
overflow-wrap: anywhere;
}
.message.user .message-bubble {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: #fff;
border-bottom-right-radius: 4px;
box-shadow: 0 2px 10px rgba(99,102,241,0.25);
}
.message.assistant .message-bubble {
background: var(--surface);
border: 1px solid var(--border);
color: var(--text);
border-bottom-left-radius: 4px;
max-width: 94%;
}
.message-time {
font-size: 0.67rem;
color: var(--text-3);
padding: 0 0.25rem;
font-variant-numeric: tabular-nums;
}
/* MARKDOWN CONTENT */
.md-content { line-height: 1.7; }
.md-content > *:first-child { margin-top: 0 !important; }
.md-content > *:last-child { margin-bottom: 0 !important; }
.md-content h1, .md-content h2,
.md-content h3, .md-content h4,
.md-content h5, .md-content h6 {
font-weight: 600;
line-height: 1.3;
margin: 1rem 0 0.4rem;
}
.md-content h1 { font-size: 1.2rem; color: var(--accent); }
.md-content h2 { font-size: 1.05rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.md-content h3 { font-size: 0.95rem; color: var(--primary); }
.md-content h4 { font-size: 0.875rem; color: var(--text-2); }
.md-content p { margin: 0.5rem 0; }
.md-content ul, .md-content ol {
margin: 0.5rem 0;
padding-left: 1.4rem;
}
.md-content li { margin: 0.2rem 0; }
.md-content ul li::marker { color: var(--accent); }
.md-content ol li::marker { color: var(--accent); font-weight: 600; }
.md-content strong { font-weight: 600; color: var(--text); }
.md-content em { color: var(--text-2); font-style: italic; }
.md-content code {
font-family: 'JetBrains Mono', 'SF Mono', Consolas, 'Courier New', monospace;
font-size: 0.8rem;
background: var(--surface-2);
border: 1px solid var(--border-2);
padding: 0.12rem 0.4rem;
border-radius: 4px;
color: var(--accent);
}
.md-content pre {
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.875rem 1rem;
overflow-x: auto;
margin: 0.75rem 0;
}
.md-content pre code {
background: none;
border: none;
padding: 0;
color: var(--text);
font-size: 0.8rem;
}
.hljs { background: transparent !important; padding: 0 !important; }
.md-content table {
width: 100%;
border-collapse: collapse;
margin: 0.75rem 0;
font-size: 0.82rem;
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.md-content th {
background: var(--surface-2);
color: var(--text-2);
font-weight: 600;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.04em;
padding: 0.5rem 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border);
}
.md-content td {
padding: 0.45rem 0.75rem;
border-top: 1px solid var(--border);
color: var(--text);
}
.md-content tr:hover td { background: rgba(255,255,255,0.015); }
.md-content blockquote {
border-left: 3px solid var(--primary);
background: var(--primary-glow);
padding: 0.6rem 0.875rem;
margin: 0.75rem 0;
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
color: var(--text-2);
}
.md-content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.md-content a:hover { border-bottom-color: var(--accent); }
.md-content hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
/* User bubble overrides */
.message.user .md-content h1,
.message.user .md-content h2,
.message.user .md-content h3,
.message.user .md-content h4 { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.2); }
.message.user .md-content strong { color: #fff; }
.message.user .md-content em { color: rgba(255,255,255,0.8); }
.message.user .md-content code {
background: rgba(255,255,255,0.15);
border-color: rgba(255,255,255,0.2);
color: #fff;
}
.message.user .md-content ul li::marker,
.message.user .md-content ol li::marker { color: rgba(255,255,255,0.7); }
/* Sources */
.sources-list {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.35rem;
margin-top: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border);
}
.sources-label {
font-size: 0.68rem;
color: var(--text-3);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.source-tag {
font-size: 0.7rem;
padding: 0.18rem 0.55rem;
background: rgba(99,102,241,0.08);
border: 1px solid rgba(99,102,241,0.2);
border-radius: 20px;
color: var(--primary);
font-weight: 500;
}
.viz-container {
margin-top: 0.875rem;
border-radius: var(--radius);
border: 1px solid var(--border);
overflow: hidden;
width: 100%;
}
/* THINKING / TOOL STEPS */
.thinking-bubble {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
border-bottom-left-radius: 4px;
padding: 0.75rem 1rem;
font-size: 0.82rem;
max-width: 90%;
min-width: 220px;
}
.thinking-header {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-2);
margin-bottom: 0.5rem;
}
.thinking-spinner {
width: 13px;
height: 13px;
border: 2px solid var(--border-2);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.75s linear infinite;
flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.thinking-label { font-weight: 500; font-size: 0.8rem; }
.tool-steps { display: flex; flex-direction: column; gap: 0.2rem; }
.tool-step {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.75rem;
color: var(--text-3);
padding: 0.15rem 0;
animation: msgSlide 0.2s ease;
}
.tool-step i { color: var(--primary); width: 13px; text-align: center; font-size: 0.7rem; }
.tool-step.done i { color: var(--success); }
.progress-strip {
margin-top: 0.625rem;
height: 2px;
background: var(--border);
border-radius: 1px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--primary), var(--accent));
border-radius: 1px;
transition: width 0.4s ease;
width: 0%;
}
/* INPUT AREA */
.input-area {
padding: 0.875rem 1.25rem 1rem;
border-top: 1px solid var(--border);
background: var(--surface);
flex-shrink: 0;
}
.input-box {
display: flex;
align-items: flex-end;
gap: 0.625rem;
background: var(--surface-2);
border: 1.5px solid var(--border-2);
border-radius: var(--radius-xl);
padding: 0.55rem 0.625rem 0.55rem 1rem;
transition: border-color 0.2s, box-shadow 0.2s;
}
.input-box:focus-within {
border-color: var(--primary);
box-shadow: 0 0 0 3px var(--primary-glow);
}
.input-field {
flex: 1;
background: none;
border: none;
outline: none;
color: var(--text);
font-size: 0.875rem;
font-family: 'Inter', sans-serif;
line-height: 1.55;
resize: none;
overflow-y: hidden;
max-height: 130px;
padding: 0;
min-height: 22px;
}
.input-field::placeholder { color: var(--text-3); }
.input-actions {
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
.char-count {
font-size: 0.65rem;
color: var(--text-3);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.send-btn {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background: var(--primary);
border: none;
border-radius: var(--radius-sm);
color: #fff;
cursor: pointer;
font-size: 0.75rem;
transition: all 0.18s;
flex-shrink: 0;
font-family: inherit;
}
.send-btn:hover:not(:disabled) {
background: var(--primary-dark);
transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(99,102,241,0.35);
}
.send-btn:active { transform: translateY(0); }
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.input-hint {
font-size: 0.65rem;
color: var(--text-3);
margin-top: 0.4rem;
padding-left: 0.25rem;
}
.input-hint kbd {
display: inline-block;
font-family: 'JetBrains Mono', monospace;
font-size: 0.6rem;
background: var(--surface-3);
border: 1px solid var(--border-2);
border-radius: 3px;
padding: 0.05rem 0.3rem;
color: var(--text-2);
}
/* TOAST NOTIFICATION */
.toast {
position: fixed;
top: 0.875rem;
right: 0.875rem;
background: var(--surface);
border: 1px solid var(--border-2);
border-radius: var(--radius);
padding: 0.55rem 0.875rem;
font-size: 0.78rem;
color: var(--text-2);
display: flex;
align-items: center;
gap: 0.5rem;
opacity: 0;
transform: translateY(-6px) scale(0.97);
transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1);
z-index: 1000;
box-shadow: var(--shadow);
pointer-events: none;
max-width: 300px;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-icon { font-size: 0.75rem; flex-shrink: 0; }
.toast.processing { border-color: rgba(99,102,241,0.4); }
.toast.processing .toast-icon { color: var(--primary); }
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning { border-color: rgba(245,158,11,0.4); }
.toast.warning .toast-icon { color: var(--warning); }
/* LIGHT THEME OVERRIDES */
[data-theme="light"] .md-content pre {
background: #f6f8fa;
border-color: #d0d7de;
}
[data-theme="light"] .md-content code {
background: rgba(175,184,193,0.2);
border-color: rgba(175,184,193,0.4);
color: #0550ae;
}
[data-theme="light"] .message.assistant .message-bubble {
background: #fff;
border-color: rgba(0,0,0,0.08);
box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
[data-theme="light"] .thinking-bubble {
background: #fff;
border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .chat-messages { background: var(--bg); }
/* RESPONSIVE */
@media (max-width: 640px) {
.app { max-width: 100%; border: none; }
.header { padding: 0 1rem; height: 48px; }
.header-title { font-size: 0.82rem; }
.status-badge { display: none; }
.chat-messages { padding: 1rem; }
.message-bubble { max-width: 92%; font-size: 0.85rem; }
.message.assistant .message-bubble { max-width: 98%; }
.input-area { padding: 0.75rem 0.875rem 0.875rem; }
.example-chips { gap: 0.375rem; }
.chip { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
}