/* Design tokens: dark night theme */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/InterVariable.woff2') format('woff2');
}

:root {
    --page: #0b0e11;
    --panel: #161a1e;
    --fill: #1e2329;
    --fill-2: #2b3139;
    --fill-3: #3a414b;
    --text-1: rgba(255, 255, 255, 0.95);
    --text-2: rgba(255, 255, 255, 0.7);
    --text-3: rgba(255, 255, 255, 0.5);
    --text-4: rgba(255, 255, 255, 0.3);
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.15);
    --hover: rgba(255, 255, 255, 0.05);
    --accent: #00d4aa;
    --accent-tint: rgba(0, 212, 170, 0.16);
    --on-accent: #06221c;
    --up: #0ecb81;
    --down: #f6465d;
    --warn: var(--text-2); /* no orange anywhere */
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    --chart-grid: #1E1F25;
    --chart-text: #6B7078;
    --chart-cross: #9AA0A6;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: dark;
}

html { background: var(--page); }

/* Pool web UI */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* =============================================
   CONTAINER
   ============================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* =============================================
   NAVBAR - flat bordered design system
   ============================================= */

.navbar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: none;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.nav-brand {
    flex: 1;
}

.nav-brand a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: var(--text-2);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 16px;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link-warroom {
    font-weight: 700;
}
.nav-link-battleground {
    padding: 0;
    display: flex;
    align-items: center;
}
.nav-battleground-logo {
    height: 28px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.15s;
}
.nav-link-battleground:hover .nav-battleground-logo {
    opacity: 1;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--text-2);
    font-weight: 500;
}

.nav-stat--stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.nav-sep {
    color: rgba(255, 255, 255, 0.12);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 2px;
}

.nav-stat-value {
    color: var(--accent);
    font-weight: 700;
}

.nav-stat-label {
    font-size: 0.9rem;
}

.nav-stat-sub {
    font-size: 0.75rem;
    color: var(--text-3);
    white-space: nowrap;
}

.nav-label-short { display: none; }

/* =============================================
   PAGE TITLE
   ============================================= */

.page-title {
    color: var(--text-1);
    font-size: 2rem;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
}

/* =============================================
   TABS
   ============================================= */

.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 16px;
}

.tab-btn {
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text-2);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-ui);
}

.tab-btn:hover {
    color: var(--text-1);
    background: var(--fill-2);
}

.tab-btn.active {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--line);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =============================================
   PANEL - base card component (flat, bordered)
   ============================================= */

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 24px;
    position: relative;
}

.panel + .panel {
    margin-top: 12px;
}

/* Section label - accent uppercase with trailing line */
.section-label,
.pool-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::after,
.pool-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 212, 170, 0.2);
    margin-right: 52px;
}

/* Inside top-cards or compact containers - let line go full width */
.top-card .pool-section-label::after,
.top-card .section-label::after {
    margin-right: 0;
}

/* =============================================
   STAT ROW - consolidated stats in a row/table
   ============================================= */

/* A horizontal row of key/value stat pairs */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.stat-row-item {
    flex: 1;
    min-width: 100px;
    padding: 14px 16px;
    border-right: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-row-item:last-child {
    border-right: none;
}

.stat-row-item.accent {
    background: rgba(0, 212, 170, 0.06);
}

.stat-row-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-3);
    font-weight: 600;
    white-space: nowrap;
}

.stat-row-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
}

.stat-row-value.accent { color: var(--accent); }
.stat-row-value.green  { color: var(--up); }
.stat-row-value.warn   { color: var(--accent); }
.stat-row-value.muted  { color: var(--text-3); }

/* =============================================
   LEGACY STAT CARD - kept for smooth compat,
   but redesigned as flat bordered cell
   ============================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--panel);
    border: none;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 16px 18px;
    text-align: left;
    position: relative;
    transition: background 0.15s ease;
}

/* Remove bottom border from last row items */
.stats-grid > .stat-card:nth-last-child(-n+2) {
    border-bottom: none;
}

/* Auto-remove right border from last in each row - approximation */
.stats-grid > .stat-card:last-child {
    border-right: none;
}

.stat-card:hover {
    background: rgba(0, 212, 170, 0.05);
}

.stat-card.highlight {
    background: rgba(0, 212, 170, 0.07);
    border-right: 1px solid rgba(0, 212, 170, 0.2);
}

.stat-card.wide {
    grid-column: span 2;
}

.stat-label {
    color: var(--text-3);
    font-size: 0.72rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.1;
}

.stat-value.success { color: var(--up); }
.stat-value.warning { color: var(--accent); }
.stat-value.highlight { color: var(--up); }
.stat-value.error { color: var(--down); }

/* =============================================
   STATS SECTION - replaces old section wrapper
   ============================================= */

.stats-section {
    margin-bottom: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 20px;
    position: relative;
}

.stats-section h2 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
}

.stats-section h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 212, 170, 0.2);
}

/* =============================================
   HOME PAGE - top cards row + sections
   ============================================= */

.home-container {}

.top-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.top-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 24px;
    position: relative;
}

.home-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 24px;
    position: relative;
    margin-bottom: 0;
}

.home-section h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 14px;
}

.home-section h4 {
    color: var(--text-2);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Hero card variant used for Bitcoin Network section */
.home-section.hero-card {
    border-color: var(--line);
}

/* =============================================
   POOL STATS CARD (index page)
   ============================================= */

.pool-card {
    display: flex;
    flex-direction: column;
}

.pool-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.pool-stat {
    padding: 16px;
    background: var(--fill);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    transition: background 0.15s;
}

.pool-stat:hover {
    background: rgba(0, 212, 170, 0.05);
}

/* Full-width first stat (hashrate hero) */
.pool-card .pool-stat:first-child {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
    border-right: none;
    padding: 18px 16px;
}

/* Remove right border on second column items */
.pool-stat:nth-child(2n) {
    border-right: none;
}

/* Remove bottom border from last row */
.pool-stat:nth-last-child(-n+2) {
    border-bottom: none;
}

.pool-card #pool-hashrate {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--accent);
}

.pool-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.1;
    margin-bottom: 4px;
}

.pool-stat-label {
    font-size: 0.7rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

/* =============================================
   NODE INFO GRID
   ============================================= */

.node-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.node-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--fill);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 0.15s;
}

.node-info-item:hover {
    background: rgba(0, 212, 170, 0.04);
}

.node-info-item:nth-child(3n) { border-right: none; }
.node-info-item:nth-last-child(-n+3) { border-bottom: none; }

/* fee-label / fee-value used inside node-info-item */
.node-info-item .fee-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-3);
    font-weight: 600;
    margin-bottom: 0;
    display: block;
}

.node-info-item .fee-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-1);
    display: block;
}

@media (max-width: 600px) {
    .node-info-grid { grid-template-columns: repeat(2, 1fr); }
    .node-info-item:nth-child(3n) { border-right: 1px solid var(--line); }
    .node-info-item:nth-child(2n) { border-right: none; }
    .node-info-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
    .node-info-item:nth-last-child(-n+2) { border-bottom: none; }
}

/* =============================================
   STRATUM CONNECTION BLOCK
   ============================================= */

.stratum-connect-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
}

.stratum-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88rem;
}

.stratum-key {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    font-weight: 600;
    min-width: 36px;
    flex-shrink: 0;
}

.stratum-val {
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
}

.stratum-hint {
    color: var(--text-2);
}

.stratum-sep {
    color: var(--text-3);
    font-family: inherit;
    font-size: 0.75rem;
    margin: 0 6px;
}

.stratum-note {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-bottom: 0;
    padding: 0 2px;
}

.stratum-port {
    margin-left: 14px;
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.stratum-desc {
    color: var(--text-3);
    font-family: inherit;
    font-size: 0.75rem;
    margin-left: 6px;
}

/* =============================================
   HERO CARD - Bitcoin Network
   ============================================= */

.hero-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

.hero-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-icon svg,
.hero-icon img {
    width: 26px;
    height: 26px;
    color: var(--on-accent);
}

.hero-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.hero-title-section h2 {
    color: var(--text-1);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 203, 129, 0.12);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(14, 203, 129, 0.25);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--up);
    letter-spacing: 0.8px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--up);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Hero stats: 4-col row */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hero-stat {
    padding: 16px;
    background: var(--fill);
    border-right: 1px solid var(--line);
    text-align: left;
    transition: background 0.15s;
}

.hero-stat:last-child {
    border-right: none;
}

.hero-stat:hover {
    background: rgba(0, 212, 170, 0.05);
}

.hero-stat.primary {
    background: rgba(0, 212, 170, 0.08);
}

.hero-stat.primary .hero-stat-value {
    color: var(--accent);
}

.hero-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

/* Hero details: inline rows */
.hero-details {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hero-detail-row {
    display: flex;
    border-bottom: 1px solid var(--line);
}

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

.hero-detail {
    flex: 1;
    min-width: 130px;
    padding: 12px 16px;
    border-right: 1px solid var(--line);
    background: var(--fill);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-detail:last-child {
    border-right: none;
}

.detail-label {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-1);
    font-weight: 600;
}

/* Recent blocks */
.recent-blocks {
    padding-top: 16px;
    border-top: 1px solid rgba(0, 212, 170, 0.2);
}

.recent-blocks h4 {
    color: var(--text-2);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.blocks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.block-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 5px;
    transition: background 0.15s;
}

.block-item:hover {
    background: rgba(0, 212, 170, 0.06);
    border-color: rgba(0, 212, 170, 0.2);
}

.block-item.loading {
    grid-template-columns: 1fr;
    text-align: center;
    color: var(--text-3);
}

.block-height {
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.block-miner {
    color: var(--text-1);
    font-weight: 600;
    font-size: 0.9rem;
}

.block-hash {
    color: var(--text-2);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.block-txs {
    color: var(--text-2);
    font-size: 0.85rem;
}

.block-time {
    color: var(--text-3);
    font-size: 0.85rem;
}

/* =============================================
   FEE RATES / BLOCK REWARD
   ============================================= */

.fee-rates {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 12px;
    position: relative;
}

.fee-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

.fee-item {
    padding: 14px 16px;
    background: var(--fill);
    border-right: 1px solid var(--line);
    text-align: left;
    transition: background 0.15s;
}

.fee-item:last-child {
    border-right: none;
}

.fee-item:hover {
    background: rgba(0, 212, 170, 0.04);
}

.fee-item.highlight {
    background: rgba(0, 212, 170, 0.07);
}

.fee-label {
    display: block;
    color: var(--text-3);
    font-size: 0.68rem;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.fee-value {
    display: block;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
}

.fee-value.success { color: var(--up); }
.fee-value.warning { color: var(--accent); }

/* =============================================
   POOL SUMMARY / POOL HERO (pool.ejs)
   ============================================= */

.pool-container .home-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.compact-card { padding: 20px 24px !important; }

.pool-hero { padding: 24px 28px !important; }

.pool-hero-body {
    display: flex;
    gap: 0;
    align-items: stretch;
    margin-bottom: 16px;
}

.pool-hero-left { flex: 1.2; min-width: 0; }
.pool-hero-right { flex: 1; min-width: 0; }

.pool-hero-divider {
    width: 1px;
    background: var(--page);
    margin: 0 28px;
    flex-shrink: 0;
}

.pool-hero-main-stat { margin: 10px 0 14px; }

.pool-hero-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
    line-height: 1;
}

.pool-hero-unit {
    font-size: 0.7rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.pool-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.pool-meta-item { display: flex; align-items: baseline; gap: 4px; }
.pool-meta-val { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.pool-meta-lbl { font-size: 0.7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.pool-meta-dot { color: var(--text-3); font-size: 1.1rem; }

.pool-net-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.pool-net-item {
    padding: 12px 14px;
    background: var(--fill);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 0.15s;
}

.pool-net-item:hover { background: rgba(0, 212, 170, 0.04); }
.pool-net-item:nth-child(2n) { border-right: none; }
.pool-net-item:nth-last-child(-n+2) { border-bottom: none; }

.pool-net-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
}

.pool-net-val.accent { color: var(--up); }

.pool-net-lbl {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.pool-records-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    overflow: hidden;
    flex-wrap: wrap;
}

.pool-record-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: var(--fill);
    border-right: 1px solid var(--line);
    transition: background 0.15s;
}

.pool-record-item:last-child { border-right: none; }
.pool-record-item:hover { background: rgba(0, 212, 170, 0.04); }

.pool-record-lbl { font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.pool-record-val { font-size: 0.95rem; font-weight: 700; color: var(--text-1); }
.pool-record-val.highlight { color: var(--up); }
.highlight-item .pool-record-lbl { color: var(--up); }

/* Block Potential */
.pool-potential-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.pool-potential-left {
    flex: 0 0 auto;
    padding: 18px 24px;
    border-right: 1px solid var(--line);
    background: var(--fill);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.pool-potential-right {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--fill);
}

.pool-potential-stat {
    padding: 18px 16px;
    border-right: 1px solid var(--line);
}

.pool-potential-stat:last-child { border-right: none; }

.pool-potential-time {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
    line-height: 1;
}

.pool-potential-sublabel {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.pool-potential-val { font-size: 1.05rem; font-weight: 700; color: var(--text-1); }
.pool-potential-lbl {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.pool-fee-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 4px;
}

.pool-fee-strip-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); }
.pool-fee-chip { color: var(--text-3); }
.pool-fee-chip strong { color: var(--accent); }
.pool-fee-chip.dim strong { color: var(--text-1); }
.pool-fee-sep { color: var(--text-3); }

/* Share Performance 4-col */
.pool-grid-4 { grid-template-columns: repeat(4, 1fr) !important; }
.pool-section-grid { margin-top: 8px; }

/* Hashrate Bar Chart */
.pool-hr-bars { display: flex; flex-direction: column; gap: 8px; }

.pool-hr-bar-row {
    display: grid;
    grid-template-columns: 28px 1fr 90px;
    align-items: center;
    gap: 12px;
}

.pool-hr-bar-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    font-weight: 600;
    text-align: right;
}

.pool-hr-bar-track {
    height: 7px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.pool-hr-bar-fill {
    height: 100%;
    background: rgba(0, 212, 170, 0.35);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.pool-hr-bar-fill.is-max { background: var(--accent); }

.pool-hr-bar-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-3);
    text-align: right;
}

.pool-hr-bar-value.is-max { color: var(--accent); }

/* Miner Pills */
.pool-miner-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pool-miner-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 6px 12px 6px 10px;
    transition: border-color 0.15s;
}

.pool-miner-pill:hover { border-color: rgba(0, 212, 170, 0.4); }
.pool-miner-pill-name { font-size: 0.85rem; color: var(--text-1); font-weight: 500; }
.pool-miner-pill-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 3px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

/* =============================================
   CHART CONTAINER
   ============================================= */

.chart-container {
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 20px;
    height: 320px;
    position: relative;
    overflow: hidden;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 270px;
}

/* Home hashrate section chart wrapper */
.hashrate-section .chart-container {
    height: 280px;
    padding: 16px;
}

/* =============================================
   LOOKUP FORM
   ============================================= */

.lookup-form {
    margin-bottom: 0;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--text-1);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group input::placeholder {
    color: var(--text-3);
}

/* Lookup field: chips + input inline */
.lookup-field {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 5px;
    cursor: text;
    transition: border-color 0.2s ease;
    min-height: 42px;
}

.lookup-field:focus-within {
    border-color: var(--accent);
}

.lookup-field input {
    flex: 1;
    min-width: 80px;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-1);
    font-size: 0.9rem;
    padding: 0;
    font-family: inherit;
}

.lookup-field input::placeholder {
    color: var(--text-3);
}

.lookup-chips {
    display: contents;
}

.lookup-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px 3px 10px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.lookup-chip-addr {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-1);
    text-decoration: none;
    transition: color 0.15s;
}

.lookup-chip-addr:hover { color: var(--accent); }

.lookup-chip-del {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0 4px;
    border-radius: 2px;
    transition: color 0.15s;
}

.lookup-chip-del:hover { color: var(--down); }

/* Lookup section (old full-page variant, rarely used) */
.lookup-section {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 40px;
    position: relative;
}

.lookup-section h2 {
    color: var(--text-1);
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.lookup-section p {
    color: var(--text-2);
    margin-bottom: 24px;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-secondary {
    background: var(--panel);
    color: var(--text-2);
    border-color: var(--line);
}

.btn-secondary:hover {
    background: var(--fill);
    color: var(--text-1);
}

/* =============================================
   WORKERS TABLE
   ============================================= */

.workers-table {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.workers-table table {
    width: 100%;
    border-collapse: collapse;
}

.workers-table th,
.workers-table td {
    padding: 12px 16px;
    text-align: left;
}

.workers-table th {
    background: var(--fill);
    color: var(--text-3);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--line);
}

.workers-table td {
    color: var(--text-1);
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

.workers-table tr:last-child td {
    border-bottom: none;
}

.workers-table tr:hover td {
    background: rgba(0, 212, 170, 0.04);
}

.worker-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.worker-link:hover {
    text-decoration: underline;
    color: var(--accent);
}

.miner-type {
    white-space: nowrap;
    cursor: help;
    color: var(--text-2);
}

.miner-type:hover { color: var(--accent); }

/* =============================================
   STATUS INDICATORS
   ============================================= */

.status-indicator {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--fill-2);
}

.status-indicator.online {
    background: var(--up);
    box-shadow: 0 0 5px rgba(14, 203, 129, 0.4);
}

.status-indicator.offline { background: var(--fill-3); }

.success { color: var(--up); }
.warning { color: var(--accent); }
.error   { color: var(--down); }

/* =============================================
   LEADERBOARD TABLE
   ============================================= */

.leaderboard-table-wrapper {
    max-height: 520px;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid var(--line);
}

.leaderboard-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-table-wrapper::-webkit-scrollbar-track {
    background: var(--fill);
}

.leaderboard-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 170, 0.35);
    border-radius: 3px;
}

.leaderboard-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 170, 0.55);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.leaderboard-table th {
    padding: 10px 10px;
    text-align: left;
    font-size: 0.68rem;
    background: var(--fill);
    color: var(--text-3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--line);
}

.leaderboard-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}

.leaderboard-table tbody tr:hover td {
    background: rgba(0, 212, 170, 0.05);
}

.leaderboard-table .loading {
    text-align: center;
    color: var(--text-3);
    padding: 28px;
}

.leaderboard-table .rank-cell {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    width: 46px;
}

.leaderboard-table .status-cell {
    width: 28px;
    text-align: center;
}

.leaderboard-table .worker-cell {
    color: var(--text-1);
    font-weight: 600;
}

.leaderboard-table .miner-cell {
    color: var(--text-3);
    font-size: 0.85rem;
}

.leaderboard-table .hashrate-cell {
    color: var(--text-2);
    font-size: 0.88rem;
}

.leaderboard-table .diff-cell {
    color: var(--accent);
    font-weight: 700;
}

/* =============================================
   STATS ACTIONS
   ============================================= */

.stats-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* =============================================
   ADDRESS / STATS HEADER
   ============================================= */

.address-display {
    font-family: var(--font-mono);
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 8px 16px;
    border-radius: 5px;
    word-break: break-all;
    color: var(--accent);
    display: inline-block;
    font-size: 0.88rem;
}

.stats-header {
    text-align: center;
    margin-bottom: 24px;
}

.stats-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 10px;
}

.stats-container {}

.user-stats {}

/* =============================================
   NO DATA / ALERTS
   ============================================= */

.no-data {
    text-align: center;
    padding: 40px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.no-data h2 {
    color: var(--text-1);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.no-data p {
    color: var(--text-3);
    margin-bottom: 12px;
}

.no-chart-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 240px;
    text-align: center;
    color: var(--text-3);
}

.no-chart-data p {
    margin: 4px 0;
}

.no-chart-data .hint {
    font-size: 0.82rem;
    color: var(--text-3);
}

.alert {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.alert-error {
    background: var(--panel);
    border-color: var(--down);
}

.alert-error p {
    color: var(--down);
    font-weight: 600;
    margin-bottom: 12px;
}

/* =============================================
   ERROR PAGE
   ============================================= */

.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-content {
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 40px;
}

.error-message {
    color: var(--text-2);
    margin: 16px 0 24px;
    font-size: 1rem;
}

.error-stack {
    background: var(--fill);
    padding: 16px;
    border-radius: 5px;
    text-align: left;
    overflow-x: auto;
    margin-bottom: 20px;
    font-size: 0.82rem;
    color: var(--text-2);
    border: 1px solid var(--line);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    text-align: center;
    padding: 24px 20px;
    margin-top: auto;
}

.footer-content {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.footer-title {
    color: var(--text-1);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.15s, border-color 0.15s;
}

.footer-link:hover {
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--accent);
}

.footer-link.donate-link {
    background: rgba(0, 212, 170, 0.1);
    border-color: rgba(0, 212, 170, 0.3);
    color: var(--accent);
}

.footer-link.donate-link:hover {
    background: rgba(0, 212, 170, 0.2);
}

.footer-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.footer-powered {
    color: var(--text-3);
    font-size: 0.8rem;
}

.footer-powered a {
    color: var(--accent);
    text-decoration: none;
}

.footer-powered a:hover { text-decoration: underline; }

/* =============================================
   MINER TYPES GRID (older usage)
   ============================================= */

.miner-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.miner-type-card {
    background: rgba(0, 212, 170, 0.07);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 5px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.miner-type-name {
    color: var(--text-1);
    font-size: 0.88rem;
}

.miner-type-count {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.82rem;
}

/* =============================================
   DRAG AND DROP STYLES
   ============================================= */

.drag-handle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: grab;
    opacity: 0.25;
    transition: opacity 0.2s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.drag-handle:hover { opacity: 0.8; }
.drag-handle:active { cursor: grabbing; }

.drag-handle span {
    display: block;
    width: 12px;
    height: 2px;
    background: var(--fill-3);
    border-radius: 1px;
}

.stat-card,
.stats-section {
    position: relative;
}

.sortable-ghost {
    opacity: 0.3;
    background: rgba(0, 212, 170, 0.15) !important;
}

.sortable-chosen {
    outline: 1px solid rgba(0, 212, 170, 0.5);
}

.sortable-drag {
    opacity: 1 !important;
}

.sortable-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-drag-handle {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 24px;
    height: 24px;
    cursor: grab;
    opacity: 0.25;
    transition: opacity 0.2s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    background: rgba(22, 26, 30, 0.9);
    border-radius: 4px;
    padding: 3px;
}

.section-drag-handle:hover { opacity: 0.8; }

.section-drag-handle span {
    display: block;
    width: 14px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* =============================================
   RECENT SEARCHES
   ============================================= */

.recent-searches {
    text-align: left;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}

.recent-searches h4 {
    margin-bottom: 12px;
    color: var(--text-3);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-1);
    transition: border-color 0.15s;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.search-item:hover {
    border-color: rgba(0, 212, 170, 0.35);
    color: var(--accent);
}

/* =============================================
   POOL SUMMARY (legacy class used in some places)
   ============================================= */

.pool-summary {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 16px;
}

.pool-summary h3 {
    margin-bottom: 16px;
    color: var(--text-1);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Estimation card */
.estimation-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    position: relative;
}

.estimation-card p {
    color: var(--text-2);
    margin-bottom: 12px;
}

.estimation-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
}

/* =============================================
   STRATUM INFO (legacy)
   ============================================= */

.stratum-info {
    text-align: center;
    margin-bottom: 16px;
}

.stratum-line {
    color: var(--text-1);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.8;
}

/* =============================================
   BATTLEGROUND - layout visibility fixes
   ============================================= */

/* Pool inline balance and Fund Pool button are hidden by default via inline
   visibility:hidden (set by JS when LNBits is not configured / not yet loaded).
   Use display:none so they don't create invisible gaps in the how-row flex layout. */
#wr-pool-inline[style*="visibility:hidden"],
#pool-donate-btn[style*="visibility:hidden"] {
    display: none !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .nav-stat-sub { display: none; }
}

@media (max-width: 768px) {
    body { padding: 10px; }

    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
        border-radius: 8px;
    }

    .nav-brand a { font-size: 1.2rem; }
    .nav-logo { height: 30px; }

    .nav-center {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
        flex: none;
    }

    .nav-label-full { display: none; }
    .nav-label-short { display: inline; }
    .nav-sep { display: none; }
    .nav-stat { padding: 5px 10px; }
    .nav-stat-label { font-size: 0.8rem; }

    .nav-links {
        order: 3;
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .top-cards-row { grid-template-columns: 1fr; }

    .input-group { flex-direction: column; }
    .lookup-card .input-group { flex-direction: column; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card.wide { grid-column: span 1; }

    .hero-stats { grid-template-columns: repeat(2, 1fr); }

    .hero-detail-row { flex-direction: column; }

    .hero-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .hero-title-section {
        flex-direction: column;
        gap: 8px;
    }

    .hero-title-section h2 { font-size: 1.2rem; }

    .block-item {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .block-miner {
        grid-column: span 2;
        order: -1;
    }

    .block-hash {
        grid-column: span 2;
        font-size: 0.72rem;
    }

    .footer-links { flex-direction: column; align-items: center; }
    .footer-link { width: 100%; max-width: 200px; justify-content: center; }

    /* Pool page */
    .pool-hero-body { flex-direction: column; }
    .pool-hero-divider { width: 100%; height: 1px; margin: 16px 0; }
    .pool-net-grid { grid-template-columns: repeat(2, 1fr); }
    .pool-potential-layout { flex-direction: column; }
    .pool-potential-right { grid-template-columns: repeat(3, 1fr); }
    .pool-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .pool-records-row { flex-direction: column; }
    .pool-record-item { border-right: none; border-bottom: 1px solid var(--line); }
    .pool-record-item:last-child { border-bottom: none; }

    .fee-rates .fee-grid { grid-template-columns: 1fr; }

    /* Leaderboard */
    .leaderboard-table .miner-cell { display: none; }
    .leaderboard-table th:nth-child(3),
    .leaderboard-table td:nth-child(3) { display: none; }
    .leaderboard-table th,
    .leaderboard-table td { padding: 8px 6px; font-size: 0.82rem; }

    /* Workers table */
    .workers-table th,
    .workers-table td { padding: 10px 12px; font-size: 0.82rem; }

    .home-section { padding: 16px; }
    .top-card { padding: 16px; }
    .stats-section { padding: 14px 16px; }
    .compact-card { padding: 14px 16px !important; }
}

@media (max-width: 480px) {
    .navbar { padding: 12px 15px; gap: 8px; }
    .nav-brand a { font-size: 1rem; gap: 6px; }
    .nav-logo { height: 25px; }
    .nav-links { gap: 0.5rem; }
    .nav-link { padding: 5px 10px; font-size: 0.8rem; }
    .nav-stat-label { font-size: 0.72rem; }
    .nav-stat-value { font-size: 0.88rem; }
    .nav-stat-sub { display: none; }

    .hero-stats { grid-template-columns: 1fr 1fr; }
    .hero-icon { width: 34px; height: 34px; border-radius: 6px; }
    .hero-icon svg, .hero-icon img { width: 18px; height: 18px; }

    .block-item { grid-template-columns: 1fr; text-align: center; }
    .block-miner, .block-hash { grid-column: 1; }

    .footer-content { padding: 16px; }
    .footer-title { font-size: 0.9rem; }
    .footer-powered { font-size: 0.72rem; }

    .chart-container { height: 240px; padding: 12px; }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 14px 16px; }
    .stat-value { font-size: 1.3rem; }

    .btn { padding: 9px 16px; font-size: 0.85rem; }

    .pool-hr-bar-row { grid-template-columns: 22px 1fr 75px; }
    .pool-net-grid { grid-template-columns: 1fr !important; }
    .pool-net-item { border-right: none; }
    .pool-potential-right { grid-template-columns: repeat(2, 1fr); }
    .pool-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }

    .section-drag-handle, .drag-handle { display: none; }

    /* Leaderboard */
    .leaderboard-table .hashrate-cell { display: none; }
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) { display: none; }
    .leaderboard-table th,
    .leaderboard-table td { padding: 6px 5px; font-size: 0.78rem; }
    .leaderboard-table-wrapper { max-height: 360px; }
    .status-indicator { width: 8px; height: 8px; }
}

/* =============================================
   ACTIVE NAV LINK
   ============================================= */
.nav-link.nav-active {
    color: var(--accent);
    font-weight: 700;
}
.nav-link-warroom.nav-active {
    color: var(--accent);
}

/* =============================================
   POOL ACTIVITY FEED (shared: home + warroom)
   ============================================= */
.home-activity-section { padding: 18px 20px; }

.home-activity-scroll-fade { position: relative; }
.home-activity-scroll-fade::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 32px;
    background: linear-gradient(transparent, var(--page));
    pointer-events: none;
    transition: opacity 0.15s;
    border-radius: 0 0 6px 6px;
}
.home-activity-scroll-fade.at-end::after { opacity: 0; }

.home-activity-feed {
    display: flex; flex-direction: column; gap: 0; margin-top: 10px;
    max-height: 320px; overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 170, 0.35) transparent;
}
.home-activity-feed::-webkit-scrollbar { width: 4px; }
.home-activity-feed::-webkit-scrollbar-track { background: transparent; }
.home-activity-feed::-webkit-scrollbar-thumb { background: rgba(0, 212, 170, 0.35); border-radius: 2px; }

.home-activity-item {
    display: flex; align-items: baseline; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.78rem;
}
.home-activity-item:last-child { border-bottom: none; }
.home-activity-time  { color: var(--text-3); white-space: nowrap; flex-shrink: 0; font-size: 0.7rem; }
.home-activity-text  { color: var(--text-2); flex: 1; }
.home-activity-empty { color: var(--text-3); font-size: 0.78rem; padding: 8px 0; }

@media (max-width: 768px) {
    .home-activity-feed { max-height: 240px; }
}


/* =============================================
   THEME: flat panels, readable contrast
   ============================================= */

body {
    background: var(--page);
    color: var(--text-1);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.navbar,
.panel,
.top-card,
.home-section,
.stats-section,
.hero-card,
.no-data,
.alert,
.error-content {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
}

.stat-row,
.fee-item,
.pool-stat,
.stratum-connect-block,
.lookup-field,
.leaderboard-table-wrapper,
.workers-table,
.block-item {
    border-radius: 8px;
}

.btn,
.tab-btn,
input,
select,
button {
    border-radius: 8px;
    font-family: var(--font-ui);
}

.btn-primary,
.tab-btn.active {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
}

.btn-primary:hover { filter: brightness(0.92); }

.btn-secondary {
    background: var(--fill);
    color: var(--text-1);
    border: 1px solid var(--line-2);
}

.btn-secondary:hover { background: var(--fill-2); }

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

table th {
    background: var(--fill);
    color: var(--text-2);
}

table tr:hover td { background: var(--hover); }

.pool-section-label,
.section-label,
.stats-section h2 {
    color: var(--accent);
}

.pool-section-label::after,
.section-label::after {
    background: var(--line);
}

.nav-link.nav-active,
.nav-link:hover { color: var(--accent); }

.status-indicator.online { background: var(--up); box-shadow: none; }
.status-indicator.offline { background: var(--text-4); box-shadow: none; }

.success, .green { color: var(--up); }
.warning, .warn { color: var(--text-2); }

.stat-row-label,
.pool-stat-label,
.fee-label,
.hero-stat-label,
.detail-label,
.stratum-key,
.stratum-note,
.stratum-desc-line,
.no-chart-data .hint,
.nav-stat-sub {
    color: var(--text-3);
}

.stratum-val { color: var(--text-1); font-family: var(--font-mono); }
.stratum-row-sub { margin-top: -4px; }
.stratum-desc-line { font-size: 0.75rem; }

.address-display,
.worker-address a,
.lookup-chip-addr {
    font-family: var(--font-mono);
    word-break: break-all;
}

.no-data-hint,
.no-data-list {
    color: var(--text-2);
    font-size: 0.88rem;
}

.no-data-list {
    text-align: left;
    max-width: 400px;
    margin: 8px auto;
}

.footer {
    background: transparent;
    border-top: 1px solid var(--line);
    color: var(--text-3);
}

.footer-title { color: var(--text-1); }
.footer-powered { color: var(--text-3); }

/* Pool notice (home page) */
.pool-notice {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 18px 24px;
    margin-bottom: 12px;
    color: var(--text-1);
}
.pool-notice-lead {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--text-1);
}
.pool-notice-steps {
    margin: 0 0 12px;
    padding-left: 20px;
    color: var(--text-2);
    font-size: 0.9rem;
    line-height: 1.6;
}
.pool-notice-steps strong,
.pool-notice-lead strong {
    color: var(--text-1);
}
.pool-notice-warn {
    margin: 0;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--accent-tint);
    color: var(--text-1);
    font-size: 0.88rem;
    line-height: 1.5;
}
.pool-notice-warn strong {
    color: var(--accent);
}
@media (max-width: 640px) {
    .pool-notice { padding: 14px 16px; }
    .pool-notice-steps { padding-left: 18px; }
}
