:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2f3a;
  --text: #e8eaed;
  --muted: #8a91a0;
  --accent: #e63946;
  --accent-dim: #7a1f26;
  --ok: #3ddc84;
  --err: #ff5c5c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.wrap {
  width: 100%;
  max-width: 640px;
}

.version-badge {
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 10;
}
.version-badge .sep { opacity: 0.5; margin: 0 2px; }

h1 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.banner {
  background: #3a2a12;
  border: 1px solid #6b4c1e;
  color: #f0c274;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.banner code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; }

form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

#url {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d0f14;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 14px;
}
#url:focus { outline: none; border-color: var(--accent); }

.row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d0f14;
  color: var(--text);
}

button {
  margin-left: auto;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover { background: #c62d3a; }
button:disabled { background: var(--accent-dim); cursor: not-allowed; }

#jobs {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.job-title {
  font-size: 0.9rem;
  margin-bottom: 8px;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.job-title .meta {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.bar-track {
  width: 100%;
  height: 10px;
  background: #0d0f14;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ff8a5b);
  transition: width 0.2s ease;
}

.job.done .bar-fill { background: var(--ok); }
.job.error .bar-fill { background: var(--err); }

.job-footer {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-footer a {
  color: var(--ok);
  text-decoration: none;
  font-weight: 600;
}
.job-footer a:hover { text-decoration: underline; }

.error-text { color: var(--err); }
