:root {
  --bg: #0b0d12;
  --panel: #141821;
  --panel-2: #1b2130;
  --line: #262d3d;
  --text: #e6e9f0;
  --muted: #8b94a8;
  --accent: #6ee7b7;
  --accent-2: #60a5fa;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand span { color: var(--accent); }

nav { display: flex; gap: 6px; }
nav a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
nav a.active { background: var(--panel-2); color: var(--accent); }

main { max-width: 980px; margin: 0 auto; padding: 32px 28px 80px; }

h1 { font-size: 24px; margin: 0 0 6px; font-weight: 650; }
h2 { font-size: 17px; margin: 36px 0 12px; font-weight: 600; }
.sub { color: var(--muted); margin: 0 0 28px; font-size: 14px; }

.hint {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 13.5px;
  color: var(--muted);
}
.hint strong { color: var(--text); }
.hint code { font-family: var(--mono); color: var(--accent); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.card .row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.card .meta { flex: 1; min-width: 240px; }
.card .name { font-size: 16px; font-weight: 600; }
.card .pkg { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.card .facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.card .facts b { color: var(--text); font-weight: 500; font-family: var(--mono); }
.card .actions { display: flex; gap: 8px; align-items: center; }

button, .btn {
  font: inherit;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
button:hover:not(:disabled) { border-color: var(--accent-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); color: #06281c; border-color: var(--accent); font-weight: 600; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.ghost { background: transparent; }

.bar { height: 4px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-top: 12px; display: none; }
.bar.show { display: block; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.status { font-size: 12.5px; color: var(--muted); margin-top: 8px; font-family: var(--mono); }
.status.err { color: var(--danger); }
.status.ok { color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0 4px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
td code { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }

pre {
  background: #0e1117;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0;
}

.codeblock { position: relative; margin: 10px 0 18px; }
.codeblock .copy { position: absolute; top: 8px; right: 8px; padding: 4px 10px; font-size: 12px; }
.copied { color: var(--accent); border-color: var(--accent); }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.method { color: var(--accent); border-color: rgba(110,231,183,.35); }

footer { color: var(--muted); font-size: 12.5px; text-align: center; padding: 30px 0 10px; }
