#tool-body {
  --primary: #16baaa;
  --primary-light: #e3f9f5;
  /*   --primary: #01aaed;
  --primary-light: #def5ff; */
  --danger: #ff5722;
  --warn: #ffb800;
  --card-bg: #ffffff;
  --card-border: #eee;
  --bg-muted: #f8f9fa;
  --text-main: #333;
  --text-muted: #999;
  --dark-item: #2b2d36;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.theme-dark-mode #tool-body {
  --card-bg: #2b2b2b;
  --card-border: #444;
  --bg-muted: #333;
  --text-main: #ddd;
  --text-muted: #888;
}

/* 上传区 */
#tool-body .upload-area {
  padding: 40px;
  text-align: center;
  border-radius: 10px;
  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; color: var(--text-main); }
#tool-body .upload-area p { color: var(--text-muted); font-size: 14px; }

/* section title */
#tool-body .section-title {
  margin: 25px 0 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
}
#tool-body .clear-btn { font-size: 14px; color: var(--danger); cursor: pointer; font-weight: normal; }

/* 文件列表 */
#tool-body .audio-item {
  background: var(--dark-item);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}
#tool-body .play-btn {
  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;
  cursor: pointer; margin-right: 15px; flex-shrink: 0; transition: 0.2s;
}
#tool-body .play-btn:hover { background: var(--primary); transform: scale(1.1); }
#tool-body .play-btn i { font-size: 20px; color: #fff; }
#tool-body .audio-info { flex: 1; min-width: 0; margin-right: 20px; pointer-events: none; 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-bottom: 5px; }
#tool-body .badge-ext { background: var(--warn); color: #333; padding: 0 4px; border-radius: 2px; font-size: 10px; margin-left: 5px; }
#tool-body .del-btn { z-index: 1; margin-left: 15px; color: var(--danger); cursor: pointer; font-size: 20px; opacity: 0.6; transition: 0.2s; padding: 10px; }
#tool-body .del-btn:hover { opacity: 1; transform: scale(1.1); }
#tool-body .waveform-box { height: 50px; width: 100%; position: absolute; top: 0; left: 0; opacity: 0.4; }
#tool-body .convert-progress { width: 100%; height: 3px; background: #555; margin-top: 8px; border-radius: 2px; overflow: hidden; display: none; }
#tool-body .convert-progress-bar { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; }

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

/* 参数滑块区 */
#tool-body .param-row {
  margin-bottom: 22px;
}
#tool-body .param-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-main);
}
#tool-body .param-header .param-label { font-weight: 500; }
#tool-body .param-header .param-val {
  font-weight: bold;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 13px;
}
.theme-dark-mode #tool-body .param-header .param-val { background: #1a3a37; }
#tool-body .param-desc { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
#tool-body .slider-wrap { margin: 10px 8px 0; }

/* 底部操作栏 */
#tool-body .action-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px dashed var(--card-border);
  margin-top: 10px;
  flex-wrap: wrap;
}
.theme-dark-mode #tool-body .action-bar { border-color: #444; }
#tool-body .format-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-muted);
  padding: 6px 15px;
  border-radius: 6px;
}
#tool-body .format-picker label { font-size: 12px; color: var(--text-muted); font-weight: bold; }
#tool-body .simple-select {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  min-width: 90px;
}
.theme-dark-mode #tool-body .simple-select { color: #ddd; }
.theme-dark-mode #tool-body .simple-select option { background: #333; }
#tool-body #processBtn {
  flex: 1;
  min-width: 200px;
  background-color: var(--primary);
  border: none;
  transition: 0.3s;
}

/* 高级选项 */
#tool-body .adv-toggle { cursor: pointer; font-size: 13px; color: var(--text-muted); padding: 5px 10px; border-radius: 4px; user-select: none; }
#tool-body .adv-toggle:hover { background: var(--bg-muted); color: var(--primary); }
#tool-body .advanced-panel {
  background: var(--bg-muted);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 15px;
  margin-top: 15px;
}
.theme-dark-mode #tool-body .advanced-panel { border-color: #444; }
#tool-body .adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
#tool-body .adv-item { display: flex; flex-direction: column; gap: 5px; }
#tool-body .adv-item label { font-size: 12px; color: var(--text-muted); }
#tool-body .adv-item select { padding: 6px; border: 1px solid var(--card-border); border-radius: 4px; font-size: 13px; outline: none; background: var(--card-bg); color: var(--text-main); }
.theme-dark-mode #tool-body .adv-item select { border-color: #555; }
#tool-body .adv-item.checkbox-item { flex-direction: row; align-items: center; justify-content: flex-start; padding-top: 20px; }

/* 输出区 */
#tool-body .output-area { display: none; margin-top: 35px; border-top: 1px solid var(--card-border); padding-top: 20px; }
/* 结果卡片 */
#tool-body .output-item {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--card-bg);
}
#tool-body .output-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
#tool-body .output-name { font-weight: bold; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); }
#tool-body .tag-ext { background: #fff8e1; color: #d6a306; border: 1px solid #ffeebb; padding: 2px 8px; border-radius: 4px; font-size: 12px; flex-shrink: 0; }
.theme-dark-mode #tool-body .tag-ext { background: #ffefb9; border: 0; }

/* 统计数据行 */
#tool-body .stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
#tool-body .stat-card {
  flex: 1;
  min-width: 110px;
  background: var(--bg-muted);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#tool-body .stat-label { font-size: 11px; color: var(--text-muted); }
#tool-body .stat-value { font-size: 16px; font-weight: bold; color: var(--text-main); }
#tool-body .stat-value.highlight { color: var(--primary); }
#tool-body .stat-value.danger { color: #ff5722; }
#tool-body .stat-sub { font-size: 11px; color: var(--text-muted); }
#tool-body .stat-tip-icon { font-size: 12px; color: var(--text-muted); cursor: help; opacity: 0.7; vertical-align: middle; }
#tool-body .stat-tip-icon:hover { opacity: 1; color: var(--primary); }

/* 播放器行 */
#tool-body .output-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#tool-body .player-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
#tool-body .output-player-row a.layui-btn { display: flex; align-items: center; justify-content: center; color: #fff; height: 30px; line-height: 30px; flex-shrink: 0; }
#tool-body audio { height: 32px; outline: none; flex: 1; min-width: 120px; max-width: 260px; border-radius: 20px; }
.theme-dark-mode #tool-body audio { filter: invert(0.85); }

/* 信息提示块 */
#tool-body .tip-block {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 18px;
  line-height: 1.7;
}
.theme-dark-mode #tool-body .tip-block { background: #333; }

/* 响应式 */
@media screen and (max-width: 768px) {
  #tool-body .upload-area { padding: 25px 15px; }
  #tool-body .stat-card { min-width: calc(50% - 5px); }
  /*   #tool-body .output-player-row { flex-direction: column; align-items: flex-start; }
  #tool-body audio { width: 100%; max-width: none; height: 40px; } */
}