html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #07090a;
  color: #e8f0e4;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hidden {
  display: none !important;
}

#lobby-screen {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background:
    linear-gradient(rgba(7, 9, 10, 0.58), rgba(7, 9, 10, 0.82)),
    url("screenshot.png") center / cover no-repeat;
}

.lobby-panel {
  width: min(760px, 100%);
  background: rgba(8, 14, 10, 0.92);
  border: 1px solid #3f5a38;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.lobby-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
  color: #ffe27a;
}

p {
  margin: 5px 0 0;
  color: #9fba92;
  font-size: 13px;
}

.room-pill {
  border: 1px solid #5f744f;
  background: #111b12;
  border-radius: 6px;
  padding: 8px 10px;
  color: #9fba92;
  white-space: nowrap;
}

#room-code {
  color: #ffffff;
  font-weight: 700;
}

.player-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.player-slot {
  min-height: 118px;
  border: 1px solid #2f3f2f;
  border-left: 4px solid var(--player-color);
  border-radius: 8px;
  background: rgba(15, 24, 16, 0.88);
  padding: 10px;
  box-sizing: border-box;
}

.player-slot.connected {
  border-color: color-mix(in srgb, var(--player-color) 70%, #2f3f2f);
}

.slot-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #9fba92;
  font-size: 11px;
}

.slot-name {
  margin: 14px 0 12px;
  color: #ffffff;
  font-size: 15px;
  min-height: 18px;
}

select {
  width: 100%;
  height: 32px;
  color: #e8f0e4;
  background: #0b110d;
  border: 1px solid #43543d;
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
}

select:disabled {
  opacity: 0.55;
}

.lobby-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

button {
  height: 38px;
  border: 1px solid #516642;
  border-radius: 6px;
  background: #142015;
  color: #e8f0e4;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

.ready-btn {
  flex: 1;
  background: #315a27;
  border-color: #7ab85c;
}

.ready-btn.is-ready {
  background: #6a4f16;
  border-color: #ffe27a;
}

.copy-btn {
  width: 190px;
}

.lobby-status {
  margin-top: 12px;
  color: #9fba92;
  font-size: 12px;
  min-height: 16px;
}

#game-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  width: 1280px;
  height: 720px;
  max-width: 100vw;
  max-height: 100vh;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: none;
  background: #07090a;
}

@media (max-width: 720px) {
  #lobby-screen {
    align-items: stretch;
    padding: 12px;
    overflow: auto;
  }

  .lobby-header,
  .lobby-actions {
    flex-direction: column;
  }

  .player-slots {
    grid-template-columns: 1fr 1fr;
  }

  .copy-btn {
    width: 100%;
  }
}
