:root {
  --cyan: #5fe0ff;
  --orange: #ff8a3c;
  --red: #ff4136;
  --panel: rgba(10, 14, 22, 0.92);
  --line: rgba(95, 224, 255, 0.18);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html, body { width: 100%; height: 100%; overflow: hidden; background: #07080d; }

#app { position: fixed; inset: 0; }
#app canvas { display: block; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; color: #cfe9f5; }

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 4, 0.55) 100%);
}

.hud-tl { position: absolute; top: 18px; left: 20px; display: flex; align-items: center; gap: 10px; }
.avatar { position: relative; width: 72px; height: 72px; }
.avatar svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.avatar svg circle { fill: rgba(7, 12, 20, 0.8); stroke-width: 5; }
.ring-bg { stroke: rgba(95, 224, 255, 0.15); }
.ring-hp {
  stroke: #58ff9d; stroke-linecap: round;
  transition: stroke-dashoffset 0.25s ease, stroke 0.25s ease;
}
.ring-hp.low { stroke: var(--red); }
.avatar-icon { position: absolute; inset: 16px; }
.tl-stats { display: flex; flex-direction: column; gap: 4px; }
.hp-label { font-size: 13px; letter-spacing: 1px; opacity: 0.85; font-weight: 600; }
.scrap-label { font-size: 12px; letter-spacing: 1px; color: var(--orange); font-weight: 600; opacity: 0.9; }

.hud-tr { position: absolute; top: 18px; right: 20px; display: flex; gap: 10px; }
.round-btn {
  pointer-events: auto;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--panel); color: var(--cyan);
  font-size: 16px; cursor: pointer; transition: border-color 0.15s, transform 0.1s;
}
.round-btn:hover { border-color: var(--cyan); transform: scale(1.06); }

.hotbar {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 9px;
}
.slot {
  position: relative; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--panel);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.slot.live { border-color: rgba(95, 224, 255, 0.55); box-shadow: 0 0 12px rgba(95, 224, 255, 0.18); }
.slot.locked { opacity: 0.38; }
.slot .icon { font-size: 19px; color: var(--cyan); z-index: 1; }
.slot.live:nth-child(2) .icon { color: var(--orange); }
.slot.live:nth-child(3) .icon { color: #ff6a4a; }
.slot.live:nth-child(4) .icon { color: #aaddff; }
.slot.live:nth-child(5) .icon { color: #9df5ff; }
.slot.live:nth-child(6) .icon { color: #66f0ff; }
.slot.live:nth-child(7) .icon { color: #b9c8ff; }
.slot .key {
  position: absolute; bottom: -1px; left: 0; right: 0; text-align: center;
  font-size: 8px; letter-spacing: 1px; opacity: 0.75; z-index: 1;
}
.slot .cd {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  background: rgba(255, 138, 60, 0.35);
}

.center-msg {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; text-shadow: 0 0 24px rgba(0, 0, 0, 0.9);
}
.center-msg h1 {
  font-size: 52px; letter-spacing: 10px; font-weight: 800; color: #fff;
  text-shadow: 0 0 30px rgba(95, 224, 255, 0.6);
}
.center-msg p { margin-top: 10px; font-size: 14px; letter-spacing: 3px; opacity: 0.8; }

.mode-tag {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  padding: 7px 18px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 12px; letter-spacing: 2px; color: var(--cyan);
}

.controls-hint {
  position: absolute; bottom: 4px; right: 12px;
  font-size: 10px; letter-spacing: 1px; opacity: 0.4;
}

.hidden { display: none !important; }

body.editor-mode .hotbar,
body.editor-mode .hud-tl,
body.editor-mode .controls-hint { display: none; }

/* ---------- editor palette ---------- */
/* palette / editor styles live in src/leveled/leveled.css (shared) */
