:root {
  --bg: #0a0e14;
  --bg2: #0d1117;
  --card: #12181f;
  --card2: #161d26;
  --line: #222c38;
  --tx: #c9d1d9;
  --tx2: #8b98a5;
  --accent: #00d9c0;
  --accent2: #6ee7d5;
  --gold: #ffd479;
  --pending: #f0a35e;
  --ok: #58d68d;
  --radius: 14px;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: radial-gradient(1200px 600px at 70% -10%, #10202b 0%, var(--bg) 55%); color: var(--tx); min-height: 100vh; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: rgba(13,17,23,0.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.logo { color: var(--accent); font-size: 26px; text-shadow: 0 0 16px rgba(0,217,192,.6); }
.name .accent { color: var(--accent); }
.net { font-size: 11px; padding: 2px 8px; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 20px; margin-left: 6px; font-weight: 600; }
.tabs { display: flex; gap: 6px; }
.tab { background: transparent; color: var(--tx2); border: none; padding: 8px 18px;
  border-radius: 10px; font-size: 15px; cursor: pointer; transition: .15s; }
.tab:hover { color: var(--tx); background: var(--card); }
.tab.active { color: #04231f; background: linear-gradient(135deg, var(--accent), var(--accent2)); font-weight: 600; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.dot.live { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.dead { background: #e05561; }

main { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.panel { display: none; animation: fade .25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 卡片 */
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.card.wide { grid-column: span 1; }
.card.narrow { max-width: 460px; }
.card-h { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.card-h small { color: var(--tx2); font-weight: 400; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

/* 统计卡片 */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px;
  background: radial-gradient(circle, rgba(0,217,192,.18), transparent 70%); }
.stat .k { color: var(--tx2); font-size: 13px; margin-bottom: 8px; }
.stat .v { font-size: 26px; font-weight: 700; color: #fff; }
.stat .v.accent { color: var(--accent); }
.stat .u { font-size: 13px; color: var(--tx2); font-weight: 400; margin-left: 4px; }

/* 表格 */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--tx2); font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid #1a222c; }
tr:hover td { background: rgba(0,217,192,.04); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.hash { color: var(--accent2); }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 20px; }
.badge.pending { color: var(--pending); border: 1px solid var(--pending); }
.badge.confirmed { color: var(--ok); border: 1px solid var(--ok); }
.badge.orphan { color: #e05561; border: 1px solid #e05561; }

/* 排行条 */
.rank .row { margin-bottom: 12px; }
.rank .row .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.rank .row .w { color: var(--tx); }
.rank .row .a { color: var(--gold); font-weight: 600; }
.bar { height: 8px; background: #1a222c; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* 图 */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.chart .b { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(0,217,192,.25));
  border-radius: 4px 4px 0 0; min-height: 4px; position: relative; }
.chart .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); background: #000; color: var(--accent2); font-size: 11px;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

/* 查询 + 计算器 */
.lookup { display: flex; gap: 10px; margin-bottom: 16px; }
.lookup input { flex: 1; }
input, select { background: var(--bg2); border: 1px solid var(--line); color: var(--tx);
  padding: 10px 12px; border-radius: 10px; font-size: 14px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
button { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04231f;
  border: none; padding: 10px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(1.08); }
.calc { display: flex; flex-direction: column; gap: 14px; }
.calc-inputs { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.calc-inputs label { flex: 1; min-width: 130px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--tx2); }
.hr-input { display: flex; gap: 6px; }
.hr-input input { flex: 1; min-width: 0; }
.hr-input select { flex: 0 0 auto; }
.calc-out { font-size: 30px; font-weight: 700; color: var(--accent); }
.calc-note { font-size: 12px; color: var(--tx2); }

.balgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.balgrid .b2 { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.balgrid .b2 .k { color: var(--tx2); font-size: 12px; }
.balgrid .b2 .v { font-size: 22px; font-weight: 700; margin-top: 6px; }
.muted { color: var(--tx2); font-size: 13px; padding: 8px 0; }

/* 币种选择 */
.coinsel { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx2); }
.coinsel select { padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--accent2); }

/* 更多链接 / 分页 / 接入 */
.more { margin-left: auto; font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 400; }
.more:hover { text-decoration: underline; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager button { padding: 6px 13px; font-size: 13px; background: var(--card); color: var(--tx);
  border: 1px solid var(--line); border-radius: 8px; }
.pager button.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04231f; }
.pager button:disabled { opacity: .35; cursor: default; }

.connect { font-size: 14px; line-height: 1.85; color: var(--tx); }
.connect h4 { color: var(--accent); margin: 16px 0 6px; font-size: 15px; }
.connect p { color: var(--tx2); }
.connect pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; overflow-x: auto; font-family: ui-monospace, "SF Mono", monospace;
  font-size: 13px; color: var(--accent2); margin: 6px 0; }
.connect code { background: var(--bg2); padding: 2px 6px; border-radius: 4px; color: var(--gold); font-size: 13px; }
.connect ul { margin: 6px 0 6px 22px; color: var(--tx2); }

footer { text-align: center; color: var(--tx2); font-size: 12px; padding: 24px; border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .tabs .tab { padding: 8px 12px; font-size: 14px; }
}

/* ---- 算力趋势折线图 ---- */
.linechart { width: 100%; height: 200px; }
.linechart .muted { padding: 70px 0; text-align: center; }
svg.lc { width: 100%; height: 200px; display: block; }
.lc-axis { stroke: var(--line); stroke-width: 1; }
.lc-pool { stroke: var(--accent); stroke-width: 2; }
.lc-net { stroke: var(--tx2); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .8; }
.lc-lbl { fill: var(--tx2); font-size: 12px; }

/* ---- 公告 ---- */
.news { display: flex; flex-direction: column; gap: 12px; }
.newsitem { border: 1px solid var(--line); border-left: 3px solid var(--tx2); border-radius: 10px;
  padding: 12px 16px; background: var(--card2); }
.newsitem.lv-update { border-left-color: var(--accent); }
.newsitem.lv-maintenance { border-left-color: var(--pending); }
.newsitem .nh { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.newsitem .ntag { font-size: 11px; padding: 2px 9px; border-radius: 20px; color: var(--tx2); border: 1px solid var(--line); }
.newsitem.lv-update .ntag { color: var(--accent); border-color: var(--accent); }
.newsitem.lv-maintenance .ntag { color: var(--pending); border-color: var(--pending); }
.newsitem .nt { font-weight: 600; flex: 1; }
.newsitem .nd { color: var(--tx2); font-size: 12px; }
.newsitem .nb { color: var(--tx2); font-size: 13px; line-height: 1.6; white-space: pre-wrap; }

/* ---- 区块状态筛选 ---- */
.filterbar { display: flex; gap: 8px; margin-bottom: 14px; }
.fbtn { background: transparent; color: var(--tx2); border: 1px solid var(--line); border-radius: 20px;
  padding: 4px 14px; font-size: 12px; cursor: pointer; }
.fbtn:hover { color: var(--tx); border-color: var(--tx2); }
.fbtn.active { color: #04231f; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; font-weight: 600; }

/* ---- 下载按钮 ---- */
.dlbtn { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04231f;
  padding: 8px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.dlbtn:hover { box-shadow: 0 0 16px rgba(0,217,192,.4); }

/* ---- 已关闭矿池横幅 ---- */
.closed-banner { margin: 0 0 18px; padding: 12px 18px; border-radius: 10px;
  background: rgba(240,163,94,.12); border: 1px solid var(--pending); color: var(--pending); font-size: 14px; }
