ZovOS_AI/internal/ui/static/style.css
Dan4ick 460d20539f feat: initial project structure - Phase 1 MVP
- Project infrastructure: go.mod, Makefile, .gitignore, README
- Configuration system with YAML parsing and env overrides
- Structured logging with slog
- AI provider interface with Ollama, OpenAI, Anthropic implementations
- Provider manager with runtime switching
- Agent orchestrator with ReAct loop (reason-act-observe)
- Tool registry with JSON Schema descriptions
- Terminal tool: shell command execution with safety controls
- Filesystem tools: read, write, list with path access control
- Conversation memory with session management
- Web UI server with WebSocket streaming
- Modern dark theme UI with glassmorphism, animations
- Frontend: WebSocket client, markdown rendering, tool call display
2026-03-20 00:38:22 +03:00

593 lines
12 KiB
CSS

/* ===== DESIGN TOKENS ===== */
:root {
/* Colors */
--bg-primary: #0a0a0f;
--bg-secondary: #12121a;
--bg-tertiary: #1a1a28;
--bg-glass: rgba(255, 255, 255, 0.03);
--bg-glass-hover: rgba(255, 255, 255, 0.06);
--text-primary: #e8e8f0;
--text-secondary: #8888a0;
--text-muted: #555570;
--accent-primary: #6C5CE7;
--accent-secondary: #00D2FF;
--accent-gradient: linear-gradient(135deg, #6C5CE7 0%, #00D2FF 100%);
--accent-gradient-hover: linear-gradient(135deg, #7d6ff0 0%, #33ddff 100%);
--border-color: rgba(255, 255, 255, 0.06);
--border-hover: rgba(255, 255, 255, 0.12);
--success: #00E676;
--warning: #FFD740;
--error: #FF5252;
/* Sizes */
--sidebar-width: 280px;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 20px;
/* Typography */
--font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
/* Shadows */
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
--shadow-glow: 0 0 20px rgba(108, 92, 231, 0.3);
}
/* ===== RESET ===== */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font-main);
background: var(--bg-primary);
color: var(--text-primary);
height: 100vh;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
/* ===== APP LAYOUT ===== */
.app {
display: flex;
height: 100vh;
}
/* ===== SIDEBAR ===== */
.sidebar {
width: var(--sidebar-width);
background: var(--bg-secondary);
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
padding: 20px 16px;
flex-shrink: 0;
}
.sidebar-header {
margin-bottom: 24px;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
}
.logo-icon {
display: flex;
align-items: center;
justify-content: center;
animation: pulse-glow 3s ease-in-out infinite alternate;
}
@keyframes pulse-glow {
0% { filter: drop-shadow(0 0 4px rgba(108, 92, 231, 0.4)); }
100% { filter: drop-shadow(0 0 12px rgba(0, 210, 255, 0.6)); }
}
.logo-text {
font-size: 20px;
font-weight: 700;
background: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.sidebar-section {
margin-bottom: 16px;
}
.section-label {
display: block;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-muted);
margin-bottom: 8px;
}
.provider-select-wrapper {
position: relative;
}
.provider-select {
width: 100%;
padding: 10px 14px;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
color: var(--text-primary);
font-family: var(--font-main);
font-size: 13px;
cursor: pointer;
outline: none;
appearance: none;
transition: all 0.2s ease;
}
.provider-select:hover {
border-color: var(--border-hover);
background: var(--bg-glass-hover);
}
.provider-select:focus {
border-color: var(--accent-primary);
box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.provider-select option {
background: var(--bg-tertiary);
color: var(--text-primary);
}
/* Buttons */
.btn {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 10px 16px;
border: none;
border-radius: var(--radius-sm);
font-family: var(--font-main);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}
.btn-new-chat {
width: 100%;
background: var(--accent-gradient);
color: white;
box-shadow: var(--shadow-glow);
}
.btn-new-chat:hover {
background: var(--accent-gradient-hover);
transform: translateY(-1px);
box-shadow: 0 0 28px rgba(108, 92, 231, 0.4);
}
.btn-new-chat:active {
transform: translateY(0);
}
.sidebar-footer {
margin-top: auto;
padding-top: 16px;
border-top: 1px solid var(--border-color);
}
.status-indicator {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--text-secondary);
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--success);
box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.status-indicator.busy .status-dot {
background: var(--warning);
box-shadow: 0 0 8px rgba(255, 215, 64, 0.5);
}
.status-indicator.error .status-dot {
background: var(--error);
box-shadow: 0 0 8px rgba(255, 82, 82, 0.5);
animation: none;
}
/* ===== MAIN CONTENT ===== */
.main {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
.chat-container {
flex: 1;
overflow-y: auto;
padding: 24px;
scroll-behavior: smooth;
}
.chat-container::-webkit-scrollbar {
width: 6px;
}
.chat-container::-webkit-scrollbar-track {
background: transparent;
}
.chat-container::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 3px;
}
/* ===== WELCOME SCREEN ===== */
.welcome {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
text-align: center;
animation: fade-in 0.6s ease;
}
@keyframes fade-in {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.welcome-icon {
margin-bottom: 24px;
animation: float 4s ease-in-out infinite;
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.welcome-title {
font-size: 36px;
font-weight: 700;
background: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 8px;
}
.welcome-subtitle {
font-size: 16px;
color: var(--text-secondary);
margin-bottom: 40px;
}
.welcome-features {
display: flex;
gap: 16px;
flex-wrap: wrap;
justify-content: center;
}
.feature-card {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 20px;
background: var(--bg-glass);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
font-size: 14px;
color: var(--text-secondary);
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}
.feature-card:hover {
background: var(--bg-glass-hover);
border-color: var(--accent-primary);
color: var(--text-primary);
transform: translateY(-2px);
box-shadow: var(--shadow-glow);
}
.feature-icon {
font-size: 20px;
}
/* ===== MESSAGES ===== */
.messages {
display: flex;
flex-direction: column;
gap: 16px;
}
.message {
display: flex;
gap: 12px;
animation: message-in 0.3s ease;
max-width: 860px;
}
@keyframes message-in {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.message.user {
align-self: flex-end;
flex-direction: row-reverse;
}
.message-avatar {
width: 36px;
height: 36px;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
flex-shrink: 0;
}
.message.user .message-avatar {
background: var(--accent-gradient);
}
.message.assistant .message-avatar {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
}
.message-body {
flex: 1;
min-width: 0;
}
.message-content {
padding: 14px 18px;
border-radius: var(--radius-lg);
font-size: 14px;
line-height: 1.65;
word-wrap: break-word;
}
.message.user .message-content {
background: var(--accent-gradient);
color: white;
border-bottom-right-radius: 4px;
}
.message.assistant .message-content {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-bottom-left-radius: 4px;
}
.message-content pre {
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 14px;
margin: 10px 0;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.5;
}
.message-content code {
font-family: var(--font-mono);
font-size: 13px;
background: rgba(108, 92, 231, 0.15);
padding: 2px 6px;
border-radius: 4px;
}
.message-content pre code {
background: none;
padding: 0;
}
/* Tool calls */
.tool-call {
margin: 8px 0;
padding: 12px 16px;
background: rgba(108, 92, 231, 0.08);
border: 1px solid rgba(108, 92, 231, 0.2);
border-radius: var(--radius-sm);
font-size: 12px;
animation: tool-pulse 0.5s ease;
}
@keyframes tool-pulse {
0% { border-color: rgba(108, 92, 231, 0.5); box-shadow: 0 0 12px rgba(108, 92, 231, 0.2); }
100% { border-color: rgba(108, 92, 231, 0.2); box-shadow: none; }
}
.tool-call-header {
display: flex;
align-items: center;
gap: 6px;
font-weight: 600;
color: var(--accent-primary);
margin-bottom: 6px;
}
.tool-call-args {
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-secondary);
white-space: pre-wrap;
word-break: break-all;
}
.tool-result {
margin: 8px 0;
padding: 12px 16px;
background: rgba(0, 230, 118, 0.05);
border: 1px solid rgba(0, 230, 118, 0.15);
border-radius: var(--radius-sm);
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-secondary);
white-space: pre-wrap;
word-break: break-all;
max-height: 200px;
overflow-y: auto;
}
/* Typing indicator */
.typing-indicator {
display: flex;
gap: 5px;
padding: 8px 0;
}
.typing-indicator span {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--accent-primary);
animation: blink 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
0%, 100% { opacity: 0.3; transform: scale(0.8); }
50% { opacity: 1; transform: scale(1); }
}
/* ===== INPUT AREA ===== */
.input-area {
padding: 16px 24px 20px;
border-top: 1px solid var(--border-color);
background: var(--bg-secondary);
}
.input-wrapper {
display: flex;
align-items: flex-end;
gap: 10px;
padding: 6px 6px 6px 18px;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
transition: all 0.2s ease;
}
.input-wrapper:focus-within {
border-color: var(--accent-primary);
box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}
.message-input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--text-primary);
font-family: var(--font-main);
font-size: 14px;
line-height: 1.5;
padding: 10px 0;
resize: none;
max-height: 150px;
}
.message-input::placeholder {
color: var(--text-muted);
}
.btn-send {
width: 40px;
height: 40px;
border: none;
border-radius: var(--radius-sm);
background: var(--accent-gradient);
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s ease;
}
.btn-send:hover {
transform: scale(1.05);
box-shadow: var(--shadow-glow);
}
.btn-send:active {
transform: scale(0.95);
}
.btn-send:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none;
}
.input-hint {
font-size: 11px;
color: var(--text-muted);
text-align: center;
margin-top: 8px;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
.sidebar {
position: fixed;
left: -100%;
top: 0;
bottom: 0;
z-index: 100;
transition: left 0.3s ease;
box-shadow: var(--shadow-lg);
}
.sidebar.open {
left: 0;
}
.welcome-features {
flex-direction: column;
}
}