html, body {
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #f5f5f7;
}

#game-canvas {
  display: block;
  background: #000;
  cursor: none;
}

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  z-index: 10;
}

.hud-group {
  display: flex;
  gap: 22px;
}

.hud-stat {
  text-align: left;
}

.hud-stat .label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a7a86;
}

.hud-stat .value {
  font-family: "Rajdhani", sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.hud-exit {
  pointer-events: all;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f5f5f7;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

.hud-exit:hover { background: rgba(255,255,255,0.12); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  text-align: center;
  padding: 20px;
}

.overlay.hidden { display: none; }

.overlay-card {
  max-width: 440px;
  width: 100%;
}

.overlay-card h1 {
  font-family: "Rajdhani", sans-serif;
  font-size: 32px;
  margin: 0 0 8px;
}

.overlay-card .sub {
  color: #96969f;
  font-size: 14px;
  margin-bottom: 28px;
}

.overlay .btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #ff3b3b;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,59,59,0.35);
}

.overlay .btn.ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: none;
  margin-left: 10px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 30px;
}

.results-grid .cell {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 10px;
}

.results-grid .cell .num {
  font-family: "Rajdhani", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.results-grid .cell .label {
  font-size: 11px;
  color: #96969f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stars-big {
  font-size: 30px;
  color: #f5b942;
  letter-spacing: 6px;
  margin-bottom: 6px;
}

/* Post-match emoji reactions (Ranked only) — see ranked-match-react.js */
.ranked-reactions {
  margin: -8px 0 22px;
}

.ranked-reactions-label {
  font-size: 12px;
  color: #96969f;
  margin: 0 0 8px;
}

.ranked-reactions-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.reaction-btn {
  appearance: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.reaction-btn:hover { transform: translateY(-2px); }

.reaction-btn.sent {
  border-color: #ff3b3b;
  background: rgba(255,59,59,0.16);
}

.ranked-reactions-opponent {
  font-size: 13px;
  color: #96969f;
  margin: 12px 0 0;
}
