Files
the-nexus/style.css
Alexander Whitestone 3e52999d58
Some checks failed
CI / validate (pull_request) Has been cancelled
feat: add performance regression monitor — alert if frame time exceeds 33ms
Tracks per-frame delta with performance.now(). After 5 consecutive frames
exceeding the 33ms threshold (~30fps), logs a console warning and shows a
"SLOW FRAME" overlay in the HUD. Resets automatically when performance
recovers.

Fixes #146
2026-03-24 00:01:06 -04:00

90 lines
1.5 KiB
CSS

/* === DESIGN SYSTEM — NEXUS === */
:root {
--color-bg: #000008;
--color-primary: #4488ff;
--color-secondary: #334488;
--color-text: #ccd6f6;
--color-text-muted: #4a5568;
--font-body: 'Courier New', monospace;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: var(--color-bg);
color: var(--color-text);
font-family: var(--font-body);
overflow: hidden;
width: 100vw;
height: 100vh;
}
canvas {
display: block;
position: fixed;
top: 0;
left: 0;
}
/* === HUD === */
.hud-controls {
z-index: 10;
}
/* === AUDIO TOGGLE === */
#audio-toggle {
font-size: 14px;
background-color: var(--color-primary);
color: var(--color-bg);
padding: 4px 8px;
border: none;
border-radius: 4px;
font-family: var(--font-body);
transition: background-color 0.3s ease;
cursor: pointer;
}
#audio-toggle:hover {
background-color: var(--color-secondary);
}
#audio-toggle.muted {
background-color: var(--color-text-muted);
}
/* === PERFORMANCE WARNING === */
#perf-warning {
position: fixed;
bottom: 12px;
left: 50%;
transform: translateX(-50%);
background: rgba(255, 60, 60, 0.85);
color: #fff;
font-family: var(--font-body);
font-size: 11px;
letter-spacing: 0.1em;
padding: 4px 12px;
border-radius: 4px;
z-index: 100;
pointer-events: none;
}
/* === DEBUG MODE === */
#debug-toggle {
margin-left: 8px;
}
.collision-box {
outline: 2px solid red;
outline-offset: 2px;
}
.light-source {
outline: 2px dashed yellow;
outline-offset: 2px;
}