/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #07090f;
  --surface:  rgba(14, 20, 32, 0.85);
  --surface2: rgba(20, 28, 44, 0.9);
  --border:   rgba(255, 255, 255, 0.07);
  --border2:  rgba(255, 255, 255, 0.12);

  --text:     #eef2f8;
  --muted:    #6b7a96;
  --subtle:   #3d4d66;

  --purple:   #7c3aed;
  --cyan:     #06b6d4;
  --green:    #22c55e;
  --amber:    #f59e0b;
  --red:      #ef4444;
  --blue:     #3b82f6;

  --grad: linear-gradient(135deg, #7c3aed, #06b6d4);
  --grad-amber: linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-green: linear-gradient(135deg, #22c55e, #06b6d4);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background decoration ───────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Layout ──────────────────────────────────────────────────── */
.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ──────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  padding: 0;
  background: rgba(7, 9, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 32px; height: 32px;
  background: var(--grad);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  display: none;
}
@media (min-width: 560px) { .brand-tag { display: inline-block; } }

.author-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  transition: color .15s, border-color .15s, background .15s;
}
.author-badge:hover {
  color: var(--text);
  border-color: var(--border2);
  background: rgba(255,255,255,0.07);
}

/* ── Hero ────────────────────────────────────────────────────── */
main { padding: 0 0 80px; }

.hero {
  padding: 64px 0 48px;
  text-align: center;
}
.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  max-width: 580px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  font-size: 12px; font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  transition: all .2s;
}
.status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--subtle);
  flex-shrink: 0;
  transition: background .2s;
}
.status.ok { color: var(--green); border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.06); }
.status.ok::before { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status.err { color: var(--red); border-color: rgba(239,68,68,.25); }
.status.err::before { background: var(--red); }

/* ── Stat cards ──────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; gap: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s, transform .2s;
}
.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon--wallets { background: rgba(124,58,237,.15); color: #a78bfa; }
.stat-icon--vhype   { background: rgba(6,182,212,.15);  color: #67e8f9; }
.stat-icon--avg     { background: rgba(34,197,94,.15);  color: #86efac; }

.stat-body { min-width: 0; }
.stat-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-value {
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-hint {
  font-size: 11px; color: var(--muted);
  margin-top: 5px;
}

/* ── Search ──────────────────────────────────────────────────── */
.search-section { margin-bottom: 20px; }

.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.search-header { margin-bottom: 20px; }
.search-header h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.search-header p { font-size: 13px; color: var(--muted); margin-top: 4px; }

.search-form {
  display: flex; gap: 10px;
}
.search-input-wrap {
  position: relative; flex: 1;
}
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.search-form input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px 12px 40px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color .15s, background .15s;
}
.search-form input::placeholder { color: var(--subtle); }
.search-form input:focus {
  outline: none;
  border-color: rgba(124,58,237,.6);
  background: rgba(124,58,237,.05);
}
.search-form button {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--grad);
  color: #fff;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-form button:hover { opacity: 0.9; transform: translateY(-1px); }
.search-form button:active { transform: translateY(0); }
.search-form button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Search results ──────────────────────────────────────────── */
#search-result { margin-top: 16px; }
.search-empty {
  color: var(--muted); font-size: 14px;
  padding: 16px 0 4px;
}

.withdraw-card {
  margin-top: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.wd-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.wd-id {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  color: var(--muted);
}
.wd-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
}
.wd-field {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.wd-field:last-child { border-right: none; }
.wd-field .k {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.wd-field .v {
  font-size: 15px; font-weight: 600;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid;
}
.badge.queued    { color: var(--amber);  border-color: rgba(245,158,11,.3);  background: rgba(245,158,11,.08); }
.badge.processed { color: var(--cyan);   border-color: rgba(6,182,212,.3);   background: rgba(6,182,212,.08); }
.badge.claimed   { color: var(--green);  border-color: rgba(34,197,94,.3);   background: rgba(34,197,94,.08); }
.badge.cancelled { color: var(--red);    border-color: rgba(239,68,68,.3);   background: rgba(239,68,68,.08); }

/* ── Charts ──────────────────────────────────────────────────── */
.charts-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chart-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.chart-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.chart-dot--blue  { background: #38bdf8; box-shadow: 0 0 8px rgba(56,189,248,.5); }
.chart-dot--amber { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,.5); }
.chart-dot--green { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.5); }
.chart-header h3 { font-size: 14px; font-weight: 600; }
.chart-scale-tag {
  margin-left: auto;
  font-size: 10px; font-weight: 500;
  color: var(--subtle);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.chart-card canvas { width: 100% !important; height: 240px !important; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex; flex-direction: column; gap: 4px;
  color: var(--muted); font-size: 12px;
}
.footer-inner a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-inner a:hover { color: var(--text); }
.footer-credit { opacity: 0.65; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .hero { padding: 40px 0 32px; }
  .hero-title { font-size: 28px; }
  .search-form { flex-direction: column; }
  .search-card { padding: 20px; }
  .wd-body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .wd-body { grid-template-columns: 1fr; }
  .wd-field { border-right: none; }
}
