676767 / style.css
Cesus67's picture
Beautiful glass UI + in-browser Gemma (dumb edition)
004ed62 unverified
Raw History Blame Contribute Delete
10.2 kB
:root {
--bg: #06070f;
--ink: #eef0ff;
--dim: rgba(238, 240, 255, 0.55);
--glass: rgba(255, 255, 255, 0.055);
--stroke: rgba(255, 255, 255, 0.11);
--violet: #8b5cf6;
--cyan: #22d3ee;
--pink: #f472b6;
--ok: #4ade80;
--err: #fb7185;
--radius: 20px;
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: "Inter", system-ui, -apple-system, sans-serif;
font-size: 15px;
line-height: 1.5;
overflow: hidden;
}
/* ---------- animated background ---------- */
.bg {
position: fixed;
inset: 0;
z-index: -1;
overflow: hidden;
background:
radial-gradient(1200px 700px at 85% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
radial-gradient(900px 600px at -10% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
var(--bg);
}
.blob {
position: absolute;
width: 46vmax;
height: 46vmax;
border-radius: 50%;
filter: blur(90px);
opacity: 0.35;
animation: drift 26s ease-in-out infinite alternate;
}
.b1 { background: var(--violet); top: -18%; left: -12%; }
.b2 { background: var(--cyan); bottom: -22%; right: -14%; animation-delay: -8s; animation-duration: 32s; }
.b3 { background: var(--pink); top: 40%; left: 55%; width: 30vmax; height: 30vmax; opacity: 0.2; animation-delay: -16s; }
@keyframes drift {
from { transform: translate3d(-4%, -3%, 0) scale(1); }
to { transform: translate3d(7%, 9%, 0) scale(1.18) rotate(12deg); }
}
.grain {
position: absolute;
inset: 0;
opacity: 0.05;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
.blob { animation: none; }
}
/* ---------- glass ---------- */
.glass {
background: var(--glass);
border: 1px solid var(--stroke);
border-radius: var(--radius);
backdrop-filter: blur(24px) saturate(150%);
-webkit-backdrop-filter: blur(24px) saturate(150%);
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
/* ---------- layout ---------- */
.shell {
height: 100dvh;
max-width: 860px;
margin: 0 auto;
padding: 16px;
display: grid;
grid-template-rows: auto 1fr auto;
gap: 14px;
}
/* ---------- topbar ---------- */
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 12px 18px;
flex-wrap: wrap;
}
.brand {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.logo-dot {
width: 34px;
height: 34px;
flex: none;
border-radius: 12px;
background: conic-gradient(from 210deg, var(--violet), var(--cyan), var(--pink), var(--violet));
box-shadow: 0 0 24px rgba(139, 92, 246, 0.65);
animation: spin 9s linear infinite;
position: relative;
}
.logo-dot::after {
content: "";
position: absolute;
inset: 4px;
border-radius: 8px;
background: var(--bg);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .logo-dot { animation: none; } }
.brand-text h1 {
margin: 0;
font-family: "Space Grotesk", "Inter", sans-serif;
font-size: 21px;
letter-spacing: -0.02em;
display: flex;
align-items: baseline;
gap: 8px;
white-space: nowrap;
}
.t-gemma { font-weight: 700; }
.t-but { font-size: 12px; color: var(--dim); font-style: italic; font-weight: 400; }
.t-dumb {
font-weight: 700;
background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
background-size: 200% auto;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: shimmer 4s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
@media (prefers-reduced-motion: reduce) { .t-dumb { animation: none; } }
#status {
margin: 1px 0 0;
font-size: 12px;
color: var(--dim);
display: flex;
align-items: center;
gap: 6px;
}
#status::before {
content: "";
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--dim);
flex: none;
}
#status[data-state="ready"]::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
#status[data-state="thinking"]::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1s ease-in-out infinite; }
#status[data-state="error"]::before { background: var(--err); box-shadow: 0 0 10px var(--err); }
@keyframes pulse { 50% { opacity: 0.35; } }
/* ---------- dumb-o-meter ---------- */
.dumbmeter {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
border-radius: 999px;
border: 1px solid var(--stroke);
background: rgba(255, 255, 255, 0.04);
cursor: pointer;
user-select: none;
}
.dm-label {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--dim);
white-space: nowrap;
}
.dm-value {
font-family: "Space Grotesk", monospace;
font-weight: 700;
min-width: 1.6em;
text-align: center;
color: var(--pink);
}
input[type="range"] {
appearance: none;
-webkit-appearance: none;
width: 130px;
height: 5px;
border-radius: 99px;
background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
outline: none;
}
input[type="range"]::-webkit-slider-thumb {
appearance: none;
-webkit-appearance: none;
width: 17px;
height: 17px;
border-radius: 50%;
background: #fff;
border: 3px solid var(--violet);
box-shadow: 0 2px 10px rgba(139, 92, 246, 0.6);
cursor: grab;
transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
width: 15px;
height: 15px;
border-radius: 50%;
background: #fff;
border: 3px solid var(--violet);
cursor: grab;
}
/* ---------- chat ---------- */
.chat {
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 14px;
scroll-behavior: smooth;
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.chat::-webkit-scrollbar { width: 8px; }
.chat::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 99px; }
.msg {
max-width: 78%;
animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes rise {
from { opacity: 0; transform: translateY(14px) scale(0.97); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .msg { animation: none; } }
.msg.user { align-self: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble {
padding: 11px 16px;
border-radius: 18px;
white-space: pre-wrap;
word-wrap: break-word;
font-size: 14.5px;
}
.user .bubble {
background: linear-gradient(135deg, var(--violet), #6366f1);
border-bottom-right-radius: 6px;
box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.bot .bubble {
background: rgba(255, 255, 255, 0.07);
border: 1px solid var(--stroke);
border-bottom-left-radius: 6px;
}
.bubble.dots {
display: inline-flex;
gap: 5px;
padding: 14px 18px;
}
.bubble.dots span {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--dim);
animation: bounce 1.2s infinite;
}
.bubble.dots span:nth-child(2) { animation-delay: 0.15s; }
.bubble.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
30% { transform: translateY(-5px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .bubble.dots span { animation: none; } }
/* ---------- composer ---------- */
.composer {
display: flex;
gap: 10px;
padding: 10px;
align-items: center;
}
#input {
flex: 1;
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--stroke);
border-radius: 14px;
padding: 13px 16px;
color: var(--ink);
font: inherit;
outline: none;
transition: border-color 0.2s, box-shadow 0.2s;
}
#input::placeholder { color: var(--dim); }
#input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25); }
#input:disabled { opacity: 0.5; }
.btn {
border: none;
border-radius: 14px;
padding: 12px 20px;
font: inherit;
font-weight: 600;
cursor: pointer;
transition: transform 0.15s ease, filter 0.2s, opacity 0.2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.send {
background: linear-gradient(135deg, var(--violet), var(--cyan));
color: #fff;
box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}
.stop {
background: rgba(251, 113, 133, 0.15);
border: 1px solid rgba(251, 113, 133, 0.5);
color: var(--err);
}
/* ---------- loading overlay ---------- */
.overlay {
position: fixed;
inset: 0;
z-index: 10;
display: grid;
place-items: center;
background: rgba(6, 7, 15, 0.72);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
transition: opacity 0.5s ease;
padding: 20px;
}
.overlay.hide { opacity: 0; pointer-events: none; }
.loader {
width: min(430px, 100%);
padding: 28px 26px;
text-align: center;
}
.loader h2 {
margin: 0 0 18px;
font-family: "Space Grotesk", sans-serif;
font-size: 22px;
background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.bar {
height: 9px;
border-radius: 99px;
background: rgba(255, 255, 255, 0.08);
overflow: hidden;
border: 1px solid var(--stroke);
}
#barfill {
height: 100%;
width: 0%;
border-radius: inherit;
background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
background-size: 200% auto;
animation: shimmer 2.5s linear infinite;
transition: width 0.3s ease;
}
#loadmsg {
margin: 12px 0 0;
font-size: 13px;
color: var(--dim);
font-variant-numeric: tabular-nums;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hint {
margin: 14px 0 0;
font-size: 11.5px;
color: rgba(238, 240, 255, 0.35);
line-height: 1.5;
}
/* ---------- small screens ---------- */
@media (max-width: 560px) {
.shell { padding: 10px; gap: 10px; }
.msg { max-width: 90%; }
.dumbmeter { order: 2; width: 100%; justify-content: space-between; }
input[type="range"] { flex: 1; }
.brand-text h1 { font-size: 18px; }
}