gemma-multi-avatar / src /style.css
bep40's picture
Upload src/style.css
6e2810c verified
Raw
History Blame
11.7 kB
:root {
--bg: #0a0b10;
--bg-elev: #13151c;
--bg-elev-2: #1b1e29;
--border: rgba(255, 255, 255, 0.08);
--border-strong: rgba(255, 255, 255, 0.16);
--text: #f5f6fa;
--text-dim: rgba(245, 246, 250, 0.65);
--text-faint: rgba(245, 246, 250, 0.42);
--error: #ff6a75;
--live: #22d3ee;
--font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
--radius-sm: 8px;
--radius-md: 14px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, sans-serif; overflow: hidden; }
#app { position: relative; height: 100dvh; }
#stage { position: absolute; inset: 0; }
#stage canvas { display: block; }
[hidden] { display: none !important; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); background: var(--bg); transition: opacity 0.6s ease; pointer-events: none; }
#loading.done { opacity: 0; }
#topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px; pointer-events: none; }
#topbar > * { pointer-events: auto; }
#identity h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
#identity p { margin: 4px 0 0; max-width: 340px; font-size: 12px; line-height: 1.45; color: var(--text-faint); }
#identity strong { color: var(--text-dim); font-weight: 500; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--text-dim); cursor: pointer; touch-action: manipulation; transition: color 0.15s ease, border-color 0.15s ease; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn.active { color: var(--live); border-color: var(--border-strong); }
.icon-btn.small { width: 28px; height: 28px; }
#main-btn { min-width: 190px; height: 46px; padding: 0 26px; border: none; border-radius: 23px; background: var(--text); color: var(--bg); font-family: Inter, system-ui, sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: transform 0.12s ease, opacity 0.15s ease; }
#main-btn:hover:not(:disabled) { transform: translateY(-1px); }
#main-btn:disabled { opacity: 0.45; cursor: default; }
#main-btn.live { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border-strong); }
#controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0 20px calc(22px + env(safe-area-inset-bottom)); z-index: 100; }
#buttons { display: flex; align-items: center; gap: 10px; }
#caption { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); transition: color 0.2s ease; }
#caption.live { color: var(--live); }
#caption.error { color: var(--error); }
#subtitles { position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); max-width: min(640px, calc(100vw - 48px)); padding: 10px 16px; border-radius: var(--radius-md); background: rgba(10, 11, 16, 0.72); backdrop-filter: blur(6px); border: 1px solid var(--border); font-size: 15px; line-height: 1.5; text-align: center; text-wrap: balance; color: var(--text); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#subtitles.visible { opacity: 1; }
#settings { width: min(440px, calc(100vw - 40px)); padding: 22px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-elev); color: var(--text); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32); }
#settings::backdrop { background: rgba(5, 6, 9, 0.6); backdrop-filter: blur(2px); }
#settings h2 { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
#settings label { display: block; margin-bottom: 14px; font-size: 12px; color: var(--text-dim); }
#settings select, #settings textarea, #settings input { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev-2); color: var(--text); font-family: inherit; font-size: 13px; }
#settings select:focus-visible, #settings textarea:focus-visible, #settings input:focus-visible { outline: 1px solid var(--text-dim); outline-offset: 1px; }
#settings textarea { resize: vertical; }
#settings .check-row { display: flex; align-items: center; gap: 9px; }
#settings .check-row input { display: inline-block; width: auto; margin: 0; accent-color: var(--text); }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.dialog-actions .primary { padding: 9px 20px; border: none; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); font-weight: 600; font-size: 13px; cursor: pointer; }
/* ── Draggable / Resizable Chat ───────────────────────────────────────────── */
#text-chat {
position: fixed;
z-index: 9999;
top: 100px;
left: 20px;
width: min(380px, calc(100vw - 40px));
height: 50vh;
display: flex;
flex-direction: column;
background: rgba(10, 11, 16, 0.92);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
overflow: hidden;
min-height: 2.5rem;
max-height: 80vh;
cursor: default;
resize: none;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
touch-action: none;
}
#text-chat.dragging { cursor: grabbing !important; user-select: none !important; }
#text-chat.resizing { user-select: none !important; }
/* Chat header bar — drag handle */
#chat-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
border-bottom: 1px solid var(--border);
background: var(--bg-elev);
cursor: grab;
flex-shrink: 0;
touch-action: none;
}
#text-chat.dragging #chat-header { cursor: grabbing !important; }
#chat-title { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.04em; }
#chat-header-actions { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
#chat-avatar-select { font-size: 11px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-elev-2); color: var(--text); cursor: pointer; max-width: 100px; pointer-events: auto; }
#chat-messages { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
#chat-messages::-webkit-scrollbar { width: 6px; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.chat-message { max-width: 85%; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; word-wrap: break-word; }
.chat-message.user { align-self: flex-end; background: var(--live); color: var(--bg); }
.chat-message.assistant { align-self: flex-start; background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
#chat-input-container { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--bg-elev); flex-shrink: 0; }
#chat-input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-family: inherit; font-size: 13px; }
#chat-input:focus { outline: 1px solid var(--text-dim); outline-offset: 1px; }
/* Resize handle at bottom-right corner — bigger, better contrast */
#chat-resize-handle {
position: absolute;
bottom: 0;
right: 0;
width: 24px;
height: 24px;
cursor: nwse-resize;
background: transparent;
z-index: 1;
touch-action: none;
}
#chat-resize-handle::after {
content: '';
position: absolute;
bottom: 3px;
right: 3px;
width: 14px;
height: 14px;
border-right: 2px solid var(--text-dim);
border-bottom: 2px solid var(--text-dim);
opacity: 0.4;
transition: opacity 0.15s;
}
#chat-resize-handle:hover::after { opacity: 1; }
#text-chat.resizing #chat-resize-handle::after { opacity: 1; }
/* ── News Panel ─────────────────────────────────────────────────────────── */
#news-panel {
position: fixed;
z-index: 9998;
bottom: 80px;
right: 20px;
width: min(380px, calc(100vw - 40px));
max-height: 70vh;
display: flex;
flex-direction: column;
background: rgba(10, 11, 16, 0.95);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.6);
transition: max-height 0.3s ease;
}
#news-panel.collapsed {
max-height: 42px;
}
#news-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 14px;
border-bottom: 1px solid var(--border);
background: var(--bg-elev);
flex-shrink: 0;
cursor: pointer;
}
#news-panel.collapsed #news-header {
border-bottom: none;
}
#news-header-actions {
display: flex;
align-items: center;
gap: 6px;
pointer-events: auto;
}
#news-title {
font-size: 13px;
font-weight: 600;
color: var(--text);
letter-spacing: 0.02em;
}
#news-list-container {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
#news-list {
flex: 1;
padding: 10px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 8px;
}
#news-list::-webkit-scrollbar { width: 5px; }
#news-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.news-item {
padding: 8px 10px;
border-radius: var(--radius-sm);
background: var(--bg-elev-2);
border: 1px solid var(--border);
cursor: pointer;
transition: border-color 0.15s ease, background 0.15s ease;
display: flex;
gap: 10px;
min-height: 60px;
}
.news-item:hover {
border-color: var(--border-strong);
background: var(--bg-elev);
}
.news-item-image {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
background: var(--bg-elev);
}
.news-item-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 3px;
overflow: hidden;
}
.news-index {
font-size: 10px;
font-weight: 600;
color: var(--live);
}
.news-title {
font-size: 12px;
line-height: 1.4;
color: var(--text);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.news-source {
font-size: 10px;
color: var(--text-dim);
font-style: italic;
}
.news-load-more-btn {
padding: 8px 16px;
margin: 8px 10px 10px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-elev);
color: var(--live);
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: border-color 0.15s ease, background 0.15s ease;
text-align: center;
}
.news-load-more-btn:hover {
border-color: var(--border-strong);
background: var(--bg-elev-2);
}
@media (max-width: 600px) {
#identity p { display: none; }
#subtitles { bottom: 128px; font-size: 14px; }
#text-chat { top: 60px; left: 10px; width: calc(100vw - 20px); height: 40vh; }
#news-panel {
bottom: 70px;
right: 10px;
width: calc(100vw - 20px);
max-height: 50vh;
}
}