:root {
  --bg: #0b0d12; --bg-glow: radial-gradient(1200px 600px at 70% -10%, rgba(232,179,57,.07), transparent 60%),
                            radial-gradient(900px 500px at 0% 0%, rgba(96,165,250,.05), transparent 55%);
  --panel: #12151d; --panel2: #1a1f2b; --panel3: #222939;
  --border: #232a3a; --border-hi: #33405c;
  --text: #e8ebf2; --dim: #8b95a9;
  --brand: #e8b339; --brand2: #f5cd6b; --brand-grad: linear-gradient(135deg, #f0bd45, #e09a1f);
  --ok: #43d685; --warn: #f5b83d; --bad: #f26d6d; --info: #6aa8f7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.5);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.4), 0 14px 34px -10px rgba(0,0,0,.55);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: #2a3245 var(--bg); }
body {
  background: var(--bg); background-image: var(--bg-glow); background-attachment: fixed;
  color: var(--text); font: 15px/1.7 -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand2); text-decoration: none; }
a:hover { color: #ffd97e; }

/* ---------- 导航 ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px; padding: 13px 28px; flex-wrap: wrap;
  background: rgba(15, 18, 26, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
nav .logo {
  font-size: 20px; font-weight: 800; letter-spacing: 2px;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
nav .logo:hover { filter: brightness(1.15); }
nav a.nav-link { color: #c6cdda; font-size: 14px; padding: 4px 2px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
nav a.nav-link:hover { color: var(--text); border-color: var(--brand); }
nav .spacer { flex: 1; }
.badge-dot { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; text-align: center; font-weight: 600; }

main { max-width: 1100px; margin: 28px auto 40px; padding: 0 18px; }
h1 { font-size: 23px; font-weight: 700; letter-spacing: .3px; margin-bottom: 16px; }
h2 { font-size: 16px; font-weight: 600; margin: 20px 0 12px; color: #d7dce6; }
.muted { color: var(--dim); }
.small { font-size: 13px; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, #10131a 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.grid > .card { margin-bottom: 0; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.grid > a.card:hover { transform: translateY(-3px); border-color: var(--border-hi); box-shadow: var(--shadow-hover); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }

/* ---------- 徽章 ---------- */
.tag {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--dim);
}
.tag.ok { color: var(--ok); border-color: rgba(67,214,133,.4); background: rgba(67,214,133,.08); }
.tag.warn { color: var(--warn); border-color: rgba(245,184,61,.4); background: rgba(245,184,61,.08); }
.tag.bad { color: var(--bad); border-color: rgba(242,109,109,.4); background: rgba(242,109,109,.08); }
.tag.info { color: var(--info); border-color: rgba(106,168,247,.4); background: rgba(106,168,247,.08); }
.tag.muted { color: var(--dim); }
.coin { color: var(--brand); font-weight: 700; }
.coin::before { content: "◈ "; font-size: .85em; opacity: .8; }

/* 难度徽章:五档分色,一眼分辨 */
.lv { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; letter-spacing: .3px; border: 1px solid; }
.lv1 { color: #4ade80; border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.09); }
.lv2 { color: #34d3c8; border-color: rgba(52,211,200,.45); background: rgba(52,211,200,.09); }
.lv3 { color: #6aa8f7; border-color: rgba(106,168,247,.45); background: rgba(106,168,247,.09); }
.lv4 { color: #b78af7; border-color: rgba(183,138,247,.45); background: rgba(183,138,247,.09); }
.lv5 { color: #f7936a; border-color: rgba(247,147,106,.5); background: rgba(247,147,106,.1); }
.lv:not(.lv1):not(.lv2):not(.lv3):not(.lv4):not(.lv5) { color: var(--brand2); border-color: #57431a; background: #2b2413; }

/* ---------- 按钮与表单 ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: 9px; border: 1px solid var(--border-hi);
  background: var(--panel2); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: filter .12s, transform .08s, box-shadow .12s;
}
button:hover, .btn:hover { filter: brightness(1.12); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary {
  background: var(--brand-grad); border: none; color: #1a1508; font-weight: 700;
  box-shadow: 0 2px 10px -2px rgba(232,179,57,.45);
}
button.primary:hover, .btn.primary:hover { box-shadow: 0 4px 16px -2px rgba(232,179,57,.55); }
button.danger, .btn.danger { background: transparent; border-color: rgba(242,109,109,.5); color: var(--bad); }
button.danger:hover { background: rgba(242,109,109,.08); }

input, textarea, select {
  width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: #0e1118; color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,179,57,.15); }
textarea { min-height: 96px; resize: vertical; }
label { display: block; margin: 12px 0 5px; font-size: 13px; color: var(--dim); }
form.inline { display: inline; }
form.inline input, form.inline select { width: auto; }
input[type="checkbox"] { accent-color: var(--brand); }
input[type="file"] { border: 1px dashed var(--border-hi); background: transparent; font-size: 13px; color: var(--dim); }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--dim); font-weight: 500; font-size: 12.5px; text-transform: none; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td, table tr:hover td { background: rgba(255,255,255,.015); }

/* ---------- 留言板 ---------- */
.msgs { max-height: 500px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; }
.msg { max-width: 76%; padding: 9px 14px; border-radius: 14px 14px 14px 4px; background: var(--panel2); border: 1px solid var(--border); }
.msg.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: linear-gradient(180deg, #253352, #1f2a45); border-color: #31436b; }
.msg.sys { align-self: center; max-width: 90%; background: transparent; border: none; color: var(--dim); font-size: 12px; padding: 2px; }
.msg.sys::before { content: "— "; } .msg.sys::after { content: " —"; }
.msg img { max-width: 260px; border-radius: 10px; display: block; margin-top: 8px; border: 1px solid var(--border); }
.msg .meta { font-size: 11px; color: var(--dim); margin-bottom: 3px; }

/* ---------- 其他 ---------- */
.hero { text-align: center; padding: 48px 16px 36px; }
.hero .logo-big {
  font-size: 46px; font-weight: 900; letter-spacing: 6px;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notice {
  border-left: 3px solid var(--brand); padding: 10px 14px; margin: 12px 0;
  background: linear-gradient(90deg, rgba(232,179,57,.07), transparent 70%);
  border-radius: 0 10px 10px 0; font-size: 13px; color: #b8c0d0;
}
.pager { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }
.stat { text-align: center; padding: 18px 14px; }
.stat .num { font-size: 30px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .cap { font-size: 12px; color: var(--dim); margin-top: 2px; }
details summary { cursor: pointer; }
details summary:hover { color: var(--text); }
footer a { color: var(--dim); } footer a:hover { color: var(--brand2); }
::selection { background: rgba(232,179,57,.3); }

/* 空状态 */
.empty { text-align: center; padding: 46px 20px; color: var(--dim); }
.empty::before { content: "◈"; display: block; font-size: 30px; opacity: .3; margin-bottom: 10px; }

@media (max-width: 640px) {
  nav { gap: 12px; padding: 11px 14px; }
  main { margin-top: 18px; }
  .msg { max-width: 92%; }
}

/* ---------- 首页 Hero:人脉网络 ---------- */
.net-hero {
  position: relative; overflow: hidden; border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(232,179,57,.10), transparent 70%),
    linear-gradient(180deg, #131722, #0d1017);
  padding: 64px 24px 44px; margin-bottom: 22px; text-align: center;
  box-shadow: var(--shadow);
}
.net-hero.compact { padding: 40px 24px 30px; }
.net-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.net-hero-inner { position: relative; z-index: 1; }
.net-title {
  font-size: clamp(26px, 4.5vw, 40px); font-weight: 900; letter-spacing: 1px; margin-bottom: 14px;
  background: linear-gradient(135deg, #ffe9b0, #e8b339 55%, #d99a25);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(232,179,57,.15);
}
.net-sub { color: #aeb7c8; font-size: 15px; line-height: 1.9; }
.net-stats { margin-top: 26px; color: var(--dim); font-size: 13px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.net-stats b { color: var(--brand2); font-size: 16px; font-weight: 800; }
.net-stats .dot { opacity: .4; }

/* ---------- 三步玩法 ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 10px; }
.steps .step { position: relative; padding-top: 22px; margin-bottom: 0; overflow: hidden; }
.steps .step h2 { margin: 6px 0 8px; font-size: 17px; }
.step-no {
  position: absolute; top: -14px; right: 6px; font-size: 84px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, rgba(232,179,57,.16), rgba(232,179,57,.02));
  -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none;
}
