html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

canvas {
  display: block;
  background: #111;
}

#textEditor {
  position: absolute;
  display: none;
  background: rgba(30,30,30,0.9);
  border: 1px solid #555;
  color: white;
  outline: none;
  resize: none;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: Arial;
  min-width: 50px;
  min-height: 24px;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

#toolbar {
  position: fixed;
  top: 10px;
  left: 10px;
  background: #1e1e1e;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  gap: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#toolbar button {
  background: #333;
  color: white;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
}

#toolbar button.active {
  background: #4CAF50;
}

#toolbar button[data-action] {
  background: #222;
}

#toolbar button[data-action]:hover {
  background: #444;
}

.tooltip {
  position: fixed;
  background: #222;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 1000;
}