:root {
  --bg: #0b0f1a;
  --card: #111623;
  --border: #1e2738;
  --accent: #1d9bf0;
  --accent-hover: #4ab3ff;
  --text-main: #ffffff;
  --text-muted: #9ba3b5;
}

/* ================= RESET ================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.hidden {
  display: none;
}

/* ================= APP LAYOUT ================= */

.app-shell {
  max-width: 780px;
  margin: 30px auto;
  padding: 0 16px;
}

/* ================= HEADER ================= */

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.header-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px var(--border),
    0 8px 22px rgba(29, 155, 240, 0.35);
}

.app-header h1 {
  margin: 0;
  line-height: 1;
  font-size: 26px;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 15px;
  margin-bottom: 50px;
  font-size: 14px;
  line-height: 1.6;
}

/* ================= CARD ================= */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}

/* ================= INPUT ================= */

.input-wrapper {
  display: flex;
  gap: 10px;
}

#addr {
  flex: 1;
  padding: 12px;
  background: #161d2e;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 10px;
}

#addr::placeholder {
  color: var(--text-muted);
}

#check {
  padding: 12px 18px;
  background: var(--accent);
  color: #000;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  border: none;
}

#check:hover {
  background: var(--accent-hover);
}

/* ================= SNAPSHOT ================= */

.snapshot-card h2 {
  margin-bottom: 14px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.result-row:last-child {
  border-bottom: none;
}

.label {
  color: var(--text-muted);
  font-size: 13px;
}

.value {
  font-weight: 600;
}

/* Status */
.status-yes {
  color: #22c55e;
  font-weight: 600;
}

.status-no {
  color: #ef4444;
  font-weight: 600;
}

/* ================= TERMINAL ================= */

.terminal {
  background: #0d111c;
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 10px;
  max-height: 460px;
  overflow-y: auto;
}

/* ================= TRANSACTIONS ================= */

.tx {
  padding: 14px;
  margin-bottom: 12px;
  background: #131a2c;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tx-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.addresses {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.addr-label {
  font-size: 11px;
  color: var(--text-muted);
}

.addr-value {
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Badges */
.badge-in,
.badge-out {
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
}

.badge-in {
  background: #2ecc71;
  color: #000;
}

.badge-out {
  background: #ff4d4d;
  color: #fff;
}

.tx-bottom {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ================= FOOTER ================= */

.app-footer {
  margin-top: 40px;
  padding: 28px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 12px;
}

.footer-icons a {
  color: var(--text-muted);
  transition: 0.2s ease;
}

.footer-icons a:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* ================= NETWORK BACKGROUND ================= */

#bg-network {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* ================= SCROLLBAR ================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #4f46e5 rgba(255,255,255,0.05);
}

/* Chromium */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4f46e5, #6d63ff);
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6d63ff, #8b85ff);
}

/* ================= MOBILE ================= */

@media (max-width: 520px) {
  .tx-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tx-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .addr-value {
    font-size: 12px;
    line-height: 1.3;
  }

  .header-title {
    gap: 10px;
  }

  .header-logo {
    width: 36px;
    height: 36px;
  }

  .app-header h1 {
    font-size: 24px;
  }

  .subtitle {
    margin-bottom: 20px;
  }
}
.intensity-low {
  color: #9ca3af; /* gray */
  font-weight: 600;
}

.intensity-medium {
  color: #facc15; /* yellow */
  font-weight: 600;
}

.intensity-high {
  color: #22c55e; /* green */
  font-weight: 600;
}

.net-in {
  color: #22c55e; /* green */
  font-weight: 600;
}

.net-out {
  color: #ef4444; /* red */
  font-weight: 600;
}

.net-neutral {
  color: #9ca3af; /* gray */
  font-weight: 600;
}
/* ================= TX META ================= */

.tx-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-main);
}

.tx-sep {
  color: var(--text-muted);
}

/* ================= TX ACTION BUTTONS ================= */

.tx-actions {
  display: flex;
  gap: 8px;
}

.tx-actions .btn-secondary {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* Copied feedback (mantém o visual antigo) */
.btn-copied {
  background: #2ecc71 !important;
  color: #000 !important;
}
.tx-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: #1b2333;
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  font-size: 13px;
}

.filter-btn:hover {
  background: #27334b;
}

.filter-btn.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
/* ================= TX META ================= */

.tx-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-main);
}

.tx-sep {
  color: var(--text-muted);
}

/* ================= TX ACTION BUTTONS ================= */

.tx-actions {
  display: flex;
  gap: 8px;
}

.tx-actions .btn-secondary {
  padding: 6px 14px;
  border-radius: 8px;
  background: #1b2333;
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  font-size: 12px;
}

.tx-actions .btn-secondary:hover {
  background: #27334b;
}

/* Copied feedback */
.btn-copied {
  background: #2ecc71 !important;
  color: #000 !important;
}

/* ================= FILTERS ================= */

.tx-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: #1b2333;
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  font-size: 13px;
}

.filter-btn:hover {
  background: #27334b;
}

.filter-btn.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.tx-actions a,
.tx-actions a:hover,
.tx-actions a:visited {
  text-decoration: none;
}
/* ================= WALLET ADDRESS (MOBILE TRUNCATE) ================= */

.wallet-address {
  word-break: break-all;
   font-weight: 600;
  letter-spacing: 0.2px;
}

/* Mobile: truncate address like 0x63a1...c1c8 */
@media (max-width: 520px) {
  .wallet-address {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
  }
}
/* ================= FOOTER ICON FIX (MOBILE) ================= */

@media (max-width: 520px) {
  .footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 26px;
    margin-bottom: 14px;
  }

  .footer-icons a {
    color: var(--text-muted);
    opacity: 1;
    visibility: visible;
  }

  .footer-icons svg {
    width: 26px;
    height: 26px;
    display: block;
  }
}
/* ================= FOOTER ICONS FIX ================= */

.footer-icons a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-icons svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: currentColor;
}

/* Hover */
.footer-icons a:hover {
  color: var(--accent);
}
/* Remove mobile focus highlight */
#addr:focus,
#addr:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: var(--accent);
}

/* Remove tap highlight (Android / Chrome) */
#addr {
  -webkit-tap-highlight-color: transparent;
}
/* ================= BUTTON CLICK FEEDBACK ================= */

.btn-secondary {
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-secondary:active {
  background: var(--accent);
  color: #000;
  transform: scale(0.96);
}

/* JS-triggered active state */
.btn-active {
  background: var(--accent) !important;
  color: #000 !important;
}

