:root{
  --bg:#0d1117;
  --panel:#161b22;
  --panel2:#1f2937;
  --line:#30363d;
  --text:#f8fafc;
  --muted:#94a3b8;
  --primary:#3b82f6;
  --primary2:#1d4ed8;
  --good:#10b981;
  --danger:#fb7185;
}
*{box-sizing:border-box}
body{
  margin:0;
  background:radial-gradient(circle at top,#17213a 0,#0d1117 540px);
  color:var(--text);
  font-family:"Microsoft YaHei",Arial,sans-serif;
}
.topbar{
  height:58px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 18px;
  background:rgba(9,13,20,.96);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:50;
}
.brand strong{font-size:18px}
.brand span{margin-left:10px;color:var(--muted);font-size:13px}
.top-actions{display:flex;gap:8px}
.app{
  display:grid;
  grid-template-columns:340px 1fr 350px;
  gap:14px;
  padding:14px;
}
.panel{
  background:rgba(22,27,34,.96);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow:0 18px 42px rgba(0,0,0,.28);
}
section{margin-bottom:18px}
h2{
  font-size:16px;
  margin:0 0 10px;
}
label{
  display:block;
  margin:8px 0 4px;
  font-size:12px;
  color:var(--muted);
}
input,select,button{
  width:100%;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0f172a;
  color:var(--text);
  padding:9px;
  font-family:inherit;
  outline:none;
}
input[type=color]{height:40px;padding:3px}
button{
  cursor:pointer;
  background:#1f2937;
  user-select:none;
}
button:hover{border-color:var(--primary)}
button.primary{background:var(--primary2);border-color:var(--primary)}
button.danger{background:#be123c;border-color:var(--danger)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:8px 0}
.notice,.help{
  background:#0f172a;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  color:#c7d2fe;
  font-size:13px;
  line-height:1.6;
}
.help{color:var(--muted)}
.workspace{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  min-height:720px;
}
.canvas-shell{
  padding:24px;
  background:#06080d;
  border:1px solid #263449;
  border-radius:18px;
  box-shadow:0 25px 80px rgba(0,0,0,.38);
}
#editorCanvas{
  width:768px;
  height:609px;
  image-rendering:pixelated;
  background:transparent;
  border:1px solid #60a5fa;
  box-shadow:0 0 0 8px #111827;
}
.toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:14px;
}
.toolbar button{width:auto;min-width:90px}
#zoomLabel{color:var(--muted);min-width:64px;text-align:center}
.tips{color:var(--muted);font-size:13px}
.layer-list{
  max-height:280px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.layer-item{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0f172a;
  padding:8px;
  cursor:pointer;
}
.layer-item.active{
  border-color:#60a5fa;
  background:#172554;
}
.layer-item small{
  display:block;
  color:var(--muted);
  margin-top:2px;
}
pre{
  white-space:pre-wrap;
  background:#0f172a;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  color:#dbeafe;
  font-size:12px;
}
@media(max-width:1200px){
  .app{grid-template-columns:1fr}
  #editorCanvas{width:512px;height:406px}
}

.navlink{display:inline-flex;align-items:center;color:#bfdbfe;text-decoration:none;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#0f172a}.user-mini{display:inline-flex;align-items:center;color:#cbd5e1;font-size:13px;padding:0 8px}
