body {
  background: #111;
  color: white;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}
#container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 10px;
}
#rouletteLeft, #rouletteRight {
  position: relative;
}
#rouletteLeft {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#rouletteCanvas {
  background: #000;
  border: 4px solid gold;
  border-radius: 50%;
}
#rouletteControls {
  width: 400px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#creditDisplay {
  font-size: 24px;
  background: #220000;
  color: red;
  font-family: 'Orbitron', monospace;
  padding: 6px 12px;
  border: 2px solid #aa0000;
  border-radius: 6px;
  text-align: center;
}
#buttonRow {
  display: flex;
  align-items: center;
  gap: 10px;
}
#spinButton {
  font-size: 18px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #ff9900;
  color: #000;
  cursor: pointer;
}
#spinButton:disabled {
  background: #663300;
  color: #aaa;
  cursor: not-allowed;
}
.side-actions .action-btn {
  padding: 8px 16px;
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  border: 2px solid #ff0000;
  background: #220000;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.side-actions .action-btn:hover {
  background: #aa0000;
}
#messagePanel {
  margin-top: 15px;
  width: 100%;
  max-width: 400px;
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 8px;
  max-height: 150px;
  overflow-y: auto;
}
#messages .message {
  padding: 4px 8px;
  border-bottom: 1px solid #333;
  background: #1c1c1c;
  color: #f1f1f1;
  margin-bottom: 4px;
  font-size: 14px;
}

#rouletteRight {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#bettingBoard {
  width: 500px;
  background: #016D29;
  border: 2px solid #ccc;
  position: relative;
}

/* Inside betting grid (numbers, zero, column bets) */
#insideGrid.inside-bets {
  display: grid;
  grid-template-columns: 70px 143px 143px 143px;
  grid-template-rows: repeat(13, 50px);
}
.zero-cell, .number-cell, .column-bet-cell {
  box-sizing: border-box;
  border: 1px solid #fff;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  color: #fff;
}
.zero-cell {
  background: green;
  /* Avoid white border on outer edges (use grey outer border instead) */
  border-top: none;
  border-left: none;
}
.number-cell, .column-bet-cell {
  background: #016D29;
}
.redNum { background: #E0080B; }
.blackNum { background: #000; }
.no-top-border { border-top: none !important; }
.no-left-border { border-left: none !important; }
.column-bet-cell {
  font-family: 'Orbitron', monospace;
}

/* Bet placement overlay blocks */
.bet-block {
  border: 1px dashed #fff;
  background: transparent;
  cursor: pointer;
}
.bet-block:hover {
  background: rgba(255,255,255,0.2);
}

/* Dozen bets row */
.bo3_board {
  display: flex;
  width: 430px;
  margin-left: 70px;
  margin-bottom: 4px;
}
.doz-item {
  flex: 1;
  border: 1px solid #fff;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  padding: 6px 0;
}

/* Outside bets row */
.outside_board {
  display: flex;
  width: 430px;
  margin-left: 70px;
  margin-top: 4px;
}
.outside-cell {
  flex: 1;
  border: 1px solid #fff;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  padding: 6px 0;
}
.outside-cell .rhomb-red, .outside-cell .rhomb-black {
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  margin: 0 auto;
}
.outside-cell .rhomb-red { background: #E0080B; }
.outside-cell .rhomb-black { background: #000; }

/* Highlight placed bets */
.bet-placed {
  box-shadow: 0 0 0 4px gold, 0 0 10px 2px #ffa500;
  background: gold !important;
  color: #000 !important;
  position: relative;
  z-index: 2;
}

.bet-label {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #fff;
  color: #000;
  font-size: 14px;
  border-radius: 50%;
  padding: 2px 5px;
}

/* Chip styling */
#chipDeck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 50px;
  margin-bottom: 10px;
  max-width: 500px;
}
.chip {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
  border: 2px solid #ccc;
}
.chip-red    { background: #f00; color: #fff; }
.chip-blue   { background: #00f; color: #fff; }
.chip-orange { background: orange; color: #000; }
.chip-gold   { background: gold; color: #000; }
.chip-green  { background: limegreen; color: #000; }
.chip-purple { background: rebeccapurple; color: #fff; }
.chip.active {
  outline: 3px solid #fff;
}
.chip.clearBet {
  background: #222;
  color: #ffa;
}

/* Modal dialogs */
.modal-overlay { 
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal-dialog {
  background: #1a0808;
  border: 2.5px solid #aa0000;
  border-radius: 18px;
  box-shadow: 0 0 24px #440000, 0 0 10px #ff0000;
  padding: 32px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  position: relative;
}
.modal-dialog .lcd {
  font-size: 26px;
  margin-bottom: 10px;
  border: 3px solid #aa0000;
  background: #220000;
  color: red;
  padding: 8px;
  text-align: center;
}
.modal-dialog label {
  font-size: 16px;
  color: #ff9999;
}
.modal-dialog input[type="text"], .modal-dialog input[type="number"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  background: #110101;
  color: #ffdddd;
  border: 1.5px solid #881313;
  border-radius: 5px;
}
.modal-dialog .btn-modal {
  display: inline-block;
  background: #333;
  color: #fff;
  border: 2px solid #aa0000;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 16px;
  font-family: 'Orbitron', monospace;
  cursor: pointer;
}
.modal-dialog .btn-modal:hover {
  background: #661111;
}
.modal-dialog .modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #ff4444;
  cursor: pointer;
}
.modal-hint {
  font-size: 14px;
  color: #ffa;
  margin-top: 4px;
}

.number-cell,
.zero-cell {
  position: relative;
}
