:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: rgba(19, 24, 33, 0.88);
  --panel-2: #111721;
  --line: rgba(255, 255, 255, 0.09);
  --muted: #8994a6;
  --text: #f5f7fb;
  --accent: #78f0ba;
  --accent-2: #7ca7ff;
  --danger: #ff7d86;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(124, 167, 255, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 0%, rgba(120, 240, 186, 0.12), transparent 28rem),
    var(--bg);
}
button, input { font: inherit; }
button { color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07100d; font-weight: 900; box-shadow: 0 10px 30px rgba(120, 240, 186, 0.16);
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -0.02em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.network-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: 999px; color: #b7c0ce; font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.035);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }

.hero { padding: 84px 0 58px; max-width: 900px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 16px; font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: 0.96; letter-spacing: -0.065em; }
.hero-copy { color: #aab3c1; font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; }
.search {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 820px; margin-top: 32px;
  padding: 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(15, 20, 28, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .3);
}
.search:focus-within { border-color: rgba(120, 240, 186, 0.6); box-shadow: 0 0 0 3px rgba(120, 240, 186, .08); }
.search input { min-width: 0; border: 0; outline: 0; padding: 13px 14px; color: var(--text); background: transparent; }
.search input::placeholder { color: #707b8e; }
.search button {
  border: 0; border-radius: 11px; padding: 0 22px; background: var(--accent); color: #07100d; font-weight: 800; cursor: pointer;
}
.search button:hover { filter: brightness(1.07); }
.form-error { margin: 12px 0 0; color: var(--danger); font-size: .9rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.025); }
.stats article { padding: 22px 24px; border-right: 1px solid var(--line); }
.stats article:last-child { border-right: 0; }
.stats span, .block-row span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
.stats strong { font-size: clamp(.95rem, 2vw, 1.16rem); }
.stats .online { color: var(--accent); }

.panel { margin-top: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 22px 70px rgba(0,0,0,.22); overflow: hidden; }
.detail-panel { scroll-margin-top: 20px; }
.panel-heading { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel h2 { margin-bottom: 0; font-size: 1.45rem; letter-spacing: -.03em; }
.muted { color: var(--muted); font-size: .85rem; }
.text-button, .hash-link { border: 0; padding: 0; background: none; color: var(--accent-2); cursor: pointer; }
.text-button:hover, .hash-link:hover { text-decoration: underline; }
.block-row { display: grid; grid-template-columns: .7fr 1.35fr .65fr 1fr; gap: 24px; align-items: center; min-height: 84px; padding: 16px 26px; border-bottom: 1px solid var(--line); }
.block-row:last-child { border-bottom: 0; }
.block-row strong, .block-row .hash-link { font-size: .92rem; font-weight: 650; }
.block-number .hash-link { font-size: 1.05rem; }
.mono { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
.empty-state { padding: 44px 26px; color: var(--muted); text-align: center; }
.empty-state.error { color: var(--danger); }

#detail-content { padding: 4px 26px 28px; }
.details { margin: 0; }
.detail-row { display: grid; grid-template-columns: minmax(140px, .35fr) 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.detail-row dt { color: var(--muted); }
.detail-row dd { margin: 0; }
.break { overflow-wrap: anywhere; }
#detail-content h3 { margin: 28px 0 12px; font-size: 1rem; }
.tx-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tx-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tx-list > div:last-child { border-bottom: 0; }
.tx-list span { color: var(--muted); }
.status { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: .78rem; background: rgba(255,255,255,.07); }
.status.success { color: var(--accent); background: rgba(120,240,186,.09); }
.status.failed { color: var(--danger); background: rgba(255,125,134,.09); }

footer { display: flex; flex-wrap: wrap; gap: 20px; padding: 34px 0 44px; color: var(--muted); font-size: .78rem; }
footer span:last-child { margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { height: 76px; }
  .hero { padding: 54px 0 40px; }
  .search { grid-template-columns: 1fr; }
  .search button { min-height: 46px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats article { border-bottom: 1px solid var(--line); }
  .stats article:nth-child(2) { border-right: 0; }
  .stats article:nth-child(n+3) { border-bottom: 0; }
  .block-row { grid-template-columns: 1fr 1fr; gap: 18px; }
  .block-row > div:nth-child(2) { text-align: right; }
  .detail-row { grid-template-columns: 1fr; gap: 7px; }
  .tx-list > div { align-items: flex-start; flex-direction: column; }
  footer span:last-child { width: 100%; margin-left: 0; }
}

@media (max-width: 440px) {
  .network-pill { font-size: 0; padding: 10px; }
  .network-pill .status-dot { width: 8px; height: 8px; }
  .stats { grid-template-columns: 1fr; }
  .stats article { border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .stats article:last-child { border-bottom: 0 !important; }
  .panel-heading, .block-row, #detail-content { padding-inline: 18px; }
  .block-row { grid-template-columns: 1fr; }
  .block-row > div:nth-child(2) { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
