/* ═══════════════════════════════════════════════════════════════
   CHART EXPORT BUTTONS - Data export and API link functionality
   ═══════════════════════════════════════════════════════════════ */

/* Position export button in the top-right of chart-box */
.chart-box {
    position: relative;
}

.chart-export-container {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    display: inline-flex;
    flex-shrink: 0;
    z-index: 15;
}

/* Add padding to chart header to make room for export button */
.chart-box .chart-header {
    padding-right: 2.75rem;
}

.chart-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--fg-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.chart-box:hover .chart-export-btn,
.chart-export-btn:focus {
    opacity: 1;
}

.chart-export-btn:hover {
    background: var(--bg-tertiary, #2a2a2a);
    border-color: var(--accent);
    color: var(--accent);
}

.chart-export-btn:active {
    transform: scale(0.95);
}

.chart-export-btn svg {
    width: 14px;
    height: 14px;
}

/* Export Dropdown Menu */
.chart-export-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
    z-index: 1000;
    overflow: hidden;
}

.chart-export-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chart-export-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--fg-muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.1s ease;
}

.chart-export-menu-item:hover {
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--fg-primary);
}

.chart-export-menu-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.chart-export-menu-item:hover svg {
    opacity: 1;
    color: var(--accent);
}

.chart-export-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Toast Notifications */
.chart-export-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--fg-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

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

.chart-export-toast-success {
    border-left: 3px solid var(--accent);
}

.chart-export-toast-warning {
    border-left: 3px solid #FFB347;
}

.chart-export-toast-error {
    border-left: 3px solid #FF6B6B;
}

/* Stat Card Header Refinement */
.stat-card-header.refined {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.5rem;
}
.stat-card-header .label.refined {
    margin-bottom: 0;
    font-size: 0.65rem;
    font-weight: 400;
    text-align: left;
}
.stat-card-header .stat-icon.refined {
    margin-bottom: 0;
    margin-left: 0.5rem;
    font-size: 1rem;
    width: 22px;
    height: 22px;
    background: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Info Banner Refinement */
.info-banner-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--fg-primary);
}
.info-banner-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--fg-secondary);
    margin-top: 0.25rem;
}
.summary-cards-row.refined {
    background: var(--bg-primary);
    border-radius: 8px;
    gap: 2rem;
    padding: 1.5rem 1rem 1.5rem 1rem;
    box-shadow: none;
}
.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none;
    padding: 2rem 1.25rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: none;
}
.stat-card .stat-icon.refined {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
    box-shadow: none;
}
.stat-card.success .stat-icon.refined {
    color: #00c853;
}
.stat-card.danger .stat-icon.refined {
    color: var(--danger);
}
.stat-card.accent .stat-icon.refined {
    color: var(--accent);
}
.stat-card .label.refined {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin-bottom: 0.1rem;
    font-weight: 400;
    text-align: center;
}
.stat-card .value.refined {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--fg-primary);
    line-height: 1.1;
    margin-bottom: 0.1rem;
    text-align: center;
}
.stat-card .subtext.refined {
    font-size: 0.7rem;
    color: var(--fg-dim);
    margin-top: 0.1rem;
    text-align: center;
    font-weight: 400;
}
.stat-card.accent {
    border-top: 2px solid var(--accent);
}
.stat-card.success {
    border-top: 2px solid #00c853;
}
.stat-card.danger {
    border-top: 2px solid var(--danger);
}
.stat-card .subtext.refined.positive {
    color: #00c853;
    font-weight: 600;
}
.stat-card .subtext.refined.negative {
    color: var(--danger);
    font-weight: 600;
}
/*
 * ELEKTRON ANALYTICS - Analytics Pages Styles
 * Consolidated CSS for all analytics/stats pages
 * This file contains styles for page headers, stats boxes, charts, and controls
 */

/* ═══════════════════════════════════════════════════════════════
   ASIC SUMMARY CARDS - Premium analytics summary styling
   ═══════════════════════════════════════════════════════════════ */
.summary-cards-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, rgba(247,147,26,0.04) 0%, rgba(0,200,83,0.04) 100%);
    border-radius: 6px;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.25rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    position: relative;
    transition: box-shadow 0.2s;
}
.stat-card:hover {
    box-shadow: 0 4px 16px rgba(247,147,26,0.10);
    border-color: var(--accent);
}
.stat-card .label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.stat-card .value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--fg-primary);
    line-height: 1.1;
    margin-bottom: 0.1rem;
}
.stat-card .subtext {
    font-size: 0.7rem;
    color: var(--fg-dim);
    margin-top: 0.1rem;
}
.stat-card.accent {
    border-top: 3px solid var(--accent);
}
.stat-card.success {
    border-top: 3px solid #00c853;
}
.stat-card.danger {
    border-top: 3px solid var(--danger);
}
.stat-card .subtext.positive {
    color: #00c853;
    font-weight: 600;
}
.stat-card .subtext.negative {
    color: var(--danger);
    font-weight: 600;
}
.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(247,147,26,0.12) 0%, rgba(0,200,83,0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.stat-card.success .stat-icon {
    color: #00c853;
}
.stat-card.danger .stat-icon {
    color: var(--danger);
}
.stat-card.accent .stat-icon {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER - Sticky header with controls
   ═══════════════════════════════════════════════════════════════ */

.page-header {
    display: block;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    margin: 0 -2rem 1.5rem -2rem;
}

.page-header.sticky {
    position: sticky;
    top: 56px; /* Below navbar */
    z-index: 100;
}

.page-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 2.5rem;
}

.page-title-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
    min-width: fit-content;
}

.page-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    color: var(--fg-primary);
}

.page-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-dim);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   TIME RANGE PILLS - Time period selector
   ═══════════════════════════════════════════════════════════════ */

.time-pills {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: 4px;
}

.time-pill {
    background: transparent;
    border: none;
    color: var(--fg-muted);
    padding: 0.35rem 0.7rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 3px;
}

.time-pill:hover {
    background: var(--bg-tertiary);
    color: var(--fg-primary);
}

.time-pill.active {
    background: var(--fg-primary);
    color: var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SCALE TOGGLE - Log/Linear scale selector
   ═══════════════════════════════════════════════════════════════ */

.scale-toggle {
    display: flex;
    gap: 1px;
    background: var(--bg-secondary);
    padding: 2px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.scale-btn {
    background: transparent;
    border: none;
    color: var(--fg-muted);
    padding: 0.3rem 0.6rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scale-btn:hover {
    background: var(--bg-tertiary);
    color: var(--fg-primary);
}

.scale-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER CONTROLS - Filters, date pickers, etc.
   ═══════════════════════════════════════════════════════════════ */

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.control-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-dim);
}

.control-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--fg-primary);
    padding: 0.35rem 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    border-radius: 3px;
    width: 60px;
    text-align: center;
}

.control-input:focus {
    outline: none;
    border-color: var(--fg-muted);
}

.control-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--fg-primary);
    padding: 0.35rem 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    border-radius: 3px;
    cursor: pointer;
}

.control-select:focus {
    outline: none;
    border-color: var(--fg-muted);
}

/* Date Range Controls */
.date-range {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.date-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--fg-primary);
    padding: 0.35rem 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    border-radius: 3px;
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

.date-separator {
    color: var(--fg-dim);
    font-size: 0.75rem;
}

.apply-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--fg-muted);
    padding: 0.35rem 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 3px;
}

.apply-btn:hover {
    background: var(--fg-primary);
    color: var(--bg-primary);
    border-color: var(--fg-primary);
}

/* ═══════════════════════════════════════════════════════════════
   STATS ROW - Grid of stat boxes
   ═══════════════════════════════════════════════════════════════ */

.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.stats-row.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stats-row.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Custom column sizing for specific layouts */
.stats-row.asic-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr 1.3fr;
}

.stat-box {
    background: var(--bg-primary);
    padding: 1.25rem;
    position: relative;
}

.stat-box .label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-box .value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--fg-primary);
    line-height: 1.2;
}

.stat-box .value.large {
    font-size: 1.65rem;
}

.stat-box .unit {
    font-size: 0.75rem;
    color: var(--fg-muted);
    margin-left: 0.25rem;
}

.stat-box .subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--fg-muted);
    margin-top: 0.4rem;
}

.stat-box .subtext.muted {
    color: var(--fg-dim);
    margin-top: 0.15rem;
}

.stat-box .subtext.positive,
.stat-box .trend-up {
    color: var(--accent);
}

.stat-box .subtext.negative,
.stat-box .trend-down {
    color: var(--danger);
}

.stat-box .avg-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-secondary);
    margin-top: 0.3rem;
}

/* Info Icon for tooltips */
.stat-box .info-icon {
    cursor: help;
    opacity: 0.6;
    font-size: 0.7rem;
}

.stat-box .info-icon:hover {
    opacity: 1;
}

/* Tooltip */
.tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 100;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    color: var(--fg-secondary);
    white-space: nowrap;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
}

.stat-box:hover .tooltip-text {
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════
   CHARTS GRID - Layout for chart containers
   ═══════════════════════════════════════════════════════════════ */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-box {
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.chart-box.full-width {
    grid-column: 1 / -1;
}

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

.chart-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-title .loading-indicator {
    display: none;
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: normal;
    animation: pulse 1.5s ease-in-out infinite;
}

.chart-title .loading-indicator.active {
    display: inline;
}

.chart-body {
    padding: 1.25rem;
    position: relative;
    height: 300px;
}

.chart-box.tall .chart-body {
    height: 400px;
}

.chart-box.pie .chart-body {
    height: 350px;
}

.chart-canvas {
    position: relative;
    height: 300px;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    gap: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--fg-muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Chart Loading State */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    color: var(--fg-muted);
}

.chart-loading::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════ */

.section-header {
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--fg-muted);
}

/* ═══════════════════════════════════════════════════════════════
   HISTOGRAM STATS
   ═══════════════════════════════════════════════════════════════ */

.histogram-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

.histogram-stats .stat {
    text-align: center;
}

.histogram-stats .stat-label {
    color: var(--fg-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.histogram-stats .stat-value {
    color: var(--fg-primary);
    font-size: 1rem;
}

.stat-date {
    font-size: 0.7rem;
    color: var(--fg-muted);
    font-weight: normal;
}

/* ═══════════════════════════════════════════════════════════════
   DOMINANCE METRICS - Pool analytics
   ═══════════════════════════════════════════════════════════════ */

.dominance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.dominance-metric {
    background: var(--bg-primary);
    padding: 1.25rem;
    text-align: center;
}

.dominance-metric .metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
}

.dominance-metric .metric-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--fg-primary);
}

.dominance-metric .metric-subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--fg-dim);
    margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   NAKAMOTO STATS GRID - For Nakamoto and NHI over time
   ═══════════════════════════════════════════════════════════════ */

.nakamoto-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.nakamoto-stat {
    background: var(--bg-primary);
    padding: 1.25rem 1rem;
    text-align: center;
}

.nakamoto-stat .stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
}

.nakamoto-stat .stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--fg-primary);
    line-height: 1.2;
}

.nakamoto-stat .stat-subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--fg-dim);
    margin-top: 0.35rem;
}

.nakamoto-stat.interpretation {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nakamoto-stat.interpretation .stat-value {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   THRESHOLD CARDS - For luck convergence thresholds
   ═══════════════════════════════════════════════════════════════ */

.threshold-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.threshold-card {
    display: grid;
    grid-template-columns: 90px 80px 1fr;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.875rem 1rem;
    transition: background 0.2s ease;
}

.threshold-card:hover {
    background: var(--bg-tertiary, rgba(255,255,255,0.02));
}

.threshold-card .threshold-range {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fg-primary);
}

.threshold-card .threshold-share {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
}

.threshold-card .threshold-info {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-muted);
    text-align: right;
    line-height: 1.4;
}

.threshold-card.excellent { border-left: 4px solid #85D94A; }
.threshold-card.good { border-left: 4px solid #4ECDC4; }
.threshold-card.moderate { border-left: 4px solid #FFB347; }
.threshold-card.high { border-left: 4px solid #FF8C42; }
.threshold-card.very-high { border-left: 4px solid #FF6B6B; }

/* ═══════════════════════════════════════════════════════════════
   POOL LUCK STATS - For individual pool analysis
   ═══════════════════════════════════════════════════════════════ */

.pool-luck-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
}

.pool-luck-stats .stat-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
}

.pool-luck-stats .stat-item .label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
}

.pool-luck-stats .stat-item .value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fg-primary);
    margin-bottom: 0.25rem;
}

.pool-luck-stats .stat-item .subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--fg-dim);
}

.pool-luck-stats .stat-item.lucky .value { color: var(--accent); }
.pool-luck-stats .stat-item.unlucky .value { color: var(--danger); }

.pool-luck-stats .stat-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.75rem;
    padding: 2rem;
}

/* ═══════════════════════════════════════════════════════════════
   POOL SELECTOR - Dropdown for pool selection
   ═══════════════════════════════════════════════════════════════ */

.pool-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pool-selector label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-muted);
}

.pool-dropdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--fg-primary);
    padding: 0.5rem 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.2s ease;
}

.pool-dropdown:hover {
    border-color: var(--fg-dim);
}

.pool-dropdown:focus {
    outline: none;
    border-color: var(--accent);
}

.pool-dropdown option {
    background: var(--bg-secondary);
    color: var(--fg-primary);
    padding: 0.5rem;
}

/* Streak indicator */
.streak-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.streak-indicator.lucky {
    background: rgba(133, 217, 74, 0.15);
    color: var(--accent);
}

.streak-indicator.unlucky {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   P&L SUMMARY GRID - For Luck P&L Analysis
   ═══════════════════════════════════════════════════════════════ */

.pnl-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pnl-stat {
    background: var(--bg-primary);
    padding: 1.25rem 1rem;
    text-align: center;
}

.pnl-stat .stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
}

.pnl-stat .stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg-primary);
    line-height: 1.4;
}

.pnl-stat .stat-value.btc {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.pnl-stat .stat-value.usd {
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.pnl-stat .stat-subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    color: var(--fg-dim);
    margin-top: 0.35rem;
}

.pnl-stat.total {
    background: var(--bg-secondary);
}

.pnl-stat.positive .stat-value.btc,
.pnl-stat.positive .stat-value.usd {
    color: var(--accent);
}

.pnl-stat.negative .stat-value.btc,
.pnl-stat.negative .stat-value.usd {
    color: var(--danger);
}

/* Change indicators in tables */
.change-positive {
    color: var(--accent) !important;
}

.change-negative {
    color: var(--danger) !important;
}

/* Loading note for ALL selection */
.loading-note {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.08) 0%, rgba(255, 179, 71, 0.03) 100%);
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    border-radius: 6px;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.loading-note.visible {
    display: flex;
}

.loading-note .note-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.loading-note .note-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--fg-secondary);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   DATA TABLE - Generic table styling for analytics
   ═══════════════════════════════════════════════════════════════ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--fg-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.65rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    position: relative;
}

.data-table th:hover {
    color: var(--fg-primary);
}

.data-table th.sortable::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-top-color: currentColor;
    opacity: 0.3;
    margin-top: 2px;
}

.data-table th.sort-asc::after {
    border-top-color: transparent;
    border-bottom-color: var(--accent);
    margin-top: -4px;
    opacity: 1;
}

.data-table th.sort-desc::after {
    border-top-color: var(--accent);
    border-bottom-color: transparent;
    margin-top: 2px;
    opacity: 1;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--fg-secondary);
}

.data-table tr:hover td {
    background: var(--bg-secondary);
}

.data-table .value {
    font-weight: 500;
    color: var(--fg-primary);
}

.data-table .change-positive {
    color: var(--accent);
}

.data-table .change-negative {
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   POOL TABLE - Specific pool table styling
   ═══════════════════════════════════════════════════════════════ */

.pool-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

.pool-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--fg-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.65rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    position: relative;
}

.pool-table th:hover {
    color: var(--fg-primary);
}

.pool-table th::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    opacity: 0.3;
}

.pool-table th.sortable::after {
    border-top-color: currentColor;
    margin-top: 2px;
}

.pool-table th.sort-asc::after {
    border-top-color: transparent;
    border-bottom-color: var(--accent);
    margin-top: -4px;
    opacity: 1;
}

.pool-table th.sort-desc::after {
    border-top-color: var(--accent);
    border-bottom-color: transparent;
    margin-top: 2px;
    opacity: 1;
}

.pool-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--fg-secondary);
}

.pool-table tr:hover td {
    background: var(--bg-secondary);
}

.pool-table .pool-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pool-table .pool-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pool-table .value {
    font-weight: 500;
    color: var(--fg-primary);
}

.pool-table .change-positive {
    color: var(--accent);
}

.pool-table .change-negative {
    color: var(--danger);
}

/* Pool Colors */
:root {
    --pool-foundry: #FF6B35;
    --pool-antpool: #3498DB;
    --pool-f2pool: #2ECC71;
    --pool-viabtc: #9B59B6;
    --pool-binance: #F1C40F;
    --pool-braiins: #E74C3C;
    --pool-mara: #1ABC9C;
    --pool-luxor: #E67E22;
    --pool-ocean: #00BCD4;
    --pool-other: #95A5A6;
}

/* ═══════════════════════════════════════════════════════════════
   CHANGES CARDS - Gainers/Losers cards
   ═══════════════════════════════════════════════════════════════ */

.changes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.changes-card {
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.changes-card .card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
}

.changes-card.gainers .card-header {
    border-left: 3px solid var(--accent);
}

.changes-card.losers .card-header {
    border-left: 3px solid var(--danger);
}

.changes-list {
    padding: 0.75rem 1rem;
}

.change-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.change-item:last-child {
    border-bottom: none;
}

.change-item .pool-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--fg-secondary);
}

.change-item .pool-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.change-item .change-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.change-item .change-value.positive {
    color: var(--accent);
}

.change-item .change-value.negative {
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   INFO TOOLTIP - Hover information
   ═══════════════════════════════════════════════════════════════ */

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--fg-muted);
    cursor: help;
    position: relative;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.info-icon:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.info-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--fg-secondary);
    line-height: 1.5;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    pointer-events: none;
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-secondary);
}

.info-icon:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════
   HALVING COUNTDOWN - Blockchain page
   ═══════════════════════════════════════════════════════════════ */

.halving-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
    min-height: 200px;
}

.halving-countdown {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border);
}

.countdown-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--fg-muted);
    margin-bottom: 0.75rem;
}

.countdown-blocks {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--fg-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-blocks .unit {
    font-size: 1rem;
    font-weight: 400;
    color: var(--fg-muted);
    margin-left: 0.5rem;
}

.countdown-target {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--fg-dim);
    margin-bottom: 1.25rem;
}

.countdown-scenarios {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scenario {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.scenario-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--fg-dim);
    min-width: 80px;
}

.scenario-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--fg-secondary);
}

.scenario-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-muted);
    padding: 0.15rem 0.4rem;
    background: var(--bg-primary);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   MONTHLY RETURNS HEATMAP TABLE
   Premium financial heatmap with terminal aesthetic
   ═══════════════════════════════════════════════════════════════ */

.heatmap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    table-layout: fixed;
}

.heatmap-table thead th {
    background: var(--bg-secondary);
    color: var(--fg-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.6rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.heatmap-table thead th:first-child {
    text-align: left;
    padding-left: 0.85rem;
    width: 65px;
    border-radius: 4px 0 0 4px;
}

.heatmap-table thead th:last-child {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-radius: 0 4px 4px 0;
    color: var(--fg-secondary);
    font-weight: 600;
}

.heatmap-table tbody tr {
    transition: background 0.15s ease;
}

.heatmap-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.heatmap-table tbody tr:hover td {
    transform: scale(1.01);
}

.heatmap-table tbody td {
    text-align: center;
    padding: 0.7rem 0.4rem;
    border: none;
    transition: all 0.2s ease;
    cursor: default;
    border-radius: 4px;
    position: relative;
    font-weight: 500;
}

/* Year column styling */
.heatmap-table tbody td.year-cell,
.heatmap-table tbody td:first-child {
    font-weight: 700;
    color: var(--fg-secondary);
    text-align: left;
    padding-left: 0.85rem;
    background: var(--bg-secondary);
    letter-spacing: 0.03em;
    font-size: 0.82rem;
}

/* Neutral/empty cells */
.heatmap-table tbody td.neutral {
    color: var(--fg-dim);
    background: transparent;
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════
   POSITIVE RETURNS - Elektron Green Gradient
   Background intensity is set dynamically via JS
   ═══════════════════════════════════════════════════════════════ */

.heatmap-table tbody td.positive {
    color: #85D94A;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(133, 217, 74, 0.2);
}

/* Higher intensity positive values get brighter text */
.heatmap-table tbody td.positive[data-intensity^="0.6"],
.heatmap-table tbody td.positive[data-intensity^="0.7"] {
    color: #9BE968;
    text-shadow: 0 0 18px rgba(133, 217, 74, 0.35);
}

.heatmap-table tbody td.positive[data-intensity^="0.8"],
.heatmap-table tbody td.positive[data-intensity^="0.9"],
.heatmap-table tbody td.positive[data-intensity="1.00"] {
    color: #ADFF5A;
    text-shadow: 0 0 25px rgba(133, 217, 74, 0.5);
    font-weight: 700;
}

.heatmap-table tbody td.positive:hover {
    box-shadow: inset 0 0 0 1px rgba(133, 217, 74, 0.5),
                0 0 15px rgba(133, 217, 74, 0.15);
    transform: scale(1.05);
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════
   NEGATIVE RETURNS - Danger Red Gradient
   ═══════════════════════════════════════════════════════════════ */

.heatmap-table tbody td.negative {
    color: #FF6B6B;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(255, 107, 107, 0.2);
}

/* Higher intensity negative values get brighter text */
.heatmap-table tbody td.negative[data-intensity^="0.6"],
.heatmap-table tbody td.negative[data-intensity^="0.7"] {
    color: #FF8A8A;
    text-shadow: 0 0 18px rgba(255, 107, 107, 0.35);
}

.heatmap-table tbody td.negative[data-intensity^="0.8"],
.heatmap-table tbody td.negative[data-intensity^="0.9"],
.heatmap-table tbody td.negative[data-intensity="1.00"] {
    color: #FFA5A5;
    text-shadow: 0 0 25px rgba(255, 107, 107, 0.5);
    font-weight: 700;
}

.heatmap-table tbody td.negative:hover {
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.5),
                0 0 15px rgba(255, 107, 107, 0.15);
    transform: scale(1.05);
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════
   YTD COLUMN - Annual performance emphasis
   ═══════════════════════════════════════════════════════════════ */

.heatmap-table tbody td.ytd-cell,
.heatmap-table tbody td:last-child:not(.year-cell) {
    font-weight: 700;
    font-size: 0.85rem;
    border-left: 2px solid var(--border-light);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    letter-spacing: -0.01em;
}

.heatmap-table tbody td.ytd-cell.positive,
.heatmap-table tbody td:last-child.positive:not(.year-cell) {
    color: #9BE968;
    border-left-color: rgba(133, 217, 74, 0.4);
}

.heatmap-table tbody td.ytd-cell.positive[data-intensity^="0.7"],
.heatmap-table tbody td.ytd-cell.positive[data-intensity^="0.8"],
.heatmap-table tbody td.ytd-cell.positive[data-intensity^="0.9"],
.heatmap-table tbody td.ytd-cell.positive[data-intensity="1.00"] {
    color: #ADFF5A;
    text-shadow: 0 0 20px rgba(133, 217, 74, 0.4);
}

.heatmap-table tbody td.ytd-cell.negative,
.heatmap-table tbody td:last-child.negative:not(.year-cell) {
    color: #FF8A8A;
    border-left-color: rgba(255, 107, 107, 0.4);
}

.heatmap-table tbody td.ytd-cell.negative[data-intensity^="0.7"],
.heatmap-table tbody td.ytd-cell.negative[data-intensity^="0.8"],
.heatmap-table tbody td.ytd-cell.negative[data-intensity^="0.9"],
.heatmap-table tbody td.ytd-cell.negative[data-intensity="1.00"] {
    color: #FFA5A5;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
}

.heatmap-table tbody td.ytd-cell.neutral {
    border-left-color: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .heatmap-table {
        font-size: 0.68rem;
        border-spacing: 2px;
    }
    
    .heatmap-table thead th {
        font-size: 0.55rem;
        padding: 0.55rem 0.3rem;
    }
    
    .heatmap-table tbody td {
        padding: 0.55rem 0.25rem;
    }
    
    .heatmap-table tbody td.ytd-cell,
    .heatmap-table tbody td:last-child:not(.year-cell) {
        font-size: 0.72rem;
    }
}

@media (max-width: 768px) {
    .heatmap-table {
        font-size: 0.58rem;
        border-spacing: 1px;
    }
    
    .heatmap-table thead th {
        font-size: 0.48rem;
        padding: 0.45rem 0.15rem;
        letter-spacing: 0;
    }
    
    .heatmap-table thead th:first-child {
        width: 48px;
        padding-left: 0.45rem;
    }
    
    .heatmap-table tbody td {
        padding: 0.45rem 0.12rem;
        border-radius: 2px;
    }
    
    .heatmap-table tbody td.year-cell,
    .heatmap-table tbody td:first-child {
        padding-left: 0.45rem;
        font-size: 0.65rem;
    }
    
    .heatmap-table tbody td.ytd-cell,
    .heatmap-table tbody td:last-child:not(.year-cell) {
        font-size: 0.62rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
}

/* Halving Timeline */
.halving-timeline {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
}

.halving-era {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.halving-era:last-child {
    border-bottom: none;
}

.halving-era:hover {
    background: var(--bg-secondary);
}

.halving-era.current {
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
}

.era-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fg-dim);
    width: 50px;
    flex-shrink: 0;
}

.era-reward {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: var(--fg-primary);
    width: 90px;
    flex-shrink: 0;
}

.era-height {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-muted);
    flex: 1;
}

.era-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--fg-dim);
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
   ASIC SELECTOR & ENERGY SLIDER
   ═══════════════════════════════════════════════════════════════ */

.asic-selector {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--fg-primary);
    padding: 0.4rem 0.6rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    border-radius: 3px;
    min-width: 200px;
    cursor: pointer;
}

.asic-selector:focus {
    outline: none;
    border-color: var(--fg-muted);
}

.energy-slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.energy-slider {
    width: 120px;
    height: 4px;
    background: var(--bg-tertiary);
    outline: none;
    border-radius: 2px;
    -webkit-appearance: none;
}

.energy-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--fg-primary);
    cursor: pointer;
    border-radius: 50%;
}

.energy-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--fg-primary);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.energy-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--fg-primary);
    min-width: 65px;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-row.asic-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .page-header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .header-controls {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
        gap: 0.75rem;
    }
    
    .page-title-group {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .histogram-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .halving-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-row.asic-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-pills {
        flex-wrap: wrap;
    }
    
    .date-range {
        flex-wrap: wrap;
    }
    
    .dominance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .changes-grid {
        grid-template-columns: 1fr;
    }
    
    .nakamoto-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nakamoto-stats-grid .nakamoto-stat.interpretation {
        grid-column: 1 / -1;
    }
    
    .pool-luck-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pnl-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pnl-summary-grid .pnl-stat.total {
        grid-column: 1 / -1;
    }
    
    .threshold-card {
        grid-template-columns: 70px 60px 1fr;
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }
    
    .threshold-card .threshold-range {
        font-size: 0.7rem;
    }
    
    .threshold-card .threshold-share {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .nakamoto-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pool-luck-stats {
        grid-template-columns: 1fr;
    }
    
    .pnl-summary-grid {
        grid-template-columns: 1fr;
    }
}