Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

7.1 KB
Raw Blame
/* Flappin UFO (/play/ufo). Tokens come from the page's :root block. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

#ufo-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

.bar {
	position: fixed; top: 0; left: 0; right: 0; z-index: 10;
	display: flex; align-items: center; gap: 12px; padding: 4px 16px; min-height: 52px;
	padding-top: max(4px, env(safe-area-inset-top));
	pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar .spacer { flex: 1; pointer-events: none; }
.bar-link {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
	color: var(--muted); font-size: 13px; font-weight: 600;
	transition: color var(--duration-fast), background var(--duration-fast);
}
.bar-link:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.bar-link:active { transform: scale(.97); }

.hud {
	position: fixed; z-index: 5; left: 0; right: 0; top: calc(max(4px, env(safe-area-inset-top)) + 52px);
	display: flex; justify-content: center; gap: 26px; pointer-events: none;
	font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}
.hud b { display: block; margin-top: 6px; font: 800 30px/1 Inter, system-ui, sans-serif; letter-spacing: -.02em; color: var(--ink); text-align: center; }

.hint {
	position: fixed; z-index: 5; left: 50%; bottom: calc(14% + env(safe-area-inset-bottom)); transform: translateX(-50%);
	padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
	backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
	font-size: 13px; color: var(--ink); pointer-events: none; white-space: nowrap;
	animation: pulse 1.6s ease-in-out infinite;
}
.hint[hidden] { display: none; }
@keyframes pulse { 50% { opacity: .55; } }

.banner {
	position: fixed; z-index: 6; left: 50%; top: 34%; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
	font-size: clamp(26px, 6vw, 44px); font-weight: 800; letter-spacing: -.02em; white-space: nowrap;
	background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
	transition: opacity var(--duration-base), transform var(--duration-base);
}
.banner.show { opacity: 1; transform: translate(-50%, 0); }

.panel {
	position: fixed; z-index: 20; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 96px); overflow-y: auto;
	background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
	border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 26px 24px 22px;
	-webkit-user-select: text; user-select: text; touch-action: pan-y;
	animation: rise .35s cubic-bezier(.22, 1, .36, 1) both;
}
.panel[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
.panel h1, .panel h2 {
	font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; text-align: center;
	background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.panel .lead { color: var(--muted); text-align: center; font-size: 13.5px; line-height: 1.55; margin: 0 auto 16px; max-width: 36ch; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 0 18px; border-radius: 12px;
	border: 1px solid color-mix(in srgb, var(--violet) 48%, var(--line));
	background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 26%, var(--panel)), color-mix(in srgb, var(--cyan) 18%, var(--panel)));
	color: var(--ink); font-weight: 700; font-size: 14px; transition: transform var(--duration-fast), border-color var(--duration-base), filter var(--duration-base);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, .link:focus-visible, .bar-link:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn.ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); font-weight: 600; margin-top: 8px; }

.stats { display: flex; justify-content: center; gap: 30px; margin: 10px 0 4px; }
.stats div { text-align: center; font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.stats b { display: block; margin-top: 6px; font: 800 38px/1 Inter, system-ui, sans-serif; color: var(--ink); letter-spacing: -.02em; }
.note-line { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 14px; min-height: 1.4em; }

form { display: flex; gap: 8px; margin-bottom: 4px; }
form[hidden] { display: none; }
input[type=text] {
	flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
	background: rgba(255, 255, 255, .05); color: var(--ink); font: inherit; font-size: 16px;
}
form .btn { width: auto; flex: 0 0 auto; }
.status { min-height: 1.3em; margin: 6px 0 4px; text-align: center; font-size: 12.5px; color: var(--muted); }
.status[data-tone=error] { color: #ff8d9d; }

.board-head { margin: 16px 0 6px; font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
ol.board { list-style: none; border-top: 1px solid var(--line); }
ol.board li {
	display: grid; grid-template-columns: 28px 1fr auto 52px; align-items: center; gap: 8px; min-height: 36px;
	border-bottom: 1px solid var(--line); font-size: 13.5px;
}
ol.board .rank { font: 700 12px var(--mono); color: var(--faint); }
ol.board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.board .lvl { font: 600 11px var(--mono); color: var(--faint); }
ol.board .pts { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
ol.board li.note { display: block; padding: 10px 0; color: var(--muted); text-align: center; }
ol.board li.skeleton { height: 36px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.link { color: var(--cyan); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.more { display: block; margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }
.more:hover { color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 480px) {
	.panel { padding: 22px 16px 18px; }
	.hud { gap: 20px; }
	.hud b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.panel, .hint, ol.board li.skeleton { animation: none; }
	.banner { transition: none; }
}