/* ---- Base ---- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e7e7ea;
}

#view {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #000;
}

/* ---- Control panel ---- */
.panel {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 270px;
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  background: rgba(14, 15, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  color: #d6d8e0;
  font-size: 12px;
  user-select: none;
  z-index: 10;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.panel-head h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #ff9a3c, #ff4d6d, #b06bff, #3cffd0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel-body {
  padding: 12px 14px 14px;
  overflow-y: auto;
}
/* Collapsed state hides the body */
.panel.collapsed .panel-body { display: none; }

section { margin-bottom: 14px; }
section:last-of-type { margin-bottom: 4px; }

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: #8a8fa3;
  margin-bottom: 8px;
}

/* ---- Sliders ---- */
.slider { display: block; margin-bottom: 10px; }
.slabel {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #c4c8d4;
}
.val { color: #ffffff; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* ---- Rows (selects, seed) ---- */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.row > span { color: #c4c8d4; }

select, input[type="text"] {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

/* ---- Buttons ---- */
button {
  background: rgba(255, 255, 255, 0.08);
  color: #eef0f6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
}
button:hover { background: rgba(255, 255, 255, 0.16); }
button:active { transform: translateY(1px); }

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preset.active {
  border-color: #ff9a3c;
  background: rgba(255, 154, 60, 0.18);
}
.wide { width: 100%; margin-top: 8px; }

/* Checkbox toggle (Bloom on/off) */
input[type="checkbox"].toggle {
  width: 16px;
  height: 16px;
  accent-color: #ff9a3c;
  cursor: pointer;
  flex: 0 0 auto;
}

.icon-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  padding: 2px 6px;
  color: #aab;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); }

.hint {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: #7e8398;
}
.fps {
  font-size: 10px;
  color: #7e8398;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Slim scrollbar inside the panel */
.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 8px;
}
