#tool-body {
  --sr-primary: #16baaa;
  --sr-primary-soft: rgba(22, 186, 170, 0.12);
  --sr-danger: #e54545;
  --sr-card: #fff;
  --sr-panel: #f4f6f8;
  --sr-border: #e6e8eb;
  --sr-text: #333;
  --sr-muted: #8a8f98;
  --sr-tip-bg: #e8f8f6;
  --sr-tip-border: #b7e6e1;
  --sr-tip-text: #0d7a70;
  --sr-stage: #141414;
  --sr-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  --sr-mask: rgba(255, 255, 255, 0.72);
  max-width: 760px;
  margin: 0 auto;
  padding-top: 8px;
  padding-bottom: 28px;
  color: var(--sr-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: relative;
}
.theme-dark-mode #tool-body {
  --sr-primary-soft: rgba(22, 186, 170, 0.16);
  --sr-card: #2b2b2b;
  --sr-panel: #34363a;
  --sr-border: #454545;
  --sr-text: #eee;
  --sr-muted: #aaa;
  --sr-tip-bg: #1a3330;
  --sr-tip-border: #245752;
  --sr-tip-text: #7dddd4;
  --sr-stage: #0c0c0c;
  --sr-shadow: none;
  --sr-mask: rgba(27, 27, 29, 0.72);
}

#tool-body .sr-card {
  background: var(--sr-card);
  border: 1px solid var(--sr-border);
  border-radius: 12px;
  box-shadow: var(--sr-shadow);
  padding: 22px 22px 20px;
}
#tool-body .sr-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sr-muted);
  margin-bottom: 8px;
}
#tool-body .sr-q-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
#tool-body .sr-q {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: var(--sr-text);
  background: var(--sr-panel);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
}
#tool-body .sr-q b {
  display: block;
  font-size: 15px;
}
#tool-body .sr-q small {
  display: block;
  margin-top: 2px;
  color: var(--sr-muted);
  font-size: 12px;
}
#tool-body .sr-q.is-active {
  border-color: var(--sr-primary);
  background: var(--sr-primary-soft);
  color: var(--sr-primary);
}
#tool-body .sr-q.is-active small { color: var(--sr-primary); }

#tool-body .sr-switches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
#tool-body .sr-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--sr-panel);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
#tool-body .sr-switch > input { display: none; }
#tool-body .sr-switch .layui-form-switch {
  margin-top: 0;
  float: none;
}
#tool-body #srQuality.is-locked,
#tool-body #srOptions.is-locked {
  opacity: 0.5;
  pointer-events: none;
}

#tool-body .sr-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--sr-tip-bg);
  border: 1px solid var(--sr-tip-border);
  color: var(--sr-tip-text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 18px;
}
#tool-body .sr-tip i { margin-top: 3px; flex-shrink: 0; }
#tool-body .sr-tip p { margin: 0; }
#tool-body .sr-tip p + p { margin-top: 4px; }

#tool-body .sr-start {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--sr-text);
  cursor: pointer;
  font: inherit;
  padding: 4px 0 2px;
}
#tool-body .sr-start-dot {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--sr-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(229, 69, 69, 0.28);
}
#tool-body .sr-start-dot span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  display: block;
}
#tool-body .sr-start-label {
  font-size: 16px;
  font-weight: 600;
}
#tool-body .sr-start:hover .sr-start-dot { background: #d33b3b; }
#tool-body .sr-start:focus-visible { outline: 3px solid var(--sr-primary); outline-offset: 4px; border-radius: 12px; }
#tool-body .sr-start.is-busy { cursor: default; }
#tool-body .sr-start.is-busy .sr-start-dot { opacity: 0.55; box-shadow: none; }

#tool-body .sr-preview-wrap {
  position: relative;
  background: var(--sr-stage);
  border-radius: 10px;
  overflow: hidden;
  min-height: 200px;
}
#tool-body .sr-preview-wrap video {
  display: block;
  width: 100%;
  max-height: 380px;
  background: #000;
  object-fit: contain;
}
#tool-body .sr-count {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.45);
}
#tool-body .sr-count b {
  font-size: 72px;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
#tool-body .sr-count #srCancel,
.theme-dark-mode #tool-body .sr-count #srCancel {
  background: #fff;
  color: #222;
  border-color: #fff;
}
#tool-body .sr-count #srCancel:hover,
.theme-dark-mode #tool-body .sr-count #srCancel:hover {
  background: #f3f3f3;
  color: #222;
  border-color: #f3f3f3;
}
#tool-body .sr-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 12px;
  font-variant-numeric: tabular-nums;
}
#tool-body .sr-timer {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
#tool-body .sr-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sr-danger);
  opacity: 0.35;
}
#tool-body .sr-dot.is-live { opacity: 1; animation: sr-pulse 1.2s ease infinite; }
@keyframes sr-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
#tool-body .sr-surface,
#tool-body .sr-badge {
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--sr-panel);
  color: var(--sr-muted);
}
#tool-body .sr-badge {
  background: rgba(229, 69, 69, 0.12);
  color: var(--sr-danger);
}
#tool-body .sr-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
#tool-body .sr-actions .layui-btn { margin: 0; min-width: 120px; }
#tool-body #srDownload { background: var(--sr-primary); }
#tool-body #srStop { background: var(--sr-danger); }
#tool-body .sr-hint {
  margin: 12px 0 0;
  text-align: center;
  color: var(--sr-muted);
  font-size: 13px;
  line-height: 1.6;
}
#tool-body .sr-hint a {
  color: var(--sr-primary);
  font-weight: 600;
  text-decoration: underline;
}
#tool-body .sr-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin: 12px 0 14px;
  font-size: 13px;
}
#tool-body .sr-file-name {
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
#tool-body .sr-file-meta { color: var(--sr-muted); flex-shrink: 0; }

#tool-body .sr-unsupported {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  text-align: center;
}
#tool-body .sr-unsupported-backdrop {
  position: absolute;
  inset: 0;
  background: var(--sr-mask);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
#tool-body .sr-unsupported-panel {
  position: relative;
  z-index: 1;
  max-width: 360px;
  width: 100%;
  padding: 28px 22px;
  border-radius: 12px;
  background: var(--sr-card);
  box-shadow: var(--sr-shadow);
  border: 1px solid var(--sr-border);
}
#tool-body .sr-unsupported i {
  font-size: 40px;
  color: var(--sr-primary);
  display: block;
  margin-bottom: 12px;
}
#tool-body .sr-unsupported p {
  margin: 0;
  line-height: 1.7;
  color: var(--sr-text);
}

@media (max-width: 640px) {
  #tool-body .sr-card { padding: 16px; }
  #tool-body .sr-switches { grid-template-columns: 1fr; }
  #tool-body .sr-timer { font-size: 24px; }
  #tool-body .sr-count b { font-size: 56px; }
  #tool-body .sr-preview-wrap video { max-height: 220px; }
}