/* Reset / Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(135deg, #1e1e2f, #2a2a40);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  height: 100%;
}

/* Headings */
h1 {
  margin-top: 30px;
  font-size: 2.5rem;
  letter-spacing: 1px;
}

h2, h3 {
  margin: 10px 0;
}

/* Buttons */
button {
  padding: 12px 24px;
  margin: 8px;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: white;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Menu & Lobby */
#menu, #lobby {
  background: rgba(0,0,0,0.35);
  padding: 25px 30px;
  border-radius: 12px;
  margin-top: 20px;
  width: 360px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  text-align: center;
}

/* Player List */
#playerList {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

#playerList li {
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  font-size: 0.95rem;
}

/* Game Container (board + leaderboard) */
#gameContainer {
  display: flex;
  align-items: flex-start;   /* aligns board and leaderboard at top */
  justify-content: center;    /* center the whole container horizontally */
  gap: 40px;                  /* space between board and leaderboard */
  margin-top: 20px;
}


/* Bingo Cells */
.cell {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.cell:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,0.18);
}

/* Player Colors */
.cell.red {
  background: linear-gradient(135deg, #ff6b6b, #e04a4a);
  color: #1a1a1a;
}

.cell.blue {
  background: linear-gradient(135deg, #6b8cff, #4e6ee6);
  color: #1a1a1a;
}

/* Wrapper to center the board vertically and horizontally */
#gameWrapper {
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center;     /* vertical center */
  height: 100vh;           /* fill the viewport */
  position: relative;
}

/* Board Container */
#boardContainer {
  display: grid;
  grid-template-columns: repeat(5, 90px);
  gap: 10px;
}

/* Leaderboard fixed to right of screen */
#leaderboard {
  display: none; /* hide initially */
  position: fixed; /* fix to viewport */
  right: 20px;     /* distance from right edge */
  top: 10%;        /* vertical center */
  transform: translateY(-50%); /* perfectly center vertically */
  background: rgba(0,0,0,0.3);
  padding: 15px;
  border-radius: 10px;
  min-width: 150px;
}