* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #060A13;
  color: #FFFFFF;
  font-family: 'Roboto Mono', monospace;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

#scoreboard {
  display: none;
  flex-direction: column;
  height: 100vh;
  padding: 3vh 4vw;
}

#scoreboard.active {
  display: flex;
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2vh;
  border-bottom: 2px solid #1A2640;
  margin-bottom: 2vh;
}

#game-info {
  font-size: 3.5vw;
  font-weight: 700;
  color: #00F0FF;
}

#leg-info {
  font-size: 2.5vw;
  font-weight: 600;
  color: #5A6A8A;
}

#table-container {
  flex: 1;
  overflow: hidden;
}

#score-table {
  width: 100%;
  border-collapse: collapse;
}

#score-table th,
#score-table td {
  padding: 1.2vh 1.5vw;
  text-align: center;
  font-size: 3vw;
  font-weight: 600;
  border-bottom: 1px solid #1A2640;
}

#score-table th {
  font-size: 2.8vw;
  font-weight: 700;
  color: #5A6A8A;
  position: sticky;
  top: 0;
  background: #060A13;
  padding-bottom: 1.5vh;
}

#score-table th.active-player {
  color: #00F0FF;
}

#score-table td {
  color: #FFFFFF;
}

#score-table td.active-player {
  color: #00F0FF;
  font-weight: 700;
}

#score-table td.checkout {
  color: #00E676;
  font-weight: 700;
}

#score-table .round-label {
  color: #5A6A8A;
  font-size: 2.2vw;
  text-align: left;
  width: 8vw;
}

/* Stats row */
#score-table .stats-row td {
  font-size: 2vw;
  color: #5A6A8A;
  border-bottom: 2px solid #1A2640;
  padding: 0.8vh 1.5vw;
}

#waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.waiting-text {
  font-size: 4vw;
  font-weight: 700;
  color: #5A6A8A;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

#winner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 19, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

#winner-overlay.hidden {
  display: none;
}

.winner-text {
  font-size: 6vw;
  font-weight: 700;
  color: #00F0FF;
  text-align: center;
  animation: winPulse 1.5s ease-in-out infinite;
}

@keyframes winPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
