:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #151918;
  color: #f4f1dd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(255, 207, 74, 0.08), transparent 34%),
    linear-gradient(220deg, rgba(89, 209, 255, 0.08), transparent 30%),
    #151918;
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lobby,
.game-view {
  width: min(100%, 980px);
}

.lobby {
  display: grid;
  gap: 22px;
  justify-items: start;
  padding: 32px;
  border: 1px solid #33413b;
  border-radius: 8px;
  background: #1d2421;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffcf4a;
  color: #151918;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: #b9c5b8;
}

.primary {
  min-width: 148px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #ffcf4a;
  color: #151918;
  font-weight: 800;
  cursor: pointer;
}

.primary:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 24px;
}

.game-view {
  display: grid;
  gap: 10px;
}

.hidden {
  display: none;
}

.topbar,
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  color: #dfe8d8;
}

.topbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

#netStatus {
  color: #96d8a0;
  font-size: 0.9rem;
}

.scoreboard {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.score {
  min-width: 58px;
  padding: 5px 8px;
  border: 1px solid #536058;
  border-radius: 6px;
  background: #202722;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
}

.score.me {
  background: #2b332e;
}

canvas {
  display: block;
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  height: auto;
  image-rendering: auto;
  border: 1px solid #445049;
  border-radius: 8px;
  background: #26302b;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  cursor: none;
}

.bottombar {
  justify-content: center;
  flex-wrap: wrap;
  color: #aebbac;
  font-size: 0.92rem;
}

.bottombar span {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .shell {
    padding: 12px;
  }

  .lobby {
    padding: 22px;
  }

  .brand {
    align-items: flex-start;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .scoreboard {
    justify-content: flex-start;
  }
}
