html, body {
  margin: 0;
  padding: 0;
  background: #07061a;
  color: #eef2ff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  height: 100%;
  overflow: hidden;
}
#game { width: 100vw; height: 100vh; }

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
#topbar{
  pointer-events: auto;
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.stat{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  padding: 8px 12px;
  border-radius: 14px;
  font-weight: 700;
}
.stat.small{ font-weight: 600; opacity: .95; }

.btn{
  background: rgba(255,255,255,.10);
  color: #eef2ff;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}
.btn.primary{
  background: #8b5cf6;
  border-color: rgba(0,0,0,0);
}
.btn:active{ transform: translateY(1px); }

.overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.60);
  z-index: 50;
}
.card{
  width: min(520px, 92vw);
  background: rgba(10,9,30,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.card h1{ margin: 0 0 6px; }
.muted{ opacity: .85; margin: 0 0 12px; }
.lbl{ display:block; opacity:.9; margin-top: 8px; margin-bottom: 6px; font-weight: 700; }
#username{
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #eef2ff;
  outline: none;
}
.row{
  display:flex;
  gap:10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.panel{
  margin-top: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 10px 12px;
}
.hidden{ display:none !important; }
.err{ margin-top: 10px; font-weight: 700; }
