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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.08), transparent 36%),
    #15131a;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  min-height: 42px;
  background: #f97316;
  color: #1a0f08;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #fb923c;
}

input {
  min-width: 0;
  border: 1px solid #4c414e;
  border-radius: 6px;
  padding: 0 12px;
  min-height: 42px;
  background: #211d27;
  color: #f8fafc;
  outline: none;
}

input:focus {
  border-color: #f97316;
}

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

.hidden {
  display: none !important;
}

.lobby {
  width: min(440px, 100%);
  display: grid;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 10vw, 76px);
  line-height: 0.92;
}

.join {
  display: grid;
  gap: 8px;
}

.join label {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.joinRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.status {
  margin: 0;
  color: #cbd5e1;
}

.game {
  width: min(1100px, 100%);
  display: grid;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  color: #cbd5e1;
}

.topbar strong {
  color: #f8fafc;
  margin-right: 10px;
}

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

.scoreItem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #413849;
  border-radius: 6px;
  background: #211d27;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
}

.scoreItem::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--player-color);
}

.stageWrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #3f3846;
  border-radius: 8px;
  background: #0f0d13;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

canvas {
  width: 100%;
  height: 100%;
  image-rendering: auto;
  display: block;
}

@media (max-width: 680px) {
  .shell {
    padding: 14px;
    align-content: start;
  }

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

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

  .joinRow {
    grid-template-columns: 1fr;
  }
}
