:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --line: #e7eaf3;
  --text: #1e2022;
  --muted: #6c757d;
  --blue: #0784c3;
  --blue-dark: #066a9c;
  --green: #00a186;
  --orange: #f59e0b;
  --soft: #f6f8fa;
  --shadow: 0 0.5rem 1.2rem rgba(189, 197, 209, 0.2);
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.thin { font-weight: 400; color: #77838f; }
.hidden { display: none !important; }
.wrap { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar-inner {
  min-height: 58px;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #0784c3, #0e4f7a);
}
.logo-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 0.15rem; margin-left: 0.5rem; flex-wrap: wrap; }
.nav > a, .drop > button {
  border: 0; background: transparent; cursor: pointer;
  color: #6c757e; font: 500 14px var(--font);
  padding: 0.55rem 0.7rem; border-radius: 6px;
}
.nav > a:hover, .drop > button:hover { color: var(--blue); background: #f3f7fa; text-decoration: none; }
.drop { position: relative; }
.drop-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 180px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); padding: 0.35rem; z-index: 50;
}
.drop:hover .drop-menu, .drop:focus-within .drop-menu { display: block; }
.drop-menu a {
  display: block; padding: 0.55rem 0.7rem; border-radius: 6px;
  color: #48515a; font-size: 13px;
}
.drop-menu a:hover { background: #f3f7fa; text-decoration: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.mini-search input {
  width: 140px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.4rem 0.65rem; font-size: 13px; background: var(--soft);
}
.net-pill {
  font-size: 12px; font-weight: 500; color: #48515a;
  background: #eef2f5; border: 1px solid var(--line);
  border-radius: 999px; padding: 0.35rem 0.7rem; white-space: nowrap;
}

.search-band {
  background: linear-gradient(90deg, #1c2a3a 0%, #213246 45%, #1b3348 100%);
  color: #fff; padding: 1.6rem 0 1.4rem;
}
.search-band h1 { margin: 0 0 0.85rem; font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 500; }
.search-box {
  display: flex; background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); max-width: 820px;
}
.search-box select {
  border: 0; border-right: 1px solid var(--line);
  padding: 0 0.85rem; background: #f8fafc; color: #48515a;
  font: 500 13px var(--font); outline: none; cursor: pointer;
}
.search-box input {
  flex: 1; min-width: 0; border: 0; padding: 0.95rem 1rem;
  font: 400 15px var(--font); color: var(--text); outline: none;
}
.search-box button {
  border: 0; width: 52px; background: var(--blue); color: #fff; cursor: pointer;
}
.search-box button:hover { background: var(--blue-dark); }

.main { padding: 1.1rem 0 2.5rem; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}

.stats {
  display: grid; grid-template-columns: 1.15fr 1fr 1fr;
  margin-bottom: 1rem; overflow: hidden;
}
.stat { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1.1rem 1.2rem; }
.stat.mid { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.stat-ico {
  width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
}
.stat-ico.tx { background: #e8f4fc; color: var(--blue); }
.stat-ico.fee { background: #eef7f1; color: var(--green); }
.stat-ico.blk { background: #fff4e5; color: var(--orange); }
.stat-label { font-size: 11px; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; }
.stat-val { font-size: 1.15rem; font-weight: 700; margin-top: 0.15rem; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 0.15rem; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.feed-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--line);
}
.feed-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.back { font-size: 13px; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line);
}
.feed-list li:last-child { border-bottom: 0; }
.feed-list li:hover { background: #fbfcfd; }
.chip {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: #eef2f7; color: #77838f;
  font-size: 11px; font-weight: 700;
}
.chip.tx { background: #e8f4fc; color: var(--blue); }
.row-main { min-width: 0; flex: 1; }
.row-main button, .linkish {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--blue); font: 500 14px var(--mono); text-align: left;
}
.row-main button:hover, .linkish:hover { text-decoration: underline; }
.meta { font-size: 12px; color: var(--muted); margin-top: 0.2rem; line-height: 1.45; }
.meta b { color: #48515a; font-weight: 500; }
.row-side { text-align: right; flex-shrink: 0; font-size: 13px; }
.amt {
  display: inline-block; margin-top: 0.25rem;
  background: #eef2f7; color: #48515a;
  border-radius: 6px; padding: 0.2rem 0.45rem; font-size: 12px; font-weight: 500;
}
.view-all {
  display: block; text-align: center;
  padding: 0.85rem; border-top: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em; color: #6c757e;
}
.view-all:hover { color: var(--blue); background: #f8fafc; text-decoration: none; }
.empty { padding: 1.5rem 1.1rem; color: var(--muted); font-size: 13px; }

.detail { padding: 1.15rem 1.25rem; margin-bottom: 1rem; }
.detail h3 {
  margin: 0 0 0.85rem; font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.kv { display: grid; gap: 0.65rem; }
.k { font-size: 12px; color: var(--muted); }
.v { word-break: break-all; font-size: 14px; }
.close {
  float: right; border: 1px solid var(--line); background: var(--soft);
  border-radius: 8px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 12px; color: var(--muted);
}
.error {
  background: #fff5f5; border: 1px solid #ffd0d0; color: #c62828;
  border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line); background: #fff;
  padding: 1.25rem 0 2rem; font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1rem; }
.footer code { color: var(--blue); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stats, .grid2, .detail { animation: fadeIn 0.35s ease both; }

@media (max-width: 960px) {
  .nav { display: none; }
  .stats, .grid2 { grid-template-columns: 1fr; }
  .stat.mid { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .mini-search { display: none; }
}
@media (max-width: 560px) {
  .search-box { flex-wrap: wrap; }
  .search-box select { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.65rem 0.85rem; }
  .search-box button { width: 100%; padding: 0.7rem; }
}
