:root {
  --bg: #0b0d12;
  --panel: #141821;
  --panel-2: #1a1f2b;
  --line: #262d3d;
  --text: #e7ebf5;
  --muted: #8b96ad;
  --accent: #6c8cff;
  --accent-2: #46d3a4;
  --warn: #f2b544;
  --bad: #ff6b6b;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(108, 140, 255, .18), transparent 70%),
    radial-gradient(760px 380px at 88% 4%, rgba(70, 211, 164, .12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.muted { color: var(--muted); font-size: 13px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, .72);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #223052, #131823);
  border: 1px solid #33405e;
  font-family: "Songti SC", serif;
  font-size: 19px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text small { color: var(--muted); font-size: 11px; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
}
.topnav a:hover { color: var(--text); background: var(--panel-2); }

.hero { padding: 64px 0 8px; position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.25;
  margin-bottom: 14px;
  background: linear-gradient(100deg, #fff, #a9bbff 65%, #7fe3c0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--muted); max-width: 640px; margin: 0 0 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}
.pill.ok { color: var(--accent-2); border-color: rgba(70, 211, 164, .35); }
.pill.bad { color: var(--bad); border-color: rgba(255, 107, 107, .35); }

.section { padding: 44px 0 8px; position: relative; z-index: 1; }
.section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 19px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.card {
  background: linear-gradient(170deg, var(--panel), #10141c);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: #38425a; transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: #1d2536; border: 1px solid #2c3852;
  font-size: 18px;
}
.card-title { font-size: 16px; font-weight: 600; }
.card-ver { font-size: 11px; color: var(--muted); }
.card-desc { color: var(--muted); font-size: 13.5px; min-height: 42px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; color: #9fb0d4;
  background: #18202e; border: 1px solid #263148;
  padding: 3px 8px; border-radius: 6px;
}
.card-foot { display: flex; gap: 8px; margin-top: auto; }

button, .btn {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 16px;
  transition: .16s;
}
button:hover, .btn:hover { border-color: #41506f; background: #222a3a; }
button.primary {
  background: linear-gradient(135deg, #5d7dff, #7b5cff);
  border: 1px solid #7a8fff;
  color: #fff;
  font-weight: 600;
}
button.primary:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.ghost { background: transparent; }

.drop {
  border: 1.5px dashed #33405c;
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  transition: .18s;
  cursor: pointer;
  background: #0f131b;
}
.drop.hot { border-color: var(--accent); background: #131a2a; color: var(--text); }
.drop b { display: block; color: var(--text); margin-bottom: 6px; }

.progress {
  height: 8px; border-radius: 999px; background: #1b2231; overflow: hidden;
}
.progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s ease;
}
.progress-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.logbox {
  background: #080a0f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  height: 240px;
  overflow: auto;
  font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #b7c3da;
  white-space: pre-wrap;
  word-break: break-all;
}

.result-box {
  border: 1px solid rgba(70, 211, 164, .35);
  background: rgba(70, 211, 164, .07);
  border-radius: 12px;
  padding: 14px 16px;
}
.result-box a { font-family: ui-monospace, monospace; word-break: break-all; }

.jobs { display: flex; flex-direction: column; gap: 10px; }
.job-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px;
  font-size: 13.5px;
}
.job-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.done { color: var(--accent-2); border-color: rgba(70, 211, 164, .4); }
.badge.failed { color: var(--bad); border-color: rgba(255, 107, 107, .4); }
.badge.running { color: var(--accent); border-color: rgba(108, 140, 255, .45); }
.empty { color: var(--muted); font-size: 13.5px; padding: 18px 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.steps li span {
  flex: 0 0 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  background: #1d2536; border: 1px solid #2c3852; font-size: 13px; color: #a9b8dc;
}
.steps b { font-size: 14.5px; }
.steps p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.foot {
  margin-top: 56px; padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px;
  position: relative; z-index: 1;
}

.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(5, 7, 11, .7);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(660px, 96vw);
  max-height: 88vh; overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  position: relative;
}
.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; padding: 0;
  border-radius: 9px; font-size: 18px; line-height: 1;
}
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal .field { margin: 16px 0; }
.modal label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.modal input, .modal textarea {
  width: 100%; font: inherit; color: var(--text);
  background: #0d1118; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.modal textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, monospace; font-size: 12.5px; }
.modal .row { display: flex; gap: 8px; margin-top: 10px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 12px; width: fit-content; margin: 12px auto; }
.qr img { width: 200px; height: 200px; display: block; }
.msg { margin-top: 10px; font-size: 13px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--accent-2); }

@media (max-width: 640px) {
  .hero { padding: 40px 0 0; }
  .brand-text small { display: none; }
  .topnav a { padding: 8px; font-size: 13px; }
  .grid { grid-template-columns: 1fr; }
}
