/* Leaderboard overlay — drawn in the 1920x1080 game space, scaled with the letterbox */
.lb-root {
  position: fixed;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  pointer-events: none;
  font-family: Impact, "Arial Narrow Bold", sans-serif;
  color: #fff;
  z-index: 10;
}

.lb-button {
  pointer-events: auto;
  position: absolute;
  left: 48px;
  top: 150px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  font: inherit;
  font-size: 34px;
  letter-spacing: 2px;
  color: #fff;
  background: rgba(20, 18, 20, 0.75);
  border: 3px solid #ff3b3b;
  border-radius: 14px;
  box-shadow: 0 0 18px rgba(255, 40, 40, 0.55), inset 0 0 10px rgba(255, 40, 40, 0.25);
  cursor: pointer;
}
.lb-button svg { width: 40px; height: 40px; color: #ffd23f; }
.lb-button:hover, .lb-button:focus-visible { background: rgba(60, 20, 20, 0.85); outline: none; }

.lb-backdrop {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
}
.lb-button[hidden], .lb-backdrop[hidden], .lb-join[hidden] { display: none; }

.lb-panel {
  position: relative;
  width: 760px;
  padding: 40px 56px 36px;
  background: #1b181b;
  border: 3px solid #ff3b3b;
  border-radius: 22px;
  box-shadow: 0 0 40px rgba(255, 40, 40, 0.5);
}
.lb-panel h2 {
  margin: 0;
  font-size: 64px;
  font-weight: normal;
  letter-spacing: 3px;
  text-align: center;
  text-shadow: 0 0 14px rgba(255, 40, 40, 0.9);
}
.lb-level { margin: 4px 0 24px; text-align: center; font-size: 28px; color: #c9c3c9; }

.lb-close {
  position: absolute;
  right: 18px;
  top: 10px;
  font: 56px/1 Impact, sans-serif;
  color: #c9c3c9;
  background: none;
  border: 0;
  cursor: pointer;
}
.lb-close:hover { color: #fff; }

.lb-list { list-style: none; margin: 0; padding: 0; font-size: 34px; }
.lb-list li {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 8px;
}
.lb-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.05); }
.lb-list li.me { background: rgba(255, 59, 59, 0.28); }
.lb-list .rank { color: #ffd23f; }
.lb-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list .value { font-family: monospace; font-size: 32px; }

.lb-status { min-height: 34px; margin: 16px 0 0; text-align: center; font-size: 28px; color: #c9c3c9; }

.lb-join { display: flex; gap: 14px; margin-top: 20px; }
.lb-join input {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  font: 32px Impact, sans-serif;
  color: #fff;
  background: #0f0d0f;
  border: 2px solid #5a545a;
  border-radius: 10px;
}
.lb-join input:focus { border-color: #ff3b3b; outline: none; }
.lb-join button {
  padding: 0 30px;
  font: 32px Impact, sans-serif;
  letter-spacing: 2px;
  color: #fff;
  background: #c41e1e;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.lb-join button:hover { background: #e02626; }
.lb-me { margin: 18px 0 0; text-align: center; font-size: 26px; color: #c9c3c9; }
