kaushik-harsh-99's picture
Upload WebGPU / WASM app with GGUF models (model_f16.gguf and model_q8_0.gguf)
d376ead verified
Raw
History Blame Contribute Delete
9.21 kB
/* ── Reset & Variables ──────────────────────────── */
:root {
--bg: #09090b;
--panel: #121215;
--border: #27272a;
--border-h: #3f3f46;
--text: #f4f4f5;
--text-sec: #a1a1aa;
--text-dim: #52525b;
--input-bg: #18181b;
--btn-bg: #f4f4f5;
--btn-text: #09090b;
--btn-sec: #27272a;
--accent: #6366f1; /* indigo β€” used for progress bar */
--font: 'Noto Sans Devanagari', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
--mono: 'Fira Code', ui-monospace, monospace;
--r: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg);
color: var(--text);
font-family: var(--font);
min-height: 100vh;
display: flex;
justify-content: center;
padding: 2rem 1rem 4rem;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
.app-layout {
width: 100%;
max-width: 780px;
display: flex;
flex-direction: column;
gap: 1.75rem;
}
/* ── Header ─────────────────────────────────────── */
.header {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding-bottom: 1.25rem;
border-bottom: 1px solid var(--border);
}
.title {
font-size: 1.45rem;
font-weight: 700;
letter-spacing: -0.025em;
}
.title span { font-weight: 400; color: var(--text-sec); }
.subtitle {
font-size: 0.82rem;
color: var(--text-sec);
margin-top: 0.2rem;
}
.subtitle a {
color: var(--text);
text-decoration: underline;
text-underline-offset: 3px;
}
/* Badge */
.badge {
font-family: var(--mono);
font-size: 0.72rem;
padding: 0.3rem 0.65rem;
border-radius: 4px;
background: var(--panel);
border: 1px solid var(--border);
color: var(--text-sec);
white-space: nowrap;
flex-shrink: 0;
}
.badge.idle { color: var(--text-dim); }
.badge.loading { color: #facc15; border-color: #713f12; animation: pulse 1.4s ease infinite; }
.badge.webgpu { color: #86efac; border-color: #166534; }
.badge.wasm { color: #fca5a5; border-color: #7f1d1d; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.55} }
/* ── Workspace ───────────────────────────────────── */
.workspace {
display: flex;
flex-direction: column;
gap: 1.25rem;
}
.section { display: flex; flex-direction: column; gap: 0.5rem; }
.section-label-row {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
}
.section-label {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-dim);
}
/* Sample Prompts */
.sample-prompts { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.sample-label { font-size: 0.72rem; color: var(--text-dim); }
.sample-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--text-sec);
font-family: var(--font);
font-size: 0.72rem;
padding: 0.2rem 0.5rem;
border-radius: 4px;
cursor: pointer;
transition: all 0.12s ease;
}
.sample-btn:hover { border-color: var(--border-h); color: var(--text); }
/* Textarea */
textarea {
width: 100%;
background: var(--input-bg);
border: 1px solid var(--border);
border-radius: var(--r);
padding: 0.8rem 1rem;
color: var(--text);
font-family: var(--font);
font-size: 0.93rem;
line-height: 1.65;
resize: vertical;
outline: none;
transition: border-color 0.15s;
}
textarea:focus { border-color: var(--border-h); }
/* ── Controls ────────────────────────────────────── */
.controls-row {
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--r);
padding: 1.1rem 1.25rem;
}
.control-item { display: flex; flex-direction: column; gap: 0.4rem; }
.control-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.83rem;
font-weight: 500;
color: var(--text-sec);
}
.val-tag { font-family: var(--mono); font-size: 0.78rem; color: var(--text); }
.control-subtext { font-size: 0.7rem; color: var(--text-dim); }
input[type="range"] {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 3px;
background: var(--border);
border-radius: 2px;
outline: none;
cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 14px; height: 14px;
border-radius: 50%;
background: var(--text);
cursor: pointer;
}
/* ── Action Bar ──────────────────────────────────── */
.action-bar {
display: flex;
justify-content: space-between;
align-items: center;
}
.action-left, .action-right { display: flex; gap: 0.5rem; }
.btn {
font-family: var(--font);
font-size: 0.85rem;
font-weight: 500;
padding: 0.55rem 1.15rem;
border-radius: var(--r);
border: 1px solid transparent;
cursor: pointer;
transition: all 0.14s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover:not(:disabled) { background: #e4e4e7; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary { background: var(--btn-sec); border-color: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-h); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-subtle { background: transparent; border-color: var(--border); color: var(--text-sec); }
.btn-subtle:hover { color: var(--text); border-color: var(--border-h); }
/* ── Output Section ──────────────────────────────── */
.output-section { display: flex; flex-direction: column; gap: 0.55rem; }
.output-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.status-text {
font-size: 0.75rem;
color: var(--text-dim);
font-family: var(--mono);
min-height: 1em;
}
/* Output box β€” relative so overlay can sit inside it */
.output-box {
position: relative;
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--r);
padding: 1.25rem;
min-height: 200px;
font-size: 0.93rem;
line-height: 1.75;
color: var(--text);
white-space: pre-wrap;
word-break: break-word;
overflow: auto;
}
.placeholder-text { color: var(--text-dim); font-style: italic; }
.prompt-text { color: var(--text-sec); }
.cursor {
display: inline-block;
font-weight: 700;
animation: blink 0.85s infinite;
margin-left: 1px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
/* ── Progress Overlay ────────────────────────────── */
.progress-overlay {
position: absolute;
inset: 0;
border-radius: calc(var(--r) - 1px);
background: rgba(9,9,11,0.92);
backdrop-filter: blur(6px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
animation: fadeIn 0.2s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.progress-overlay.hidden {
display: none;
}
.progress-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
width: min(340px, 80%);
text-align: center;
}
.progress-icon {
font-size: 1.5rem;
animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
.progress-label {
font-size: 0.9rem;
font-weight: 600;
color: var(--text);
}
.progress-track {
width: 100%;
height: 5px;
background: var(--border);
border-radius: 3px;
overflow: hidden;
}
.progress-fill {
height: 100%;
width: 0%;
background: linear-gradient(90deg, var(--accent), #818cf8);
border-radius: 3px;
transition: width 0.25s ease;
}
.progress-pct {
font-family: var(--mono);
font-size: 1.35rem;
font-weight: 700;
color: var(--text);
letter-spacing: -0.02em;
}
.progress-sub {
font-size: 0.72rem;
color: var(--text-dim);
}
/* ── Stats Bar ───────────────────────────────────── */
.stats-bar {
display: flex;
align-items: center;
gap: 0.45rem;
font-family: var(--mono);
font-size: 0.72rem;
color: var(--text-dim);
flex-wrap: wrap;
}
.stat-sep { color: var(--border-h); }
/* ── Responsive ──────────────────────────────────── */
@media (max-width: 520px) {
body { padding: 1rem 0.75rem 3rem; }
.title { font-size: 1.25rem; }
.progress-pct { font-size: 1.1rem; }
}