/* ================================================================
   SuperKnet Explorer v2.0 — Base Styles
   Design: Dark theme, orange/gold brand, JetBrains Mono
   Organized: Variables → Reset → Typography → Layout → Components
   ================================================================ */

/* Variables moved to variables.css */

/* ======= RESET ======= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======= TYPOGRAPHY ======= */
html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: transparent;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

a {
    color: var(--orange);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--gold);
}

::selection {
    background: rgba(0,255,0,0.3);
    color: #fff;
}

/* ======= HEADER ======= */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ======= LOGO ======= */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: transform var(--transition-smooth);
}
.logo:hover .logo-icon {
    transform: scale(1.08);
}

.logo-text {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--text);
}

.ticker-symbol {
    display: inline-block;
    margin-left: 4px;
    font-weight: 700;
    font-size: 17px;
    color: var(--orange);
    text-shadow: var(--glow-orange);
    transform: translateY(-1px);
    letter-spacing: 0;
}

.network-badge {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0,255,0,0.12);
    border: 1px solid rgba(0,255,0,0.3);
    color: var(--gold);
}

/* ======= HEADER STATS ======= */
.header-stats {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    color: var(--text-dim);
    font-weight: 600;
}

/* ======= WS STATUS ======= */
.ws-status .ws-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.3s;
}

.ws-status.connected .ws-dot {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.ws-status.disconnected .ws-dot {
    background: var(--red);
    box-shadow: 0 0 6px var(--red);
}

.ws-status.connecting .ws-dot {
    background: var(--gold);
    animation: pulse 1.5s infinite;
}

/* ======= SEARCH ======= */
.search-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 20px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.search-container {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.search-box:focus-within {
    border-color: var(--orange);
    box-shadow: var(--glow-orange);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    padding: 14px 12px;
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    font-family: var(--font);
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    flex-shrink: 0;
    line-height: 1.4;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--orange);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    flex-shrink: 0;
}
.search-btn:hover {
    background: rgba(0,255,0,0.1);
}
.search-btn svg {
    width: 20px;
    height: 20px;
}

/* ======= SEARCH SUGGESTIONS ======= */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    margin-top: 4px;
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-header {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 14px 4px;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-dim);
    transition: background var(--transition-fast);
}

.suggestion-item:hover {
    background: rgba(0,255,0,0.08);
    color: var(--orange);
}

.suggestion-hint {
    color: var(--text-muted);
    font-style: italic;
}

/* ======= MAIN LAYOUT ======= */
.main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.content-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.content-panel.hidden {
    display: none;
}

/* ======= PANEL HEADER ======= */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.panel-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ======= BUTTONS ======= */
.btn-icon {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 6px;
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}
.btn-icon:hover {
    color: var(--orange);
    background: rgba(0,255,0,0.08);
    border-color: var(--border);
}
.btn-icon svg {
    width: 16px;
    height: 16px;
}
.btn-icon.active {
    color: var(--red);
}

.btn-small {
    font-family: var(--font);
    font-size: 11px;
    padding: 5px 12px;
    background: rgba(0,255,0,0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--orange);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-small:hover {
    background: rgba(0,255,0,0.2);
    border-color: var(--orange);
}

.btn-page {
    font-family: var(--font);
    font-size: 11px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-page:hover:not(:disabled) {
    background: rgba(0,255,0,0.1);
    color: var(--orange);
    border-color: var(--border-strong);
}
.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-copy-inline {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: var(--text-muted);
    border-radius: 2px;
    margin-left: 6px;
    opacity: 0;
    transition: opacity var(--transition-fast), color var(--transition-fast);
    vertical-align: middle;
}
.block-field:hover .btn-copy-inline,
.btn-copy-inline:focus {
    opacity: 1;
}
.btn-copy-inline:hover {
    color: var(--orange);
}

/* ======= PULSE DOT ======= */
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.pulse-dot.paused {
    background: var(--text-muted);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,230,118,0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0,230,118,0); }
}

/* ======= FILTER CHIPS ======= */
.feed-filter-group {
    display: flex;
    gap: 2px;
    margin-right: 8px;
}

.filter-chip {
    font-family: var(--font);
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
}

.filter-chip.active {
    color: var(--orange);
    background: rgba(0,255,0,0.1);
    border-color: var(--border);
}

/* ======= FEED ======= */
.feed-container {
    max-height: 70vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.feed-container::-webkit-scrollbar {
    width: 4px;
}
.feed-container::-webkit-scrollbar-track {
    background: transparent;
}
.feed-container::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 2px;
}

.feed-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-dim);
}

.feed-empty-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.feed-empty-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ======= FEED ITEM ======= */
.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background var(--transition-fast);
    animation: feedSlideIn 0.3s ease;
    cursor: pointer;
}

.feed-item:hover {
    background: var(--bg-card-hover);
}

@keyframes feedSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-type-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.feed-type-badge.send {
    background: rgba(255,59,59,0.1);
    border: 1px solid rgba(255,59,59,0.25);
    color: var(--red);
}

.feed-type-badge.receive {
    background: rgba(0,230,118,0.1);
    border: 1px solid rgba(0,230,118,0.25);
    color: var(--green);
}

.feed-type-badge.change {
    background: rgba(187,134,252,0.1);
    border: 1px solid rgba(187,134,252,0.25);
    color: var(--purple);
}

.feed-type-badge.open {
    background: rgba(68,138,255,0.1);
    border: 1px solid rgba(68,138,255,0.25);
    color: var(--blue);
}

.feed-type-badge.bandwidth {
    background: rgba(77,208,225,0.1);
    border: 1px solid rgba(77,208,225,0.25);
    color: var(--cyan);
}

.feed-type-badge.stake {
    background: rgba(255,193,7,0.1);
    border: 1px solid rgba(255,193,7,0.35);
    color: #ffc107;
}

.feed-body {
    flex: 1;
    min-width: 0;
}

.feed-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.feed-type-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feed-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

.feed-hash {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-address {
    font-size: 12px;
    color: var(--orange);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}
.feed-address:hover {
    color: var(--gold);
    text-decoration: underline;
}

.feed-dest {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.feed-amount {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.feed-amount.positive {
    color: var(--green);
}

.feed-amount.negative {
    color: var(--red);
}

.feed-memo {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.memo-payload {
    font-style: italic;
    color: var(--text-dim, #aaa);
}
.memo-type-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    font-style: normal;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    vertical-align: middle;
}
.memo-type-badge.memo-text        { background: #1a3a2a; color: #4ade80; }
.memo-type-badge.memo-json        { background: #1a2a3a; color: #60a5fa; }
.memo-type-badge.memo-hash_ref    { background: #3a2a1a; color: #f59e0b; }
.memo-type-badge.memo-nfc_card    { background: #2a1a3a; color: #c084fc; }
.memo-type-badge.memo-encrypted   { background: #3a1a2a; color: #f472b6; }
.memo-type-badge.memo-knexmail    { background: #2a1a3a; color: #a78bfa; }
.memo-type-badge.memo-dex_order   { background: #3a3a1a; color: #fbbf24; }
.memo-type-badge.memo-dex_settlement { background: #3a2a1a; color: #fb923c; }
.memo-type-badge.memo-recurring   { background: #1a3a2a; color: #34d399; }
.memo-type-badge.memo-multisig    { background: #1a2a3a; color: #93c5fd; }
.memo-type-badge.memo-app         { background: #2a2a2a; color: #9ca3af; }
.memo-type-badge.memo-extension   { background: #2a2a2a; color: #d4d4d8; }
.memo-type-badge.memo-legacy      { background: #2a2a2a; color: #737373; }
.memo-type-badge.memo-unknown     { background: #2a2a2a; color: #525252; }

/* ======= BREADCRUMB ======= */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.breadcrumb-item {
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--orange);
}

.breadcrumb-item.active {
    color: var(--text);
    cursor: default;
}

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

/* ======= PAGINATION ======= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.pagination.hidden {
    display: none;
}

.page-info {
    font-size: 11px;
    color: var(--text-dim);
}

/* ======= ACCOUNT VIEW ======= */
.account-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.account-address-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.account-address {
    font-size: 12px;
    color: var(--orange);
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.btn-copy {
    flex-shrink: 0;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.account-stat {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.account-stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.account-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold);
}

.account-stat-value.account-stat-addr {
    font-size: 11px;
    color: var(--orange);
    word-break: break-all;
    cursor: pointer;
}

/* ======= HISTORY ======= */
.history-container {
    max-height: 60vh;
    overflow-y: auto;
}

.history-container::-webkit-scrollbar {
    width: 4px;
}
.history-container::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 2px;
}

/* ======= BLOCK DETAIL ======= */
.block-detail {
    padding: 20px;
}

.block-fields {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    gap: 1px;
}

.block-field {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    gap: 12px;
}

.block-field:last-child {
    border-bottom: none;
}

.block-field-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 120px;
    flex-shrink: 0;
    padding-top: 2px;
}

.block-field-value {
    font-size: 13px;
    color: var(--text);
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.block-field-value.hash-value {
    font-size: 12px;
    color: var(--text-dim);
}

.block-field-value.clickable {
    cursor: pointer;
}
.block-field-value.clickable:hover {
    color: var(--orange);
    text-decoration: underline;
}

.block-field-value.address-link {
    color: var(--orange);
    cursor: pointer;
}
.block-field-value.address-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

.block-field-value .type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.type-tag.send { background: rgba(255,59,59,0.15); color: var(--red); }
.type-tag.receive { background: rgba(0,230,118,0.15); color: var(--green); }
.type-tag.change { background: rgba(187,134,252,0.15); color: var(--purple); }
.type-tag.open { background: rgba(68,138,255,0.15); color: var(--blue); }
.type-tag.bandwidth { background: rgba(77,208,225,0.15); color: var(--cyan); }
.type-tag.stake { background: rgba(255,193,7,0.15); color: #ffc107; }

/* ======= BLOCK NAVIGATION ======= */
.block-nav {
    display: flex;
    gap: 8px;
    padding: 16px 0 0;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

.block-nav:empty {
    display: none;
}

/* ======= RICH LIST ======= */
.richlist-container {
    max-height: 70vh;
    overflow-y: auto;
}

.richlist-table {
    width: 100%;
}

.richlist-header,
.richlist-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 80px;
    padding: 10px 20px;
    gap: 12px;
    align-items: center;
    font-size: 12px;
}

.richlist-header {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.richlist-row {
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background var(--transition-fast);
}

.richlist-row:hover {
    background: var(--bg-card-hover);
}

.rl-rank {
    color: var(--text-muted);
    font-weight: 600;
}

.rl-address .address-link {
    color: var(--orange);
    cursor: pointer;
}
.rl-address .address-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

.rl-balance {
    color: var(--gold);
    font-weight: 600;
}

.rl-pct {
    color: var(--text-dim);
    text-align: right;
}

.known-badge-inline {
    font-size: 9px;
    font-weight: 700;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ======= BLOCKS LIST ======= */
.blocks-container {
    max-height: 70vh;
    overflow-y: auto;
}

/* ======= TOAST ======= */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    gap: 8px;
    pointer-events: none;
}

.toast {
    font-family: var(--font);
    font-size: 12px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: auto;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info {
    border-color: rgba(0,255,0,0.3);
}

.toast-error {
    border-color: rgba(255,59,59,0.3);
    color: var(--red);
}

/* ======= ERROR BANNER ======= */
.error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255,59,59,0.12);
    border-bottom: 1px solid rgba(255,59,59,0.3);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: var(--red);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.error-banner.hidden {
    display: none;
}

.error-banner-text {
    flex: 1;
    max-width: var(--max-width);
    text-align: center;
}

.error-close-btn {
    color: var(--red);
}

/* ======= FOOTER ======= */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    margin-top: auto;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-dim);
    font-size: 11px;
}
.footer-links a:hover {
    color: var(--orange);
}

.footer-meta {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kbd-hint {
    font-family: var(--font);
    font-size: 10px;
    padding: 1px 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text-dim);
}

/* ======= KEYBOARD SHORTCUTS MODAL ======= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 14px;
    color: var(--text);
}

.modal-body {
    padding: 16px 20px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.shortcut-row kbd {
    font-family: var(--font);
    font-size: 12px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--gold);
    min-width: 28px;
    text-align: center;
}

.shortcut-row span {
    font-size: 12px;
    color: var(--text-dim);
}

/* ======= LOADING SPINNER ======= */
.spinner-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    html { font-size: 13px; }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-stats {
        width: 100%;
        overflow-x: auto;
    }

    .search-box input {
        font-size: 12px;
    }

    .main {
        padding: 12px;
    }

    .feed-item {
        padding: 12px 14px;
    }

    .account-stats {
        grid-template-columns: 1fr 1fr;
    }

    .block-field {
        flex-direction: column;
        gap: 4px;
    }

    .block-field-label {
        width: auto;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .richlist-header,
    .richlist-row {
        grid-template-columns: 40px 1fr 1fr;
        font-size: 11px;
    }

    .rl-pct {
        display: none;
    }

    .feed-filter-group {
        display: none;
    }

    .footer-meta {
        display: none;
    }
}

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

    .account-address {
        font-size: 11px;
    }

    .stat-pill {
        font-size: 10px;
        padding: 3px 8px;
    }

    .search-shortcut {
        display: none;
    }
}

/* ======= IDENTICONS ======= */

.identicon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 0;
}

.identicon-img {
    border-radius: 3px;
    image-rendering: pixelated;
    vertical-align: middle;
}

.identicon-account {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 10px;
    line-height: 0;
}

.identicon-account .identicon-img {
    border-radius: 6px;
}

.block-field-value.address-link {
    display: inline-flex;
    align-items: center;
}

.rl-address .address-link {
    display: inline-flex;
    align-items: center;
}

.account-stat-value.account-stat-addr {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 480px) {
    .identicon-inline .identicon-img {
        width: 14px !important;
        height: 14px !important;
    }
    .identicon-account .identicon-img {
        width: 36px !important;
        height: 36px !important;
    }
}

/* ======= DUAL-ADDRESS LAYOUT ======= */
.feed-addresses {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.feed-arrow {
    color: #555;
    font-size: 11px;
    margin: 0 2px;
    flex-shrink: 0;
}

/* ======= VALIDATOR ADDRESS (MAGENTA BOLD) ======= */
.validator-address {
    color: #e040fb !important;
    font-weight: 700;
}
.validator-address:hover {
    color: #ea80fc !important;
}

/* ======= UNSTAKE TYPE BADGE ======= */
.feed-type-badge.unstake {
    background: rgba(255,152,0,0.1);
    border: 1px solid rgba(255,152,0,0.35);
    color: #ff9800;
}
.type-tag.unstake {
    background: rgba(255,152,0,0.15);
    color: #ff9800;
}

/* ======= PENDING PULSE ANIMATION ======= */
.feed-item--pending {
    border-left: 3px solid rgba(255,193,7,0.5);
    animation: pending-pulse 2s ease-in-out infinite;
}
@keyframes pending-pulse {
    0%, 100% { border-left-color: rgba(255,193,7,0.3); background: transparent; }
    50% { border-left-color: rgba(255,193,7,0.8); background: rgba(255,193,7,0.03); }
}
.feed-item--confirmed {
    border-left: 3px solid #00e676;
    animation: confirmed-flash 0.6s ease-out forwards;
}
@keyframes confirmed-flash {
    0% { background: rgba(0,230,118,0.1); }
    100% { background: transparent; opacity: 0; }
}

/* ======= STAKING SECTION (Account Panel) ======= */
.account-staking-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.account-staking-section .panel-subtitle {
    margin-bottom: 10px;
}
.staking-entries {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    gap: 8px;
}
.staking-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid var(--border);
    gap: 12px;
}
.staking-validator {
    flex: 1;
    min-width: 0;
}
.staking-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.staking-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.staking-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.staking-badge.active {
    background: rgba(0,200,83,0.15);
    color: #00c853;
}
.staking-badge.unbonding {
    background: rgba(255,193,7,0.15);
    color: #ffc107;
}
.staking-countdown {
    font-size: 11px;
    color: #ffc107;
    font-weight: 600;
}

/* ======= NERD STATS EXPANSION ======= */
.nerd-tier-row {
    transition: background 0.15s ease;
}
.nerd-tier-row:hover {
    background: rgba(0,255,0,0.05);
}
.nerd-tier-row.expanded {
    background: rgba(0,255,0,0.08);
}
.nerd-tier-row td:first-child::before {
    content: '▶ ';
    font-size: 8px;
    color: #555;
    transition: transform 0.15s ease;
    display: inline-block;
    margin-right: 4px;
}
.nerd-tier-row.expanded td:first-child::before {
    content: '▼ ';
    color: var(--orange);
}
.nerd-tier-detail.hidden {
    display: none;
}
.account-staking-section.hidden {
    display: none;
}
.nerd-tier-detail td {
    padding: 0 !important;
    border-bottom: none !important;
}
.nerd-json {
    background: #0a0a0a;
    color: #8be9fd;
    font-size: 11px;
    line-height: 1.5;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 4px 8px 8px;
    overflow-x: auto;
    white-space: pre;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid rgba(139,233,253,0.1);
}

/* ======= TIER BREAKDOWN BAR (Stats Panel) ======= */
.tier-bar {
    display: flex;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0 6px;
    gap: 2px;
}
.tier-bar-segment {
    min-width: 4px;
    transition: width 0.3s ease;
    border-radius: 2px;
}
.tier-breakdown-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.tier-legend-item {
    font-size: 10px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
}
.tier-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Light theme overrides */
.nerd-json {
    background: #f5f5f5;
    color: #0d47a1;
    border-color: rgba(13,71,161,0.1);
}
.validator-address {
    color: #ab47bc !important;
}
.staking-entry {
    background: rgba(0,0,0,0.02);
}
