html, body {
  height: 100%;
  margin: 0;
  background: #111;
  color: #eee;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* Layout wrapper: vertical stack, content near top, centered horizontally */
#wrap {
  display: flex;
  flex-direction: column;
  align-items: center;      /* centre the main game area */
  justify-content: flex-start;
  min-height: 100%;
  padding: 8px;
  box-sizing: border-box;
}

/* Legacy plain-screen style (used for create/dead modes) */
pre#screen {
  margin: 0;
  line-height: 1.05;
  font-size: 16px;
  white-space: pre;
  background: #000;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  overflow: auto;
  max-width: 100%;
  max-height: 90vh;
}

/* Container inside #screen when in play mode:
   <div class="play-wrap"><div class="hud">…</div><pre class="map">…</pre></div> */
.play-wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  justify-content: center;   /* centres the map+hud block on the page */
  margin-top: 8px;
}

/* HUD panel (stats etc) on the left */
.hud {
  flex: 0 0 auto;
  padding: 10px 12px;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  white-space: pre;
  font-size: 14px;
  line-height: 1.1;
  max-height: 90vh;
  overflow: auto;
  min-width: 220px;
}

/* Map panel to the right of HUD */
pre.map {
  flex: 0 1 auto;
  margin: 0;
  line-height: 1.05;
  font-size: 16px;
  white-space: pre;
  background: #000;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  overflow: auto;
  max-width: 100%;
  max-height: 90vh;
}

.status {
  margin-top: 10px;
  text-align: center;
  opacity: 0.85;
}

/* Modal styling */
.modal-backdrop {
  position: fixed; inset: 0;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.6);
}
.modal-card {
  background: #1b1b1b; padding: 16px; border-radius: 12px;
  width: min(520px, 92vw); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-card h2 { margin: 0 0 8px 0; font-size: 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab { padding: 8px 12px; border-radius: 8px; background: #222; cursor: pointer; }
.tab.active { background: #2d6cdf; }
.row { display: flex; gap: 8px; margin-top: 6px; }
input[type="text"], input[type="password"] {
  flex: 1; padding: 10px; background: #0c0c0c; color: #eee; border: 1px solid #333; border-radius: 8px;
}
button {
  padding: 10px 14px; background: #2d6cdf; color: white; border: none; border-radius: 8px; cursor: pointer;
}
button:hover { filter: brightness(1.05); }
.error { color: #f66; margin-top: 8px; min-height: 1.2em; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { padding: 6px 10px; background: #222; border: 1px solid #333; border-radius: 999px; cursor: pointer; }
.pill:hover { background: #2a2a2a; }
.show { display: grid !important; }

.controls {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.controls button {
  padding: 8px 12px;
  background: #444;
  color: #eee;
  border: 1px solid #666;
  border-radius: 8px;
  cursor: pointer;
}
.controls button:hover { filter: brightness(1.08); }

#chat {
  margin-top: 8px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.chat-log {
  width: 960px;
  max-width: 100%;
  height: 140px;          /* fixed size */
  overflow-y: auto;
  padding: 6px 8px;
  background: #000;
  border-radius: 8px;
  border: 1px solid #333;
  font-size: 12px;
  line-height: 1.25;
  white-space: pre-wrap;
}

/* Provider buttons */
.auth-providers {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.provider-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  width: 260px;
  padding: 10px 14px;

  background: #f5f5f5;
  color: #222;
  border-radius: 999px;
  border: 1px solid #444;

  cursor: pointer;
  font-size: 14px;
  font-weight: 500;

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}

.provider-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
}

.provider-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.provider-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.provider-icon svg {
  width: 100%;
  height: 100%;
}

.provider-text {
  flex: 1;
  text-align: left;
}
