/* Minimal, premium UI; keep it clean and fast */
:root{
  --bg:#0b1220;
  --panel:#0f1a2c;
  --card:#111f35;
  --text:#e9eef7;
  --muted:#a8b3c7;
  --line:rgba(255,255,255,.10);

  /* Accent */
  --accent: rgba(249,115,22,0.18);
  --accentBorder: rgba(249,115,22,0.55);
  --accentSolid: #ea580c;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #070b14, var(--bg));
  color:var(--text);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(15,26,44,.65);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand{display:flex;align-items:center;gap:12px}
.brand__logo{width:112px;height:112px;object-fit:contain}
/* brand__name removed in HTML; safe to keep unused */
.brand__name{font-weight:700;letter-spacing:.2px}
.brand__sub{font-size:16px;font-weight:700;color:var(--text);letter-spacing:.3px}

.topbar__actions{display:flex;gap:10px}

.btn{
  appearance:none;
  border:0;
  background: rgba(234,88,12,.92);
  color:#0b1220;
  padding:10px 12px;
  border-radius:12px;
  font-weight:650;
  cursor:pointer;
}
.btn:hover{background: rgba(234,88,12,.98)}

.btn--ghost{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn--ghost:hover{
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 3px rgba(249,115,22,.08);
}

.layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  padding: 16px;
}

.panel{
  background: rgba(15,26,44,.55);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}

.panel__section{
  padding:14px 14px 16px;
  border-bottom:1px solid var(--line);
}
.panel__section:last-child{border-bottom:0}

.panel h3{
  margin:0 0 10px;
  font-size:13px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--muted);
}

.segmented{display:flex;gap:8px;flex-wrap:wrap}

.segBtn{
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight:600;
}

.segBtn:hover{
  border-color: rgba(255,255,255,.20);
  background: rgba(255,255,255,.09);
}

.segBtn.active{
  background: var(--accent);
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 3px rgba(249,115,22,.08);
}

/* Native select styling (field only; dropdown list is OS-controlled) */
.select,
.input{
  width:100%;
  background: rgba(8,12,20,0.90);
  border:1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.94);
  padding:10px 10px;
  border-radius:12px;
  outline:none;
}

.select:focus,
.input:focus{
  border-color: var(--accentBorder);
  box-shadow: 0 0 0 3px rgba(249,115,22,.10);
}

.input{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:12px;
}

.stageWrap{
  background: rgba(15,26,44,.55);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  min-height: 600px;
}

.stageHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
}

.stage{
  padding: 12px;
  display:flex;
  justify-content:center;
  align-items:center;
}

canvas{
  width: 100%;
  max-width: 1050px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 70px rgba(0,0,0,.45);
  background:#0b1220;
}

@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
}

a.btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}



/* About modal */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:50}
.modal.is-open{display:flex}
.modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.modal__panel{position:relative;width:min(520px, calc(100vw - 40px));border:1px solid var(--line);background:rgba(15,26,44,.92);backdrop-filter:blur(12px);border-radius:16px;box-shadow:0 20px 80px rgba(0,0,0,.55);padding:18px}
.modal__title{font-size:16px;font-weight:800;margin:0 0 8px 0}
.modal__body{color:var(--muted);font-size:13px;line-height:1.45}
.modal__actions{display:flex;justify-content:flex-end;margin-top:14px}
