Some checks failed
CI / validate (pull_request) Has been cancelled
- detectPerformanceTier() measures real frame time over 60 frames using requestAnimationFrame during scene init - If avg FPS < 30 → LOW quality: bloom disabled, particles reduced from 3000 → 800, core material simplified to wireframe MeshLambertMaterial - Quality indicator badge added to HUD showing tier + detected FPS - Full Three.js scene: stars, nexus core (icosahedron), particle cloud, floor grid, orbit controls, UnrealBloom post-processing - CSS quality states: quality-high (green dot), quality-low (orange dot), quality-detecting (muted) Fixes #94
243 lines
5.2 KiB
CSS
243 lines
5.2 KiB
CSS
/* === NEXUS DESIGN SYSTEM === */
|
|
:root {
|
|
--color-bg: #020408;
|
|
--color-primary: #00ffff;
|
|
--color-secondary: #ff00ff;
|
|
--color-accent: #ffff00;
|
|
--color-text: #c0e8ff;
|
|
--color-text-muted: #4a7a9b;
|
|
--color-panel: rgba(0, 20, 40, 0.85);
|
|
--color-border: rgba(0, 255, 255, 0.25);
|
|
--font-body: 'Courier New', Courier, monospace;
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
background: var(--color-bg);
|
|
color: var(--color-text);
|
|
font-family: var(--font-body);
|
|
overflow: hidden;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
|
|
#canvas {
|
|
display: block;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
position: fixed;
|
|
top: 0; left: 0;
|
|
}
|
|
|
|
/* === LOADING SCREEN === */
|
|
#loading-screen {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--color-bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100;
|
|
transition: opacity 0.8s ease;
|
|
}
|
|
#loading-screen.hidden { opacity: 0; pointer-events: none; }
|
|
|
|
.loading-inner { text-align: center; }
|
|
.loading-title {
|
|
font-size: 2.5rem;
|
|
color: var(--color-primary);
|
|
letter-spacing: 0.3em;
|
|
margin-bottom: 1.5rem;
|
|
text-shadow: 0 0 20px var(--color-primary);
|
|
}
|
|
.loading-bar {
|
|
width: 240px;
|
|
height: 4px;
|
|
background: var(--color-border);
|
|
border-radius: 2px;
|
|
margin: 0 auto 0.75rem;
|
|
overflow: hidden;
|
|
}
|
|
#loading-progress {
|
|
height: 100%;
|
|
width: 0;
|
|
background: var(--color-primary);
|
|
border-radius: 2px;
|
|
transition: width 0.3s ease;
|
|
box-shadow: 0 0 8px var(--color-primary);
|
|
}
|
|
#loading-status {
|
|
font-size: 0.7rem;
|
|
color: var(--color-text-muted);
|
|
letter-spacing: 0.15em;
|
|
}
|
|
|
|
/* === HUD === */
|
|
#hud {
|
|
position: fixed;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
z-index: 10;
|
|
}
|
|
|
|
#hud-title {
|
|
position: absolute;
|
|
top: 12px; left: 16px;
|
|
font-size: 1rem;
|
|
letter-spacing: 0.3em;
|
|
color: var(--color-primary);
|
|
text-shadow: 0 0 12px var(--color-primary);
|
|
}
|
|
|
|
#hud-top-right {
|
|
position: absolute;
|
|
top: 8px; right: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
/* Quality Indicator */
|
|
.hud-badge {
|
|
background: var(--color-panel);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: 4px;
|
|
padding: 4px 10px;
|
|
font-size: 0.65rem;
|
|
letter-spacing: 0.12em;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
.hud-badge::before {
|
|
content: '';
|
|
display: inline-block;
|
|
width: 6px; height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--quality-dot, var(--color-text-muted));
|
|
box-shadow: 0 0 4px var(--quality-dot, transparent);
|
|
}
|
|
#quality-indicator.quality-high {
|
|
--quality-dot: #00ff88;
|
|
border-color: rgba(0, 255, 136, 0.4);
|
|
color: #00ff88;
|
|
}
|
|
#quality-indicator.quality-low {
|
|
--quality-dot: #ff8800;
|
|
border-color: rgba(255, 136, 0, 0.4);
|
|
color: #ff8800;
|
|
}
|
|
#quality-indicator.quality-detecting {
|
|
--quality-dot: var(--color-text-muted);
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
#hud-hint {
|
|
position: absolute;
|
|
bottom: 16px; left: 50%;
|
|
transform: translateX(-50%);
|
|
font-size: 0.65rem;
|
|
color: var(--color-text-muted);
|
|
letter-spacing: 0.1em;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* === BUTTONS === */
|
|
.hud-btn {
|
|
background: var(--color-panel);
|
|
border: 1px solid var(--color-border);
|
|
color: var(--color-text);
|
|
font-family: var(--font-body);
|
|
font-size: 0.75rem;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
backdrop-filter: blur(4px);
|
|
transition: border-color 0.2s, color 0.2s;
|
|
pointer-events: auto;
|
|
}
|
|
.hud-btn:hover {
|
|
border-color: var(--color-primary);
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
/* === CHAT PANEL === */
|
|
#chat-panel {
|
|
position: fixed;
|
|
bottom: 16px; right: 16px;
|
|
width: 320px;
|
|
max-height: 380px;
|
|
background: var(--color-panel);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
backdrop-filter: blur(8px);
|
|
z-index: 20;
|
|
transform: translateY(calc(100% + 16px));
|
|
transition: transform 0.3s ease;
|
|
}
|
|
#chat-panel.open { transform: translateY(0); }
|
|
|
|
#chat-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--color-border);
|
|
font-size: 0.7rem;
|
|
letter-spacing: 0.15em;
|
|
color: var(--color-primary);
|
|
}
|
|
#chat-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 8px 12px;
|
|
font-size: 0.75rem;
|
|
line-height: 1.5;
|
|
min-height: 180px;
|
|
}
|
|
#chat-input-row {
|
|
display: flex;
|
|
gap: 6px;
|
|
padding: 8px 12px;
|
|
border-top: 1px solid var(--color-border);
|
|
}
|
|
#chat-input {
|
|
flex: 1;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
border: 1px solid var(--color-border);
|
|
color: var(--color-text);
|
|
font-family: var(--font-body);
|
|
font-size: 0.75rem;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
outline: none;
|
|
}
|
|
#chat-input:focus { border-color: var(--color-primary); }
|
|
|
|
#chat-toggle {
|
|
position: fixed;
|
|
bottom: 16px; right: 16px;
|
|
z-index: 15;
|
|
font-size: 1.1rem;
|
|
padding: 8px 12px;
|
|
}
|
|
#chat-panel.open ~ #chat-toggle { opacity: 0; pointer-events: none; }
|
|
|
|
/* === AUDIO TOGGLE === */
|
|
#audio-toggle {
|
|
font-size: 14px;
|
|
background-color: var(--color-panel);
|
|
color: var(--color-text);
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-family: var(--font-body);
|
|
transition: background-color 0.3s ease;
|
|
}
|
|
#audio-toggle:hover { background-color: rgba(0, 255, 255, 0.1); }
|
|
#audio-toggle.muted { color: var(--color-text-muted); }
|