/* BLOCKS page: the stat cards and block tables as before, plus a heading on
   each table. The shared theme stays inline in blocks.html; the confirmation
   grid and status sprites below are the original rules, unchanged. */

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}
.stat-card {
    border: 4px solid var(--border-color);
    background: rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}
.stat-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--glow-color);
}
.stat-card-header {
    font-size: 0.8em;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.stat-card-body {
    font-size: 1.2em;
    color: var(--text-color);
}
.effort-sub {
    margin-top: 0.6rem;
    font-size: 0.5em;
    letter-spacing: 1px;
    color: var(--muted);
}
.effort-sub b {
    color: var(--gold);
}

/* Retro Table Styles */
.retro-table-container {
    margin-top: 2rem;
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    overflow-x: auto;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
/* Table heading: which chain this is */
.blocks-head {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    margin: 0.2rem 0.2rem 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}
.blocks-title {
    margin: 0;
    font-size: 0.85em;
    font-weight: normal;
    letter-spacing: 1.5px;
    color: var(--accent-color);
}
.blocks-count {
    font-size: 0.5em;
    letter-spacing: 1.5px;
    color: var(--muted);
}
.retro-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-color);
    text-align: center;
}
/* Same compact rows as the payouts tab: thin separators, zebra stripes */
.retro-table th {
    background: transparent;
    padding: 10px 14px;
    border: none;
    border-bottom: 2px solid rgba(138, 109, 31, 0.4);
    text-transform: uppercase;
    font-size: 0.55em;
    color: var(--muted);
    letter-spacing: 2.5px;
}
.retro-table td {
    padding: 9px 14px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    vertical-align: middle;
    font-size: 0.72em;
}
.retro-table td.table-message {
    text-align: center;
}
.retro-table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.045);
}
.retro-table tbody tr:last-child td {
    border-bottom: none;
}
.retro-table tr:hover td {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.retro-table .txhash {
    padding: 7px 10px;
}
.block-height {
    color: var(--accent-color);
    font-weight: bold;
}
.eff-val.good {
    color: var(--gold);
}
.eff-val.high {
    color: var(--red-soft);
}
.td-sub {
    display: block;
    margin-top: 5px;
    font-size: 0.7em;
    color: var(--muted);
}

/* Block confirmations: one pixel cell per confirmation, 25 per row
   (coinbase maturity = 100), framed like a tiny LCD panel. The cell at
   the fill frontier blinks hard like a cursor; the rest still waiting
   flick dim/bright in a column-staggered square wave — steps(), no
   easing, to keep it 8-bit. Confirmed rows use plain status text. */
.conf-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.conf-grid {
    display: grid;
    grid-template-columns: repeat(25, 6px);
    grid-auto-rows: 6px;
    gap: 1px;
    padding: 3px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.4);
}
.conf-cell {
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
}
.conf-cell.fill {
    background: var(--gold);
    border-color: var(--gold);
}
.conf-cell.next {
    background: var(--gold-soft);
    border-color: var(--gold);
    animation: conf-cursor 0.8s steps(1, end) infinite;
}
.conf-cell.wait {
    animation: conf-blink 1.2s steps(1, end) infinite;
}
.conf-cell.wait:nth-child(10n+2) { animation-delay: 0.12s; }
.conf-cell.wait:nth-child(10n+3) { animation-delay: 0.24s; }
.conf-cell.wait:nth-child(10n+4) { animation-delay: 0.36s; }
.conf-cell.wait:nth-child(10n+5) { animation-delay: 0.48s; }
.conf-cell.wait:nth-child(10n+6) { animation-delay: 0.6s; }
.conf-cell.wait:nth-child(10n+7) { animation-delay: 0.72s; }
.conf-cell.wait:nth-child(10n+8) { animation-delay: 0.84s; }
.conf-cell.wait:nth-child(10n+9) { animation-delay: 0.96s; }
.conf-cell.wait:nth-child(10n) { animation-delay: 1.08s; }
@keyframes conf-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}
@keyframes conf-blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
    .conf-cell.wait,
    .conf-cell.next {
        animation: none;
    }
    .conf-cell.wait {
        opacity: 0.4;
    }
}
/* Block status: the same three words in both tables, coloured text
   with an 8x8 pixel sprite (check / running hourglass / cross), no chip. */
.block-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7em;
    letter-spacing: 1.5px;
    white-space: nowrap;
    /* hard 1px pixel shadow, no glow */
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
}
.block-status .status-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
    shape-rendering: crispEdges;
}
.block-status .status-icon .sand {
    fill: var(--text-color);
    opacity: 0;
}
.block-status b {
    color: var(--text-color);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
}
.block-status.ok {
    color: var(--green);
}
.block-status.bad {
    color: var(--red-soft);
}
.block-status.pending {
    color: var(--gold);
}
/* Three-frame sand animation, one frame per 0.8s, no easing */
.block-status.pending .sand-a { animation: sand-a 2.4s steps(1, end) infinite; }
.block-status.pending .sand-b { animation: sand-b 2.4s steps(1, end) infinite; }
.block-status.pending .sand-c { animation: sand-c 2.4s steps(1, end) infinite; }
@keyframes sand-a { 0% { opacity: 1; } 33.3% { opacity: 0; } }
@keyframes sand-b { 0% { opacity: 0; } 33.3% { opacity: 1; } 66.6% { opacity: 0; } }
@keyframes sand-c { 0% { opacity: 0; } 66.6% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .block-status.pending .sand { animation: none; }
    .block-status.pending .sand-b { opacity: 1; }
}

/* Hash chip: head shrinks with an ellipsis, 8-char tail stays, so the
   visible hash adapts to the column width (capped — auto table layout) */
.txhash {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 460px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 9px 12px;
    background: rgba(138, 109, 31, 0.08);
    border: 1px solid rgba(138, 109, 31, 0.35);
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.5px;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
a.txhash:hover {
    background: rgba(138, 109, 31, 0.18);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(202, 169, 106, 0.55);
    color: var(--accent-color);
}
.txhash .txh-head {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.txhash .txh-tail {
    flex: none;
    white-space: nowrap;
}
.txhash .txh-ext {
    flex: none;
    margin-left: auto;
    padding-left: 10px;
    font-style: normal;
    font-size: 0.85em;
    opacity: 0.6;
}
a.txhash:hover .txh-ext {
    opacity: 1;
}

