/* ═══════════════════════════════════════════════════════
   ENNUUMscan — header.css
   Etherscan-style nav, dropdowns, topbar, token/contract pages
════════════════════════════════════════════════════════ */

/* ─── TOPBAR ─────────────────────────────────────────── */
.topbar {
  height: 36px;
  background: #060709;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 12px;
  color: var(--text-2, #8899aa);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar-left { display: flex; align-items: center; gap: 0; }
.topbar-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  white-space: nowrap;
  line-height: 36px;
}
.topbar-pill strong { color: var(--text, #e2e8f0); font-weight: 600; }
.topbar-pill .val    { color: var(--text, #e2e8f0); font-weight: 600; }
.topbar-pill .chg.up   { color: #22c55e; }
.topbar-pill .chg.down { color: #ef4444; }
.topbar-pill .chg.neutral { color: var(--text-2, #8899aa); }

.tb-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.tb-label { color: var(--text-muted, #4a5568); font-size: 11px; }
.tb-sep {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.08);
  margin: 0 2px;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── LANG DROPDOWN ──────────────────────────────────── */
.lang-dropdown { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 4px 9px;
  color: var(--text, #e2e8f0);
  font-size: 12px; cursor: pointer;
  transition: background .15s;
}
.lang-btn:hover { background: rgba(255,255,255,0.09); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #13141c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px;
  min-width: 140px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  display: none; z-index: 2000;
}
.lang-menu.open, .lang-dropdown:hover .lang-menu { display: block; }
.lang-menu a {
  display: block; padding: 7px 12px;
  color: var(--text-2, #8899aa); font-size: 12px;
  border-radius: 5px; text-decoration: none;
  transition: background .12s, color .12s;
}
.lang-menu a:hover { background: rgba(232,146,10,.12); color: var(--enu, #E8920A); }

/* ─── NET BADGE ──────────────────────────────────────── */
.net-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px; font-weight: 600;
  color: #10b981; letter-spacing: .04em;
  text-transform: uppercase;
}
.net-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #10b981;
  animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; } 50% { opacity: .35; }
}

/* ─── NAV ────────────────────────────────────────────── */
.nav {
  background: #0d0e16;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: 36px;
  z-index: 900;
  height: 58px;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center;
  height: 100%; padding: 0 20px; gap: 0;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; margin-right: 20px;
  flex-shrink: 0;
}
.logo img { width: 30px; height: 30px; border-radius: 50%; }
.logo-name { font-family: 'Syne', sans-serif; font-size: 17px; line-height: 1; }
.logo-brand { color: var(--enu, #E8920A); font-weight: 800; letter-spacing: -.01em; }
.logo-scan  { color: var(--text, #e2e8f0); font-weight: 600; }

/* Nav links row */
.nav-links {
  display: flex; align-items: center;
  gap: 0; flex: 1;
}

/* Regular nav link */
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 0 13px;
  height: 58px;
  color: var(--text-2, #8899aa);
  font-size: 13.5px; font-weight: 500;
  text-decoration: none; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.nav-link:hover  { color: var(--text, #e2e8f0); }
.nav-link.active { color: var(--enu, #E8920A); border-bottom-color: var(--enu, #E8920A); }

/* Chevron icon in dropdown button */
.nav-link .chev, .ndrop-btn .chev {
  opacity: .5;
  transition: transform .2s, opacity .2s;
  flex-shrink: 0;
}

/* ─── DROPDOWN ───────────────────────────────────────── */
.ndrop {
  position: relative;
  display: flex; align-items: center;
}
.ndrop-btn {
  /* inherits .nav-link */
}
.ndrop:hover .ndrop-btn  { color: var(--text, #e2e8f0); }
.ndrop:hover .chev       { transform: rotate(180deg); opacity: .8; }
.ndrop:hover .nav-link   { color: var(--text, #e2e8f0); }

/* Dropdown panel */
.ndrop-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: #13141c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px;
  min-width: 260px;
  box-shadow: 0 12px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
  opacity: 0; pointer-events: none;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s;
  z-index: 1500;
}
.ndrop:hover .ndrop-menu,
.ndrop-menu:hover {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.ndrop-menu--right { left: auto; right: 0; }

/* Group label */
.ndrop-group { padding: 4px 0; }
.ndrop-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted, #4a5568);
  padding: 4px 10px 6px;
}

/* Separator */
.ndrop-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 6px 0;
}

/* Dropdown item */
.ndrop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-2, #8899aa);
  transition: background .12s, color .12s;
}
.ndrop-item:hover {
  background: rgba(232,146,10,.1);
  color: var(--text, #e2e8f0);
}
.ndrop-ico {
  font-size: 18px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 7px; flex-shrink: 0;
}
.ndrop-title { font-size: 13px; font-weight: 600; color: var(--text, #e2e8f0); }
.ndrop-item:hover .ndrop-title { color: var(--enu, #E8920A); }
.ndrop-sub { font-size: 11px; color: var(--text-muted, #4a5568); margin-top: 1px; }

/* NEW badge inside dropdown */
.ndrop-badge {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 1px 5px; border-radius: 4px;
  vertical-align: middle; margin-left: 5px;
  line-height: 14px;
}
.new-badge {
  background: rgba(232,146,10,.2);
  color: var(--enu, #E8920A);
  border: 1px solid rgba(232,146,10,.3);
}

/* ─── SEARCH BAR ─────────────────────────────────────── */
.nav-search {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  overflow: hidden;
  margin-left: auto;
  min-width: 340px;
  transition: border-color .2s, box-shadow .2s;
}
.nav-search:focus-within {
  border-color: rgba(232,146,10,.5);
  box-shadow: 0 0 0 2px rgba(232,146,10,.12);
}
.nav-search .search-wrap {
  position: relative; flex: 1;
  display: flex; align-items: center;
}
.nav-search .search-icon {
  position: absolute; left: 12px;
  color: var(--text-muted); pointer-events: none;
}
.nav-search input {
  flex: 1; background: none; border: none; outline: none;
  padding: 0 12px 0 36px;
  height: 36px;
  color: var(--text, #e2e8f0);
  font-size: 13px;
}
.nav-search input::placeholder { color: var(--text-muted, #4a5568); }
.search-btn {
  background: var(--enu, #E8920A);
  border: none; cursor: pointer;
  padding: 0 16px;
  height: 36px;
  color: #000; font-weight: 700;
  font-size: 13px; font-family: 'Inter', sans-serif;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-btn:hover { background: #f5a020; }

/* ─── LIVE BADGE ─────────────────────────────────────── */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 20px; padding: 3px 9px;
  font-size: 11px; font-weight: 700; color: #ef4444;
  letter-spacing: .04em;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ef4444;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.3); }
}

/* ─── TOKEN TABLE SPECIFIC ───────────────────────────── */
.token-table td, .token-table th { vertical-align: middle; }

.token-logo {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.token-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.token-name-cell {
  display: flex; align-items: center; gap: 10px;
}
.token-name { font-weight: 600; color: var(--text, #e2e8f0); }
.token-symbol {
  font-size: 12px; color: var(--text-muted, #4a5568);
  background: rgba(255,255,255,0.05);
  padding: 1px 6px; border-radius: 4px;
  margin-left: 4px;
}
.token-address-small {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--enu, #E8920A); cursor: pointer;
}
.token-address-small:hover { text-decoration: underline; }

.chg-up   { color: #22c55e; font-weight: 600; }
.chg-down { color: #ef4444; font-weight: 600; }
.chg-flat { color: var(--text-muted); }

.holders-cell {
  display: flex; flex-direction: column; align-items: flex-end;
}
.holders-change { font-size: 11px; }

/* Contract verified badge */
.verified-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 5px; padding: 2px 7px;
  font-size: 11px; font-weight: 600; color: #22c55e;
}
.unverified-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 5px; padding: 2px 7px;
  font-size: 11px; color: #f59e0b;
}

/* Contract type badges */
.contract-type {
  display: inline-block;
  padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.ct-token  { background: rgba(99,102,241,.15); color: #818cf8; }
.ct-defi   { background: rgba(34,197,94,.12);  color: #22c55e; }
.ct-nft    { background: rgba(168,85,247,.15);  color: #c084fc; }
.ct-dao    { background: rgba(245,158,11,.12);  color: #f59e0b; }
.ct-other  { background: rgba(255,255,255,.07); color: var(--text-2); }

/* ─── PAGINATION ─────────────────────────────────────── */
.tbl-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.tbl-pg-info { font-size: 12px; color: var(--text-muted); }
.tbl-pg-btns { display: flex; align-items: center; gap: 6px; }
.pg-numbers  { display: flex; gap: 4px; }
.pg-btn, .pg-num {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-2); font-size: 12px; cursor: pointer;
  transition: .15s;
}
.pg-btn:hover, .pg-num:hover { background: rgba(232,146,10,.1); color: var(--enu); border-color: rgba(232,146,10,.3); }
.pg-btn:disabled { opacity: .35; cursor: not-allowed; }
.pg-num.active { background: var(--enu); color: #000; border-color: var(--enu); font-weight: 700; }

/* ─── OUT pill (tx direction) ────────────────────────── */
.out-pill, .in-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.out-pill { background: rgba(239,68,68,.12); color: #ef4444; border: 1px solid rgba(239,68,68,.2); }
.in-pill  { background: rgba(34,197,94,.12);  color: #22c55e; border: 1px solid rgba(34,197,94,.2); }

/* ─── INFO BOX ───────────────────────────────────────── */
.info-box {
  display: flex; align-items: flex-start; gap: 16px;
  background: rgba(232,146,10,.07);
  border: 1px solid rgba(232,146,10,.18);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 20px;
}
.info-box h4 { color: var(--enu); margin: 0 0 4px; font-size: 14px; }
.info-box p  { color: var(--text-2); font-size: 13px; margin: 0; line-height: 1.6; }

/* ─── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; text-align: center;
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .6; }
.empty-state h3 { color: var(--text); margin: 0 0 8px; }
.empty-state p  { color: var(--text-muted); font-size: 13px; margin: 0; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .nav-search { min-width: 260px; }
  .ndrop-menu { min-width: 220px; }
  .topbar-pill:nth-child(3) { display: none; }
}

@media (max-width: 860px) {
  .nav-search { min-width: 180px; }
  .ndrop-menu { min-width: 200px; }
  .topbar { padding: 0 12px; }
  .topbar-pill { padding: 0 8px; font-size: 11px; }
  .tb-sep { display: none; }
}

@media (max-width: 860px) {
  /* Nav links hidden — replaced by drawer */
  .nav-links { display: none !important; }
  /* Search bar stays visible on tablet */
  .nav-search { min-width: 160px; }
}

@media (max-width: 640px) {
  .topbar-left .topbar-pill:not(:first-child) { display: none; }
  /* Search bar hidden on small mobile (use drawer search) */
  .nav-search { display: none; }
  .nav-inner { gap: 0; }
  .logo { margin-right: auto; }
  .nav-link { padding: 0 8px; font-size: 12px; }
  .ndrop-menu { min-width: 180px; }
}

/* ─── NOT FOUND CARD ─────────────────────────────────────── */
.not-found-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 64px 24px;
    background: var(--surface, #13141c);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    margin: 0 auto;
    max-width: 560px;
}
.nf-icon  { font-size: 4rem; margin-bottom: 16px; }
.nf-title { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.nf-sub   { color: var(--text-2); font-size: 15px; margin: 0 0 20px; }
.nf-addr  {
    font-family: var(--font-mono, 'IBM Plex Mono');
    font-size: 12px;
    color: var(--enu, #E8920A);
    background: rgba(232,146,10,.08);
    border: 1px solid rgba(232,146,10,.2);
    border-radius: 8px;
    padding: 10px 16px;
    word-break: break-all;
    max-width: 100%;
    margin-bottom: 14px;
}
.nf-hint {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 400px;
}

/* ─── SEARCH ERROR TOAST ─────────────────────────────────── */
#searchErrorToast {
    animation: slideDown .2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}