:root #tool-body {
  --card-bg: #fff;
  --primary: #16baaa;
  --danger: #ff5722;
  --warn: #ffb800;
  --dark-item: #2b2d36;
  --border-color: #eee;
  --text-muted: #999;
  --panel-bg: #f2f4f7;
  --text-color: #333;
  --label-color: #666;
}
.theme-dark-mode #tool-body {
  --card-bg: #2b2b2b;
  --border-color: #444;
  --panel-bg: #333;
  --text-color: #ddd;
  --label-color: #aaa;
}
#tool-body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; color: var(--text-color); }

/* 上传区 */
#tool-body .upload-area { padding: 40px; text-align: center; border-radius: 8px; border-width: 2px; cursor: pointer; transition: .3s; display: block; color: inherit; }
#tool-body .upload-area:hover { border-color: var(--primary); }
#tool-body .upload-icon { font-size: 48px; color: var(--primary); margin-bottom: 10px; }
#tool-body .upload-area h3 { margin-bottom: 5px; }
#tool-body .upload-area p { color: var(--text-muted); font-size: 14px; }

/* 文件列表 */
#tool-body .section-title { margin: 25px 0 15px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
#tool-body .clear-btn { font-size: 14px; color: var(--danger); cursor: pointer; font-weight: normal; }
#tool-body .video-item { background: var(--dark-item); color: #fff; border-radius: 8px; margin-bottom: 12px; padding: 14px 15px; display: flex; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.15); position: relative; overflow: hidden; }
#tool-body .file-icon { z-index:1; width:40px; height:40px; background:rgba(255,255,255,0.1); border-radius:50%; display:flex; align-items:center; justify-content:center; margin-right:15px; flex-shrink:0; cursor:pointer; transition:.2s; }
#tool-body .file-icon:hover { transform: scale(1.1); }
#tool-body .file-icon i { font-size:20px; color:var(--primary); }
#tool-body .file-info { flex:1; min-width:0; z-index:1; }
#tool-body .file-name { font-size:14px; font-weight:bold; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#tool-body .file-meta { font-size:12px; color:#bbb; margin-top:3px; }
#tool-body .badge-fmt { background:var(--primary); color:#fff; padding:0 5px; border-radius:2px; font-size:10px; margin-left:5px; font-weight:bold; }
#tool-body .del-btn { z-index:1; margin-left:12px; color:var(--danger); cursor:pointer; font-size:20px; opacity:.6; transition:.2s; padding:8px; flex-shrink:0; }
#tool-body .del-btn:hover { opacity:1; transform:scale(1.1); }
#tool-body .item-progress { width:100%; height:4px; background:#444; margin-top:8px; border-radius:2px; overflow:hidden; display:none; }
#tool-body .item-progress-bar { height:100%; background:var(--primary); width:0%; transition:width 0.5s ease; }
#tool-body .item-status { font-size:11px; color:#aaa; margin-top:5px; display:none; line-height:1.4; }

/* 控制面板 */
#tool-body .control-panel-wrapper { background:var(--card-bg); border-radius:12px; box-shadow:0 4px 20px rgba(0,0,0,0.05); margin-top:20px; border:1px solid var(--border-color); }
#tool-body .panel-header { border-radius: 12px 12px 0 0;background:var(--panel-bg); padding:14px 20px; display:flex; align-items:center; gap:8px; font-weight:bold; color:var(--label-color); font-size:15px; border-bottom:1px solid var(--border-color); }
#tool-body .panel-header i { color:var(--primary); font-size:18px; }
#tool-body .panel-content { padding:18px 22px; }

/* 参数行：label + layui select，两列栅格布局 */
#tool-body .param-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px 24px; margin-bottom:16px; }
@media(max-width:600px){ #tool-body .param-grid { grid-template-columns:1fr; } }
#tool-body .param-cell { display:flex; flex-direction:column; gap:4px; }
#tool-body .param-cell .layui-form-label-sm { font-size:12px; color:var(--label-color); font-weight:600; margin-bottom:2px; padding:0; width:auto; float:none; }

/* 操作行 */
#tool-body .action-row { display:flex; align-items:center; gap:12px; padding-top:16px; border-top:1px dashed var(--border-color); margin-top:4px; flex-wrap:wrap; }
.theme-dark-mode #tool-body .action-row { border-color:#3a3a3a; }
#tool-body #processBtn { background-color:var(--primary); min-width:160px; transition:.3s; border:none; flex-shrink:0; }
#tool-body #stopBtn { flex-shrink:0; display:none; }

/* 进度汇总文字 */
#tool-body #globalStatus { font-size:13px; color:var(--text-muted); flex:1; min-width:0; }

/* 输出区 */
#tool-body .output-area { display:none; margin-top:28px; border-top:1px solid var(--border-color); padding-top:20px; }
.theme-dark-mode #tool-body .output-area { border-color:#444; }
#tool-body .output-item { border:1px solid var(--border-color); border-radius:8px; padding:12px 15px; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; background:var(--card-bg); flex-wrap:wrap; gap:10px; }
#tool-body .output-left { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
#tool-body .output-name { font-weight:bold; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-color); max-width:260px; }
#tool-body .tag-fmt { background:#e3f9f5; color:var(--primary); border:1px solid #c2e9e3; padding:2px 7px; border-radius:4px; font-size:12px; flex-shrink:0; font-weight:bold; }
.theme-dark-mode #tool-body .tag-fmt { background:#1a3a38; border-color:#2a5a55; }
#tool-body .tag-size { color:var(--text-muted); font-size:12px; white-space:nowrap; flex-shrink:0; }
#tool-body .output-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; flex-shrink:0; }
#tool-body .output-right a.layui-btn { display:flex; align-items:center; justify-content:center; color:#fff; height:30px; line-height:30px; }
#tool-body .btn-preview-result { cursor:pointer; }

@media(max-width:768px){
  #tool-body .upload-area { padding:20px; }
  #tool-body .output-item { flex-direction:column; align-items:flex-start; }
  #tool-body .output-left { width:100%; }
  #tool-body .output-name { max-width:60vw; }
}