* {
    box-sizing: border-box;
}

:root {
    --bg: #080b10;
    --panel: #0e131b;
    --panel-soft: #111823;
    --border: rgba(255,255,255,.07);
    --text: #f5f7fa;
    --muted: #7e8998;
    --accent: #f7931a;
    --green: #38d996;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 70% 0%, rgba(247,147,26,.08), transparent 35%),
        var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
    max-width: 1450px;
    margin: auto;
    padding: 34px 42px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bitcoin-logo {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #080b10;
    border-radius: 14px;
    font-size: 30px;
    font-weight: 800;
}

h1 {
    font-size: 17px;
    margin: 0;
    letter-spacing: .16em;
}

.brand p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.status-badge,
.live-label,
.online {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: .12em;
    font-weight: 700;
}

.status-badge {
    padding: 10px 14px;
    border: 1px solid rgba(56,217,150,.22);
    background: rgba(56,217,150,.05);
    border-radius: 100px;
    color: var(--green);
}

.status-dot,
.small-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px var(--green);
}

.hero {
    min-height: 270px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eyebrow,
.panel-kicker {
    color: var(--accent);
    font-size: 10px;
    letter-spacing: .2em;
    font-weight: 800;
}

.hero h2 {
    font-size: clamp(38px, 5vw, 66px);
    letter-spacing: -.055em;
    line-height: .98;
    margin: 13px 0 18px;
    max-width: 720px;
}

.hero-text {
    color: var(--muted);
    font-size: 15px;
}

.hero-live {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: .12em;
}

.pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(56,217,150,.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card,
.panel {
    background: linear-gradient(145deg, var(--panel-soft), var(--panel));
    border: 1px solid var(--border);
    border-radius: 18px;
}

.stat-card {
    padding: 25px;
}

.stat-label {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .14em;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    font-size: 32px;
    margin: 13px 0 7px;
    letter-spacing: -.04em;
}

.stat-detail {
    color: var(--muted);
    font-size: 12px;
}

.success {
    color: var(--green);
}

.main-grid {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.panel {
    padding: 27px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.panel h3 {
    margin: 7px 0 0;
    font-size: 18px;
}

.live-label,
.online {
    color: var(--green);
}

.activity-display {
    min-height: 180px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.activity-number span {
    font-size: 62px;
    font-weight: 700;
    letter-spacing: -.06em;
}

.activity-number small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
}

.activity-line {
    height: 70px;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.line-glow {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(247,147,26,.3),
        var(--accent),
        rgba(247,147,26,.3),
        transparent
    );
    box-shadow: 0 0 15px rgba(247,147,26,.4);
}

.activity-footer {
    color: var(--muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.miner-name {
    margin-top: 36px;
    font-size: 18px;
    font-weight: 600;
    word-break: break-all;
    line-height: 1.5;
}

.miner-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
}

.miner-data div {
    padding: 16px;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.miner-data span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    margin-bottom: 8px;
}

.miner-data strong {
    font-size: 14px;
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.compact-panel {
    min-height: 180px;
}

.progress {
    height: 5px;
    background: rgba(255,255,255,.06);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 34px;
}

.progress div {
    height: 100%;
    width: 0;
    background: var(--green);
    transition: width .5s ease;
}

.progress-info {
    margin-top: 13px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.progress-info strong {
    color: var(--text);
}

.block-value {
    font-size: 42px;
    font-weight: 700;
    margin-top: 24px;
}

.muted {
    color: var(--muted);
    font-size: 11px;
    margin-top: 8px;
}

.system-online {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--green);
    font-size: 20px;
    font-weight: 700;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 26px 4px 0;
    color: #48515e;
    font-size: 9px;
    letter-spacing: .14em;
}

@media (max-width: 900px) {
    .page {
        padding: 22px;
    }

    .stats-grid,
    .bottom-grid,
    .main-grid {
        grid-template-columns: 1fr;
    }

    .hero-live {
        display: none;
    }

    .hero {
        min-height: 230px;
    }
}


/* =========================================
   REAL-TIME MINING ACTIVITY CHART
   ========================================= */

.activity-line {
    position: relative;
    height: 150px;
    min-width: 0;
    overflow: visible;
}

.activity-chart {
    width: 100%;
    height: 125px;
    display: block;
    overflow: visible;
}

.chart-grid {
    stroke: rgba(255,255,255,.055);
    stroke-width: 1;
}

.chart-line {
    fill: none;
    stroke: #f7931a;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(
        0 0 5px rgba(247,147,26,.35)
    );
}

.chart-current {
    fill: #f7931a;
    stroke: #080b10;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.chart-max {
    position: absolute;
    top: 0;
    right: 0;
    color: #7e8998;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
}

.chart-times {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    justify-content: space-between;

    color: #596474;
    font-size: 9px;
    letter-spacing: .08em;
}


/* =========================================
   BITCOIN CORE NODE PANEL
   ========================================= */

.node-section {
    margin-top: 12px;
}

.node-panel {
    position: relative;
    overflow: hidden;
}

.node-panel::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(247,147,26,.055);
    filter: blur(20px);
    pointer-events: none;
}

.node-header {
    position: relative;
    z-index: 1;
}

.node-grid {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 1.35fr 1.35fr 1fr 1fr 1fr 1fr;

    margin-top: 28px;

    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;
    background: rgba(255,255,255,.015);
}

.node-metric {
    min-width: 0;
    padding: 19px 20px;

    border-right: 1px solid var(--border);
}

.node-metric:last-child {
    border-right: 0;
}

.node-metric span {
    display: block;

    color: var(--muted);

    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;

    margin-bottom: 11px;
}

.node-metric strong {
    display: block;

    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.035em;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-metric.primary strong {
    color: var(--accent);
    font-size: 27px;
}

.node-metric small {
    display: block;

    margin-top: 8px;

    color: var(--muted);
    font-size: 10px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#nodeSync.synced {
    color: var(--green);
}

#nodeSync.syncing {
    color: var(--accent);
}


/* Responsive Bitcoin Core panel */

@media (max-width: 1150px) {
    .node-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .node-metric:nth-child(3) {
        border-right: 0;
    }

    .node-metric:nth-child(-n+3) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 700px) {
    .node-grid {
        grid-template-columns: 1fr 1fr;
    }

    .node-metric {
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }

    .node-metric:nth-child(even) {
        border-right: 0;
    }

    .node-metric:nth-last-child(-n+2) {
        border-bottom: 0;
    }
}


/* =========================================
   COMPACT INFRASTRUCTURE HEADER
   ========================================= */

.hero {
    min-height: 155px;
    padding: 26px 0 22px;
}

.hero h2 {
    font-size: clamp(34px, 3.6vw, 52px);
    line-height: .96;
    margin: 10px 0 12px;
    max-width: 650px;
}

.hero-text {
    margin: 0;
    font-size: 13px;
}

.topbar {
    padding-bottom: 20px;
}

.page {
    padding-top: 24px;
}

.stats-grid {
    margin-top: 0;
}

@media (max-width: 900px) {
    .hero {
        min-height: 170px;
        padding: 24px 0;
    }
}


/* =========================================
   SOLO MINING PERFORMANCE
   ========================================= */

.solo-performance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-top: 20px;
    margin-bottom: 14px;
}

.solo-performance-grid > div {
    padding: 14px 15px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: rgba(255,255,255,.018);
}

.solo-performance-grid span {
    display: block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
}

.solo-performance-grid strong {
    display: block;

    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.035em;

    white-space: nowrap;
}

#soloNetworkDifficulty {
    color: var(--accent);
}

#soloBlocksFound {
    color: var(--green);
}


/* Best Share */

#bestShare {
    margin-top: 17px;
    margin-bottom: 18px;

    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.045em;
}

#bestShareProgress {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


/* Responsive */

@media (max-width: 700px) {
    .solo-performance-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   SOLO PROBABILITY
   ========================================= */

.probability-panel {
    margin-top: 12px;
    min-height: 0;
}

.probability-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.probability-header h3 {
    margin-bottom: 0;
}

.probability-live {
    padding: 7px 10px;
    border: 1px solid rgba(74,222,128,.22);
    border-radius: 999px;
    color: var(--green);
    background: rgba(74,222,128,.045);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
    white-space: nowrap;
}

.probability-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 22px;
}

.probability-card {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255,255,255,.018);
}

.probability-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
}

.probability-card strong {
    display: block;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.035em;
    white-space: nowrap;
}

.probability-card small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.expected-time strong {
    color: var(--accent);
}

.probability-footer {
    margin-top: 14px;
    color: var(--muted);
    font-size: 10px;
}

@media (max-width: 900px) {
    .probability-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .probability-grid {
        grid-template-columns: 1fr;
    }

    .probability-header {
        flex-direction: column;
    }
}


/* =========================================
   LANGUAGE SELECTOR
   ========================================= */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 7px;

    height: 30px;
    padding: 0 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(255,255,255,.018);
}

.language-icon {
    margin-right: 2px;
    font-size: 11px;
    opacity: .7;
}

.language-button {
    padding: 0;
    border: 0;
    outline: 0;

    background: transparent;
    color: var(--muted);

    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;

    cursor: pointer;

    transition:
        color .18s ease,
        opacity .18s ease;
}

.language-button:hover {
    color: var(--text);
}

.language-button.active {
    color: var(--accent);
}

.language-separator {
    color: #3f4855;
    font-size: 9px;
}

@media (max-width: 600px) {
    .topbar-actions {
        gap: 8px;
    }

    .language-selector {
        padding: 0 8px;
    }

    .language-icon {
        display: none;
    }
}
