:root {
  --sidebar-width: 220px;
  --bg: #0b0b0c;
  --panel: #0f1720;
  --accent: #5dd0ff;
  --text: #e6eef6;
}

* {
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  overflow: hidden;
}

#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  padding: 18px;
  background: linear-gradient(180deg, #0b1220 0%, #071018 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  overflow-y: auto;
  z-index: 10;
}

#canvasContainer {
  position: fixed;
  left: var(--sidebar-width);
  right: 0;
  top: 0;
  bottom: 0;
  background: #000;
  z-index: 1;
}

h1 { margin: 0 0 12px 0; font-size: 20px; }

label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(230, 238, 246, 0.9);
}

select {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border-radius: 6px;
  border: none;
  background: #0b1220;
  color: var(--text);
}

.controls {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modeRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ctrl {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #0f1a25, #07121a);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.ctrl:active { transform: translateY(1px); }

.mode-toggle.active {
  outline: 1px solid rgba(93, 208, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(93, 208, 255, 0.2);
}

.toggleRow { display: flex; align-items: center; gap: 8px; }
.toggleRow input { transform: scale(1.2); margin-right: 6px; }

.sliderRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 6px;
}

#sliderAlpha {
  width: 100%;
  accent-color: var(--accent);
}

#alphaValue {
  font-size: 13px;
  color: rgba(230, 238, 246, 0.7);
  text-align: right;
}

#status { margin-top: 16px; font-size: 14px; line-height: 1.5; }
#counts div { margin-bottom: 6px; }

footer {
  position: relative;
  margin-top: 18px;
  font-size: 12px;
  color: rgba(230, 238, 246, 0.6);
}

/* Disabled state */
.ctrl[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

@media (max-width: 800px) {
  :root { --sidebar-width: 180px; }
}