*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #050608;
  --surface: #0A0B10;
  --border: #1A1D27;
  --text: #ECEAE3;
  --muted: #6B6B7A;
  --accent: #34D399;
  --accent2: #60A5FA;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(5,6,8,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-title { font-size: 14px; font-weight: 700; color: var(--accent); }
.nav-sub   { font-size: 11px; color: var(--muted); }

#main { padding-top: 48px; }

#hero {
  padding: 48px 24px 32px;
  max-width: 600px;
}
#hero h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
#hero p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

#canvas-section {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#gpu-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
  touch-action: none;
}

#no-webgpu {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

#system-panel {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 200;
  background: rgba(10,11,16,0.90);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 160px;
  backdrop-filter: blur(6px);
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  line-height: 1.8;
}
.panel-row .label { color: var(--muted); }
.panel-row span:last-child { color: var(--accent); font-variant-numeric: tabular-nums; }

#state-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5,6,8,0.92);
  padding: 80px 32px 32px;
  overflow-y: auto;
  font-size: 12px;
}

#state-overlay[hidden] { display: none; }

.overlay-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 20px;
}

#overlay-content { color: var(--muted); line-height: 2; }
#overlay-content .ok  { color: var(--accent); }
#overlay-content .key { color: var(--text); margin-right: 8px; }

#pause-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  background: rgba(10,11,16,0.88);
  border: 1px solid var(--accent2);
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 13px;
  color: var(--accent2);
  letter-spacing: 0.12em;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
#pause-indicator[hidden] { display: none; }

body::after {
  content: '';
  display: block;
  height: 200vh;
}
