html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #2b6cb0;
  overflow: hidden;
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Segoe UI', sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

#game-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#game canvas {
  display: block;
  margin: 0 auto;
}

#ui-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#ui-overlay > * {
  pointer-events: auto;
}

/* ---------- Name Keyboard Overlay (Agent_UI_UX) ---------- */
.kb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 70, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.kb-title {
  color: #fff;
  font-size: 34px;
  font-weight: bold;
  text-shadow: 2px 2px 0 #1a365d;
}

.kb-name-display {
  min-width: 320px;
  min-height: 70px;
  background: #ffffff;
  border: 5px solid #f6e05e;
  border-radius: 18px;
  font-size: 44px;
  font-weight: bold;
  color: #2b6cb0;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 6px;
  padding: 4px 20px;
}

.kb-row {
  display: flex;
  gap: 8px;
}

.kb-key {
  min-width: 64px;
  height: 64px;
  border: none;
  border-radius: 14px;
  background: #ffffff;
  color: #2b6cb0;
  font-size: 30px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 5px 0 #90cdf4;
  transition: transform 0.05s, box-shadow 0.05s;
}

.kb-key:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #90cdf4;
  background: #f6e05e;
}

.kb-key.kb-wide {
  min-width: 140px;
  background: #48bb78;
  color: #fff;
  box-shadow: 0 5px 0 #276749;
}

.kb-key.kb-wide:disabled {
  background: #a0aec0;
  box-shadow: 0 5px 0 #718096;
}

.kb-key.kb-del {
  background: #fc8181;
  color: #fff;
  box-shadow: 0 5px 0 #c53030;
}
