/* ===============================
   RESET
=============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: auto;   /* ou remove a linha */
  background: white;
  font-family: Arial, sans-serif;
}
/* ===============================
   WORLD (NORMAL)*/
#world {
  position: relative;
  width: 1000000px;
  height: 1000000px;
  background: lightblue;
  overflow: hidden;
}

#chatInput {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 30px;
  font-size: 14px;
  z-index: 999;
  padding: 4px;
}

/* mensagens sobre a cabeça do player */
.chatText {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: bold;
  color: #000;
  pointer-events: none;
  white-space: nowrap;
}

/* ===============================
   PLAYER LOCAL
=============================== */
#player {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

#nick {
  position: absolute;
  font-size: 12px;
  color: #000;

  pointer-events: none;
}

/* ===============================
   OUTROS PLAYERS
=============================== */
.playerOther {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 10px;
  color: white;
  text-align: center;
  line-height: 32px;
}

/* ===============================
   BLOCOS
=============================== */
.tile {
  position: absolute;
  width: 32px;
  height: 32px;
}

/* ===============================
   CONTROLES
=============================== */
#controles {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  gap: 5px;
}

#controles .btn {
  width: 50px;
  height: 50px;
  font-size: 22px;
  border-radius: 6px;
  border: 2px solid #000;
  background: #fff;
}

#controles .btn[data-dir="up"] {
  grid-column: 2;
}
#controles .btn[data-dir="left"] {
  grid-column: 1;
  grid-row: 2;
}
#controles .btn[data-dir="down"] {
  grid-column: 2;
  grid-row: 2;
}
#controles .btn[data-dir="right"] {
  grid-column: 3;
  grid-row: 2;
}


/* ===============================
   BOTÕES DE BLOCO
=============================== */
/* ===============================
   BOTÕES FIXOS
=============================== */
#btnBlocos,
#btnApagar,
#btnSair {
  position: fixed;
  right: 20px;
  width: 70px;
  height: 50px;
  border-radius: 6px;
  border: 2px solid #000;
  background: #fff;
  font-weight: bold;
  z-index: 9999; /* garante que fique acima de tudo */
}

/* positions individuais */
#btnBlocos {
  bottom: 20px;
  background: #fff;
}

#btnApagar {
  bottom: 80px;
  background: #fff;
}

#btnSair {
  bottom: 140px;
  background: #ffdddd;
}







