body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: white;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bet-type-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.bet-type-button {
  padding: 10px 20px;
  font-size: 1.1em;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.bet-type-button.selected {
  background: #4caf50;
  transform: scale(1.05);
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.18),
    0 0 18px rgba(76, 175, 80, 0.12);
  z-index: 3;
}

.number-red {
  background: #ff0000 !important;
}

.number-yellow {
  background: #ffff00 !important;
}

.number-green {
  background: #00ff00 !important;
}

.betting-options {
  display: none;
  margin: 20px 0;
}

.betting-options.active {
  display: block;
}

.color-bet-options,
.odd-even-options,
.high-low-options {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 10px 0;
}

.option-button {
  padding: 10px 20px;
  font-size: 1.2em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s;
}

.option-button:hover {
  transform: translateY(-2px);
}

.option-button.selected {
  transform: translateY(-6px) scale(1.06);
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.06);
  z-index: 2;
}

/* Colored glows for option buttons */
.option-button.number-red.selected {
  box-shadow: 0 12px 28px rgba(204, 0, 0, 0.28),
    0 0 18px rgba(255, 77, 77, 0.22);
}
.option-button.number-yellow.selected {
  box-shadow: 0 12px 28px rgba(204, 172, 0, 0.28),
    0 0 18px rgba(255, 215, 0, 0.18);
}
.option-button.number-green.selected {
  box-shadow: 0 12px 28px rgba(45, 160, 73, 0.28),
    0 0 18px rgba(76, 175, 80, 0.18);
}

/* Odd/Even and High/Low selection glows */
/* Neutral selected style for odd/even and high/low options (no color)
         Keeps selection visible without applying color backgrounds */
[data-odd-even].selected,
[data-high-low].selected {
  transform: translateY(-6px) scale(1.05);
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.06),
    0 0 12px rgba(255, 255, 255, 0.04);
  z-index: 2;
}

.container {
  max-width: 800px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.timer {
  font-size: 2.5em;
  text-align: center;
  margin: 20px 0;
  color: #ff4d4d;
  text-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.number-button {
  padding: 20px;
  font-size: 1.5em;
  border: none;
  border-radius: 10px;
  background: linear-gradient(145deg, #2e2e2e, #1a1a1a);
  color: black;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.number-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.number-button.selected {
  /* Keep the color class background but add a strong visual treatment so
           selected state is obvious regardless of background color. */
  transform: translateY(-6px) scale(1.08);
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Add colored glow for better contrast based on the number color */
.number-button.number-red.selected {
  box-shadow: 0 12px 30px rgba(204, 0, 0, 0.28),
    0 0 18px rgba(255, 77, 77, 0.25);
}
.number-button.number-yellow.selected {
  box-shadow: 0 12px 30px rgba(204, 172, 0, 0.28),
    0 0 18px rgba(255, 215, 0, 0.22);
}
.number-button.number-green.selected {
  box-shadow: 0 12px 30px rgba(45, 160, 73, 0.28),
    0 0 18px rgba(76, 175, 80, 0.22);
}

.bet-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.bet-input {
  padding: 10px;
  font-size: 1.2em;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 150px;
}

.place-bet {
  padding: 10px 20px;
  font-size: 1.2em;
  border: none;
  border-radius: 5px;
  background: #4caf50;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.place-bet:hover {
  background: #45a049;
}

.result {
  text-align: center;
  font-size: 1.5em;
  margin: 20px 0;
  padding: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.history {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.history h3 {
  margin-top: 0;
}

/* History result balls */

.history-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px !important;
  justify-content: flex-start !important;
  width: auto !important;
  min-width: 0 !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.history-time {
  display: inline-block;
  min-width: 90px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  margin-right: 10px;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}

.history-grid .history-row .result-ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  color: white;
  margin: 0;
  padding: 0;
  background-color: #2196f3;
}

.history-grid .history-row .result-ball.active-result {
  background-color: #ff0000;
}

.history-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  text-align: center;
}

.balance {
  font-size: 1.5em;
  text-align: center;
  margin: 20px 0;
  color: #4caf50;
}
