body { 
  margin: 0; 
  background: #222; 
  overflow: hidden; 
  font-family: Arial, sans-serif;
}

canvas { 
  display: block; 
  margin: 0 auto; 
  background: #444; 
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 12, 16, 0.78);
  z-index: 10;
}

.modal[hidden] {
  display: none;
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0c10;
  z-index: 20;
}

.loading-screen[hidden] {
  display: none;
}

.loading-screen canvas {
  width: 160px;
  height: 90px;
  image-rendering: pixelated;
  background: transparent;
  margin: 0;
}

.modal-box {
  width: 100%;
  max-width: 340px;
  padding: 24px;
  border: none;
  border-radius: 10px;
  background: #1b1e24;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: #e8e8e8;
  box-sizing: border-box;
}

.modal-box h1 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: bold;
  color: #ffffff;
  text-align: center;
}

.modal-box input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #3a3f4a;
  border-radius: 6px;
  background: #11131a;
  color: #fff;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
}

.modal-box input:focus {
  border-color: #3a3f4a;
}

.modal-error {
  min-height: 0;
  margin: 0;
  padding: 6px 0 15px;
  font-size: 13px;
  color: #ff6b6b;
}

.modal-box button {
  display: block;
  margin: 0 auto;
  padding: 8px 32px;
  border: none;
  border-radius: 6px;
  background: #ccff33;
  color: #1b1e24;
  font-size: 15px;
  font-weight: bold;
}

.modal-box button:disabled {
  opacity: 0.6;
}

.password-input {
  margin-top: 8px;
}

.name-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.name-row input {
  flex: 1;
  min-width: 0;
}

.gender-picker {
  display: flex;
  gap: 6px;
}

.modal-box .gender-option {
  width: 41px;
  height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3a3f4a;
  border-radius: 8px;
  background: #11131a;
  color: #8a8f99;
}

@media (hover: hover) {
  .modal-box .gender-option:hover:not(:disabled) {
    color: #e8e8e8;
  }
}

.modal-box .gender-option.selected,
.modal-box .gender-option.selected:hover:not(:disabled) {
  color: #ccff33;
}

.modal-box .gender-option svg {
  width: 20px;
  height: 20px;
}

/* Seta tradicional em tudo: tela do jogo, janelas, botões e itens. */
*, *::before, *::after {
  cursor: default !important;
}

/* Caixa de fala: flutuante, centralizada na base da tela; 1 linha até
   receber o foco, aí cresce pra cima. */
.chat-box {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(300px, calc(100vw - 32px));
  height: 34px;
  margin: 0;
  z-index: 2;
  transition: height 0.15s ease-out;
}

.chat-box:focus-within {
  height: 80px;
}

.chat-box textarea {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8px 32px 8px 10px;
  border: none;
  border-radius: 8px;
  background: rgba(17, 19, 26, 0.82);
  color: #e8e8e8;
  font: 13px 'IBM Plex Sans', system-ui, sans-serif;
  resize: none;
  outline: none;
}

.chat-box textarea::placeholder {
  color: #6b7080;
}

.chat-send {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #8a8f99;
}

.chat-send:hover {
  color: #e8e8e8;
}

.death-box p {
  margin: 0 0 20px;
  line-height: 1.45;
  text-align: center;
}

.death-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.death-actions button {
  margin: 0;
}

.death-actions button.secondary {
  background: #2a2e37;
  color: #e8e8e8;
}
