*{box-sizing:border-box}
:root{
  --bg:#0a0a0a; --panel:#161616; --ink:#f3f3f3; --muted:#a3a3a3;
  --accent:#10b981; --accent-2:#059669; --surface:#0f0f0f;
  --radius:18px; --shadow:0 10px 25px rgba(0,0,0,.45);
}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--ink); font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif;
}
.container{max-width:1280px; margin:0 auto; padding:24px}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap}
h1{font-size:clamp(18px,2.5vw,26px); margin:0; font-family:Orbitron,system-ui,sans-serif; letter-spacing:.5px}
.actions{display:flex; gap:10px; align-items:center}
.grid{display:grid; grid-template-columns:1fr 420px; gap:18px}
@media (max-width:1100px){.grid{grid-template-columns:1fr} .panel{order:-1}}

.canvasWrap{background:var(--surface); border-radius:var(--radius); padding:8px; box-shadow:var(--shadow)}
#canvas{width:100%; height:auto; border-radius:12px; display:block; background:#000}

.panel{background:var(--panel); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); display:grid; gap:14px; align-content:start}
.tabs{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px}
.tab{background:#202020; color:var(--ink); border:1px solid #2b2b2b; padding:8px 12px; border-radius:999px; cursor:pointer; font-weight:600; font-size:13px}
.tab.active{background:var(--accent); color:#002b1e; border-color:transparent}
.tab-content{display:none}
.tab-content.active{display:grid; gap:12px}

.field{display:grid; gap:8px}
.field.inline{grid-template-columns:1fr auto; align-items:center}
.field.range label{display:flex; justify-content:space-between; align-items:center}
.subgroup{background:#1b1b1b; border:1px solid #2b2b2b; border-radius:12px; padding:12px; display:grid; gap:8px}
.subgroup h4{margin:0 0 6px 0; font-size:13px; color:var(--muted)}

label{font-weight:600; font-size:14px}
small{color:var(--muted); font-size:12px}
input[type=file], input[type=text], select, input[type=number]{
  width:100%; padding:10px 12px; background:#202020; border:1px solid #2b2b2b; border-radius:12px; color:var(--ink);
}
input[type=range]{width:100%}
.button{
  display:inline-block; background:var(--accent); color:#002b1e; font-weight:700; border:none; border-radius:999px;
  padding:12px 16px; cursor:pointer; text-decoration:none; box-shadow:var(--shadow); text-align:center;
}
.button.primary{min-width:180px}
.button:hover{background:var(--accent-2)}
.button.disabled{background:#333; color:#777; cursor:not-allowed; box-shadow:none}

.status{color:var(--muted); font-size:13px; margin:0}

.progress-container{margin:8px 0}
.progress-bar{width:100%; height:8px; background:#202020; border-radius:999px; overflow:hidden}
.progress-fill{height:100%; background:var(--accent); transition:width 0.2s ease; width:0}
.progress-text{color:var(--ink); font-size:13px; font-weight:600; margin:6px 0 0 0; text-align:center}

.footer{margin-top:16px; color:var(--muted); font-size:12px}
