:root {
  --bg: #1b1f24;
  --panel: rgba(28, 32, 38, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e8eaed;
  --muted: #9aa0a8;
  --accent: #6fae6b;
  --accent-dark: #4f8f4c;
}

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

html, body {
  height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

#app { position: relative; width: 100vw; height: 100vh; }

#scene { display: block; width: 100%; height: 100%; }

.topbar {
  position: absolute;
  top: 0; left: 0;
  padding: 22px 28px;
  pointer-events: none;
}
.topbar h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.topbar p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.panel {
  position: absolute;
  top: 0; right: 0;
  width: 290px;
  height: 100%;
  padding: 24px 22px;
  background: var(--panel);
  border-left: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.panel section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 12px;
}

.examples { display: flex; flex-direction: column; gap: 8px; }

.example-btn {
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.example-btn:hover { background: rgba(255, 255, 255, 0.07); }
.example-btn:active { transform: scale(0.99); }
.example-btn.active {
  border-color: var(--accent);
  background: rgba(111, 174, 107, 0.14);
}
.example-btn strong { display: block; font-size: 14px; }
.example-btn span { font-size: 12px; color: var(--muted); }

.control {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 13px;
}
.control span { color: var(--text); }
.control em { color: var(--muted); font-style: normal; }

.control input[type="color"] {
  width: 100%;
  height: 34px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.control select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.control.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}
.control.checkbox input { accent-color: var(--accent); cursor: pointer; }

.hint ul { list-style: none; font-size: 12px; color: var(--muted); }
.hint li { padding: 3px 0; }

.loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  transition: opacity 0.4s;
}
.loading.hidden { opacity: 0; pointer-events: none; }

@media (max-width: 720px) {
  .panel { width: 230px; padding: 18px 14px; }
  .topbar h1 { font-size: 20px; }
}
