/* static/style.css */
:root {
    --bg-dark: #030504;
    --bg-card: #080c0a;
    --bg-elevated: #0d1410;
    --border-dim: #19261e;
    --border-bright: #00ff66;
    --neon-green: #00ff66;
    --neon-green-dim: rgba(0, 255, 102, 0.14);
    --neon-cyan: #00e5ff;
    --warn-amber: #ffb800;
    --danger-red: #ff3b3b;
    --text-main: #eef5f0;
    --text-muted: #6c8273;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(0, 255, 102, 0.08) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px, 24px 24px;
    color: var(--text-main);
    font-family: var(--font-mono);
    height: 100vh;
    overflow: hidden;
    font-size: 13px;
}

/* Scanline CRT */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%);
    background-size: 100% 4px;
    opacity: 0.35;
}

/* ================= GENESIS BOOT LOADER OVERLAY ================= */
.boot-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, #091e11 0%, #020403 75%);
    z-index: 9500;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.boot-overlay.fade-out {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

.boot-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.early-pill {
    display: inline-block;
    background: rgba(0, 255, 102, 0.12);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.2);
}

.boot-logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.4);
    margin-bottom: 4px;
}
.boot-logo span {
    color: var(--neon-green);
}

.boot-tagline {
    font-size: 10.5px;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    margin-bottom: 18px;
}

.boot-terminal {
    background: #050907;
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 14px;
    text-align: left;
    margin-bottom: 16px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.boot-logs {
    min-height: 88px;
    font-size: 11px;
    line-height: 1.65;
    color: #9cb3a3;
    margin-bottom: 12px;
}

.boot-progress-track {
    width: 100%;
    height: 6px;
    background: #101913;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.boot-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    box-shadow: 0 0 10px var(--neon-green);
    transition: width 0.2s ease;
}

.boot-percent-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
}

.fomo-card {
    background: linear-gradient(180deg, rgba(0, 255, 102, 0.1) 0%, rgba(8, 13, 10, 0.95) 100%);
    border: 1px solid rgba(0, 255, 102, 0.45);
    border-radius: 10px;
    padding: 14px;
    text-align: left;
    margin-bottom: 18px;
}

.fomo-header {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--neon-green);
    margin-bottom: 6px;
}

.fomo-desc {
    font-size: 11.5px;
    color: var(--text-main);
    line-height: 1.45;
    margin-bottom: 10px;
}

.fomo-perks {
    list-style: none;
    font-size: 11px;
    color: #b7ccc0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.fomo-perks li span {
    color: var(--neon-green);
    font-weight: bold;
    margin-right: 4px;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 255, 102, 0.3); }
    50% { box-shadow: 0 0 28px rgba(0, 255, 102, 0.65); }
}
.pulse-glow {
    animation: pulseGlow 2s infinite;
}

/* Early Pioneer Banner inside App */
.early-banner {
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid rgba(0, 255, 102, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.early-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
    flex-shrink: 0;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 74px;
}

.text-green { color: var(--neon-green) !important; }
.text-cyan { color: var(--neon-cyan) !important; }
.text-muted { color: var(--text-muted); font-size: 11px; }
.hidden { display: none !important; }

/* Toast Notification */
.toast {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: #07120b;
    border: 1px solid var(--neon-green);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 8px 25px rgba(0, 255, 102, 0.25);
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-dim);
    background: rgba(5, 9, 7, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warn-amber);
    box-shadow: 0 0 8px var(--warn-amber);
}
.status-led.online {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.brand-title {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.version {
    font-size: 9.5px;
    background: var(--neon-green-dim);
    color: var(--neon-green);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.brand-sub {
    font-size: 10px;
    color: var(--text-muted);
}

/* Pages */
.page {
    display: none;
    padding: 14px 16px 24px;
    overflow-y: auto;
    height: 100%;
    scrollbar-width: none;
}
.page::-webkit-scrollbar { display: none; }
.page.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Terminal Card */
.terminal-card {
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    background: var(--bg-card);
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}

.terminal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-dim);
}

.win-dots { display: flex; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    font-size: 11px;
    color: var(--text-muted);
}

.ping-badge {
    font-size: 10px;
    color: var(--neon-green);
    background: var(--neon-green-dim);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.terminal-body { padding: 14px; }

.log-lines {
    font-size: 11.5px;
    line-height: 1.65;
    margin-bottom: 12px;
}

.cmd-prompt { color: var(--neon-green); font-weight: bold; margin-right: 4px; }
.status-warn { color: var(--warn-amber); }
.status-ok { color: var(--neon-green); }

/* Live Counter Box */
.live-counter-box {
    background: #040705;
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.counter-label {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.counter-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--neon-green);
    text-shadow: 0 0 14px rgba(0, 255, 102, 0.35);
    margin-bottom: 8px;
}

.currency-tag {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 700;
}

.hash-progress-wrap {
    width: 100%;
    height: 4px;
    background: #111914;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.hash-progress-bar {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    transition: width 0.3s linear;
}

.live-hash-stream {
    font-size: 9.5px;
    color: #466350;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Telemetry Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
}
.stat-card.highlight {
    border-color: rgba(0, 255, 102, 0.35);
}

.stat-label {
    display: block;
    font-size: 9.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 13px;
    font-weight: 700;
}
.stat-value small {
    font-size: 9.5px;
    font-weight: normal;
    color: var(--text-muted);
}

/* Buttons & Controls */
.cyber-btn {
    width: 100%;
    padding: 13px 16px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease;
    text-transform: uppercase;
}

.primary-btn {
    background: var(--neon-green);
    color: #020804;
    border: none;
    box-shadow: 0 0 18px rgba(0, 255, 102, 0.25);
}
.primary-btn:active {
    transform: scale(0.98);
    background: #00cc52;
}

.locked-btn {
    background: #101712;
    color: var(--warn-amber);
    border: 1px dashed rgba(255, 184, 0, 0.5);
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.danger-btn {
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
}

.btn-tag {
    font-size: 9px;
    background: #031409;
    color: var(--neon-green);
    padding: 2px 6px;
    border-radius: 4px;
}

.mining-status-bar {
    margin-top: 8px;
    margin-bottom: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
}

.green-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--neon-green);
}

.rate-pill {
    color: var(--neon-green);
    background: var(--neon-green-dim);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 10.5px;
}

/* Listing Countdown Card */
.listing-card {
    border: 1px solid rgba(0, 255, 102, 0.4);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 255, 102, 0.08) 0%, rgba(8, 12, 10, 0.95) 100%);
    margin-bottom: 14px;
}

.listing-badge {
    display: inline-block;
    font-size: 9.5px;
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 102, 0.4);
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.listing-title {
    font-size: 13.5px;
    font-weight: 800;
    margin-bottom: 3px;
}

.listing-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.cd-box {
    background: #040806;
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 54px;
}
.cd-box span {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--neon-green);
}
.cd-box small {
    font-size: 8.5px;
    color: var(--text-muted);
}
.cd-sep {
    font-weight: bold;
    color: var(--neon-green);
}

/* Panel & Tokenomics */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-dim);
}

.tokenomics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.t-info {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    margin-bottom: 4px;
}

.t-bar {
    height: 5px;
    background: #111a14;
    border-radius: 3px;
    overflow: hidden;
}
.t-bar div {
    height: 100%;
    background: var(--neon-green);
}

/* Shop Page */
.page-header-block { margin-bottom: 12px; }
.page-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.page-subtitle { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.mini-telemetry { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 8px; }

.shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.tab {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    color: var(--text-muted);
    padding: 9px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}
.tab.active {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: var(--neon-green-dim);
}

.shop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.item-left { display: flex; align-items: center; gap: 12px; }

.rig-badge {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--neon-green);
}

.item-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.item-specs { font-size: 11px; color: var(--neon-green); }
.item-owned { font-size: 10px; color: var(--text-muted); }

.buy-btn {
    background: var(--neon-green-dim);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11.5px;
    cursor: pointer;
}
.buy-btn:active { background: var(--neon-green); color: #000; }

/* Referral Page */
.ref-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.ref-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.ref-stat-item {
    background: #040806;
    border: 1px solid var(--border-dim);
    padding: 10px;
    border-radius: 8px;
}

.qr-wrapper {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 14px;
}
.qr-code-img { width: 130px; height: 130px; display: block; }

.ref-code-box {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--neon-green);
    background: #040806;
    border: 1px dashed var(--neon-green);
    padding: 10px;
    border-radius: 6px;
    margin: 6px 0 14px;
}

.ref-actions { display: flex; gap: 8px; }

/* Wallet Page & TGE Lock Banner */
.wallet-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
.wallet-left { display: flex; align-items: center; gap: 12px; }
.ton-diamond { font-size: 26px; }
.wallet-addr { font-size: 13px; font-weight: 700; }
.wallet-badge { font-size: 10.5px; color: var(--text-muted); }

.small-action-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
}

.vault-balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 14px;
}
.balance-amount {
    font-size: 28px;
    font-weight: 800;
    margin: 6px 0 4px;
}
.balance-usd {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.tge-lock-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    background: rgba(255, 184, 0, 0.08);
    border: 1px solid rgba(255, 184, 0, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
.lock-icon { font-size: 18px; line-height: 1; margin-top: 2px; }
.lock-text { display: flex; flex-direction: column; gap: 3px; }
.lock-text b { font-size: 11px; color: var(--warn-amber); }
.lock-text span { font-size: 10.5px; color: #c9d6cd; line-height: 1.35; }

.input-group { margin-bottom: 12px; }
.input-group label {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.max-link { color: var(--neon-green); cursor: pointer; font-weight: bold; }
.cyber-input {
    width: 100%;
    background: #030604;
    border: 1px solid var(--border-dim);
    color: var(--neon-green);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
}
.cyber-input:focus { outline: none; border-color: var(--neon-green); }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    padding: 8px;
    background: #040806;
    border-radius: 6px;
    border: 1px solid #101913;
}
.empty-log { text-align: center; color: var(--text-muted); font-size: 11.5px; padding: 12px; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(5, 9, 7, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-dim);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 25%;
    cursor: pointer;
    position: relative;
}

.nav-svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item.active { color: var(--neon-green); }
.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    width: 36px;
    height: 2px;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--neon-green);
    border-radius: 12px;
    padding: 22px 18px;
    width: 88%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.2);
}
.modal-tag { font-size: 10px; color: var(--neon-green); letter-spacing: 1px; margin-bottom: 6px; }
.modal-title { font-size: 17px; margin-bottom: 10px; }
.modal-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 18px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }