:root {
  --bg: #0e1116;
  --fg: #e6edf3;
  --muted: #8a98a8;
  --accent: #ffb800;
  --orange: #e57225;
  --blue: #3a6dd9;
  --card: #1a1f2a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Segoe UI, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }

.overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% 30%, #1a1f2a 0%, #0e1116 60%); z-index: 10; }
.card { width: min(560px, 100%); background: var(--card); border: 1px solid #2a313e; border-radius: 16px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.01em; }
.sub { margin: 0 0 18px; color: var(--muted); }
.muted { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
code { background: #0b0e13; padding: 2px 6px; border-radius: 4px; }

.dropzone { display: grid; place-items: center; height: 160px; border: 2px dashed #2f3946; border-radius: 12px; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s, color .15s; user-select: none; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); color: var(--fg); background: rgba(255,184,0,.04); }

.status { color: var(--muted); font-size: 12px; min-height: 1em; margin: 12px 0 0; white-space: pre-wrap; }
.status.error { color: #ff6b6b; }

#viewer { position: fixed; inset: 0; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#hud-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; pointer-events: none; }
.hud-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { background: rgba(20,24,32,.7); border: 1px solid rgba(255,255,255,.06); padding: 6px 10px; border-radius: 8px; font-size: 12px; color: #cbd5e1; backdrop-filter: blur(8px); }

#hud-players { position: absolute; top: 60px; left: 14px; z-index: 2; display: grid; gap: 6px; pointer-events: none; }
.player-chip { display: flex; align-items: center; gap: 8px; background: rgba(20,24,32,.7); border: 1px solid rgba(255,255,255,.06); padding: 6px 10px; border-radius: 8px; font-size: 12px; min-width: 220px; backdrop-filter: blur(8px); }
.player-chip .swatch { width: 10px; height: 10px; border-radius: 2px; }
.player-chip .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip .weapon { color: var(--muted); }

#hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; z-index: 2; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); }
.controls { display: flex; gap: 10px; align-items: center; max-width: 1100px; margin: 0 auto; }
.controls button, .controls select { background: #1a1f2a; color: var(--fg); border: 1px solid #2a313e; padding: 6px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.controls button:hover, .controls select:hover { border-color: #3c4655; }
#scrub { flex: 1; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 110px; text-align: right; font-size: 12px; }
