:root {
  --bg: #0f1115;
  --panel: #181b21;
  --text: #e4e6eb;
  --muted: #8b949e;
  --accent: #f59e0b;
  --border: #2f333a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
header h1 { margin: 0; color: var(--accent); }
header p { margin: 0.25rem 0 0; color: var(--muted); }

main { padding: 1.5rem; }
section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
section h2 { margin-top: 0; }

form {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
input, textarea, select, button {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
}
button {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
button:hover { filter: brightness(1.1); }
button.secondary { background: var(--border); color: var(--text); }

textarea { grid-column: 1 / -1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

ul { list-style: none; padding: 0; margin: 1rem 0 0; }
li {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
li.running { border-left: 4px solid #22c55e; }
li.stopped { border-left: 4px solid var(--muted); }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.actions button { padding: 0.4rem 0.7rem; font-size: 0.85rem; }

#log-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 400px;
  overflow: auto;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.hidden { display: none; }

li.selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.empty {
  color: var(--muted);
  justify-content: center;
  border-style: dashed;
}

a.strategy-name {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
a.strategy-name:hover {
  filter: brightness(1.2);
}
