* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10131a;
  color: #eef1f7;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

#lobby-screen {
  text-align: center;
  padding: 2rem;
}

#lobby-screen h1 {
  margin-bottom: 1.5rem;
}

#join-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

#name-input {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #3a4152;
  background: #1b2030;
  color: #eef1f7;
  font-size: 1rem;
}

#join-button {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  background: #4f7cff;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

#join-button:disabled {
  opacity: 0.5;
  cursor: default;
}

#lobby-status {
  margin-top: 1.5rem;
}

#lobby-players {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

#lobby-players li {
  padding: 0.15rem 0;
  color: #b7bfd1;
}

#game-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#game-canvas {
  background: #05070c;
  border: 2px solid #2a3145;
  border-radius: 8px;
  max-width: 92vmin;
  max-height: 92vmin;
}

#scoreboard {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.95rem;
}

.score-entry {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  background: #1b2030;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}

.score-entry.is-me {
  outline: 2px solid #4f7cff;
}

.score-name {
  color: #b7bfd1;
}

.score-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#results-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

#results-box {
  background: #1b2030;
  border: 1px solid #3a4152;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 280px;
}

#results-list {
  text-align: left;
  padding-left: 1.4rem;
  margin: 1rem 0;
}

#results-list li.winner {
  color: #6fe28a;
  font-weight: 700;
}

#results-list li.loser {
  color: #ff6b6b;
}

#results-hint {
  color: #8b93a7;
  font-size: 0.9rem;
}

[hidden] {
  display: none !important;
}
