*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #111;
  color: #ddd;
  font: 13px/1 system-ui, sans-serif;
  overflow: hidden;
}

/* ── Toolbar ── */
#toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  background: #1c1c1c;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
  flex-wrap: wrap;
}

#brush-tools {
  display: flex;
  gap: 4px;
}

.tool-btn {
  padding: 5px 10px;
  background: #2e2e2e;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ccc;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s;
}
.tool-btn:hover { background: #3a3a3a; }
.tool-btn.active {
  background: #5a3e9e;
  border-color: #7a5ebe;
  color: #fff;
}

#brush-controls {
  display: flex;
  gap: 14px;
}

#brush-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aaa;
  font-size: 12px;
}

#brush-controls input[type=range] {
  width: 90px;
  accent-color: #7a5ebe;
}

#brush-controls span {
  width: 24px;
  text-align: right;
  color: #ddd;
}

#actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

#actions button,
.file-label {
  padding: 5px 10px;
  background: #2e2e2e;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ccc;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s;
  user-select: none;
}
#actions button:hover,
.file-label:hover { background: #3a3a3a; }

.file-label input[type=file] { display: none; }

/* ── Canvas area ── */
#canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #111;
  height: 100%;
}

#goo-canvas {
  display: block;
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  cursor: none;
  touch-action: none;
  image-rendering: pixelated;
}

#cursor-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ── Drop overlay ── */
#drop-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  border: 3px dashed #7a5ebe;
  border-radius: 8px;
  font-size: 22px;
  color: #aaa;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
#drop-overlay.visible { opacity: 1; }

/* Placeholder when no image loaded */
#canvas-wrapper.empty::before {
  content: 'Drop an image or click "Load Image" to start';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #444;
  font-size: 16px;
  pointer-events: none;
  white-space: nowrap;
}
