/* ═══════════════════════════════════════════════════════════
   AgentChain Explorer v3 — Premium Dark Theme
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg:           #0a0a0f;
    --bg-2:         #0e0e16;
    --bg-3:         #13131e;
    --bg-card:      rgba(14, 14, 22, 0.85);
    --bg-hover:     rgba(0, 212, 255, 0.03);
    --border:       rgba(255, 255, 255, 0.06);
    --border-2:     rgba(255, 255, 255, 0.1);
    --border-glow:  rgba(0, 212, 255, 0.15);

    --text:         #e8e8f0;
    --text-2:       #8e8eaa;
    --text-3:       #555570;
    --text-dim:     #333348;

    --accent:       #00d4ff;
    --accent-2:     #00ff88;
    --purple:       #8b5cf6;
    --red:          #ff4466;
    --orange:       #ff8844;
    --yellow:       #ffd700;
    --pink:         #f472b6;

    --gradient:     linear-gradient(135deg, #00d4ff, #00ff88);
    --gradient-2:   linear-gradient(135deg, #00d4ff 0%, #8b5cf6 50%, #00ff88 100%);

    --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:         'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

    --radius:       12px;
    --radius-sm:    8px;
    --radius-lg:    16px;

    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ Reset ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 212, 255, 0.02) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(139, 92, 246, 0.02) 0%, transparent 60%);
    pointer-events: none;
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: #33dfff; }

/* ═══ Typography ═══ */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.gradient-text {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mono { font-family: var(--mono); font-size: 0.85em; }
.dim { color: var(--text-3); }
.accent { color: var(--accent); }

/* ═══ Navigation ═══ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    height: 60px;
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text) !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.nav-chain { font-size: 1.2rem; }
.nav-accent { color: var(--accent); }

.nav-center { flex: 1; display: flex; justify-content: center; }

.search-bar {
    position: relative;
    width: 100%;
    max-width: 520px;
}
.search-bar input {
    width: 100%;
    height: 38px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 0 40px 0 36px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.82rem;
    transition: all 0.15s var(--ease);
    outline: none;
}
.search-bar input::placeholder { color: var(--text-3); }
.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
    background: var(--bg-2);
}
.search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}
.search-kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: 4px;
    padding: 1px 7px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-3);
    pointer-events: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-2);
}
.net-dot {
    width: 6px; height: 6px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* WebSocket badge */
.ws-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-3);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
}
.ws-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.3s;
}
.ws-dot-live {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
    animation: pulse-dot 2s infinite;
}
.ws-dot-off {
    background: var(--text-dim);
}

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
}
.nav-link {
    font-size: 0.82rem;
    color: var(--text-2) !important;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.15s var(--ease);
}
.nav-link:hover { color: var(--text) !important; background: rgba(255,255,255,0.03); }
.nav-link-active {
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent) !important;
}
.nav-link-icon { display:flex;align-items:center;padding:4px 8px; }
.nav-link-lang { font-size:0.78rem;padding:4px 10px;border:1px solid rgba(255,255,255,0.08);border-radius:6px; }

/* Hamburger */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px; height: 32px;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}
.nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    position: absolute;
    left: 5px;
    transition: all 0.3s ease;
    border-radius: 1px;
}
.nav-hamburger span:nth-child(1) { top: 8px; }
.nav-hamburger span:nth-child(2) { top: 15px; }
.nav-hamburger span:nth-child(3) { top: 22px; }
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg); top: 15px; }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg); top: 15px; }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
    background: rgba(5, 5, 8, 0.97);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 16px 24px;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu-search {
    margin-bottom: 12px;
}
.mobile-menu-search input {
    width: 100%;
    height: 44px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.85rem;
    outline: none;
}
.mobile-menu-search input:focus {
    border-color: var(--accent);
}
.mobile-menu-link {
    display: block;
    padding: 14px 16px;
    color: var(--text-2);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.mobile-menu-link:hover,
.mobile-menu-active {
    color: var(--accent);
    background: rgba(0, 212, 255, 0.06);
}

/* ═══ Views ═══ */
.view { display: none; padding-top: 88px; padding-bottom: 60px; min-height: 100vh; }
.view.active { display: block; animation: fadeIn 0.25s var(--ease); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ Page Header ═══ */
.page-header { margin-bottom: 24px; }
.page-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-3);
    margin-bottom: 8px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-dim); }

/* Block nav arrows */
.block-nav-arrows {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.btn-page-sm {
    font-size: 0.78rem;
    padding: 5px 12px;
}

/* ═══ Stats Grid ═══ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s var(--ease);
}
.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-1px);
}
.stat-card-highlight {
    border-color: rgba(0, 212, 255, 0.12);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.04), rgba(0, 255, 136, 0.02));
}

.stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon-blue { background: rgba(0, 212, 255, 0.08); color: var(--accent); }
.stat-icon-green { background: rgba(0, 255, 136, 0.08); color: var(--accent-2); }
.stat-icon-purple { background: rgba(139, 92, 246, 0.08); color: var(--purple); }
.stat-icon-cyan { background: rgba(0, 212, 255, 0.08); color: var(--accent); }
.stat-icon-orange { background: rgba(255, 136, 68, 0.08); color: var(--orange); }
.stat-icon-pink { background: rgba(244, 114, 182, 0.08); color: var(--pink); }

.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-label {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 2px;
}

/* ═══ Dashboard Grid ═══ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dash-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-icon { font-size: 1rem; }

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}
.btn-link:hover { color: var(--accent-2); }

.panel-body { max-height: 520px; overflow-y: auto; }

/* Live indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.live-dot {
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 68, 102, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(255, 68, 102, 0); }
}

/* ═══ Feed Items ═══ */
.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.1s var(--ease);
    border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--bg-hover); }

.feed-item-new {
    animation: feedSlideIn 0.4s var(--ease);
    background: rgba(0, 212, 255, 0.02);
}
@keyframes feedSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-item-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.65rem;
    flex-shrink: 0;
}
.feed-icon-block {
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.12);
    color: var(--accent);
}
.feed-icon-tx {
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.12);
    color: var(--accent-2);
}

.feed-item-body { flex: 1; min-width: 0; }
.feed-item-title {
    font-size: 0.82rem;
    font-weight: 600;
}
.feed-item-sub {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feed-item-time {
    font-size: 0.72rem;
    color: var(--text-3);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ═══ Block/Tx List Items ═══ */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.1s var(--ease);
    border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-hover); }

.list-item-new {
    animation: feedSlideIn 0.4s var(--ease);
    background: rgba(0, 212, 255, 0.02);
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.block-icon {
    width: 38px; height: 38px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--accent);
    flex-shrink: 0;
}

.list-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.list-item-title { font-weight: 600; font-size: 0.85rem; }
.list-item-sub {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 1px;
}

.list-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
}
.list-item-meta { font-size: 0.72rem; color: var(--text-3); }
.list-item-txcount {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-2);
}

/* ═══ Agent Link ═══ */
.agent-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent) !important;
}
.agent-link:hover { color: #33dfff !important; }

.agent-avatar {
    width: 20px; height: 20px;
    background: var(--gradient);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 800;
    color: var(--bg);
    flex-shrink: 0;
}

.mono-link {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
}

/* ═══ Copy Button ═══ */
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-3);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    flex-shrink: 0;
    vertical-align: middle;
}
.copy-btn:hover {
    background: rgba(0, 212, 255, 0.06);
    border-color: rgba(0, 212, 255, 0.15);
    color: var(--accent);
}
.copy-btn:active {
    transform: scale(0.9);
}

/* Time badge (relative time) */
.time-badge {
    display: inline-flex;
    padding: 2px 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.7rem;
    color: var(--text-3);
    margin-left: 6px;
}

/* Hash display */
.hash-full {
    word-break: break-all;
    font-size: 0.82em;
}
.hash-cell {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

/* ═══ Tables ═══ */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead {
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
}
.data-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    white-space: nowrap;
}
.data-table td {
    padding: 11px 16px;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }

.clickable-row { cursor: pointer; transition: background 0.1s var(--ease); }
.clickable-row:hover { background: var(--bg-hover); }

.tx-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    padding: 2px 8px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
}

.utility-score {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--accent-2);
}

.time-cell { color: var(--text-2); }

/* ═══ Pagination ═══ */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.btn-page {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s var(--ease);
}
.btn-page:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}
.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.btn-page-active {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}
.page-info {
    font-size: 0.78rem;
    color: var(--text-3);
    margin-left: 8px;
}

/* ═══ Detail Cards ═══ */
.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}
.detail-card h3 {
    font-size: 0.92rem;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    font-weight: 600;
}

.detail-rows { display: flex; flex-direction: column; }
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 24px;
}
.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 0.82rem;
    color: var(--text-3);
    font-weight: 500;
    min-width: 160px;
    flex-shrink: 0;
}
.detail-value {
    font-size: 0.82rem;
    text-align: right;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.amount-highlight {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-2);
}

/* ═══ Badges ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-success { background: rgba(0, 255, 136, 0.08); color: var(--accent-2); border: 1px solid rgba(0, 255, 136, 0.15); }
.badge-fail { background: rgba(255, 68, 102, 0.08); color: var(--red); border: 1px solid rgba(255, 68, 102, 0.15); }
.badge-validator { background: rgba(255, 215, 0, 0.08); color: var(--yellow); border: 1px solid rgba(255, 215, 0, 0.15); }
.badge-agent { background: rgba(0, 212, 255, 0.08); color: var(--accent); border: 1px solid rgba(0, 212, 255, 0.15); }

.tx-type-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent);
}

.direction-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--mono);
}
.dir-out { background: rgba(255, 68, 102, 0.08); color: var(--red); }
.dir-in { background: rgba(0, 255, 136, 0.08); color: var(--accent-2); }

/* ═══ Address Header ═══ */
.address-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}
.address-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}
.address-avatar-lg {
    width: 48px; height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: var(--bg);
    flex-shrink: 0;
}
.address-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.address-name { font-size: 1.2rem; font-weight: 800; }
.address-hash {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-3);
    cursor: pointer;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 6px;
}
.address-hash:hover { color: var(--accent); }
.address-badges {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

/* ═══ Offline Card ═══ */
.offline-card {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    margin: 60px auto;
}
.offline-icon { font-size: 3rem; margin-bottom: 16px; }
.offline-card h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text);
}
.offline-card p { color: var(--text-3); font-size: 0.9rem; margin-bottom: 4px; }
.offline-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}
.btn-secondary {
    padding: 10px 24px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.btn-secondary:hover { border-color: var(--accent); }

/* ═══ Empty State ═══ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-3);
}
.empty-state-icon { font-size: 2rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.88rem; }

/* ═══ Connection Status ═══ */
.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    user-select: none;
}
.connection-status:hover { border-color: var(--accent); }
.conn-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.conn-dot-connecting {
    background: var(--yellow);
    animation: pulse-dot 1s ease-in-out infinite;
}
.conn-dot-live {
    background: var(--accent-2);
    box-shadow: 0 0 6px var(--accent-2);
}
.conn-dot-offline { background: var(--red); }
.conn-label { color: var(--text-2); font-weight: 500; }

/* ═══ Settings Panel ═══ */
.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-panel {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.settings-header h3 { font-size: 0.95rem; }
.settings-close {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
.settings-close:hover { color: var(--text); }
.settings-body { padding: 16px 20px; }
.settings-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-2);
    margin-bottom: 5px;
    font-weight: 500;
}
.settings-label-sm { font-size: 0.72rem; color: var(--text-3); }
.settings-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s;
}
.settings-input:focus { border-color: var(--accent); }
.settings-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}
.settings-preset {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-2);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.settings-preset:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.settings-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}
.btn-primary {
    padding: 9px 24px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: var(--font);
}
.btn-primary:hover { opacity: 0.85; }

/* ═══ Loading / Spinner ═══ */
.loading-placeholder {
    padding: 40px;
    text-align: center;
    color: var(--text-3);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.spinner {
    width: 24px; height: 24px;
    border: 2px solid var(--border-2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Copy Toast ═══ */
.copy-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 9999;
    animation: toastIn 0.2s var(--ease), toastOut 0.2s var(--ease) 1s forwards;
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.3);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ═══ Not Found ═══ */
.not-found {
    text-align: center;
    color: var(--text-3);
    padding: 60px 20px;
    font-size: 1rem;
}

/* ═══ Footer ═══ */
#footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 20px;
    background: var(--bg-2);
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 28px;
    margin-bottom: 28px;
}
.footer-logo {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
}
.footer-desc {
    font-size: 0.78rem;
    color: var(--text-3);
    line-height: 1.5;
}
.footer-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-2);
    margin-bottom: 10px;
}
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 5px; }
.footer-list a {
    color: var(--text-3);
    font-size: 0.82rem;
    transition: color 0.15s;
}
.footer-list a:hover { color: var(--accent); }
.footer-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 3px 0;
    color: var(--text-3);
}
.footer-info-row .mono { color: var(--text-2); font-size: 0.72rem; }
.footer-status-live { color: var(--accent-2); font-weight: 600; }
.footer-status-offline { color: var(--red); font-weight: 600; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* ═══ Stats grid in address pages ═══ */
.stats-grid-sm {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 20px;
}

/* ═══ Responsive ═══ */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-sm { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
    .nav-hamburger { display: block; }
    .search-bar { max-width: 280px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .ws-badge .ws-label { display: none; }
}

@media (max-width: 640px) {
    .nav-container { gap: 8px; padding: 0 12px; }
    .nav-center { display: none; }
    .container { padding: 0 12px; }
    .view { padding-top: 76px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-icon { display: none; }
    .stat-value { font-size: 1.05rem; }
    .data-table th:nth-child(5), .data-table td:nth-child(5),
    .data-table th:nth-child(6), .data-table td:nth-child(6) { display: none; }
    .detail-row { flex-direction: column; gap: 4px; }
    .detail-value { text-align: left; justify-content: flex-start; }
    .detail-label { min-width: auto; }
    .address-identity { flex-direction: column; text-align: center; }
    .address-hash { justify-content: center; flex-wrap: wrap; }
    .footer-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
    .list-item { padding: 10px 14px; }
    .feed-item { padding: 10px 14px; }
    .connection-status .conn-label { display: none; }
    .offline-card { padding: 40px 20px; }
    .ws-badge { display: none; }
    .network-badge { display: none; }
    .block-nav-arrows { flex-wrap: wrap; }
    .page-title { font-size: 1.4rem; }
}

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

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
::selection { background: rgba(0, 212, 255, 0.2); color: var(--text); }

/* ═══ Table overflow in detail cards ═══ */
.detail-card .data-table { overflow-x: auto; display: block; }
.detail-card .data-table thead,
.detail-card .data-table tbody { display: table; width: 100%; }

/* ═══ Slow connection banner ═══ */
.slow-connection-banner {
    text-align: center;
    padding: 12px 20px;
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--yellow);
    margin-bottom: 16px;
    animation: fadeIn 0.3s var(--ease);
}
