:root {
  --bg: #07090f;
  --surface: rgba(16, 21, 34, 0.86);
  --surface-2: rgba(24, 31, 49, 0.9);
  --border: rgba(148, 163, 184, 0.14);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #38bdf8;
  --accent: #a855f7;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

.mono, code {
  font-family: 'JetBrains Mono', monospace;
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.16;
  pointer-events: none;
  z-index: -1;
}
.bg-glow-1 { top: -140px; left: -100px; background: #38bdf8; }
.bg-glow-2 { top: 220px; right: -120px; background: #a855f7; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(7, 9, 15, 0.82);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}
.brand-accent { color: var(--primary); }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--text); }

.quota-badge {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.quota-badge.is-pro {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.95; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.28);
}
.btn-pro {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
}
.btn-secondary {
  background: #1d9bf0;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.btn-full { width: 100%; padding: 13px; font-size: 0.96rem; }

.hero {
  text-align: center;
  padding: 58px 0 36px;
}
.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2rem, 4.3vw, 3.15rem);
  line-height: 1.13;
  font-weight: 800;
  max-width: 880px;
  margin: 0 auto 16px;
}
.gradient-text {
  background: linear-gradient(90deg, #38bdf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: 1.02rem;
}

.scanner-box {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.scanner-input-row {
  display: flex;
  gap: 10px;
}
.chain-select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 600;
  min-width: 140px;
}
.address-input {
  flex: 1;
  background: rgba(7, 9, 15, 0.75);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}
.address-input:focus, .chain-select:focus {
  outline: none;
  border-color: var(--primary);
}
.quick-samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.sample-chip {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.78rem;
  cursor: pointer;
}
.sample-chip:hover { border-color: var(--primary); color: #fff; }

.alert-error {
  max-width: 860px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.9rem;
}
.hidden { display: none !important; }

.result-section { margin: 26px 0 42px; }
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
}
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.token-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.chain-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--primary);
}
.verdict-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
}
.verdict-low { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.verdict-med { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.verdict-high { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.muted-addr { color: var(--muted); font-size: 0.84rem; margin-top: 6px; word-break: break-all; }

.score-circle {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--success);
  background: rgba(7, 9, 15, 0.7);
}
.score-circle span { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.score-circle small { font-size: 0.63rem; color: var(--muted); margin-top: 3px; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.metric-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.metric-box label { display: block; font-size: 0.75rem; color: var(--muted); }
.metric-box strong { font-size: 1.05rem; font-weight: 700; }

.result-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}
.flags-panel, .forensics-panel {
  background: rgba(7, 9, 15, 0.55);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.flags-panel h3, .forensics-panel h3 { font-size: 0.98rem; margin-bottom: 12px; }
.flags-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.flag-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.88rem;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.panel-title-row { display: flex; justify-content: space-between; align-items: center; }
.pro-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
}

.locked-blur-box {
  position: relative;
  border-radius: 10px;
  padding: 16px;
  background: rgba(168, 85, 247, 0.07);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  text-align: center;
}
.locked-blur-box p { font-size: 0.86rem; color: #cbd5e1; margin-bottom: 12px; }

.holder-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.radar-section { padding: 30px 0 50px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.section-sub { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.radar-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-pill {
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
.stat-danger { color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.1); }

.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}
.radar-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.radar-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.radar-sym { font-weight: 700; font-size: 1rem; }
.radar-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-flag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
.mini-flag.bad { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.mini-flag.good { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
.radar-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.mcp-section { padding: 10px 0 60px; }
.mcp-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
  padding: 28px;
}
.mcp-copy h2 { margin: 8px 0 10px; }
.mcp-copy p { color: var(--muted); margin-bottom: 14px; }
.mcp-features { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.code-block {
  background: #05070c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  color: #7dd3fc;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  background: #0f1523;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 18px;
  padding: 26px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-sub { color: var(--muted); font-size: 0.9rem; margin: 10px 0 18px; }
.pay-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.pay-tab {
  flex: 1;
  padding: 9px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
}
.pay-tab.active {
  background: rgba(168, 85, 247, 0.2);
  color: #fff;
  border-color: #a855f7;
}
.divider-or {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 14px 0;
}
.wallet-box, .verify-box {
  background: rgba(7, 9, 15, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.wallet-box label, .verify-box label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.copy-row, .verify-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.copy-row code {
  flex: 1;
  font-size: 0.78rem;
  word-break: break-all;
  color: #e2e8f0;
}
.btn-copy {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.76rem;
  cursor: pointer;
}
.verify-row input {
  flex: 1;
  background: #07090f;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
.verify-msg { font-size: 0.8rem; margin-top: 8px; min-height: 18px; }

.footer {
  text-align: center;
  padding: 28px 20px 44px;
  color: var(--muted);
  font-size: 0.84rem;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--primary); text-decoration: none; }

@media (max-width: 780px) {
  .scanner-input-row, .result-columns, .mcp-card { grid-template-columns: 1fr; flex-direction: column; }
  .nav-link { display: none; }
}
