:root {
  --bg:        #0f1216;
  --void:      #0c0f13;
  --void-dot:  #171c23;
  --panel:     #161b22;
  --panel-2:   #1b212b;
  --line:      #2a323d;
  --line-soft: #222a34;
  --text:      #c9d2dd;
  --muted:     #7a8697;
  --muted-2:   #596373;
  --accent:    #d8a24a;   /* amber - spawn, highlights */
  --player:    #5ec4b6;   /* teal - live players */
  --shadow:    0 6px 24px rgba(0,0,0,.45);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", "Roboto Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

#map {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
  touch-action: none;
}
#map.dragging { cursor: grabbing; }

/* ---------- status chip ---------- */
.status {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: rgba(22,27,34,.82);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  font-size: 12px;
  color: var(--muted);
}
.status .s-world { color: var(--text); font-weight: 500; }
.status .s-sep { width: 1px; height: 13px; background: var(--line); }
.status .s-coord { font-family: var(--mono); color: var(--text); }
.status .s-coord b { font-weight: 500; }
.status .s-zoom { font-family: var(--mono); color: var(--muted); }

/* ---------- panels ---------- */
.panel {
  position: fixed;
  z-index: 10;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.players {
  top: 12px;
  right: 12px;
  width: 190px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}
.panel-head .count {
  font-family: var(--mono);
  background: var(--panel-2);
  color: var(--text);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  letter-spacing: 0;
}
.player-list { list-style: none; margin: 0; padding: 6px; max-height: 44vh; overflow-y: auto; }
.player-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.player-list li:hover { background: var(--panel-2); }
.player-list .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-list .ppos { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.empty { padding: 14px 12px 16px; font-size: 12px; color: var(--muted-2); text-align: center; }

/* ---------- controls dock ---------- */
.dock {
  position: fixed;
  right: 12px;
  bottom: 54px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel);
  color: var(--text);
  border: none;
  font-size: 19px;
  font-family: var(--sans);
  cursor: pointer;
  line-height: 1;
  transition: background .12s ease, color .12s ease;
}
.btn:hover { background: var(--panel-2); }
.btn:active { background: #0f1216; }
.btn.toggle.on { color: var(--accent); background: #22262c; }

@media (max-width: 560px) {
  .players { width: 150px; }
  .status { font-size: 11px; gap: 8px; padding: 6px 10px; }
}
