:root {
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --bg: #0f0a1f;
  --text: #f3eaff;
  --text-dim: #b6a8d9;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-dim);
  font-size: 18px;
  letter-spacing: 0.05em;
  z-index: 10;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
#loading.hide { opacity: 0; }

#hud {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
#hud-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#hud-controls {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.back-link {
  position: fixed;
  top: 16px;
  left: 18px;
  z-index: 6;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(15, 10, 31, 0.55);
  backdrop-filter: blur(4px);
}
.back-link:hover { color: var(--text); }

.noscript {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--text);
  background: var(--bg);
}
