/* cronus experiment design system
   Import in any experiment: <link rel="stylesheet" href="/experiment.css">
   Matches the cronus site aesthetic — gallery/museum, not terminal. */

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

:root {
  --sidebar-bg: #f8f7f4;
  --border: #e0ddd8;
  --text: #1a1a1a;
  --text-dim: #666;
  --text-muted: #999;
  --btn-hover: #f0efec;
  --btn-active-bg: #eae9e5;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #111; /* canvas area background */
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-tap-highlight-color: transparent;
}

/* --- Layout --- */
body { display: flex; }

#sidebar {
  width: 220px; min-width: 220px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
}

#main {
  flex: 1; position: relative; overflow: hidden;
}

#main canvas {
  display: block; width: 100%; height: 100%;
}

/* --- Sidebar title --- */
#sidebar h1 {
  font-family: var(--sans);
  font-size: 13px; font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

/* --- Description (the thesis / gallery label) --- */
.experiment-desc {
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-dim);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

/* --- Section labels --- */
.section-label {
  font-family: var(--sans);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 16px 20px 8px;
}

/* --- Buttons (mode switches, presets) --- */
.btn {
  display: flex; align-items: center;
  padding: 10px 20px;
  border: none; border-bottom: 1px solid var(--border);
  background: transparent; color: var(--text-dim);
  cursor: pointer; font-family: var(--sans); font-size: 13px;
  text-align: left; width: 100%;
  transition: background 0.1s, color 0.1s;
}
.btn:hover { background: var(--btn-hover); color: var(--text); }
.btn.active { background: var(--btn-active-bg); color: var(--text); }

/* --- Action button (Reset, Clear) --- */
.btn-action {
  display: block;
  margin: 12px 20px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-dim);
  font-family: var(--sans); font-size: 12px;
  text-align: center; cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  letter-spacing: 0.02em;
}
.btn-action:hover {
  background: var(--btn-hover); color: var(--text);
  border-color: var(--text-muted);
}

/* --- Sliders --- */
.slider-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 20px;
}
.slider-row label {
  font-family: var(--sans); font-size: 12px;
  color: var(--text-dim); min-width: 52px;
}
.slider-row input[type=range] {
  flex: 1; accent-color: var(--text); height: 2px;
  cursor: pointer;
}
.slider-row .slider-value {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-muted); min-width: 28px; text-align: right;
}

/* --- Toggles --- */
.toggle-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 20px;
  font-family: var(--sans); font-size: 12px;
  color: var(--text-dim); cursor: pointer;
}
.toggle-row input[type=checkbox] { accent-color: var(--text); cursor: pointer; }

/* --- Key hints --- */
.key-hint {
  margin-left: auto;
  font-family: var(--mono); font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 1px 5px;
}

/* --- HUD overlays on canvas --- */
.hud {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--sans); font-size: 11px;
  color: rgba(255,255,255,0.3);
  pointer-events: none; z-index: 10;
  letter-spacing: 0.03em;
}
.hud-right {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--sans); font-size: 11px;
  color: rgba(255,255,255,0.3);
  pointer-events: none; z-index: 10; text-align: right;
}

/* --- Separator --- */
.sidebar-sep {
  height: 1px; background: var(--border); margin: 8px 0;
}

/* --- Hint text (usage instructions) --- */
.usage-hint {
  padding: 12px 20px;
  font-family: var(--sans); font-size: 11px;
  color: var(--text-muted); line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 700px) {
  #sidebar {
    width: 100%; min-width: unset;
    height: auto; max-height: 200px;
    flex-direction: row; flex-wrap: wrap;
    border-right: none; border-bottom: 1px solid var(--border);
    overflow-x: auto; overflow-y: hidden;
  }
  body { flex-direction: column; }
  #sidebar h1 { width: 100%; border-bottom: none; padding-bottom: 0; }
  .experiment-desc { display: none; }
  .section-label { width: 100%; padding: 8px 20px 4px; }
}
