/* Minimal, unobtrusive UI */
:root {
  --bg: #0e0f12;
  --panel: #15171c;
  --text: #e8eaed;
  --muted: #a7adb4;
  --accent: #4f8cff;
  --danger: #ff5c5c;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

#toggleView { position: fixed; top: 20px; right: 20px; z-index: 1000; background: var(--panel); border: 1px solid #1f2229; color: var(--text); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 16px; font-family: inherit; transition: all 0.2s; }
#toggleView:hover { background: #1a1c22; border-color: var(--accent); }
#resetParams { position: fixed; top: 20px; right: 70px; z-index: 1000; background: var(--panel); border: 1px solid #1f2229; color: var(--text); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 16px; font-family: inherit; transition: all 0.2s; }
#resetParams:hover { background: #1a1c22; border-color: var(--accent); }

/* Tab mode (centered) */
#app.tab-mode { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; }
#app.tab-mode #tab { background: var(--panel); border-radius: 12px; padding: 20px; max-width: 800px; width: 100%; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
#app.tab-mode #glcanvas { width: 100%; height: 400px; display: block; border-radius: 8px; margin-bottom: 20px; }
#app.tab-mode #controls { padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
#app.tab-mode #controls h2 { grid-column: 1 / -1; margin-bottom: 16px; }
#app.tab-mode .control { margin-bottom: 0; }
#app.tab-mode .control input[type="range"] { max-width: 100%; }

/* Fullscreen mode (original layout) */
#app.fullscreen-mode { display: grid; grid-template-columns: 1fr 300px; grid-template-areas: "canvas controls"; height: 100%; padding: 0; }
#app.fullscreen-mode #tab { display: contents; }
#app.fullscreen-mode #glcanvas { grid-area: canvas; width: 100%; height: 100%; display: block; border-radius: 0; margin-bottom: 0; }
/* padding-top controls vertical position - adjust this value to shift section down/up */
#app.fullscreen-mode #controls { grid-area: controls; background: var(--panel); padding: 36px 60px 16px 16px; overflow: auto; border-left: 1px solid #1f2229; display: block; }
#app.fullscreen-mode #controls h2 { grid-column: auto; }

#controls h2 { margin: 0 0 24px 0; font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.control { margin-bottom: 14px; }
.control label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.control input[type="range"] { width: 100%; }
.control .value { color: var(--text); margin-left: 8px; min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }

.row { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; }

input[type="range"] { -webkit-appearance: none; height: 4px; background: #22252d; border-radius: 999px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; border: none; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; border: none; }

input[type="color"] { width: 100%; height: 28px; border: 1px solid #282c34; background: #15171c; border-radius: 6px; padding: 0; }

#error { position: fixed; left: 0; bottom: 0; right: 0; padding: 10px 14px; background: transparent; color: var(--danger); white-space: pre-wrap; font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; pointer-events: none; }

@media (max-width: 820px) {
  #app.tab-mode { padding: 10px; }
  #app.tab-mode #tab { padding: 16px; }
  #app.tab-mode #glcanvas { height: 300px; }
  #app.fullscreen-mode { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; grid-template-areas: "controls" "canvas"; }
  #app.fullscreen-mode #controls { border-left: none; border-bottom: 1px solid #1f2229; }
}


