/* VidForge — a private workshop console.
   Direction: a dark forge. Cool graphite surfaces, one molten-ember accent
   that only appears on the thing you're about to act on. Monospace for
   data/labels (this is a tool, not a brochure), humanist sans for reading. */

:root {
  --bg:        #14161a;
  --panel:     #1b1e24;
  --panel-2:   #21252c;
  --line:      #2c313a;
  --track:     #2c313a;
  --ink:       #e7e9ee;
  --ink-dim:   #9aa1ad;
  --ink-faint: #6b7280;
  --accent:    #ff6a2b;   /* molten ember */
  --accent-2:  #ffab4a;   /* spark */
  --ok:        #3ecf8e;
  --err:       #ff5d5d;
  --radius:    14px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, #1d2128 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: rgba(20,22,26,.82);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.brand {
  font-family: var(--mono);
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  font-size: 14px; display: flex; align-items: center; gap: 10px;
}
.spark {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px 1px rgba(255,106,43,.6);
}
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  color: var(--ink-dim); text-decoration: none;
  font-size: 13px; padding: 7px 12px; border-radius: 8px;
  font-family: var(--mono); letter-spacing: .02em;
}
.topbar nav a:hover { color: var(--ink); background: var(--panel-2); }
.topbar nav a.muted { color: var(--ink-faint); }

/* ---- layout ---- */
.wrap { max-width: 760px; margin: 0 auto; padding: 30px 20px 80px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 18px;
}
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; }
.sub { color: var(--ink-dim); margin: 0 0 20px; font-size: 14px; }
.lbl { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-dim);
       text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }

/* ---- login ---- */
.login { max-width: 380px; margin: 8vh auto 0; }
.login label { display: block; margin-bottom: 16px; font-size: 13px; color: var(--ink-dim); }
.login input {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-size: 15px; font-family: var(--mono);
}
.login input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---- dropzone ---- */
.drop {
  display: block; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: var(--panel-2);
  padding: 38px 20px; text-align: center;
  transition: border-color .15s, background .15s;
  margin-bottom: 26px;
}
.drop:hover, .drop.over { border-color: var(--accent); background: #23262d; }
.drop.has { border-style: solid; border-color: var(--ok); }
.drop-icon {
  width: 42px; height: 42px; margin: 0 auto 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative; box-shadow: 0 6px 22px -6px rgba(255,106,43,.7);
}
.drop-icon::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-bottom: 13px solid #14161a; transform: translateY(-1px);
}
.drop-text { font-weight: 500; margin-bottom: 4px; word-break: break-all; }
.drop-hint { color: var(--ink-faint); font-size: 12.5px; font-family: var(--mono); }

/* ---- range / count ---- */
.field { margin-bottom: 24px; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.field-top span { font-family: var(--mono); font-size: 12px; text-transform: uppercase;
                  letter-spacing: .06em; color: var(--ink-dim); }
#countOut {
  font-family: var(--mono); font-size: 30px; font-weight: 600;
  color: var(--accent-2); line-height: 1;
}
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: 6px; background: var(--track); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--accent-2), var(--accent));
  cursor: pointer; border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px -2px rgba(255,106,43,.7);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--panel);
  background: var(--accent); cursor: pointer;
}
.ticks { display: flex; justify-content: space-between; margin-top: 8px;
         font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: 13px; color: var(--ink-dim);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 14px; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--accent); }

/* ---- segmented ---- */
.row { display: flex; gap: 16px; }
.half { flex: 1; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line);
       border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  font-family: var(--mono); font-size: 13px; color: var(--ink-dim);
  background: transparent; border: 0; border-radius: 7px; padding: 7px 14px; cursor: pointer;
}
.seg button.on { background: var(--accent); color: #14161a; font-weight: 600; }

/* ---- buttons ---- */
.btn {
  display: inline-block; font-family: var(--mono); font-size: 13px;
  color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 18px; cursor: pointer; text-decoration: none;
  transition: transform .05s, background .15s;
}
.btn:hover { background: #262b33; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2));
               color: #14161a; font-weight: 700; border: 0; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { width: 100%; padding: 15px; font-size: 15px; margin-top: 8px; }
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn.tiny  { padding: 4px 10px; font-size: 11px; }
.btn:disabled { opacity: .6; cursor: default; }

.fineprint { color: var(--ink-faint); font-size: 12.5px; margin-top: 14px; }

/* ---- alerts ---- */
.alert { border-radius: 10px; padding: 12px 14px; font-size: 13.5px;
         background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-dim); }
.alert.err { background: rgba(255,93,93,.08); border-color: rgba(255,93,93,.4); color: #ff9b9b; }

/* ---- job steps ---- */
.job-head { display: flex; align-items: center; justify-content: space-between; }
.pill { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
        padding: 4px 10px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line);
        color: var(--ink-dim); }
.pill.done { color: var(--ok); border-color: rgba(62,207,142,.4); background: rgba(62,207,142,.08); }
.pill.failed { color: var(--err); border-color: rgba(255,93,93,.4); background: rgba(255,93,93,.08); }
.pill.analyzing, .pill.prompting { color: var(--accent-2); border-color: rgba(255,171,74,.4); }

.steps { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 2px; }
.steps li {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-faint);
  padding: 12px 16px; border-radius: 10px; position: relative; padding-left: 42px;
}
.steps li::before {
  content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line);
}
.steps li.active { color: var(--ink); background: var(--panel-2); }
.steps li.active::before { border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,106,43,.15); animation: pulse 1.2s infinite; }
.steps li.done { color: var(--ink-dim); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(255,106,43,.18); }
                   50% { box-shadow: 0 0 0 7px rgba(255,106,43,.05); } }

/* ---- table ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase;
          letter-spacing: .06em; color: var(--ink-faint); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: var(--panel-2); }
.muted { color: var(--ink-faint); }

/* ---- analysis block ---- */
.analysis { margin-top: 8px; }
.a-row { padding: 12px 0; border-top: 1px solid var(--line); }
.a-row span { font-family: var(--mono); font-size: 11px; text-transform: uppercase;
              letter-spacing: .06em; color: var(--ink-faint); display: block; margin-bottom: 4px; }
.a-row p { margin: 0; }
.a-grid { display: flex; gap: 26px; padding: 14px 0; border-top: 1px solid var(--line); }
.a-grid span { font-family: var(--mono); font-size: 11px; text-transform: uppercase;
               letter-spacing: .06em; color: var(--ink-faint); display: block; }
.a-grid b { font-size: 18px; }
.unc { margin: 6px 0 0; padding-left: 18px; color: var(--ink-dim); font-size: 13px; }

/* ---- prompts ---- */
.prompts { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.prompt { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.p-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.p-seq { font-family: var(--mono); font-size: 12px; color: #14161a; background: var(--accent-2);
         width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; }
.p-label { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); flex: 1; }
.p-text { margin: 0; font-size: 14px; line-height: 1.5; }
.p-neg { margin: 8px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

.empty { text-align: center; padding: 30px 0; color: var(--ink-dim); }
.empty p { margin-bottom: 16px; }

@media (max-width: 560px) {
  .row { flex-direction: column; }
  .wrap { padding: 20px 14px 60px; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
