Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

9.6 KB
Raw Blame
/* The retro cabinet overlay (RetroArcadeOverlay). The cabinet wears its game's
   own colours (--cab-*, from the registry look) in both app themes, like a real
   machine; only the dimmed room behind it follows the theme. Nothing here
   animates except the "press start" pulse, and that only when motion is welcome. */
.retro-cab-backdrop { position:absolute; inset:0; z-index:70; display:flex; align-items:center; justify-content:center; padding:16px; background:hsl(var(--background) / .72); backdrop-filter:blur(6px); }
.retro-cab {
  position:relative; display:flex; flex-direction:column; width:min(1180px, 100%); height:100%; max-height:980px; padding:0 14px 14px; outline:none;
  border-radius:22px 22px 14px 14px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--cab-body) 86%, #fff) 0%, var(--cab-body) 16%, color-mix(in srgb, var(--cab-body) 80%, #000) 100%);
  box-shadow:0 0 0 1px hsl(var(--border)), 0 24px 80px rgb(0 0 0 / .5), inset 0 0 0 1px rgb(255 255 255 / .06);
  font-family:'Pixelify Sans', ui-monospace, monospace;
}
/* Neon side stripes, lit but steady. */
.retro-cab::before, .retro-cab::after { content:""; position:absolute; top:84px; bottom:24px; width:3px; border-radius:2px; background:var(--cab-accent); box-shadow:0 0 10px var(--cab-accent); opacity:.85; pointer-events:none; }
.retro-cab::before { left:5px; }
.retro-cab::after { right:5px; }

.retro-cab-marquee {
  position:relative; margin:0 -14px 12px; padding:14px 60px; border-radius:22px 22px 0 0; text-align:center;
  background:radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--cab-marquee-text) 24%, var(--cab-marquee)) 0%, var(--cab-marquee) 72%);
  border-bottom:3px solid var(--cab-accent);
}
.retro-cab-marquee h2 {
  margin:0; font-size:clamp(20px, 3.4vw, 40px); font-weight:600; line-height:1.1; letter-spacing:.08em; text-transform:uppercase; color:var(--cab-marquee-text);
  text-shadow:0 0 6px color-mix(in srgb, var(--cab-marquee-text) 70%, transparent), 0 0 20px color-mix(in srgb, var(--cab-marquee-text) 40%, transparent);
}
.retro-cab-close {
  position:absolute; right:12px; top:50%; transform:translateY(-50%); width:34px; height:34px; border-radius:8px; cursor:pointer;
  border:1px solid color-mix(in srgb, var(--cab-marquee-text) 35%, transparent); background:rgb(0 0 0 / .28); color:var(--cab-marquee-text); font-size:20px; line-height:1;
}
.retro-cab-close:hover { background:rgb(0 0 0 / .45); }

.retro-cab-bezel { flex:1; min-height:0; display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:14px; background:var(--cab-trim); box-shadow:inset 0 2px 12px rgb(0 0 0 / .65), 0 0 0 1px rgb(255 255 255 / .05); }
.retro-cab-hud { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 24px; font-size:15px; letter-spacing:.08em; text-transform:uppercase; color:rgb(230 235 255 / .7); font-variant-numeric:tabular-nums; }
.retro-cab-hud b { font-weight:600; color:var(--cab-marquee-text); }

/* The stage takes the room that is left; the screen inside is sized in JS to a crisp scale. */
.retro-cab-stage { flex:1; min-height:0; min-width:0; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.retro-cab-screen { position:relative; flex:none; overflow:hidden; border-radius:6px; background:#000; box-shadow:0 0 0 3px rgb(0 0 0 / .85), 0 0 44px color-mix(in srgb, var(--cab-accent) 24%, transparent); }
.retro-cab-screen canvas { display:block; width:100%; height:100%; image-rendering:crisp-edges; image-rendering:pixelated; }
.retro-cab-screen canvas[data-pointer="true"] { cursor:crosshair; touch-action:none; }

/* Static CRT: a vignette always, scanlines (one per game pixel row) when pixels are big enough to carry them. */
.retro-cab-crt { position:absolute; inset:0; pointer-events:none; background:radial-gradient(ellipse at center, transparent 60%, rgb(0 0 0 / .42) 100%); }
.retro-cab-screen[data-scan="on"] .retro-cab-crt {
  background:
    radial-gradient(ellipse at center, transparent 60%, rgb(0 0 0 / .42) 100%),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--retro-px) * .6), rgb(0 0 0 / .2) calc(var(--retro-px) * .6), rgb(0 0 0 / .2) var(--retro-px));
}

.retro-cab-card {
  position:absolute; left:50%; top:50%; transform:translate(-50%, -50%); display:flex; flex-direction:column; align-items:center; gap:8px;
  width:max-content; max-width:calc(100% - 24px); max-height:calc(100% - 16px); overflow:auto; padding:16px 24px;
  border:2px solid var(--cab-accent); border-radius:4px; background:rgb(6 6 12 / .84); box-shadow:0 0 0 4px rgb(0 0 0 / .5);
  color:#e8ecff; font:inherit; font-size:14px; text-align:center;
}
button.retro-cab-card { cursor:pointer; }
.retro-cab-card strong { font-size:clamp(18px, 3vw, 32px); font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--cab-marquee-text); }
.retro-cab-card b { font-weight:600; color:var(--cab-marquee-text); }
.retro-cab-tagline { font-size:15px; }
.retro-cab-how { max-width:46ch; font-size:12px; color:rgb(232 236 255 / .72); }
.retro-cab-blink { font-size:14px; letter-spacing:.08em; text-transform:uppercase; color:var(--cab-accent); }
.retro-cab-newbest { padding:2px 8px; border-radius:3px; background:#facc15; color:#1a1405; font-size:13px; letter-spacing:.08em; text-transform:uppercase; }
.retro-cab-retry { margin-top:4px; padding:6px 14px; border:1px solid var(--cab-accent); border-radius:4px; background:transparent; color:#e8ecff; font:inherit; cursor:pointer; }
.retro-cab-retry:hover { background:rgb(255 255 255 / .08); }
@media (prefers-reduced-motion: no-preference) {
  .retro-cab[data-reduced="false"] .retro-cab-blink { animation:retro-cab-pulse 1.4s ease-in-out infinite; }
}
@keyframes retro-cab-pulse { 50% { opacity:.45; } }

.retro-cab-keys { margin:0; text-align:center; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:rgb(230 235 255 / .5); }

/* Touch controls: d-pad left, B / A right, like the panel of a real cabinet. */
.retro-cab-touch { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:2px 6px; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.retro-cab-dpad { position:relative; flex:none; width:132px; height:132px; border-radius:50%; background:rgb(255 255 255 / .06); touch-action:none; }
.retro-cab-dpad-arm { position:absolute; width:40px; height:44px; border-radius:8px; background:rgb(255 255 255 / .16); }
.retro-cab-dpad-arm[data-dir="up"] { left:46px; top:6px; }
.retro-cab-dpad-arm[data-dir="down"] { left:46px; bottom:6px; }
.retro-cab-dpad-arm[data-dir="left"] { left:6px; top:46px; width:44px; height:40px; }
.retro-cab-dpad-arm[data-dir="right"] { right:6px; top:46px; width:44px; height:40px; }
.retro-cab-dpad-arm::after { content:""; position:absolute; left:50%; top:50%; width:0; height:0; transform:translate(-50%, -50%); border:7px solid transparent; }
.retro-cab-dpad-arm[data-dir="up"]::after { border-bottom-color:var(--cab-accent); margin-top:-4px; }
.retro-cab-dpad-arm[data-dir="down"]::after { border-top-color:var(--cab-accent); margin-top:4px; }
.retro-cab-dpad-arm[data-dir="left"]::after { border-right-color:var(--cab-accent); margin-left:-4px; }
.retro-cab-dpad-arm[data-dir="right"]::after { border-left-color:var(--cab-accent); margin-left:4px; }
.retro-cab-buttons { display:flex; align-items:center; gap:14px; padding-bottom:14px; }
.retro-cab-btn { width:64px; height:64px; border:0; border-radius:50%; background:var(--cab-accent); color:#0b0b12; font:inherit; font-size:22px; font-weight:600; box-shadow:0 4px 0 rgb(0 0 0 / .45); touch-action:none; cursor:pointer; }
.retro-cab-btn[data-button="b"] { filter:brightness(.72); transform:translateY(14px); }
.retro-cab-btn:active { box-shadow:0 1px 0 rgb(0 0 0 / .45); translate:0 3px; }
.retro-cab-pause { flex:none; padding:8px 12px; border:1px solid rgb(255 255 255 / .2); border-radius:8px; background:rgb(0 0 0 / .3); color:#e8ecff; font-size:12px; letter-spacing:.1em; cursor:pointer; }

.retro-cab-close:focus-visible, .retro-cab-card:focus-visible, .retro-cab-retry:focus-visible, .retro-cab-btn:focus-visible, .retro-cab-pause:focus-visible { outline:2px solid hsl(var(--ring)); outline-offset:2px; }

@media (max-width:640px) {
  .retro-cab-backdrop { padding:8px; }
  .retro-cab { padding:0 8px 8px; }
  .retro-cab-marquee { margin:0 -8px 8px; padding:10px 50px; }
  .retro-cab-bezel { padding:8px; gap:8px; }
  .retro-cab-hud { gap:2px 14px; font-size:12px; }
  .retro-cab-card { padding:10px 14px; gap:6px; font-size:12px; }
  .retro-cab-how { font-size:11px; }
  .retro-cab-dpad { width:116px; height:116px; }
  .retro-cab-dpad-arm { width:34px; height:38px; }
  .retro-cab-dpad-arm[data-dir="up"], .retro-cab-dpad-arm[data-dir="down"] { left:41px; }
  .retro-cab-dpad-arm[data-dir="left"], .retro-cab-dpad-arm[data-dir="right"] { top:41px; width:38px; height:34px; }
  .retro-cab-btn { width:56px; height:56px; font-size:19px; }
}

/* A phone on its side: the controls flank the screen instead of eating its height. */
@media (orientation: landscape) and (max-height: 540px) and (pointer: coarse) {
  .retro-cab-marquee { padding-block:6px; margin-bottom:6px; }
  .retro-cab-marquee h2 { font-size:18px; }
  .retro-cab::before, .retro-cab::after { top:48px; }
  .retro-cab-bezel {
    display:grid; gap:6px 12px; grid-template-columns:auto minmax(0, 1fr) auto; grid-template-rows:auto minmax(0, 1fr) auto;
    grid-template-areas:"hud hud hud" "dpad stage btns" "pause stage .";
  }
  .retro-cab-hud { grid-area:hud; font-size:12px; }
  .retro-cab-stage { grid-area:stage; }
  .retro-cab-touch { display:contents; }
  .retro-cab-dpad { grid-area:dpad; align-self:center; }
  .retro-cab-buttons { grid-area:btns; align-self:center; }
  .retro-cab-pause { grid-area:pause; justify-self:center; }
}