/* Dark mode styles */
@media (prefers-color-scheme: dark) {

  body {
      background-color: #1a202c; /* This is roughly equivalent to bg-gray-800 in Tailwind */
      color: #e5e7eb;           /* Roughly equivalent to text-gray-300 in Tailwind */
  }

  .bg-gray-100 {
      background-color: #2D3748; /* This color is equivalent to bg-gray-800 in Tailwind */
  }
  .bg-gray-500 {
      background-color: #e5e7eb; /* This color is equivalent to bg-gray-800 in Tailwind */
  }

  .bg-blue-500 {
      background-color: #4299E1; /* Same color but might be adjusted for better visibility on dark bg */
    }

  .text-blue-500 {
      color: #4daefe; /* Same color but might be adjusted for better visibility on dark bg */
    }

  body.text-gray-500 {
      color: #e5e7eb;
  }
  td.text-gray-500 {
      color: #e5e7eb;
  }

  input[type="text"].border {
      background-color: #4A5568; /* Equivalent to bg-gray-700 in Tailwind */
      color: #E2E8F0; /* Equivalent to text-gray-300 in Tailwind */
      border-color: #4A5568; /* To keep the border same as the background color */
    }

    input[type="text"].border::placeholder {
      color: #A0AEC0; /* Equivalent to text-gray-400 in Tailwind */
    }

}


/* Copiable classes */
.copy_btn, .copy_btn_front {
display: inline-block;
position: relative;
white-space: nowrap; /* Prevent wrapping */
}

.copy_icon {
display: inline; /* make it always visible */
cursor: pointer;
color: currentColor; /* inherit color from parent */
}

.copy_btn .copy_icon {
margin-left: 5px; /* space it out a bit from the text when at the end */
margin-right: 5px;
}

.copy_btn_front .copy_icon {
margin-right: 5px; /* space it out a bit from the text when at the front */
}


/* spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader {
  border-top-color: #3498db;
  -webkit-animation: spin 1s linear infinite;
  animation: spin 1s linear infinite;
}

.suggestions-container div {
  padding: 5px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestions-container div:hover {
  opacity: 90%;
}


/* =========================================================
   LREG Explorer UI
   NanoExplorer-inspired information density with LREG brand
   ========================================================= */

:root {
  --explorer-bg: #f4f7fb;
  --explorer-surface: #ffffff;
  --explorer-surface-soft: #f8fafc;
  --explorer-border: #e2e8f0;
  --explorer-text: #0f172a;
  --explorer-muted: #64748b;
  --explorer-blue: #2585f4;
  --explorer-blue-dark: #1769c2;
  --explorer-blue-soft: #eff6ff;
  --explorer-dark: #0a112e;
  --explorer-gold: #f6c744;
  --explorer-radius: 14px;
  --explorer-shadow: 0 7px 24px rgba(15, 23, 42, 0.05);
}

body.explorer-body {
  margin: 0;
  min-height: 100vh;
  background: var(--explorer-bg);
  color: var(--explorer-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.explorer-shell {
  width: min(1180px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.explorer-header {
  background: var(--explorer-surface);
  border-bottom: 1px solid var(--explorer-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.explorer-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.explorer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--explorer-text);
  text-decoration: none;
}

.explorer-brand-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.explorer-brand-copy {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--explorer-border);
  padding-left: 13px;
}

.explorer-brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.explorer-brand-subtitle {
  color: var(--explorer-muted);
  font-size: 11px;
  margin-top: 2px;
}

.explorer-beta {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.explorer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}

.explorer-nav a {
  color: var(--explorer-text);
  text-decoration: none;
}

.explorer-network-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--explorer-muted);
}

.explorer-network-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px #dcfce7;
}

.explorer-main {
  padding-top: 38px;
  padding-bottom: 70px;
}

.explorer-search-section,
.explorer-page-heading {
  margin-bottom: 28px;
}

.explorer-section-heading h1,
.explorer-page-heading h1 {
  margin: 4px 0 8px;
  color: var(--explorer-dark);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.explorer-section-heading p,
.explorer-page-heading p {
  color: var(--explorer-muted);
}

.explorer-eyebrow {
  color: var(--explorer-blue) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.explorer-search-form {
  margin-top: 22px;
}

.explorer-search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  background: var(--explorer-surface);
  border: 1px solid var(--explorer-border);
  border-radius: 12px;
  padding: 7px 8px 7px 18px;
  box-shadow: var(--explorer-shadow);
}

.explorer-search-icon {
  width: 21px;
  color: #94a3b8;
}

.explorer-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--explorer-text);
  font-size: 15px;
}

.explorer-search-box input::placeholder {
  color: #94a3b8;
}

.explorer-search-box button {
  border: 0;
  border-radius: 8px;
  background: var(--explorer-blue);
  color: white;
  padding: 12px 23px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.explorer-search-box button:hover {
  background: var(--explorer-blue-dark);
}

.explorer-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.explorer-stat {
  min-height: 122px;
  background: var(--explorer-surface);
  border: 1px solid var(--explorer-border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.025);
}

.explorer-stat-label {
  display: block;
  color: var(--explorer-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.explorer-stat strong {
  display: block;
  color: var(--explorer-dark);
  font-size: 22px;
  font-weight: 750;
}

.explorer-stat small {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 7px;
}

.explorer-card {
  background: var(--explorer-surface);
  border: 1px solid var(--explorer-border);
  border-radius: var(--explorer-radius);
  box-shadow: var(--explorer-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.explorer-card-header {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--explorer-border);
  padding: 17px 22px;
}

.explorer-card-header h2 {
  margin: 2px 0 0;
  color: var(--explorer-dark);
  font-size: 18px;
  font-weight: 750;
}

.explorer-tabs {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 9px;
  padding: 3px;
}

.explorer-tab {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--explorer-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
}

.explorer-tab-active {
  background: var(--explorer-surface);
  color: var(--explorer-text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.explorer-table-wrap {
  overflow-x: auto;
  padding: 6px 22px 22px;
}

.explorer-table {
  width: 100%;
  border-collapse: collapse;
}

.explorer-table th,
.explorer-table td,
.explorer-table-wrap table th,
.explorer-table-wrap table td {
  border-bottom: 1px solid #edf2f7;
  padding: 14px 11px;
  text-align: left;
  font-size: 13px;
}

.explorer-table th,
.explorer-table-wrap table thead {
  color: var(--explorer-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.explorer-page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.explorer-address {
  display: flex;
  align-items: center;
  max-width: 800px;
  color: var(--explorer-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.explorer-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 750;
}

.explorer-badge-gold {
  background: #fff7d6;
  color: #8a6500;
  border: 1px solid #f8df80;
}

.explorer-account-summary {
  padding: 24px;
}

.explorer-account-more .explorer-info-grid {
  padding: 22px;
}

.explorer-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.explorer-info-grid > div {
  border: 1px solid var(--explorer-border);
  border-radius: 10px;
  background: var(--explorer-surface-soft);
  padding: 15px;
}

.explorer-info-grid span {
  display: block;
  color: var(--explorer-muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 7px;
}

.explorer-info-grid strong {
  color: var(--explorer-dark);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.explorer-legacy-account-header {
  padding: 20px 22px 0;
}

.explorer-block-content {
  padding: 22px;
}

.explorer-alert {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  color: #9f1239;
  margin-bottom: 22px;
  padding: 15px 18px;
}

.explorer-alert pre {
  margin-top: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .explorer-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .explorer-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .explorer-shell {
    width: min(100% - 24px, 1180px);
  }

  .explorer-header-inner {
    min-height: 66px;
  }

  .explorer-brand-copy,
  .explorer-nav a {
    display: none;
  }

  .explorer-main {
    padding-top: 25px;
  }

  .explorer-search-box {
    grid-template-columns: auto 1fr;
  }

  .explorer-search-box button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .explorer-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explorer-card-header,
  .explorer-page-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .explorer-info-grid {
    grid-template-columns: 1fr;
  }

  .explorer-tabs {
    width: 100%;
  }

  .explorer-tab {
    flex: 1;
  }
}

@media (max-width: 420px) {
  .explorer-stats-grid {
    grid-template-columns: 1fr;
  }
}
