:root {
    --primary: #f7931a;
    --mainnet-alt: #1a2c3d;
    --secondary: #240935;
    --bg-black: #050505;
    --cyan: #00d2ff;
    --yellow-fee: #f2c94c;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Block State Colors (Subtle Palette) */
    --color-past: #475569;
    /* Slate Gray */
    --color-mining: #d97706;
    /* Amber */
    --color-locked: #7c3aed;
    /* Violet */
    --color-future: #059669;
    /* Emerald */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: none !important;
    animation: none !important;
}

/* INTERACTIVE SURFACES */
a,
button,
[onclick],
.direction-alternator,
.stake-pill,
.tx-operator-btn,
.pb-btn-primary,
.pb-btn-secondary,
.pb-modal-close {
    cursor: pointer !important;
}

.cube,
.alternator-btn,
.badge,
a {
    cursor: pointer !important;
}

#block-visuals {
    cursor: grab;
}

#block-visuals:active {
    cursor: grabbing;
}

body.dragging,
body.dragging * {
    cursor: grabbing !important;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    overflow-x: hidden;
}

.main-container {
    width: 100%;
}

.top-bar-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 3D STREAM CONTAINER */
.mempool-stream-wrapper {
    position: relative;
    margin: 1rem 0;
    user-select: none;
    width: 100%;
}

/* Triangle pointer below blocks */
.center-pointer-triangle {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    /* Equilateral triangle pointing up: 20px sides */
    border-left: 11.55px solid transparent;
    border-right: 11.55px solid transparent;
    border-bottom: 20px solid var(--primary);
    filter: drop-shadow(0 0 5px rgba(247, 147, 26, 0.4));
    z-index: 20;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.center-pointer-triangle:hover {
    transform: translateX(-50%) scale(1.2);
    filter: drop-shadow(0 0 12px rgba(247, 147, 26, 0.8));
}

#block-visuals {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 20px;
    gap: 5px;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

/* Allow centering blocks on very large viewports where content < 100vw */
#block-visuals::before,
#block-visuals::after {
    content: '';
    flex: 0 0 calc(50vw - 75px);
}

#block-visuals.stream-transitioning {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(10px) brightness(1.5);
    pointer-events: none;
}

@keyframes streamFlip {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }

    50% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

#block-visuals::-webkit-scrollbar {
    display: none;
}

#block-visuals>div {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* THE MAGIC CUBE (User's Snippet Refined) */
.cube {
    --d: 22px;
    /* Precision Depth for 150px width */
    width: 150px;
    height: 150px;
    /* Perfect Square */
    padding: 15px;
    box-sizing: border-box;
    border: solid #0000;
    border-width: var(--d) 0 0 var(--d);
    clip-path: polygon(100% 100%, var(--d) 100%, 0 calc(100% - var(--d)), 0 0, calc(100% - var(--d)) 0, 100% var(--d));
    background:
        conic-gradient(from 90deg at var(--d) var(--d), #0000 25%, rgba(0, 0, 0, 0.2) 0 62.5%, rgba(0, 0, 0, 0.4) 0) border-box,
        linear-gradient(180deg, #9b51e0 0%, #2f80ed 100%) border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: pointer;
}

/* BLOCK UNIT WRAPPER */
.block-unit-wrapper {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.block-unit-wrapper.selected {
    transform: scale(1.1);
    margin: 0 20px;
    z-index: 10;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(247, 147, 26, 0.4));
}

.block-height {
    height: 35px;
    /* Fixed height for consistent starting point */
    display: flex;
    align-items: flex-end;
    color: var(--cyan);
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 15px;
}

/* MINED STATE - SUBTLE GRAY */
.mined-block .cube {
    background:
        conic-gradient(from 90deg at var(--d) var(--d), #0000 25%, rgba(255, 255, 255, 0.01) 0 62.5%, rgba(255, 255, 255, 0.02) 0) border-box,
        linear-gradient(135deg, rgba(71, 85, 105, 0.2) 0%, rgba(5, 5, 5, 0.9) 100%) border-box;
    border: 1px solid rgba(71, 85, 105, 0.2);
    border-width: var(--d) 1px 1px var(--d);
}

/* MINING STATE - SUBTLE AMBER */
.mining-block .cube {
    background:
        conic-gradient(from 90deg at var(--d) var(--d), #0000 25%, rgba(217, 119, 6, 0.05) 0 62.5%, rgba(217, 119, 6, 0.1) 0) border-box,
        linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(5, 5, 5, 0.9) 100%) border-box;
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-width: var(--d) 1px 1px var(--d);
}

/* LOCKED STATE - SUBTLE VIOLET */
.locked-block .cube {
    background:
        conic-gradient(from 90deg at var(--d) var(--d), #0000 25%, rgba(124, 58, 237, 0.05) 0 62.5%, rgba(124, 58, 237, 0.1) 0) border-box,
        linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(5, 5, 5, 0.9) 100%) border-box;
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-width: var(--d) 1px 1px var(--d);
}

/* FUTURE BETTABLE STATE - SUBTLE EMERALD */
.future-block .cube {
    background:
        conic-gradient(from 90deg at var(--d) var(--d), #0000 25%, rgba(5, 150, 105, 0.05) 0 62.5%, rgba(5, 150, 105, 0.1) 0) border-box,
        linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(5, 5, 5, 0.9) 100%) border-box;
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-width: var(--d) 1px 1px var(--d);
}

.mining-block .block-height {
    color: var(--primary);
}

/* WARP GLITCH STATE - MULTIPLIER/ANOMALY */
.warp-glitch {
    animation: warpShake 0.4s infinite alternate;
}

.cube.warp {
    background:
        conic-gradient(from 90deg at var(--d) var(--d), #0000 25%, rgba(255, 0, 255, 0.05) 0 62.5%, rgba(255, 0, 255, 0.1) 0) border-box,
        linear-gradient(135deg, rgba(255, 0, 255, 0.2) 0%, rgba(5, 5, 5, 0.9) 100%) border-box !important;
    border: 1px solid rgba(255, 0, 255, 0.5) !important;
    border-width: var(--d) 1px 1px var(--d) !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3) !important;
}

@keyframes warpShake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    100% { transform: translate(-1px, -2px) rotate(-1deg); }
}

/* DATA LABELS */
.bitcoin-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fees {
    font-size: 0.6rem;
    font-weight: 500;
}

.fee-span {
    color: var(--yellow-fee);
    font-size: 0.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.block-stats-row {
    font-size: 0.85rem;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.transaction-count {
    font-size: 0.55rem;
    font-weight: 500;
}

.time-difference {
    font-size: 0.65rem;
    font-weight: 600;
}

.block-status {
    background: #f7931a;
    color: #000;
    padding: 2px 6px;
    font-size: 0.5rem;
    /* Reduced slightly */
    font-weight: 900;
    border-radius: 2px;
    display: inline-block;
    margin-top: 6px;
    /* Balanced spacing */
    text-transform: uppercase;
}

.block-status.future-status {
    background: #059669;
    /* Emerald Green */
    color: #fff;
}

/* FOOTER */
.animated {
    margin-top: 25px;
    height: 30px;
    /* Standardize bottom area */
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    /* Reduced from 0.85rem */
    font-weight: 700;
    /* Reduced from 900 */
    text-decoration: none;
    color: inherit;
}

.pool-logo {
    width: 14px;
    height: 14px;
    background: #26a69a;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

/* CLEANUP: Grid and Panels removed */

/* DIRECTION ALTERNATOR - Minimalist Technical Version */
.alternator-unit {
    flex: 0 0 50px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.direction-alternator {
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    user-select: none;
}

.alternator-track {
    width: 1px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    /* Very subtle line */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.alternator-btn {
    width: 44px;
    height: 44px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(247, 147, 26, 0.2);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease !important;
}

.alternator-btn:hover {
    background: rgba(247, 147, 26, 0.1);
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.2);
}

.alternator-btn.spinning {
    transform: rotate(360deg) scale(1.1) !important;
    background: rgba(247, 147, 26, 0.2);
    box-shadow: 0 0 30px rgba(247, 147, 26, 0.4);
}

.alternator-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--primary);
    opacity: 0.8;
    transition: fill 0.3s ease;
}

.alternator-btn .status-dot {
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 2px;
    box-shadow: 0 0 10px var(--primary);
    animation: none !important;
}

.direction-alternator:hover svg {
    fill: var(--primary);
    opacity: 1;
}

.alternator-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 40px;
    opacity: 0.3;
    position: absolute;
    bottom: -30px;
    white-space: nowrap;
}

.direction-alternator:hover .alternator-label {
    opacity: 0.6;
    color: var(--text-white);
}

/* DASHBOARD GRID SYSTEM - 2 COLUMN TOP ROW */
.dashboard-grid,
#global-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem 5rem 1.5rem;
}

/* MASSIVE EXCHANGE DASHBOARD STYLES */
#global-dashboard {
    grid-template-columns: 1fr;
    margin-top: 1rem;
    padding-bottom: 5rem;
}

#exchange-grid-massive {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns for more breathing room */
    gap: 25px;
    margin-top: 25px;
}

#global-dashboard .panel {
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

#global-dashboard .panel-title {
    font-size: 0.85rem;
    /* Larger and clearer */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(247, 147, 26, 0.1);
    padding-bottom: 8px;
}

.info-light-label {
    font-size: 0.75rem;
    /* Readable labels */
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.info-light-value {
    font-size: 1.15rem;
    /* Prominent values */
    font-weight: 900;
    color: var(--text-white);
}

/* LIVE FEED STYLES - SCALED UP */
.live-feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.feed-user {
    font-size: 0.9rem;
    color: var(--text-white);
    font-weight: 700;
}

.feed-amount {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 800;
}

.feed-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}


/* SPARKLINE PLACEHOLDER */
.spark-placeholder {
    height: 30px;
    background: linear-gradient(90deg, transparent, rgba(247, 147, 26, 0.1), transparent);
    background-size: 200% 100%;
    animation: flow 2s linear infinite;
    border-radius: 4px;
    margin-top: 5px;
}

@keyframes flow {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* OMNIPRESENT NAVIGATOR FIX - OPAQUE */
.mempool-stream-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0d0d12;
    /* Fully opaque background */
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0;
    padding-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.full-width {
    grid-column: span 2;
}

#block-info-panel,
#player-info-panel {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    padding: 0 0 1rem 0;
    min-height: 120px;
}

#player-info-panel {
    border-left: 1px solid var(--glass-border);
    padding-left: 2rem;
}

#block-info-panel .panel-header,
#player-info-panel .panel-header {
    border: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}

.info-light-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0;
}

.info-light-row.central {
    justify-content: center;
}

.info-light-item {
    display: flex;
    flex-direction: column;
}

.info-light-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.info-light-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

/* Player Info Activity List */
.player-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.activity-block {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
}

.activity-amount {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--text-white);
}

.status-tag {
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-won {
    background: rgba(5, 150, 105, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-lost {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.status-waiting {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.status-modifiable {
    background: rgba(255, 255, 255, 0.05);
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mining-focus .info-light-value {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(247, 147, 26, 0.4);
}

.info-hero-wrap {
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.05) 0%, rgba(247, 147, 26, 0) 100%);
    padding: 1rem;
    border-left: 2px solid var(--primary);
    border-radius: 4px;
    margin: 0.5rem 0;
}

.hero-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.01em;
    opacity: 0.9;
}

/* Status specific colors for subtitles */
.status-minado {
    color: var(--text-muted) !important;
    opacity: 0.6;
}

.status-en-minado {
    color: var(--primary) !important;
}

.status-en-espera {
    color: var(--color-locked) !important;
}

.status-abierto {
    color: var(--color-future) !important;
}

.panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.panel-title {
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.block-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 5px;
}

.block-info-grid.mining-layout {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    grid-template-columns: none !important;
}

.block-main-stat {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.block-secondary-stat {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.2;
}

.block-pool-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.block-pool-label {
    font-size: 0.55rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.info-label {
    font-size: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 800;
}

.info-value {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 800;
}

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

/* TAB SYSTEM */
.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.tab-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(247, 147, 26, 0.1);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(247, 147, 26, 0.1);
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.tab-pane.active {
    display: flex;
}

/* BET ACTION BUTTON */
.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: auto;
    text-align: center;
    box-shadow: 0 4px 20px rgba(247, 147, 26, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 30px rgba(247, 147, 26, 0.5);
}

/* Re-using bet-card styles for tab layouts */
.bet-layout-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bet-layout-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Standardized Betting Tracks (The Draggable Ribbon) */
.track-visual-selector {
    height: 36px;
    background: linear-gradient(90deg, #111 0%, #222 15%, #333 50%, #222 85%, #111 100%);
    border-radius: 6px;
    position: relative;
    margin-top: 5px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(247, 147, 26, 0.2);
}

.track-visual-selector::before,
.track-visual-selector::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.3;
    pointer-events: none;
}

.track-visual-selector::before {
    content: '-';
    left: 15px;
}

.track-visual-selector::after {
    content: '+';
    right: 15px;
}

/* Center line indicator */
.track-visual-selector::main {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(247, 147, 26, 0.1);
    pointer-events: none;
}

.track-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 900;
    border: 1px solid var(--primary);
    color: var(--primary);
    pointer-events: none;
    box-shadow: 0 0 15px rgba(247, 147, 26, 0.4);
    z-index: 2;
}

.track-hint {
    font-size: 0.55rem;
    text-align: center;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 4px;
    font-weight: 800;
}

.track-visual-selector:active {
    cursor: grabbing;
    background: linear-gradient(90deg, #000 0%, #111 50%, #000 100%);
}

/* Pool Grid */
.pool-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding-right: 5px;
}

.pool-selector-grid::-webkit-scrollbar {
    width: 4px;
}

.pool-selector-grid::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.pool-item {
    font-size: 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
}

.pool-item:hover {
    border-color: var(--primary);
    background: rgba(247, 147, 26, 0.1);
}

.custom-pool-input {
    background: #111;
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 4px;
    font-size: 0.65rem;
    border-radius: 4px;
    width: 100%;
}

/* Tx Selector */
.tx-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.tx-operator-btn {
    background: #111;
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.tx-operator-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* Satoshi Flow - Innovative Amount Manager */
.satoshi-flow-container {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.satoshi-flow-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.satoshi-flow-label {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.satoshi-flow-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(247, 147, 26, 0.5);
}

.satoshi-flow-value-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
}

/* Editable Inputs Styling */
.editable-display,
.editable-amount {
    background: transparent;
    border: none;
    color: var(--primary);
    text-align: center;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: text;
    transition: all 0.2s;
    pointer-events: auto;
    /* Force clickability */
    position: relative;
    z-index: 10;
}

.editable-display {
    width: 80px;
}

.editable-amount {
    width: 150px;
    text-align: right;
}

.editable-display:focus,
.editable-amount:focus {
    text-shadow: 0 0 15px var(--primary);
    color: #fff;
}

.satoshi-flow-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

.satoshi-flow-track:active {
    transform: scaleY(1.2);
}

.satoshi-flow-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f7931a, #ffab40);
    box-shadow: 0 0 15px var(--primary);
    border-radius: 20px;
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1), background 0.5s;
}

/* Markers inside the track */
.satoshi-flow-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: none;
    z-index: 2;
}

.flow-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.flow-marker.active {
    background: var(--primary);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 15px var(--primary);
    opacity: 1;
    border: 2px solid rgba(0, 0, 0, 0.4);
}

/* Pulse animation on value change */
@keyframes flow-pulse {
    0% {
        box-shadow: 0 0 0px var(--primary);
    }

    50% {
        box-shadow: 0 0 20px var(--primary);
    }

    100% {
        box-shadow: 0 0 0px var(--primary);
    }
}

.satoshi-flow-pulse {
    animation: flow-pulse 0.4s ease-out;
}

/* Whale mode gradient */
.satoshi-flow-fill.whale {
    background: linear-gradient(90deg, #f7931a, #ff0000);
    box-shadow: 0 0 25px #ff0000;
}

/* Placeholder states */
.placeholder-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0.2;
}

.placeholder-icon {
    font-size: 3rem;
}

/* MESAS SECTION */
.mesas-nav-main {
    display: flex;
    gap: 5px;
    margin-bottom: 1rem;
}

.mesa-cat-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.mesa-cat-btn.active {
    background: rgba(247, 147, 26, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.mesas-sub-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.subtype-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
}

.subtype-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.mesa-selector-wrap {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mesa-label {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.mesa-select {
    background: #111;
    border: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 10px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

.mesa-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.1);
}

.mesas-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    min-height: 100px;
}

.mesa-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mesa-detail-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.mesa-detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 800;
}

/* MESA DETAILS TABLE */
.mesa-detail-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.mesa-table-wrap {
    padding-right: 5px;
}

.mesa-table-wrap::-webkit-scrollbar {
    width: 3px;
}

.mesa-table-wrap::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.mesa-table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
    text-align: left;
}

.mesa-table thead {
    position: sticky;
    top: 0;
    background: #0d0d0d;
    z-index: 1;
}

.mesa-table th {
    padding: 10px 5px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mesa-table td {
    padding: 10px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.mesa-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* VIEW MANAGEMENT */
.view-container {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* DASHBOARD HERO */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1) 0%, rgba(5, 5, 5, 0.5) 100%);
    border: 1px solid rgba(247, 147, 26, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(247, 147, 26, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-main {
    flex: 1;
}

.hero-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.hero-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(247, 147, 26, 0.3);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.h-stat {
    text-align: right;
}

.h-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.h-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-white);
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 3rem;
}

.stats-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stats-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
}

.stats-card.highlight {
    border-color: rgba(247, 147, 26, 0.3);
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.card-icon {
    font-size: 1.25rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-white);
}

.stat-row span:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.card-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pulse-indicator {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--primary);
    text-align: center;
    padding: 10px;
    border: 1px dashed rgba(247, 147, 26, 0.3);
    border-radius: 8px;
    animation: textPulse 2s infinite;
}

@keyframes textPulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

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

    .dashboard-hero {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .hero-stats {
        justify-content: center;
    }
}
/* -------------------------------------------------------------------------- */
/* PREDICTOR MODAL (LIGHTBOX) STYLES                                          */
/* -------------------------------------------------------------------------- */

.pb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999999 !important; /* Extremely high ensure on top */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important; /* Force visible */
}

.pb-modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(10, 10, 15, 0.98));
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 15px rgba(247, 147, 26, 0.1);
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.9);
    animation: scaleIn 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.pb-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.pb-modal-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

.pb-modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
}

.pb-modal-close:hover {
    color: var(--text-white);
}

.pb-modal-body {
    padding: 2rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-white);
    text-align: center;
}

.pb-modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 12px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

/* MODAL BUTTONS */
.pb-btn-primary, .pb-btn-secondary {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.pb-btn-primary {
    background: var(--primary);
    color: #000;
}

.pb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.3);
}

.pb-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.1);
}

.pb-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* VARIANTS */
.pb-modal-error .pb-modal-title { color: #f87171; }
.pb-modal-error .pb-modal-content { border-color: rgba(248, 113, 113, 0.3); }

.pb-modal-success .pb-modal-title { color: #34d399; }
.pb-modal-success .pb-modal-content { border-color: rgba(52, 211, 153, 0.3); }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes scaleIn {
    to { transform: scale(1); }
}
