:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* Scrollbar — 4px, #404040 */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 2px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #525252;
}

:focus-visible {
  outline: 2px solid #a3a3a3;
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}

/* Slider — 2px track, 12px white thumb */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  margin-top: -5px;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
  background: #404040;
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 2px;
  cursor: pointer;
  background: #404040;
  border: 0;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 0;
  cursor: pointer;
}

input[type="range"]:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Canvas stage */
.canvas-stage {
  position: relative;
  background: #0a0a0a;
}

/* Color picker */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #404040;
  border-radius: 4px;
  background: #171717;
  cursor: pointer;
  padding: 1px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 1px;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

/* Pill button group */
.btn-pill {
  padding: 0.35rem 0.4rem;
  font-size: 10px;
  border-radius: 4px;
  border: 1px solid #404040;
  background: #262626;
  color: #a3a3a3;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
  line-height: 1.3;
}

.btn-pill:hover {
  background: #404040;
  color: #e5e5e5;
}

.btn-pill.active {
  background: #f5f5f5;
  color: #0a0a0a;
  border-color: #d4d4d4;
  font-weight: 500;
}

/* Canvas container */
#canvas-container {
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  outline: 1px solid #262626;
}

#canvas-container canvas {
  display: block;
}
