body {
  background: #2E4053;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: white;
  font-family: Arial, sans-serif;
}

.leaderboard-card {
  width: 100%;
  max-width: 750px;
  background: var(--primary-bg, #1a1d29);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 18px;
  margin-left: auto;
  margin-right: auto;
}
.leaderboard-header {
  padding: 18px 16px;
  background: var(--secondary-bg, #252a3b);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  text-align: center;
}
.leaderboard-header h3 { margin: 0; font-size: 18px; color: var(--text-color, #fff); }
.leaderboard-body { display: flex; flex-direction: column; }
.player-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); transition: background .12s ease; }
.player-row:hover { background: rgba(255,255,255,0.02); }
.player-info { display:flex; align-items:center; gap:12px; }
.rank { width:40px; text-align:center; color: var(--text-muted, #9ca3af); font-weight:700; }
.player-name { font-weight:600; color:var(--text-color, #fff); }
.balance { font-weight:700; color:#10b981; }

/* top badges */
.player-row:nth-child(1) .rank { color: var(--gold, #fbbf24); }
.player-row:nth-child(2) .rank { color: var(--silver, #94a3b8); }
.player-row:nth-child(3) .rank { color: var(--bronze, #b45309); }

.current-user-row { background: var(--highlight, #4f46e5); }
.current-user-row .player-name, .current-user-row .balance, .current-user-row .rank { color: #fff; }

.separator-row { text-align:center; padding: 10px; color: var(--text-muted, #9ca3af); }
.leaderboard-empty { padding: 12px; color: var(--text-muted, #9ca3af); }

#leaderboard {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 750px;
  /* margin: 54px 0 0 0; lower the leaderboard away from header */
  align-self: center;
  box-sizing: border-box;
  pointer-events: auto;
  max-height: none; /* show full content, no internal scroll */
  overflow: visible;
}

canvas { 
  background: transparent; 
  /* margin-top: 10px;  */
}
.controls button, 
button#resetBtn {
    background: #fff;
    margin: 10px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  min-width: 100px;   
  border-radius: 6px; 
}
.controls {
  display: flex;
  gap: 10px;
}
.controls button {
  flex: 1; 
}
#balance { font-size: 18px; margin: 10px; }
.table {
  display: grid;
  grid-template-columns: 60px repeat(12, 50px) 60px;
  grid-auto-rows: 50px;
  background: darkgreen;
  padding: 10px;
  border: 3px solid #111;
  border-radius: 8px;
  margin-bottom: 20px;
}
.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: white;
  border: 1px solid white;
  cursor: pointer;
  position: relative;
}
.cell.red { background: darkred; }
.cell.black { background: black; }
.cell.green { background: green; }
.cell.outside { background: darkgreen; font-size: 12px; }
.cell.outside.red-bet { background: darkred; }
.cell.outside.black-bet { background: black; }
.bet-chip {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: gold;
  color: black;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 6px;
}
.chips { display: flex; gap: 10px; margin: 10px; }
.chip {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  border: 3px solid white;
}
.chip.selected { outline: 3px solid yellow; }
.c50 { background: #ccc; color: black; }
.c100 { background: #0af; }
.c250 { background: #a0f; }
.c500 { background: #f55; }
.c1000 { background: #0f5; }


