#tool-body {
  --c-primary: #00A3A3;
  --c-primary-light: rgba(0, 163, 163, 0.12);
  --c-border: #e8e8e8;
  --c-bg: #fff;
  --c-bg2: #f7f8fa;
  --c-text: #333;
  --c-text2: #666;
  --c-text3: #999;
  --c-danger: #e74c3c;
  --c-success: #27ae60;
  --c-warning: #f39c12;
}
.theme-dark-mode #tool-body {
  --c-border: #3a3a3a;
  --c-bg: #1e1e1e;
  --c-bg2: #252525;
  --c-text: #e0e0e0;
  --c-text2: #aaa;
  --c-text3: #666;
}

#tool-body .ts-tip {
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-text2);
  margin-bottom: 16px;
  line-height: 1.6;
  background: var(--c-bg2);
}
#tool-body .ts-tip-warn {
  background: rgba(243,156,18,0.08);
  border-color: rgba(243,156,18,0.35);
  color: #b7770d;
}
#tool-body .ts-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
#tool-body .ts-input-row input[type=text] {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#tool-body .ts-input-row input[type=text]:focus { border-color: var(--c-primary); }
#tool-body .ts-input-row input[type=text]::placeholder { color: var(--c-text3); }
#tool-body .ts-btn {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
#tool-body .ts-btn:hover { opacity: 0.85; }
#tool-body .ts-btn-primary { background: var(--c-primary); color: #fff; }
#tool-body .ts-btn-default {
  background: var(--c-bg2);
  color: var(--c-text2);
  border: 1px solid var(--c-border);
}
#tool-body .ts-opts-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
#tool-body .ts-opts-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text2);
  cursor: pointer;
  user-select: none;
}
#tool-body .ts-whitelist-wrap { margin-bottom: 16px; }
#tool-body .ts-whitelist-toggle {
  font-size: 13px;
  color: var(--c-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#tool-body .ts-whitelist-panel {
  display: none;
  margin-top: 8px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 12px;
  background: var(--c-bg2);
}
#tool-body .ts-whitelist-panel.open { display: block; }
#tool-body .ts-wl-add-row { display: flex; gap: 8px; margin-bottom: 10px; }
#tool-body .ts-wl-add-row input[type=text] {
  flex: 1; height: 32px; padding: 0 10px;
  border: 1px solid var(--c-border); border-radius: 5px;
  background: var(--c-bg); color: var(--c-text); font-size: 13px; outline: none;
  box-sizing: border-box;
}
#tool-body .ts-wl-add-row input[type=text]:focus { border-color: var(--c-primary); }
#tool-body .ts-wl-add-row .ts-btn { height: 32px; padding: 0 14px; font-size: 13px; }
#tool-body .ts-wl-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 20px; }
#tool-body .ts-wl-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--c-primary-light); color: var(--c-primary);
  border-radius: 4px; padding: 2px 8px; font-size: 12px;
}
#tool-body .ts-wl-tag .ts-wl-del {
  cursor: pointer; font-size: 15px; line-height: 1; opacity: 0.7;
}
#tool-body .ts-wl-tag .ts-wl-del:hover { opacity: 1; }
#tool-body .ts-wl-hint { font-size: 12px; color: var(--c-text3); margin-top: 8px; }
#tool-body .ts-player-wrap {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tool-body .ts-player-wrap video {
  width: 100%;
  max-height: 500px;
  display: block;
  background: #000;
}
#tool-body .ts-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #777; gap: 10px; font-size: 14px;
}
#tool-body .ts-ph i { font-size: 48px; color: #555; }
#tool-body .ts-ph.hidden { display: none; }
#tool-body .ts-statusbar {
  font-size: 13px; color: var(--c-text3);
  margin-bottom: 10px; min-height: 20px;
}
#tool-body .ts-statusbar.err { color: var(--c-danger); }
#tool-body .ts-statusbar.ok  { color: var(--c-success); }
#tool-body .ts-statusbar.loading { color: var(--c-primary); }
#tool-body .ts-stream-info {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px; color: var(--c-text2);
  margin-bottom: 14px;
  display: none; line-height: 1.8;
}
#tool-body .ts-stream-info.show { display: block; }
#tool-body .ts-stream-info b { color: var(--c-text); font-weight: 600; }
#tool-body .ts-hint {
  font-size: 12px; color: var(--c-text3);
  margin-bottom: 16px; line-height: 1.7;
}
#tool-body .ts-hint code {
  background: var(--c-bg2); border: 1px solid var(--c-border);
  border-radius: 3px; padding: 1px 5px; font-size: 12px; color: var(--c-text2);
}

#tool-body .layui-input-wrap {
  flex: 1;
}
#tool-body .wl-close {
  float: right;
  cursor: pointer;
  color: var(--wl-notice-c, #7d5a00);
  opacity: .65;
  transition: opacity .2s;
  font-size: 1em;
  font-weight: bolder;
}
#tool-body .wl-close:hover { opacity: 1; }
#tool-body .ts-stream-info {
  display: none;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--c-primary-light);
  border: 1px solid rgba(0, 163, 163, 0.2);
  border-radius: 6px;
  font-size: 13px;
  color: var(--c-text2);
  line-height: 2;
}
#tool-body .ts-stream-info.show { display: block; }
#tool-body .ts-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
#tool-body .ts-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
#tool-body .ts-info-label {
  color: var(--c-text3);
  font-size: 12px;
}
#tool-body .ts-info-value {
  color: var(--c-text);
  font-size: 13px;
  font-weight: 500;
}