#stremio-helper {
  --sh-bg: #fafaf9;
  --sh-panel: #ffffff;
  --sh-border: #e2e0db;
  --sh-text: #1c1b1a;
  --sh-muted: #6b6862;
  --sh-accent: #6A1B9A;
  --sh-success: #2e7d4f;
  --sh-error: #b3261e;
  --sh-warn: #a3690a;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  max-width: 520px;
  color: var(--sh-text);
}

#stremio-helper * { box-sizing: border-box; }

.sh-form { display: flex; flex-direction: column; gap: 1rem; }

.sh-field { display: flex; flex-direction: column; gap: 0.25rem; }
.sh-field label { font-size: 0.8rem; color: var(--sh-muted); }
.sh-field input {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--sh-border);
  border-radius: 4px;
  font: inherit;
  background: var(--sh-panel);
  width: 100%;
}
.sh-field input:focus-visible {
  outline: 2px solid var(--sh-accent);
  outline-offset: 1px;
}

.sh-group { display: flex; flex-direction: column; gap: 0.4rem; }
.sh-group-title { margin: 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sh-muted); }

.sh-actions { list-style: none; margin: 0; padding: 0; border: 1px solid var(--sh-border); border-radius: 6px; overflow: hidden; }
.sh-action {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--sh-panel);
  border-bottom: 1px solid var(--sh-border);
}
.sh-action:last-child { border-bottom: none; }
.sh-action.sh-dragging { opacity: 0.4; }
.sh-reorder { display: flex; flex-direction: column; gap: 0.15rem; flex-shrink: 0; margin-top: 0.1rem; }
.sh-reorder button {
  width: 1.6rem;
  height: 1.1rem;
  padding: 0;
  border: 1px solid var(--sh-border);
  background: var(--sh-panel);
  color: var(--sh-muted);
  font-size: 0.6rem;
  line-height: 1;
  border-radius: 3px;
  cursor: pointer;
}
.sh-reorder button:hover:not(:disabled) { background: var(--sh-bg); color: var(--sh-text); }
.sh-reorder button:disabled { opacity: 0.3; cursor: default; }
.sh-reorder button:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 1px; }
.sh-action label { display: flex; align-items: flex-start; gap: 0.5rem; flex: 1; cursor: pointer; font-size: 0.9rem; }
.sh-action label input { margin-top: 0.25rem; }
.sh-action-text { display: flex; flex-direction: column; gap: 0.15rem; }
.sh-action-desc { font-size: 0.75rem; color: var(--sh-text); opacity: 0.55; line-height: 1.4; }

.sh-run {
  padding: 0.65rem 1rem;
  background: var(--sh-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
.sh-run:disabled { opacity: 0.6; cursor: wait; }
.sh-run:focus-visible { outline: 2px solid var(--sh-text); outline-offset: 2px; }

.sh-log {
  display: none;
  max-height: 220px;
  overflow-y: auto;
  background: #111110;
  color: #d8d5cd;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.6;
}
.sh-log.sh-visible { display: block; }
.sh-log-line::before { content: "\203A  "; color: #6b6862; }
.sh-log-success { color: #6fcf97; }
.sh-log-error { color: #f28b82; }
.sh-log-warn { color: #f5c26b; }