
        :root {
            --glass-bg: rgba(255, 255, 255, 0.6);
            --glass-border: rgba(255, 255, 255, 0.4);
            --text: #0f172a;
            --dim: #64748b;
            --green: #10b981;
            --red: #ef4444;
            --blue: #3b82f6;
            --blue-2: #2980b9;
            --purple: #a855f7;
            --orange: #f59e0b;
            --border: rgba(226, 232, 240, 0.8);
            --header-accent: rgba(241, 245, 249, 0.7);
            --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
            --card: #ffffffed;
        }

        body.dark-mode {
            --glass-bg: rgba(15, 23, 42, 0.7);
            --glass-border: rgba(255, 255, 255, 0.1);
            --text: #eaecef;
            --dim: #94a3b8;
            --green: #02c076;
            --red: #f84960;
            --blue: #3b82f6;
            --border: rgba(30, 41, 59, 0.7);
            --header-accent: rgba(30, 41, 59, 0.5);
            --card: #161a1eed;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: #f8fafc;
            color: var(--text);
            min-height: 100vh;
            transition: background 0.3s ease;
            position: relative;
            overflow-x: hidden;
        }

        body.dark-mode { background: #0b0e11; }

        body::before {
            content: ""; position: fixed; top: 50%; left: 50%; width: 150vw; height: 150vh;
            transform: translate(-50%, -50%);
            background: radial-gradient(circle, var(--blue) 0%, transparent 50%);
            opacity: 0.05; z-index: -2; pointer-events: none;
            animation: global-screen-pulse 8s infinite ease-out;
        }

        @keyframes global-screen-pulse {
            0% { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
            50% { opacity: 0.1; }
            100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
        }

        /* LIVE CELL ANIMATION */
        @keyframes cell-pulse {
            0% { opacity: 1; stroke-width: 1; }
            50% { opacity: 0.4; stroke-width: 3; }
            100% { opacity: 1; stroke-width: 1; }
        }
        
        .live-cell-active {
            animation: cell-pulse 2s infinite ease-in-out;
            stroke: #fff !important;
            stroke-dasharray: 2;
        }

        .glass-panel {
            background: var(--glass-bg) !important;
            backdrop-filter: blur(16px) saturate(180%);
            -webkit-backdrop-filter: blur(16px) saturate(180%);
            border: 1px solid var(--glass-border) !important;
            box-shadow: var(--shadow);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 20px;
        }

        .box-title {
            display: block; font-weight: 800; font-size: 0.9rem; padding-left: 10px;
            border-left: 3px solid var(--purple); margin-bottom: 20px; text-transform: uppercase;
        }

        .liq-bar-container { margin-bottom: 15px; }
        .liq-label { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
        
        .liq-bar-bg {
            height: 10px; background: rgba(0,0,0,0.1); border-radius: 10px;
            position: relative; overflow: hidden; border: 1px solid var(--glass-border);
        }
        body.dark-mode .liq-bar-bg { background: rgba(255,255,255,0.05); }

        .liq-fill {
            height: 100%; border-radius: 10px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .ratio-wrapper {
            margin-top: 15px;
            margin-bottom: 20px;
        }
        .ratio-labels {
            display: flex;
            justify-content: space-between;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            font-weight: 800;
            margin-bottom: 5px;
        }
        .ratio-bar-container {
            display: flex;
            height: 14px;
            width: 100%;
            background: rgba(0,0,0,0.1);
            border-radius: 4px;
            overflow: hidden;
            border: 1px solid var(--glass-border);
        }
        .buy-ratio-fill {
            background: var(--green);
            width: 50%;
            transition: width 0.8s ease;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding-left: 5px;
        }
        .sell-ratio-fill {
            background: var(--red);
            width: 50%;
            transition: width 0.8s ease;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 5px;
        }

        .dot {
            width: 10px; height: 10px; background-color: var(--green);
            border-radius: 50%; position: relative; display: inline-block; margin-right: 8px;
        }
        .dot::after {
            content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background-color: var(--green); border-radius: 50%; z-index: -1;
            animation: pulse-small-dot 2s infinite ease-out;
        }
        @keyframes pulse-small-dot { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(3.5); opacity: 0; } }

        .btn-time {
            border: 1px solid var(--glass-border); background: var(--glass-bg);
            color: var(--text); padding: 5px 15px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
            transition: all 0.2s;
        }
        .btn-time:hover { background: rgba(255,255,255,0.1); }
        .btn-time.active { background: var(--blue); color: white; }
        
        .search-dropdown {
            position: relative;
            min-width: 220px;
        }
        .search-dropdown-menu {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            z-index: 1000;
            margin-top: 8px;
            padding: 10px;
        }
        .search-dropdown-menu.show { display: block; }
        .search-input-box {
            width: 100%;
            background: rgba(0,0,0,0.1);
            border: 1px solid var(--glass-border);
            color: var(--text);
            border-radius: 6px;
            padding: 6px 10px;
            font-size: 0.8rem;
            margin-bottom: 10px;
            outline: none;
        }
        body.dark-mode .search-input-box { background: rgba(255,255,255,0.05); }
        
        .coin-list {
            max-height: 200px;
            overflow-y: auto;
            scrollbar-width: thin;
        }
        .coin-item {
            padding: 8px 10px;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            justify-content: space-between;
        }
        .coin-item:hover { background: var(--blue); color: white; }
        .coin-item .ticker { opacity: 0.6; font-family: 'JetBrains Mono'; }
        
        /* Whale Flow Styling */
        #whale-flow-radar {
            height: 300px;
            overflow-y: auto;
            scrollbar-width: thin;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
        }
        .whale-row {
            padding: 8px;
            border-bottom: 1px solid var(--glass-border);
            animation: fadeIn 0.4s ease-out;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

        .math-box {
            background: rgba(168, 85, 247, 0.05); 
            border-radius: 12px; 
            border: 1px solid rgba(168, 85, 247, 0.2);
            padding: 15px;
            margin-top: 20px;
        }

        /* NEW S2F STYLES */
        .s2f-container {
            border-top: 1px solid var(--glass-border);
            padding-top: 15px;
            margin-top: 10px;
        }
        .s2f-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .s2f-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--dim);
            text-transform: uppercase;
        }
        .s2f-value {
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            font-size: 0.95rem;
        }

        .scanning-loader {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--dim);
            font-style: italic;
            animation: pulse-text 2s infinite;
        }
        @keyframes pulse-text { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

        /* NEW SENTIMENT STYLES */
        .sentiment-badge {
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
        }


        .global-stats-bar {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            padding: 10px 20px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            font-family: 'JetBrains Mono', monospace;
        }
        .stat-item { font-size: 0.85rem; font-weight: 700; }
        .stat-label { color: var(--dim); text-transform: uppercase; font-size: 0.7rem; margin-right: 5px; }

        .mvrv-container {
            margin-top: 15px;
            background: rgba(255, 255, 255, 0.05);
            padding: 15px;
            border-radius: 12px;
            border: 1px solid var(--glass-border);
        }
        .mvrv-header {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            margin-bottom: 8px;
            font-family: 'JetBrains Mono', monospace;
        }
        .progress-track {
            height: 12px;
            background: linear-gradient(to right, #00ff88 0%, #333 20%, #333 80%, #ff4444 100%);
            border-radius: 6px;
            position: relative;
            overflow: hidden;
        }
        .progress-fill {
            height: 100%;
            width: 0%;
            background: #fff;
            box-shadow: 0 0 10px #fff;
            transition: width 1s ease-in-out;
        }
        .mvrv-status { font-weight: 800; }



        .pi-cycle-container {
            margin-top: 15px;
            background: rgba(255, 255, 255, 0.05);
            padding: 15px;
            border-radius: 12px;
            border: 1px solid var(--glass-border);
            font-family: 'JetBrains Mono', monospace;
        }
        .pi-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 12px;
        }
        .pi-metric { font-size: 0.7rem; color: var(--dim); text-transform: uppercase; }
        .pi-value { font-size: 0.9rem; font-weight: 700; color: #fff; display: block; }
        
        /* Progress Bar for Convergence */
        .pi-progress-track {
            height: 8px;
            background: #222;
            border-radius: 4px;
            overflow: hidden;
            margin-top: 5px;
        }
        .pi-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #ef4444);
            transition: width 0.8s ease-in-out;
        }


        /* ---------------------------------------------------- */

        /* Optimized Global Stats Bar */
.global-stats-bar {
    display: flex;
    flex-wrap: wrap; /* Allows items to drop to next line on mobile */
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    align-items: center;
}

.stat-item { 
    font-size: 0.85rem; 
    font-weight: 700; 
    white-space: nowrap; /* Prevents labels from breaking weirdly */
}

.stat-label { 
    color: var(--dim); 
    text-transform: uppercase; 
    font-size: 0.7rem; 
    margin-right: 5px; 
}

/* Mobile Specific Adjustments */
@media (max-width: 768px) {
    .global-stats-bar {
        gap: 10px;
        padding: 10px;
        justify-content: space-between; /* Spreads items evenly */
    }
    
    .stat-item {
        font-size: 0.75rem; /* Slightly smaller text for mobile */
        flex: 1 1 auto;     /* Items grow to fill space */
        min-width: 140px;   /* Ensures at least 2 items per row */
    }

    /* Remove the border-left on mobile as it breaks the grid look */
    .stat-item[style*="border-left"] {
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid var(--glass-border);
        padding-top: 8px;
        margin-top: 5px;
        width: 100%; /* Makes 'Inverse Bias' full width on bottom */
    }
}