:root {
  --bg: #030303;
  --surface: #0a0a0c;
  --surface-hover: #121216;
  --border: #1a1a24;
  --border-focus: #3f3f56;
  --accent: #ffffff;
  --accent-muted: #8e8e9f;
  --text: #f3f3f7;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #030303; }
::-webkit-scrollbar-thumb { background: #272732; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #525264; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font-sans); min-height: 100vh; }
.bg-grid { background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 24px 24px; }
.mono { font-family: var(--font-mono); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 320px; background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  height: 100vh; position: sticky; top: 0; overflow-y: auto; flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--accent); }
.brand-badge {
  width: 28px; height: 28px; background: var(--accent); color: #000;
  display: grid; place-items: center; border-radius: 8px; font-family: var(--font-mono); font-weight: 700; font-size: 12px;
}
.label { display: block; font-size: 11.5px; font-weight: 600; color: var(--accent-muted); margin-bottom: 6px; letter-spacing: 0.04em; }
.input, .select {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: inherit; font-size: 13.5px; padding: 9px 12px; outline: none;
}
.input:focus, .select:focus { border-color: var(--border-focus); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text);
}
.btn:hover { border-color: var(--border-focus); background: var(--surface-hover); }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { background: #e4e4e7; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.tag {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; border: 1px solid var(--border); color: var(--accent-muted);
}
.main-content { flex: 1; padding: 20px; display: flex; align-items: center; justify-content: center; min-width: 0; }
.canvas-card {
  width: 100%; height: calc(100vh - 40px); background: #070709;
  border: 1px solid var(--border); border-radius: 14px; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.iso-box {
  position: absolute; right: 16px; bottom: 16px;
  background: rgba(3,3,3,0.92); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px; backdrop-filter: blur(12px);
}
input[type="range"] { accent-color: #ffffff; cursor: pointer; }
input[type="checkbox"] { accent-color: #ffffff; width: 15px; height: 15px; cursor: pointer; }
.toast-box {
  position: fixed; top: 18px; right: 18px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: #ffffff; color: #000000; font-size: 13px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px; border: 1px solid #272732;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6); animation: fadeIn 0.15s ease;
}
/* Custom Switch & Stepper */
.c-switch {
  position: relative; width: 36px; height: 20px; border-radius: 999px;
  background: #18181f; border: 1px solid var(--border-focus);
  cursor: pointer; transition: background 0.15s ease; flex-shrink: 0;
}
.c-switch.on { background: #ffffff; border-color: #ffffff; }
.c-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #8e8e9f; transition: transform 0.15s ease, background 0.15s ease;
}
.c-switch.on::after { transform: translateX(16px); background: #000000; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .canvas-card { height: 420px; }
}
