/* Layout styles for Roulette game - Universal fit without overlapping v5.0 - Cache bust */

#game-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 10px;
  position: relative;
  max-width: 1800px;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

.game-table {
  flex: 1;
  background: var(--felt-green);
  border-radius: 12px;
  position: relative;
  height: 100%;
  padding: 15px;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.1) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: 25px 25px;
  background-position: 0 0, 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow: visible;
}

/* Roulette Wheel Container (Now in top area) */
.roulette-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 400px;
  height: 400px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.winning-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--gold);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.7);
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--gold);
}

/* Top Game Area (Wheel on Left, Timer and Results on Right) */
.top-game-area {
  display: flex;
  gap: 40px;
  width: 100%;
  min-height: 300px;
  max-height: 450px;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Right Panel (Players/Bets, Timer and Results) */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

/* Players and Bets Section (Now in top area) */
.players-bets-section {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.players-bets-section .players-section,
.players-bets-section .bets-section {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.players-bets-section h3 {
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: var(--gold);
  text-align: center;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.players-bets-section .player-item,
.players-bets-section .bet-item {
  font-size: 0.75rem;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #fff;
  transition: all 0.2s ease;
}

.players-bets-section .player-item:hover,
.players-bets-section .bet-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

/* Betting Section (Container for side-by-side layout) */
.betting-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin-bottom: 20px;
}

/* Betting controls and table row - Now handled by unified betting interface */
/* .betting-row {
  display: flex;
  gap: 25px;
  width: 100%;
} */

/* Bottom Game Area - Moved to top area */
/* .bottom-game-area {
  display: flex;
  gap: 30px;
  width: 100%;
  margin-top: 20px;
  flex-shrink: 0;
  min-height: 120px;
} */

/* Betting Controls Panel (Left Side) - Now handled by unified betting interface */
/* .betting-controls-panel {
  width: 350px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease;
  height: 100%;
} */

/* Disabled state for betting controls - Now handled by unified betting interface */
/* .betting-controls-panel.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.betting-controls-panel.disabled .betting-controls-header {
  background: rgba(0, 0, 0, 0.5);
}

.betting-controls-panel.disabled input,
.betting-controls-panel.disabled button {
  opacity: 0.5;
  cursor: not-allowed;
} */

/* Betting Board (Right Side) */
.betting-board {
  flex: 1;
  background: var(--felt-green);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  border: 2px solid var(--gold);
  min-height: 250px;
}

/* Betting Controls Header (Now in separate panel) */
.betting-controls-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-medium);
  flex: 1;
  justify-content: space-between;
  min-height: 250px;
  height: 100%;
}

.betting-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.controls-title {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 0 10px 0;
  text-align: center;
}

.bet-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

.bet-type-display {
  color: var(--gold);
  font-weight: bold;
  font-size: 1.1rem;
}

.betting-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.bet-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

#bet-amount {
  width: 120px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.9rem;
}

#bet-amount:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

#place-bet {
  background: var(--gold);
  color: var(--black);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

#place-bet:hover {
  background: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.chip-selector {
  display: flex;
  gap: 6px;
}

.chip-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  min-width: 50px;
  min-height: 50px;
  background: var(--gold);
  color: var(--black);
  border: 2px solid var(--gold);
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chip-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.chip-btn.selected {
  background: var(--black);
  color: var(--gold);
  border-color: var(--white);
}


/* Old bet-results styles removed - now using unified game modal */

.betting-help h4 {
  color: var(--gold);
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  text-align: center;
}

.betting-help ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.betting-help li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin-bottom: 5px;
  padding-left: 15px;
  position: relative;
}

.betting-help li:before {
  content: "•";
  color: var(--gold);
  position: absolute;
  left: 0;
}

.betting-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: start;
  width: 100%;
}

/* Standard roulette table layout */
.roulette-table-layout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  flex: 1;
}

/* Dozen section at top - only spans number grid, not zero or 2to1 */
.dozen-section {
  display: flex;
  flex-direction: row;
  gap: 1px;
  margin-bottom: 1px;
  margin-left: 131px; /* Offset by zero button width (130px) + gap (1px) */
  width: calc(100% - 177px); /* Full width minus zero button (130px) + gap (1px) + 2to1 buttons (45px) + gap (1px) */
}

.dozen-section .dozen-bet {
  flex: 1;
  min-height: 40px;
  width: calc(33.333% - 1px); /* Each dozen bet spans 4 number buttons (4/12 = 1/3 of number grid width) */
}

/* Main numbers section */
.main-numbers-section {
  display: flex;
  flex-direction: row;
  gap: 1px;
  align-items: flex-start;
  width: 100%;
}

.zero-section {
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin-right: 1px;
}

.numbers-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-height: 120px; /* 3 rows × 40px each */
  width: 100%;
}

.number-row {
  display: flex;
  flex-direction: row;
  gap: 1px;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.column-bets {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 1px;
  min-height: 137px;
  width: 45px;
}

.bottom-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 1px;
}

/* Column bets */
.column-bet {
  background-color: var(--cell-bg);
  color: white;
  border: 1px solid var(--gold);
  text-align: center;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-fast);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex: 1;
  min-height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  position: relative;
  /* Add consistent inner shadow for depth */
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.column-bet:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.column-bet.selected {
  background: var(--cell-selected) !important;
  box-shadow: var(--shadow-glow);
}

.number-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.6rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
  position: relative;
  height: 32px;
  flex: 1;
  min-width: 0;
  min-height: 32px;
  width: 100%;
  /* Add consistent inner shadow for depth */
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.number-cell:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.number-cell.selected {
  background: var(--cell-selected) !important;
  box-shadow: var(--shadow-glow);
}

.number-cell.red {
  background: var(--roulette-red);
  color: white;
  border: 1px solid #dc143c;
}

.number-cell.black {
  background: var(--roulette-black);
  color: white;
  border: 1px solid #333;
}

.number-cell.zero {
  background: var(--roulette-green);
  color: white;
  font-size: 1.2rem;
  height: 110px;
  width: 105px;
  flex: 0 0 auto;
  border: 1px solid #008800;
  min-height: 110px;
  min-width: 105px;
  align-self: stretch;
  position: relative;
  /* Rounded rectangle with slight curve on the right side */
  border-radius: 8px 0 0 8px;
  /* Add a subtle inner shadow for depth */
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Outside Bets */
.outside-bets {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Dozen bets */
.dozen-bets {
  display: flex;
  flex-direction: row;
  gap: 1px;
  margin-bottom: 1px;
  min-height: 40px;
  flex: 1;
}

.dozen-bet {
  background-color: var(--cell-bg);
  color: white;
  border: 1px solid var(--gold);
  text-align: center;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--radius-sm);
  position: relative;
  /* Add consistent inner shadow for depth */
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.dozen-bet:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.dozen-bet.selected {
  background: var(--cell-selected) !important;
  box-shadow: var(--shadow-glow);
}

/* Diamond symbols for color bets */
.diamond {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  margin: 0 auto;
}

.red-diamond {
  background-color: #dc2626;
}

.black-diamond {
  background-color: #1f2937;
}

/* Outside bet row - only spans number grid, not zero or 2to1 */
.outside-bet-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  min-height: 40px;
  flex: 1;
  margin-left: 131px; /* Offset by zero button width (130px) + gap (1px) */
  width: calc(100% - 177px); /* Full width minus zero button (130px) + gap (1px) + 2to1 buttons (45px) + gap (1px) */
}

.outside-bet {
  background: var(--cell-bg);
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 0.6rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  position: relative;
  /* Add consistent inner shadow for depth */
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.outside-bet:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.outside-bet.selected {
  background: var(--cell-selected);
  border-color: var(--gold);
  box-shadow: var(--shadow-glow);
}

.outside-bet.red-bet {
  background: var(--roulette-red);
  border-color: #dc143c;
}

.outside-bet.black-bet {
  background: var(--roulette-black);
  border-color: #333;
}

/* Game Status (Now in right panel) */
/* Old game-status styles removed - now using unified game modal */

/* Old phase-display and timer styles removed - now using unified game modal */

/* Current Bets section removed */



.bet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  font-size: 0.9rem;
}

.bet-item .bet-type {
  font-weight: bold;
  color: var(--gold);
}

.bet-item .bet-amount {
  color: var(--white);
}

/* HD Screen responsive styles (769px - 1400px) */
@media (min-width: 769px) and (max-width: 1400px) {
  #game-container {
    padding: 1vw;
    max-width: 100%;
    height: 100vh;
    overflow-y: auto;
  }
  
  .game-table {
    padding: 1.5vw;
    gap: 1.5vw;
    overflow: visible;
    min-height: auto;
  }
  
  .top-game-area {
    min-height: 200px;
    max-height: 300px;
    gap: 1.5vw;
  }
  
  .roulette-wheel-container {
    width: 15vw;
    height: 15vw;
    max-width: 200px;
    max-height: 200px;
  }
  
  .betting-controls-panel {
    width: 14vw;
    max-width: 200px;
  }
  
  .betting-controls-header {
    padding: 1vw;
    min-height: 12vh;
    max-height: 15vh;
    gap: 0.8vw;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .betting-board {
    padding: 0.8vw;
    min-height: 12vh;
    max-height: 15vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .betting-section {
    gap: 1.5vw;
    max-height: 25vh;
    margin-bottom: 15px;
  }
  
  .bottom-game-area {
    gap: 1vw;
    margin-top: 1vh;
    flex-shrink: 0;
    min-height: 100px;
  }
  
  .bottom-game-area .players-section,
  .bottom-game-area .bets-section {
    flex: 1;
    padding: 0.8vw;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.6vw;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-medium);
    min-height: 8vh;
    overflow-y: auto;
  }
  
  .bottom-game-area h3 {
    font-size: 0.8vw;
    margin-bottom: 0.5vw;
  }
  
  .bottom-game-area .player-item,
  .bottom-game-area .bet-item {
    font-size: 0.6vw;
    padding: 0.3vw;
    margin-bottom: 0.3vw;
  }
  
  .game-status {
    padding: 15px;
  }
  
  .bet-results {
    padding: 15px;
  }
  
  .right-panel {
    gap: 15px;
  }
  
  /* Reduce font sizes for HD screens */
  .controls-title {
    font-size: 0.8rem;
    color: var(--gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    margin-bottom: 0.5vw;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 0.3vw;
  }
  
  #phase-display {
    font-size: 0.8rem;
  }
  
  .timer {
    font-size: 0.7rem;
  }
  
  .winning-number {
    font-size: 1rem;
    padding: 4px 8px;
  }
  
  /* Compact betting grid for HD screens */
  .betting-grid {
    gap: 4px;
  }
  
  .number-cell {
    font-size: 0.6rem;
    padding: 4px 2px;
    min-height: 20px;
  }
  
  .outside-bet {
    font-size: 0.5rem;
    padding: 3px 4px;
    min-height: 18px;
  }
  
  .column-bet {
    font-size: 0.5rem;
    padding: 3px 2px;
    min-height: 18px;
  }
  
  .zero-cell {
    font-size: 0.6rem;
    padding: 4px 2px;
    min-height: 20px;
  }
  
  /* Compact betting controls */
  .betting-info {
    gap: 3px;
  }
  
  .betting-actions {
    gap: 5px;
  }
  
  .betting-actions input,
  .betting-actions button {
    padding: 4px 6px;
    font-size: 0.6rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: var(--gold);
    transition: all 0.3s ease;
  }
  
  .betting-actions input:focus,
  .betting-actions button:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  }
  
  #bet-amount {
    width: 50px;
  }
}

/* Narrow HD screens (769px - 1200px) - Extra compact */
@media (min-width: 769px) and (max-width: 1200px) {
  #game-container {
    padding: 0.8vw;
    max-width: 100%;
    height: 100vh;
    overflow-y: auto;
  }
  
  .game-table {
    padding: 1.2vw;
    gap: 1.2vw;
    overflow: visible;
    min-height: auto;
  }
  
  .top-game-area {
    min-height: 180px;
    max-height: 250px;
    gap: 1vw;
  }
  
  .roulette-wheel-container {
    width: 12vw;
    height: 12vw;
    max-width: 150px;
    max-height: 150px;
  }
  
  .betting-controls-panel {
    width: 12vw;
    max-width: 160px;
  }
  
  .betting-controls-header {
    padding: 0.8vw;
    min-height: 10vh;
    max-height: 12vh;
    gap: 0.5vw;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .betting-board {
    padding: 0.6vw;
    min-height: 10vh;
    max-height: 12vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .betting-section {
    gap: 1vw;
    max-height: 20vh;
    margin-bottom: 10px;
  }
  
  .bottom-game-area {
    gap: 0.8vw;
    margin-top: 0.8vh;
    flex-shrink: 0;
    min-height: 80px;
  }
  
  .bottom-game-area .players-section,
  .bottom-game-area .bets-section {
    flex: 1;
    padding: 0.6vw;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.4vw;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-medium);
    min-height: 6vh;
    overflow-y: auto;
  }
  
  .bottom-game-area h3 {
    font-size: 1.1vw;
    margin-bottom: 0.8vw;
  }
  
  .bottom-game-area .player-item,
  .bottom-game-area .bet-item {
    font-size: 0.8vw;
    padding: 0.4vw;
    margin-bottom: 0.4vw;
  }
  
  .game-status {
    padding: 12px;
  }
  
  .bet-results {
    padding: 12px;
  }
  
  .right-panel {
    gap: 12px;
  }
  
  /* Even more compact for narrow screens */
  .number-cell {
    font-size: 0.8rem;
    padding: 6px 3px;
    min-height: 30px;
  }
  
  .outside-bet {
    font-size: 0.7rem;
    padding: 5px 6px;
    min-height: 25px;
  }
  
  .column-bet {
    font-size: 0.7rem;
    padding: 5px 3px;
    min-height: 25px;
  }
  
  .zero-cell {
    font-size: 0.8rem;
    padding: 6px 3px;
    min-height: 30px;
  }
  
  .betting-grid {
    gap: 6px;
  }
  
  .controls-title {
    font-size: 1.1rem;
  }
  
  #phase-display {
    font-size: 1.1rem;
  }
  
  .timer {
    font-size: 1rem;
  }
  
  .winning-number {
    font-size: 1.3rem;
    padding: 6px 12px;
  }
}

/* Very small HD screens (769px - 1024px) - Maximum scaling */
@media (min-width: 769px) and (max-width: 1024px) {
  #game-container {
    padding: 0.5vw;
    max-width: 100%;
    height: 100vh;
    overflow-y: auto;
  }
  
  .game-table {
    padding: 1vw;
    gap: 1vw;
    overflow: visible;
    min-height: auto;
  }
  
  .top-game-area {
    min-height: 160px;
    max-height: 200px;
    gap: 1.2vw;
  }
  
  .roulette-wheel-container {
    width: 16vw;
    height: 16vw;
    max-width: 220px;
    max-height: 220px;
  }
  
  .betting-controls-panel {
    width: 14vw;
    max-width: 200px;
  }
  
  .betting-controls-header {
    padding: 1vw;
    min-height: 16vh;
    max-height: 20vh;
    gap: 0.6vw;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .betting-board {
    padding: 0.8vw;
    min-height: 16vh;
    max-height: 20vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .betting-section {
    gap: 1.5vw;
    max-height: 30vh;
    margin-bottom: 8px;
  }
  
  .bottom-game-area {
    gap: 1vw;
    margin-top: 1.5vh;
    flex-shrink: 0;
    min-height: 60px;
  }
  
  .bottom-game-area .players-section,
  .bottom-game-area .bets-section {
    flex: 1;
    padding: 1vw;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.6vw;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-medium);
    min-height: 10vh;
    overflow-y: auto;
  }
  
  .bottom-game-area h3 {
    font-size: 1vw;
    margin-bottom: 0.6vw;
  }
  
  .bottom-game-area .player-item,
  .bottom-game-area .bet-item {
    font-size: 0.7vw;
    padding: 0.3vw;
    margin-bottom: 0.3vw;
  }
  
  .game-status {
    padding: 10px;
  }
  
  .bet-results {
    padding: 10px;
  }
  
  .right-panel {
    gap: 10px;
  }
  
  /* Ultra compact for very small screens */
  .number-cell {
    font-size: 0.7rem;
    padding: 4px 2px;
    min-height: 25px;
  }
  
  .outside-bet {
    font-size: 0.6rem;
    padding: 4px 4px;
    min-height: 20px;
  }
  
  .column-bet {
    font-size: 0.6rem;
    padding: 4px 2px;
    min-height: 20px;
  }
  
  .zero-cell {
    font-size: 0.7rem;
    padding: 4px 2px;
    min-height: 25px;
  }
  
  .betting-grid {
    gap: 4px;
  }
  
  .controls-title {
    font-size: 1rem;
  }
  
  #phase-display {
    font-size: 1rem;
  }
  
  .timer {
    font-size: 0.9rem;
  }
  
  .winning-number {
    font-size: 1.1rem;
    padding: 4px 8px;
  }
}

/* Large screen optimizations (1401px+) */
@media (min-width: 1401px) {
  #game-container {
    max-width: 2000px;
  }
  
  .top-game-area {
    height: 500px;
    gap: 50px;
  }
  
  .roulette-wheel-container {
    width: 450px;
    height: 450px;
  }
  
  .betting-controls-panel {
    width: 500px;
  }
  
  .betting-controls-header {
    padding: 40px;
    min-height: 400px;
  }
  
  .betting-board {
    padding: 30px;
    min-height: 400px;
  }
  
  .betting-section {
    gap: 30px;
  }
  
  .bottom-game-area {
    gap: 35px;
    margin-top: 60px;
  }
  
  .game-status {
    padding: 35px;
  }
  
  .bet-results {
    padding: 35px;
  }
  
  .right-panel {
    gap: 35px;
  }
}

/* Small screens (769px - 900px) - Handle collision issues */
@media (min-width: 769px) and (max-width: 900px) {
  #game-container {
    padding: 0.3vw;
    max-width: 100%;
    height: 100vh;
    overflow-y: auto;
  }
  
  .game-table {
    padding: 0.8vw;
    gap: 0.8vw;
    overflow: visible;
    min-height: auto;
  }
  
  .top-game-area {
    min-height: 140px;
    max-height: 180px;
    gap: 0.8vw;
  }
  
  .roulette-wheel-container {
    width: 14vw;
    height: 14vw;
    max-width: 180px;
    max-height: 180px;
  }
  
  .betting-controls-panel {
    width: 10vw;
    max-width: 140px;
  }
  
  .betting-controls-header {
    padding: 0.6vw;
    min-height: 8vh;
    max-height: 10vh;
    gap: 0.4vw;
    overflow-y: auto;
  }
  
  .betting-board {
    padding: 0.4vw;
    min-height: 8vh;
    max-height: 10vh;
    overflow-y: auto;
  }
  
  .betting-section {
    gap: 0.8vw;
    max-height: 15vh;
    margin-bottom: 5px;
  }
  
  .bottom-game-area {
    gap: 0.6vw;
    margin-top: 1vh;
    flex-shrink: 0;
    min-height: 50px;
  }
  
  .bottom-game-area .players-section,
  .bottom-game-area .bets-section {
    flex: 1;
    padding: 0.4vw;
    min-height: 4vh;
    overflow-y: auto;
  }
  
  .bottom-game-area h3 {
    font-size: 0.8vw;
    margin-bottom: 0.4vw;
  }
  
  .bottom-game-area .player-item,
  .bottom-game-area .bet-item {
    font-size: 0.6vw;
    padding: 0.2vw;
    margin-bottom: 0.2vw;
  }
  
  .number-cell {
    font-size: 0.6rem;
    padding: 3px 1px;
    min-height: 20px;
  }
  
  .outside-bet {
    font-size: 0.5rem;
    padding: 3px 3px;
    min-height: 18px;
  }
  
  .column-bet {
    font-size: 0.5rem;
    padding: 3px 1px;
    min-height: 18px;
  }
  
  .zero-cell {
    font-size: 0.6rem;
    padding: 3px 1px;
    min-height: 20px;
  }
  
  .betting-grid {
    gap: 3px;
  }
  
  .controls-title {
    font-size: 0.8rem;
  }
  
  #phase-display {
    font-size: 0.8rem;
  }
  
  .timer {
    font-size: 0.7rem;
  }
  
  .winning-number {
    font-size: 0.9rem;
    padding: 3px 6px;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .betting-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .outside-bet-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .number-cell {
    min-height: 35px;
    font-size: 0.8rem;
  }
  
  .roulette-wheel {
    width: 150px;
    height: 150px;
  }
  
  .current-bets {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    margin-top: 20px;
  }
  
  /* Mobile responsive for top game area */
  .top-game-area {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
    height: auto;
    align-items: center;
  }
  
  .roulette-wheel-container {
    width: 300px;
    height: 300px;
    align-self: center;
  }
  
  .right-panel {
    width: 100%;
    gap: 15px;
  }
  
  .game-status {
    padding: 20px;
  }
  
  .bet-results {
    padding: 20px;
  }
  
  /* Mobile responsive for side-by-side betting layout */
  .betting-section {
    flex-direction: column;
    gap: 10px;
  }
  
  .betting-controls-panel {
    width: 100%;
  }
  
  .betting-controls-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .betting-actions {
    align-items: stretch;
  }
  
  .bet-input-row {
    justify-content: center;
  }
  
  .chip-selector {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  #bet-amount {
    width: 100px;
  }
  
  
  /* Mobile responsive for bottom game area */
  .bottom-game-area {
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
  }
}

/* Leaderboard Section - Updated to match game style */
.leaderboard-section {
  margin-bottom: 20px;
  background: var(--felt-green);
  border-radius: 12px;
  padding: 15px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-medium);
}

.leaderboard-section h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin: 0 0 15px 0;
  text-align: center;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.refresh-btn {
  padding: 10px 20px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 80px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  background: var(--gold);
  color: var(--black);
  width: 100%;
  margin-bottom: 15px;
}

.refresh-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  background: #ffd700;
}

.refresh-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 150px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-list li {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  gap: 8px;
}

.leaderboard-list li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.leaderboard-list .player-name {
  flex: 1;
  color: var(--white);
  font-weight: 500;
}

.leaderboard-list .player-chips {
  color: var(--gold);
  font-weight: bold;
  font-size: 0.85rem;
}

.leaderboard-list li:first-child {
  background: rgba(255, 215, 0, 0.3);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.leaderboard-list li:nth-child(2) {
  background: rgba(192, 192, 192, 0.3);
  border-color: #c0c0c0;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.2);
}

.leaderboard-list li:nth-child(3) {
  background: rgba(205, 127, 50, 0.3);
  border-color: #cd7f32;
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.2);
}

/* Previous Results Section - Updated to match game style */
.previous-results {
  margin-bottom: 20px;
  background: var(--felt-green);
  border-radius: 12px;
  padding: 15px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-medium);
}

.previous-results h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin: 0 0 15px 0;
  text-align: center;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.previous-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.previous-list li {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  min-width: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.previous-list li.red {
  background: var(--roulette-red);
  color: white;
}

.previous-list li.black {
  background: var(--roulette-black);
  color: white;
}

.previous-list li.green {
  background: var(--roulette-green);
  color: white;
}

.previous-list li.placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 20px;
  width: 100%;
  background: transparent;
}


@media (max-width: 480px) {
  .game-table {
    padding: 10px;
  }
  
  .betting-board {
    padding: 10px;
  }
  
  .number-cell {
    min-height: 30px;
    font-size: 0.7rem;
  }
  
  .outside-bet {
    padding: 10px 5px;
    font-size: 0.8rem;
  }
  
  .roulette-wheel {
    width: 120px;
    height: 120px;
  }
}

/* Very small screens with limited height */
@media (max-height: 600px) and (min-width: 769px) {
  .top-game-area {
    min-height: 120px;
    max-height: 150px;
  }
  
  .betting-section {
    max-height: 20vh;
    margin-bottom: 5px;
  }
  
  .bottom-game-area {
    min-height: 40px;
    margin-top: 0.5vh;
  }
  
  .bottom-game-area .players-section,
  .bottom-game-area .bets-section {
    min-height: 3vh;
    padding: 0.3vw;
  }
  
  .betting-controls-header {
    min-height: 6vh;
    max-height: 8vh;
    padding: 0.4vw;
  }
  
  .betting-board {
    min-height: 6vh;
    max-height: 8vh;
    padding: 0.4vw;
  }
}
