:root { color-scheme: dark; }

*{box-sizing:border-box;}
html,body{margin:0;height:100%;}
body{
  font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:#0a0a12;color:#e9e9f2;overflow:hidden;
  display:grid;grid-template-columns:336px 1fr;height:100vh;
}
@media (max-width:900px){
  body{grid-template-columns:1fr;grid-template-rows:auto 1fr;}
  #sidebar{max-height:46vh;}
}

/* ---------- 侧栏 ---------- */
#sidebar{
  overflow-y:auto;padding:20px 18px 40px;
  background:linear-gradient(180deg,#12121e,#0d0d16);
  border-right:1px solid #22222f;
}
#sidebar::-webkit-scrollbar{width:8px;}
#sidebar::-webkit-scrollbar-thumb{background:#2b2b3d;border-radius:4px;}
h1{font-size:16px;margin:0 0 2px;letter-spacing:.3px;}
.sub{font-size:11px;color:#6b6b85;margin:0 0 18px;}
section{margin-bottom:18px;}
.lbl{display:block;font-size:12px;font-weight:600;color:#9a9ab5;margin-bottom:7px;letter-spacing:.4px;}

input[type=file]{
  width:100%;font-size:12px;color:#b9b9d0;
  background:#181826;border:1px dashed #33334a;border-radius:9px;
  padding:9px 10px;cursor:pointer;transition:.18s;
}
input[type=file]:hover{border-color:#5b5bff;background:#1c1c2e;}
input[type=file]::file-selector-button{
  background:#2c2c44;color:#cfcfe8;border:none;border-radius:6px;
  padding:5px 10px;margin-right:10px;font-size:11px;cursor:pointer;
  font-family:inherit;
}

.info{font-size:11px;color:#5f5f7a;margin-top:6px;word-break:break-all;line-height:1.5;}
.info.ok{color:#4ade80;}

.chk{display:flex;align-items:center;gap:7px;font-size:12px;color:#9a9ab5;margin-top:9px;cursor:pointer;}
.chk input{accent-color:#6c5ce7;width:14px;height:14px;cursor:pointer;}

.chips{display:flex;flex-wrap:wrap;gap:7px;}
.chip{
  font-family:inherit;font-size:11.5px;color:#a8a8c4;background:#181826;
  border:1px solid #2c2c42;border-radius:8px;padding:7px 11px;cursor:pointer;
  transition:.16s;
}
.chip:hover{border-color:#4a4a80;color:#dcdcf0;}
.chip.active{background:#2a2350;border-color:#6c5ce7;color:#c9bcff;box-shadow:0 0 14px rgba(108,92,231,.35);}

select{
  width:100%;font-family:inherit;font-size:12px;color:#c8c8e0;background:#181826;
  border:1px solid #2c2c42;border-radius:9px;padding:9px 10px;cursor:pointer;
}
select:focus{outline:none;border-color:#6c5ce7;}

.actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;}
.btn{
  font-family:inherit;font-size:12.5px;font-weight:600;color:#fff;
  border:none;border-radius:10px;padding:11px 12px;cursor:pointer;
  transition:.16s;display:flex;align-items:center;justify-content:center;gap:6px;
  text-decoration:none;
}
.btn:disabled{opacity:.32;cursor:not-allowed;}
.btn.primary{background:linear-gradient(135deg,#5b4be0,#7c5cff);}
.btn.primary:not(:disabled):hover{filter:brightness(1.15);}
.btn.danger{background:linear-gradient(135deg,#d6355f,#ff4d6d);}
.btn.danger:not(:disabled):hover{filter:brightness(1.15);}
.btn.success{background:linear-gradient(135deg,#0e9f6e,#22c55e);width:100%;}
.btn.success:hover{filter:brightness(1.12);}
.btn.small{font-size:11px;padding:7px 12px;background:#2c2c44;}

.rec-status{
  background:#181826;border:1px solid #2c2c42;border-radius:10px;
  padding:11px 12px;margin-bottom:14px;
}
.rec-status .bar{height:5px;background:#0e0e18;border-radius:3px;overflow:hidden;margin-bottom:9px;}
.rec-status .bar>div{height:100%;width:0;background:linear-gradient(90deg,#ff4d6d,#ff8fa3);transition:width .1s linear;}
.rec-status .row{display:flex;align-items:center;justify-content:space-between;gap:10px;}
#recText{font-size:11.5px;color:#ff8fa3;font-weight:600;}
#downloadWrap{margin-bottom:14px;}
.hidden{display:none !important;}

.tip{font-size:10.5px;color:#50506a;line-height:1.65;margin:14px 0 0;border-top:1px solid #1e1e2c;padding-top:12px;}
.time{font-size:11px;color:#6b6b85;text-align:center;margin-bottom:14px;font-variant-numeric:tabular-nums;}

/* ---------- 新增：滑块行 ---------- */
.slider-row{
  display:flex;align-items:center;gap:8px;
  font-size:11px;color:#9a9ab5;margin-bottom:7px;
}
.slider-row input[type=range]{
  flex:1;accent-color:#6c5ce7;cursor:pointer;
  height:4px;background:#2c2c42;border-radius:2px;
}
.slider-row span:last-child{
  min-width:38px;text-align:right;color:#c9bcff;
  font-variant-numeric:tabular-nums;
}

/* ---------- 新增：自定义配色 ---------- */
.custom-colors{
  margin-top:9px;display:flex;gap:10px;flex-wrap:wrap;
}
.custom-colors label{
  display:flex;align-items:center;gap:5px;
  font-size:11px;color:#9a9ab5;
}
.custom-colors input[type=color],
.row-inline input[type=color]{
  width:36px;height:24px;padding:0;border:1px solid #2c2c42;
  border-radius:5px;background:transparent;cursor:pointer;
}
.row-inline{
  display:flex;align-items:center;gap:8px;
  font-size:11px;color:#9a9ab5;
}

/* ---------- 舞台 ---------- */
#stage{
  display:flex;align-items:center;justify-content:center;
  background:#050508;padding:18px;min-height:0;min-width:0;
}
canvas{
  max-width:100%;max-height:100%;width:auto;height:auto;
  border-radius:10px;box-shadow:0 0 60px rgba(0,0,0,.85);
  background:#000;display:block;
}