@font-face {
  font-family: "FiraCode-Regular";
  src: url("./assets/fonts/FiraCode-Regular.ttf");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; touch-action: none; background: #0c0e14; }

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: grab;
}

#gui {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0px;
  padding: 14px 16px;
  color: #e0e0e0;
  font-family: "FiraCode-Regular";
  font-size: 13px;
  min-width: 200px;
  max-width: 260px;
  transition: opacity 0.2s;
}

#gui.collapsed > .gui-body { display: none; }
#gui.collapsed { min-width: 0; max-width: none; }

.gui-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.gui-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
}

.gui-toggle {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.gui-body { margin-top: 12px; }

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  margin-top: 12px;
}

.control-row label { font-size: 12px; color: #999; flex-shrink: 0; user-select: none; }
.control-row .val { font-size: 12px; color: #ccc; min-width: 28px; text-align: right; margin-left: 8px; user-select: none; }
.lock-btn { margin-left: auto; font-size: 10px; color: #666; cursor: pointer; transition: color 0.15s; user-select: none; text-transform: uppercase; }
.lock-btn:hover { color: #999; }
.lock-btn.active { color: #ccc; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 0px;
  background: rgba(255,255,255,0.15); outline: none; margin: 6px 0 0 0;
}
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 0%; background: #b1b1b1; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 0%; background: #b4b4b4; border: none; cursor: pointer; }

.gui-btn {
  width: 100%; margin-top: 4px; padding: 8px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 0px;
  background: rgba(255,255,255,0.06); color: #ccc; font-size: 13px;
  cursor: pointer; transition: background 0.15s;
}
.gui-btn:first-of-type { margin-top: 12px; }
.gui-btn:hover { background: rgba(255,255,255,0.12); }
.gui-btn:active { background: rgba(255, 255, 255, 0.25); }

#version { text-align: center; font-size: 11px; color: #666; margin-top: 8px; }

.mode-toggle { display: flex; gap: 4px; margin-bottom: 10px; }
.mode-btn {
  flex: 1; padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 0px;
  background: rgba(255,255,255,0.04); color: #888; font-size: 11px;
  cursor: pointer; transition: all 0.15s;
}
.mode-btn.active { background: rgba(243, 243, 243, 0.2); border-color: rgb(239 239 239 / 40%); color: #f1f1f1; }
.mode-btn:hover:not(.active) { background: rgba(255,255,255,0.08); }

#seed-display { text-align: center; font-size: 11px; color: #666; margin-top: 8px; }
#status { position: absolute; bottom: 12px; right: 12px; color: #555; font-size: 11px; }

@media (max-width: 480px) {
  #gui { top: auto; bottom: 12px; left: 12px; right: 12px; max-width: none; }
}
