/* ============================================================
   MEMPOOL SPACE · SOPHISTICATED DARK THEME
   ============================================================ */

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d0f14;
    color: #d1d9e6;
    padding: 16px;
    min-height: 100vh;
    line-height: 1.5;
}

#app {
    max-width: 1440px;
    margin: 0 auto;
}

/* ----- SCROLLBAR ----- */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #141820;
}
::-webkit-scrollbar-thumb {
    background: #2a3342;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d4a5e;
}

/* ----- WELCOME BAR - PROMINENT & LARGE ----- */
.welcome-bar {
    background: #141820;
    border: 1px solid #242a34;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.welcome-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.06), rgba(128, 235, 82, 0.03));
    pointer-events: none;
}

.welcome-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-left {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7931a, #ffb347);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d0f14;
    box-shadow: 0 0 40px rgba(247, 147, 26, 0.25);
    flex-shrink: 0;
}

.welcome-text {
    display: flex;
    flex-direction: column;
}

.welcome-greeting {
    font-size: 14px;
    color: #6a7a8a;
    letter-spacing: 0.3px;
}

.welcome-name {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #f7931a, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.company-name {
    font-size: 13px;
    color: #8a9aa8;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.company-name svg {
    color: #f7931a;
    flex-shrink: 0;
}

.welcome-status {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
    flex-wrap: wrap;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(128, 235, 82, 0.1);
    border: 1px solid rgba(128, 235, 82, 0.2);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    color: #80eb52;
}

.status-dot-active {
    width: 8px;
    height: 8px;
    background: #80eb52;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a202a;
    border: 1px solid #2a3342;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 12px;
    color: #8a9aa8;
}

.date-badge svg {
    color: #f7931a;
}

/* ----- WELCOME STATS - BIGGER ----- */
.welcome-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    z-index: 1;
    margin-bottom: 24px;
}

.welcome-stat {
    display: flex;
    flex-direction: column;
    background: #0d0f14;
    border: 1px solid #1f2732;
    border-radius: 12px;
    padding: 16px 20px;
    transition: border-color 0.3s ease;
}

.welcome-stat:hover {
    border-color: #3a4555;
}

.welcome-stat .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6a7a8a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-stat .label svg {
    color: #f7931a;
    flex-shrink: 0;
}

.welcome-stat .value.big {
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #eaeef2;
}

.welcome-stat .value .currency {
    font-size: 20px;
    font-weight: 400;
    color: #8a9aa8;
}

.welcome-stat .value .pct-symbol {
    font-size: 20px;
    font-weight: 400;
    color: #8a9aa8;
}

.welcome-stat .sub {
    font-size: 12px;
    color: #5a6a7a;
    margin-top: 4px;
}

.status-active {
    color: #80eb52;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ----- PROGRESS BAR - PROMINENT ----- */
.progress-wrap.prominent {
    z-index: 1;
    width: 100%;
    padding: 16px 20px;
    background: #0d0f14;
    border: 1px solid #1f2732;
    border-radius: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #8a9aa8;
    margin-bottom: 8px;
}

.progress-header .pct {
    font-weight: 700;
    color: #80eb52;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: #1a202a;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #f7931a, #80eb52);
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 30px rgba(128, 235, 82, 0.2);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-30px); }
    100% { transform: translateX(30px); }
}

.progress-end {
    font-size: 12px;
    color: #5a6a7a;
    text-align: right;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.progress-end svg {
    color: #f7931a;
}

.progress-end .divider {
    color: #2a3342;
}

/* ----- HEADER ----- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #141820;
    border: 1px solid #242a34;
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo svg {
    color: #f7931a;
}

.logo span:first-of-type {
    color: #f7931a;
}

.logo-dot {
    color: #f7931a;
}

.logo-space {
    color: #d1d9e6;
    font-weight: 400;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a202a;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 12px;
    color: #8a9aa8;
    border: 1px solid #2a3342;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #80eb52;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.block-height {
    font-size: 13px;
    color: #8a9aa8;
    background: #1a202a;
    padding: 4px 14px;
    border-radius: 40px;
    border: 1px solid #2a3342;
    display: flex;
    align-items: center;
    gap: 6px;
}

.block-height svg {
    color: #f7931a;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #8a9aa8;
}

.header-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-stat svg {
    color: #f7931a;
}

.header-stat span {
    color: #d1d9e6;
    font-weight: 500;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a202a;
    padding: 4px 14px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 11px;
    color: #80eb52;
    border: 1px solid rgba(128, 235, 82, 0.2);
    letter-spacing: 0.5px;
}

.live-pulse {
    width: 7px;
    height: 7px;
    background: #80eb52;
    border-radius: 50%;
    animation: pulse-dot 1.2s ease-in-out infinite;
}

/* ----- STATS GRID ----- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #141820;
    border: 1px solid #242a34;
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color 0.25s ease;
}

.stat-card:hover {
    border-color: #3a4555;
}

.stat-label {
    font-size: 11px;
    color: #6a7a8a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-label svg {
    color: #f7931a;
    flex-shrink: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #eaeef2;
    letter-spacing: -0.5px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-unit {
    font-size: 16px;
    font-weight: 400;
    color: #8a9aa8;
    margin-left: 4px;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: #80eb52;
}

.stat-change.negative {
    color: #ff4081;
}

.stat-change svg {
    width: 12px;
    height: 12px;
}

.stat-sub {
    font-size: 12px;
    color: #6a7a8a;
    margin-top: 4px;
}

.stat-sub .positive {
    color: #80eb52;
}

.stat-sub .negative {
    color: #ff4081;
}

/* ----- CARDS ----- */
.card {
    background: #141820;
    border: 1px solid #242a34;
    border-radius: 12px;
    padding: 18px 20px;
}

.card-header {
    font-size: 12px;
    font-weight: 600;
    color: #8a9aa8;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header svg {
    color: #f7931a;
    flex-shrink: 0;
}

.card-sub {
    font-weight: 400;
    color: #5a6a7a;
    font-size: 11px;
    margin-left: auto;
}

/* ----- MAIN GRID ----- */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* ----- CHART ----- */
.chart-wrapper {
    height: 150px;
    position: relative;
}

.chart-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 11px;
    color: #8a9aa8;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-dot.high { background: #80eb52; }
.legend-dot.medium { background: #f7931a; }
.legend-dot.low { background: #4a5a6e; }

/* ----- BLOCKS GRID ----- */
.blocks-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.block-slot {
    aspect-ratio: 1;
    background: #1a202a;
    border-radius: 4px;
    border: 1px solid #242a34;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: #4a5a6e;
    cursor: default;
}

.block-slot.filled {
    background: #80eb52;
    border-color: #80eb52;
    color: #0d0f14;
    box-shadow: 0 0 20px rgba(128, 235, 82, 0.15);
}

.block-slot.pending {
    background: #f7931a;
    border-color: #f7931a;
    color: #0d0f14;
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.12);
}

.block-slot.empty {
    background: #1a202a;
    border-color: #242a34;
    color: #2a3342;
}

.block-slot.high-fee {
    background: #80eb52;
    border-color: #80eb52;
    color: #0d0f14;
    box-shadow: 0 0 25px rgba(128, 235, 82, 0.25);
    animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(128, 235, 82, 0.15); }
    50% { box-shadow: 0 0 35px rgba(128, 235, 82, 0.35); }
}

.block-slot.new {
    animation: block-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes block-pop {
    0% { transform: scale(0.6); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

.blocks-legend {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: #6a7a8a;
}

.legend-box {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-box.filled { background: #80eb52; }
.legend-box.pending { background: #f7931a; }
.legend-box.empty { background: #1a202a; border: 1px solid #2a3342; }

.miner-info {
    margin-top: 14px;
    background: #0d0f14;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #8a9aa8;
}

.miner-info svg {
    color: #f7931a;
    flex-shrink: 0;
}

.miner-hash {
    margin-left: auto;
    color: #d1d9e6;
    font-weight: 500;
}

/* ----- BOTTOM GRID ----- */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* ----- MINERS ----- */
.miners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.miner-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.miner-name {
    width: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #d1d9e6;
}

.miner-bar {
    flex: 1;
    height: 5px;
    background: #1a202a;
    border-radius: 10px;
    overflow: hidden;
}

.miner-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #f7931a, #80eb52);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.miner-share {
    width: 50px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    color: #d1d9e6;
    font-variant-numeric: tabular-nums;
}

/* ----- TRANSACTIONS ----- */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    background: #0d0f14;
    border-radius: 8px;
    border-left: 3px solid #4a5a6e;
    transition: all 0.25s ease;
    animation: tx-slide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tx-slide {
    0% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 1; transform: translateX(0); }
}

.tx-item:hover {
    background: #1a202a;
}

.tx-hash {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
    color: #d1d9e6;
    flex: 1;
    letter-spacing: 0.2px;
}

.tx-fee {
    font-weight: 500;
    font-size: 12px;
    background: #1a202a;
    padding: 2px 12px;
    border-radius: 20px;
    color: #b0c0d0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tx-size {
    font-size: 11px;
    color: #5a6a7a;
    white-space: nowrap;
}

.tx-time {
    font-size: 11px;
    color: #5a6a7a;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tx-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tx-badge.rbf {
    background: rgba(128, 235, 82, 0.15);
    color: #80eb52;
    border: 1px solid rgba(128, 235, 82, 0.2);
}

.tx-badge.full-rbf {
    background: rgba(255, 64, 129, 0.15);
    color: #ff4081;
    border: 1px solid rgba(255, 64, 129, 0.2);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tx-item.priority-high { border-left-color: #80eb52; }
.tx-item.priority-med { border-left-color: #f7931a; }
.tx-item.priority-low { border-left-color: #4a5a6e; }

/* ----- FOOTER ----- */
.footer {
    margin-top: 12px;
    padding: 14px 20px;
    background: #141820;
    border: 1px solid #242a34;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4a5a6e;
    flex-wrap: wrap;
    gap: 8px;
}

.footer a {
    color: #6a7a8a;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #f7931a;
}

.footer svg {
    color: #4a5a6e;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-grid {
        grid-template-columns: 1fr;
    }
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    .welcome-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .welcome-top {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    .header-right {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .blocks-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .tx-item {
        flex-wrap: wrap;
        gap: 6px;
    }
    .tx-hash {
        width: 100%;
        font-size: 11px;
    }
    .miner-name {
        width: 80px;
        font-size: 12px;
    }
    .welcome-bar {
        padding: 20px 16px;
    }
    .welcome-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .welcome-stat .value.big {
        font-size: 26px;
    }
    .welcome-name {
        font-size: 20px;
    }
    .welcome-status {
        flex-direction: column;
        align-items: flex-start;
    }
}