:root {
  --bg: #070b14;
  --card: rgba(14, 22, 40, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #93a0b8;
  --red: #e21b24;
  --blue: #1a56d8;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%);
}
.bg-orb {
  position: fixed; width: 520px; height: 520px; border-radius: 50%;
  filter: blur(80px); opacity: .28; pointer-events: none; z-index: 0;
  animation: drift 18s var(--ease) infinite alternate;
}
.bg-orb-a { top: -160px; left: -80px; background: #e21b24; }
.bg-orb-b { right: -120px; top: 180px; background: #1a56d8; animation-delay: -6s; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(40px, 30px, 0) scale(1.08); }
}

.topbar, .wrap, .foot { position: relative; z-index: 1; }
.topbar {
  max-width: 1120px; margin: 0 auto; padding: 18px 20px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; background: transparent; }
.brand strong { display: block; font-size: 16px; letter-spacing: .04em; }
.brand small { color: var(--muted); font-size: 12px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav > a, .drop-btn {
  color: var(--text); text-decoration: none; background: transparent; border: 0;
  font: inherit; cursor: pointer; padding: 8px 14px; border-radius: 10px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav > a:hover, .drop-btn:hover, .nav > a.active, .drop-btn.active {
  background: rgba(255,255,255,.12);
}
.drop { position: relative; }
.drop-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px;
  background: rgba(10, 18, 34, .96);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 6px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px) scale(.98);
  transform-origin: 80% 0;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  z-index: 50;
}
.drop.is-open .drop-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
.drop-menu a {
  display: block; color: #fff; text-decoration: none;
  padding: 10px 14px; border-radius: 8px; font-size: 14px;
}
.drop-menu a:hover, .drop-menu a.on { background: rgba(255,255,255,.16); }

.wrap { max-width: 860px; margin: 0 auto; padding: 18px 20px 64px; }
.hero-card, .ad-card, .rank-preview {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 24px 32px;
  backdrop-filter: blur(18px);
  margin-bottom: 20px;
}
.topline { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.rank-page h1 { text-align: center; font-size: 28px; margin: 8px 0 18px; }

.gauge-wrap { position: relative; width: 260px; height: 260px; margin: 8px auto 12px; }
.gauge { width: 100%; height: 100%; overflow: visible; }
.track, .arc {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}
.track { stroke: rgba(255,255,255,.1); }
.arc {
  stroke: url(#g1);
  opacity: 0;
  transition: opacity .2s var(--ease);
  filter: drop-shadow(0 0 8px rgba(226,27,36,.35));
}
.arc.is-on { opacity: 1; }
.gauge-read {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding-top: 6px;
}
.gauge-read b {
  font-size: 42px; font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em; line-height: 1; font-weight: 700;
}
.gauge-read span { color: var(--muted); font-size: 13px; margin-top: 6px; }
.gauge-read em { font-style: normal; color: #c9d4ea; font-size: 13px; margin-top: 8px; }

.go {
  display: block; margin: 6px auto 22px; min-width: 188px;
  border: 0; border-radius: 999px; padding: 14px 32px;
  color: #fff; font: 600 16px/1 inherit; cursor: pointer;
  background: linear-gradient(135deg, var(--red), #b8141c 42%, var(--blue));
  background-size: 180% 100%;
  transition: transform .18s var(--ease), filter .18s var(--ease), background-position .4s var(--ease);
}
.go:hover { transform: translateY(-1px) scale(1.02); background-position: 100% 0; }
.go:active { transform: scale(.98); }
.go:disabled { opacity: .55; cursor: wait; }

.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.metrics div {
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 10px; text-align: center;
}
.metrics small { color: var(--muted); font-size: 12px; }
.metrics strong { display: block; margin-top: 6px; font-size: 18px; font-variant-numeric: tabular-nums; }

.meta-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.chip {
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.chip span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.chip b { font-size: 14px; word-break: break-all; }

.node-box { text-align: center; }
.node-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
#speedlist {
  width: min(100%, 520px); appearance: none;
  background: rgba(8,14,28,.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2393a0b8' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 36px 12px 14px; font: 14px inherit;
}
.node-groups, .rank-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.node-groups button, .rank-tabs a {
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: #fff; border-radius: 999px; padding: 8px 14px; font: 13px inherit;
  cursor: pointer; text-decoration: none;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.node-groups button:hover, .rank-tabs a:hover, .node-groups button.on, .rank-tabs a.on {
  background: rgba(255,255,255,.14); border-color: transparent;
}

.ad-card { position: relative; overflow: hidden; }
.ad-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  border-radius: 50%; background: var(--blue); filter: blur(50px); opacity: .25; pointer-events: none;
}
.ad-kicker { color: #8eb0ff; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.ad-card h2 { margin: 8px 0 10px; font-size: 22px; }
.ad-card p { color: #c5d0e4; line-height: 1.7; max-width: 62ch; }
.ad-cta {
  display: inline-block; margin-top: 16px; color: #fff; text-decoration: none;
  background: var(--blue); padding: 10px 16px; border-radius: 999px; font-size: 14px;
  transition: transform .18s var(--ease);
}
.ad-cta:hover { transform: translateY(-1px); }

.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sec-head a { color: #8eb0ff; text-decoration: none; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td:nth-child(1) { color: #8eb0ff; font-variant-numeric: tabular-nums; }

.foot { border-top: 1px solid var(--line); padding: 28px 20px 40px; }
.foot-inner { max-width: 860px; margin: 0 auto; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.foot-brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: transparent; }
.foot-brand p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 4px; }
.icp { color: var(--muted); font-size: 12px; }
.icp a { color: #9ab0d6; }

@media (max-width: 720px) {
  .nav > a:last-child { display: none; }
  .metrics, .meta-row { grid-template-columns: 1fr 1fr; }
  .gauge-read b { font-size: 34px; }
}
