:root {
  --bg: #0d0d12;
  --panel: #15151d;
  --panel-2: #1c1c27;
  --border: #262634;
  --text: #e8e8f0;
  --muted: #8b8ba3;
  --accent: #9b6bff;
  --accent-soft: rgba(155, 107, 255, 0.14);
  --green: #3ddc97;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 13, 18, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.server-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; }
.hero { padding: 56px 0 28px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; margin: 0 0 8px; }
.hero h1 { font-size: 40px; margin: 0 0 8px; letter-spacing: -0.02em; }
.hero p { margin: 0; max-width: 680px; }
.build-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pill {
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: all .15s;
}
.pill:hover { border-color: var(--accent); }
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.section-nav {
  position: sticky; top: 60px; z-index: 10;
  display: flex; gap: 4px; overflow-x: auto;
  padding: 10px 0; margin-bottom: 16px;
  background: var(--bg);
}
.section-nav a {
  font-size: 14px; color: var(--muted); padding: 6px 12px; border-radius: 8px; white-space: nowrap;
}
.section-nav a:hover, .section-nav a.active { color: var(--text); background: var(--panel-2); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card h2 { font-size: 20px; margin: 0; }
.card-actions { display: flex; gap: 8px; }
.btn {
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.notes { margin-top: 16px; }
.notes:empty { display: none; }
.note {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; margin-top: 8px;
}
.trees { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.tree { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.tree-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.tree-name { font-weight: 600; }
.tree-points { font-size: 22px; font-weight: 700; color: var(--accent); }
.tree.zero .tree-points { color: var(--muted); }
.tree-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.talent {
  position: relative; aspect-ratio: 1; border-radius: 10px;
  background: #101018; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; text-align: center; padding: 4px; line-height: 1.2;
  color: var(--muted); cursor: default; transition: transform .12s;
  overflow: hidden;
}
.talent img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: grayscale(1); }
.talent .t-label { position: relative; }
.talent.has-icon { align-items: flex-end; padding: 0; }
.talent.has-icon .t-label {
  width: 100%; padding: 14px 3px 3px; font-size: 10.5px;
  background: linear-gradient(transparent, rgba(0,0,0,.9) 55%);
  text-shadow: 0 1px 2px #000;
}
.talent.has-icon .rank { top: 3px; bottom: auto; }
.talent:hover { transform: translateY(-2px); }
.talent.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.talent.on img { opacity: .9; filter: none; }
.talent.max { box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(155,107,255,.35); }
.talent .rank {
  position: absolute; right: 3px; bottom: 3px; font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,.75); padding: 0 4px; border-radius: 4px; color: var(--muted);
}
.talent.on .rank { color: var(--green); }
.gear-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.gear-tabs .pill { padding: 5px 12px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.gear-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gear-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.gear-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.gear-table tr:last-child td { border-bottom: none; }
.gear-table tr:hover td { background: var(--panel-2); }
.slot { color: var(--muted); white-space: nowrap; }
.item-name { font-weight: 600; }
.q-epic { color: #c27bff; } .q-rare { color: #4ea8ff; } .q-legendary { color: #ff9a3c; } .q-uncommon { color: #3ddc97; }
.alt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-list { list-style: none; padding: 0; margin: 0; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.stat-list li {
  counter-increment: s; display: flex; align-items: center; gap: 14px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
}
.stat-list li::before {
  content: counter(s); width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-name { font-weight: 600; }
.stat-desc { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; }
.rotation { display: grid; gap: 16px; }
.rot-group h3 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 500; }
.rot-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rot-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--panel-2); border-radius: 10px; padding: 10px 14px; border: 1px solid var(--border); }
.rot-steps .num { color: var(--accent); font-weight: 700; min-width: 20px; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.code-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.code-card-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; gap: 8px; }
.code-card-head .title { font-weight: 600; font-size: 14px; }
.code-card-head .desc { font-size: 12px; color: var(--muted); }
.code-card pre {
  margin: 0; padding: 12px 14px; background: #0b0b10; border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", Consolas, monospace; font-size: 12.5px; color: #cfcfe0;
  white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto; flex: 1;
}
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tooltip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 260px;
  background: #0b0b10; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; opacity: 0; transition: opacity .1s;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.tooltip.show { opacity: 1; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip .r { color: var(--green); font-size: 12px; }
.tooltip .rank-en { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); font-size: 11.5px; color: #a8a8c0; line-height: 1.45; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: #fff; padding: 8px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: all .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.footer { padding: 32px 24px 48px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .card { padding: 18px; }
  .stat-list li { flex-wrap: wrap; }
  .stat-desc { margin-left: 40px; text-align: left; width: 100%; }
}