:root {
  color-scheme: dark;
  --panel-bg: rgba(7, 12, 18, 0.72);
  --panel-border: rgba(180, 225, 255, 0.18);
  --panel-text: rgba(235, 247, 255, 0.96);
  --panel-muted: rgba(191, 217, 235, 0.78);
  --accent: #9be3ff;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

#renderCanvas {
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}

#overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  z-index: 10;
}

#overlay .hint {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  color: var(--panel-text);
  padding: 12px 20px;
  backdrop-filter: blur(18px);
  font-size: 0.9rem;
  text-align: center;
  max-width: 500px;
  pointer-events: auto;
}

#loading {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.6s;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

#loading .spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(155, 227, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
