:root {
  --bg: #0f131a;
  --panel: #171e29;
  --panel2: #1d2634;
  --border: #2a3547;
  --text: #e7ecf3;
  --muted: #93a1b5;
  --accent: #6ea8fe;
  --gold: #ffd166;
  --green: #7dd87d;
  --purple: #c39bff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, "Microsoft YaHei", sans-serif; font-size: 15px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex; align-items: center; gap: 18px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 12px 24px; position: sticky; top: 0; z-index: 10;
}
.nav .brand { font-weight: 700; font-size: 17px; color: var(--gold); }
.nav a { color: var(--muted); }
.nav a.active, .nav a:hover { color: var(--text); }
.nav .spacer { flex: 1; }
.nav input {
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 10px; width: 180px; outline: none;
}
.container { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 21px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; color: var(--muted); margin: 26px 0 10px; }
.status-ok { color: var(--green); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 16px 0; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
}
.card .num { font-size: 26px; font-weight: 700; color: var(--accent); }
.card .label { color: var(--muted); font-size: 13px; margin-top: 2px; }

.grid2 { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tr:last-child td { border-bottom: none; }

.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.feed li { padding: 8px 6px; border-bottom: 1px dashed var(--border); font-size: 14px; }
.feed li:last-child { border-bottom: none; }
.feed .time { color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tabs button {
  background: var(--panel); color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 14px;
}
.tabs button.active { background: var(--accent); color: #0b1220; border-color: var(--accent); font-weight: 600; }

.tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ach {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start;
}
.ach.locked-nobody { opacity: 0.62; }
.ach .icon { font-size: 26px; line-height: 1.2; }
.ach .icon.challenge { filter: drop-shadow(0 0 6px var(--purple)); }
.ach .icon.goal { filter: drop-shadow(0 0 6px var(--accent)); }
.ach .t { font-weight: 600; }
.ach .t.challenge { color: var(--purple); }
.ach .t.goal { color: var(--accent); }
.ach .d { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ach .c { color: var(--green); font-size: 12px; margin-top: 5px; }
.ach.hidden-ach { border-style: dashed; }

.bar { background: var(--panel2); border-radius: 999px; height: 8px; overflow: hidden; margin-top: 8px; }
.bar > div { background: var(--green); height: 100%; }

.pct-ring { font-size: 40px; font-weight: 800; color: var(--gold); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px dashed var(--border); font-size: 14px; }
.timeline li:last-child { border-bottom: none; }
.timeline .time { color: var(--muted); }

.btn {
  display: inline-block; background: var(--accent); color: #0b1220; font-weight: 600;
  border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 14px;
}
.btn.gray { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
input.field, select.field {
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; outline: none; width: 100%;
}
label.field-label { display: block; color: var(--muted); font-size: 13px; margin: 12px 0 4px; }
.msg { margin: 10px 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; display: none; }
.msg.ok { display: block; background: rgba(125,216,125,.12); color: var(--green); }
.msg.err { display: block; background: rgba(255,107,107,.12); color: #ff6b6b; }
code.token { background: var(--panel2); padding: 2px 8px; border-radius: 6px; font-size: 18px; letter-spacing: 4px; color: var(--gold); }
.mcicon { width: 30px; height: 30px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.mcicon.unlocked { filter: drop-shadow(0 0 5px rgba(255, 209, 102, .8)); }
.mcicon.locked { filter: grayscale(1) brightness(.55); }
.mcicon.sm { width: 20px; height: 20px; }
footer { color: var(--muted); font-size: 12px; margin-top: 40px; text-align: center; }
