/* GH Workflow Builder — Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #238636; --primary-light: #3FB950;
  --accent: #58A6FF; --accent-glow: rgba(88,166,255,0.15);
  --bg: #0D1117; --bg-card: rgba(255,255,255,0.04);
  --bg-glass: rgba(255,255,255,0.06); --border: rgba(255,255,255,0.10);
  --text: #E6EDF3; --text-dim: #8B949E; --text-muted: #6E7681;
  --radius: 12px; --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,0.3); --transition: 250ms ease;
}
html { font-size: 16px; } body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(13,17,23,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.header__inner { max-width: 900px; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.header__brand { display: flex; align-items: center; gap: 0.6rem; }
.header__icon { font-size: 1.3rem; } .header__title { font-size: 1.15rem; font-weight: 700; }
.header__actions { display: flex; gap: 0.5rem; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: none; cursor: pointer; font-family: var(--font); font-size: 0.85rem; font-weight: 500; border-radius: var(--radius-sm); transition: all var(--transition); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn--ghost { background: var(--bg-glass); color: var(--text-dim); padding: 0.5rem 0.85rem; border: 1px solid var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.btn--sm { font-size: 0.78rem; padding: 0.35rem 0.7rem; }

.main { max-width: 900px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.section-label { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.step-count { font-weight: 400; }

.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.4rem; margin-bottom: 0.75rem; }
.palette-item { padding: 0.5rem 0.7rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.palette-item:hover { border-color: var(--primary); background: rgba(35,134,54,0.08); }
.palette-cmd { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--primary-light); }
.palette-desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }

.preset-row { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.preset-btn { padding: 0.35rem 0.7rem; background: rgba(88,166,255,0.08); border: 1px solid rgba(88,166,255,0.2); border-radius: 999px; color: var(--accent); font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.preset-btn:hover { background: rgba(88,166,255,0.16); }

.steps-list { display: flex; flex-direction: column; gap: 0.5rem; }
.empty-msg { font-size: 0.85rem; color: var(--text-muted); text-align: center; padding: 2rem; }

.step-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; position: relative; }
.step-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.step-num { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.step-cmd { font-family: var(--mono); font-size: 0.82rem; font-weight: 600; color: var(--primary-light); }
.step-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; padding: 0.25rem; }
.step-remove:hover { color: #F85149; }
.step-params { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; }
@media (max-width: 500px) { .step-params { grid-template-columns: 1fr; } }
.param-group { display: flex; flex-direction: column; gap: 0.1rem; }
.param-label { font-size: 0.68rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; }
.param-input { padding: 0.3rem 0.5rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 0.78rem; }
.param-input:focus { outline: none; border-color: var(--primary); }

.step-connector { width: 2px; height: 16px; background: var(--border); margin: -0.25rem auto; }

.script-section { margin-top: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.script-section[hidden] { display: none; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.script-output { padding: 0.75rem; background: rgba(0,0,0,0.3); font-family: var(--mono); font-size: 0.78rem; overflow-x: auto; margin: 0; }
.script-output code { white-space: pre; color: var(--text); }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow); z-index: 500; animation: toastIn 300ms ease; }
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 600px) { .main { padding: 1rem; } }
