html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0d1a0d;
  color: #ddd;
  font-family: sans-serif;
}

#board {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
}

#uiPanel {
  position: fixed;
  top: 10px;
  left: 10px;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(20,40,20,0.9);
  border-radius: 8px;
  max-width: 280px;
  font-size: 14px;
}

#toggleUI {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #204520;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, 20px);
  gap: 4px;
}

.palette button.color {
  width: 20px;
  height: 20px;
  border: 1px solid #333;
  cursor: pointer;
}
.palette button.selected {
  border: 2px solid yellow;
}

.chat {
  background: #111;
  padding: 5px;
  border-radius: 4px;
  max-height: 200px;
  display: flex;
  flex-direction: column;
}
#chatBody {
  flex: 1;
  overflow-y: auto;
  background: #222;
  margin-bottom: 4px;
  padding: 4px;
  font-size: 13px;
}
#chatBody .msg {
  margin: 2px 0;
}
#chatBody .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
#chatBody .name {
  font-weight: bold;
  margin-right: 4px;
}
#chatInput {
  flex: 1;
  padding: 2px 4px;
}
#chatSend {
  margin-left: 4px;
  padding: 2px 6px;
}

/* ===== Regeln Overlay ===== */
#rulesOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#rulesBox {
  background: #132613;
  padding: 20px;
  border-radius: 10px;
  color: #fff;
  max-width: 400px;
  text-align: center;
}

#rulesBox h2 {
  margin-top: 0;
}

#rulesBox button {
  margin-top: 15px;
  padding: 8px 16px;
  background: #204520;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}
