      :root {
            --terminal-bg: #0a0e14;
            --terminal-surface: #151922;
            --terminal-border: #1f2430;
            --accent-green: #00ff88;
            --accent-red: #ff4444;
            --accent-blue: #00d4ff;
            --accent-yellow: #ffd700;
            --text-primary: #e6e6e6;
            --text-secondary: #8a8a8a;
            --text-dim: #5a5a5a;
            --glow-green: rgba(0, 255, 136, 0.3);
            --glow-blue: rgba(0, 212, 255, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            /* MOBILE: Enable smooth scrolling on touch */
            -webkit-tap-highlight-color: rgba(0, 255, 136, 0.2);
        }

        html {
            /* MOBILE: Ensure scrolling works */
            overflow-y: scroll;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            height: 100%;
            width: 100%;
            touch-action: pan-y pinch-zoom;
        }

        body {
            background: var(--terminal-bg);
            color: var(--text-primary);
            font-family: 'JetBrains Mono', monospace;
            overflow-x: hidden;
            /* MOBILE FIX: Enable vertical scrolling */
            overflow-y: scroll;
            -webkit-overflow-scrolling: touch;
            min-height: 100vh;
            width: 100%;
            touch-action: pan-y pinch-zoom;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                linear-gradient(var(--terminal-border) 1px, transparent 1px),
                linear-gradient(90deg, var(--terminal-border) 1px, transparent 1px);
            background-size: 30px 30px;
            opacity: 0.3;
            pointer-events: none;
            animation: gridMove 20s linear infinite;
            z-index: 0;
        }

        @keyframes gridMove {
            0% { transform: translate(0, 0); }
            100% { transform: translate(30px, 30px); }
        }

        body::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(transparent 50%, rgba(0, 255, 136, 0.03) 50%);
            background-size: 100% 4px;
            pointer-events: none;
            animation: scanline 8s linear infinite;
            z-index: 100;
        }

        @keyframes scanline {
            0% { transform: translateY(0); }
            100% { transform: translateY(4px); }
        }

        .container {
            max-width: 1800px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        .header {
            border: 2px solid var(--accent-green);
            background: var(--terminal-surface);
            padding: 25px 30px;
            margin-bottom: 30px;
            position: relative;
            box-shadow: 0 0 30px var(--glow-green);
            animation: fadeInDown 0.6s ease-out;
        }

        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .header::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, var(--accent-green), var(--accent-blue));
            opacity: 0.1;
            animation: borderGlow 3s ease-in-out infinite;
        }

        @keyframes borderGlow {
            0%, 100% { opacity: 0.1; }
            50% { opacity: 0.3; }
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            z-index: 1;
        }

        .logo {
            font-family: 'Syne', sans-serif;
            font-size: 32px;
            font-weight: 800;
            letter-spacing: 2px;
            color: var(--accent-green);
            text-shadow: 0 0 20px var(--glow-green);
        }

        .logo-subtitle {
            font-family: 'Space Mono', monospace;
            font-size: 11px;
            color: var(--text-secondary);
            letter-spacing: 3px;
            margin-top: 5px;
        }

        .live-indicator {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .live-dot {
            width: 12px;
            height: 12px;
            background: var(--accent-red);
            border-radius: 50%;
            animation: pulse 2s ease-in-out infinite;
            box-shadow: 0 0 10px var(--accent-red);
        }

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

        .stats-bar {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 30px;
            animation: fadeIn 0.8s ease-out 0.2s both;
        }

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

        .stat-card {
            background: var(--terminal-surface);
            border: 1px solid var(--terminal-border);
            padding: 20px;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            border-color: var(--accent-blue);
            transform: translateY(-2px);
            box-shadow: 0 5px 20px var(--glow-blue);
        }

        .stat-label {
            font-size: 11px;
            color: var(--text-dim);
            letter-spacing: 1px;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .stat-value {
            font-size: 28px;
            font-weight: 700;
            font-family: 'Space Mono', monospace;
        }

        .stat-value.green { color: var(--accent-green); }
        .stat-value.red { color: var(--accent-red); }
        .stat-value.blue { color: var(--accent-blue); }
        .stat-value.yellow { color: var(--accent-yellow); }

        .stat-change {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 5px;
        }

        .filters {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
            flex-wrap: wrap;
            animation: fadeIn 1s ease-out 0.4s both;
        }

        .filter-group {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .filter-label {
            font-size: 11px;
            color: var(--text-dim);
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        select, input {
            background: var(--terminal-surface);
            border: 1px solid var(--terminal-border);
            color: var(--text-primary);
            padding: 10px 15px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 13px;
            transition: all 0.3s ease;
            outline: none;
        }

        select:hover, input:hover {
            border-color: var(--accent-blue);
        }

        select:focus, input:focus {
            border-color: var(--accent-green);
            box-shadow: 0 0 10px var(--glow-green);
        }

        input[type="search"] {
            min-width: 200px;
            max-width: 100%;
        }

        .markets-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
            gap: 20px;
            animation: fadeIn 1.2s ease-out 0.6s both;
        }

        .market-card {
            background: var(--terminal-surface);
            border: 1px solid var(--terminal-border);
            padding: 0;
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            animation: slideUp 0.5s ease-out backwards;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .market-card:hover {
            border-color: var(--accent-blue);
            transform: translateY(-4px);
            box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
        }

        .market-card.unusual {
            border: 2px solid var(--accent-yellow);
            animation: unusualPulse 2s ease-in-out infinite;
        }

        @keyframes unusualPulse {
            0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
            50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
        }

        .market-header {
            background: linear-gradient(135deg, var(--terminal-bg), var(--terminal-surface));
            padding: 15px 20px;
            border-bottom: 1px solid var(--terminal-border);
        }

        .market-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .platform-badge {
            font-size: 10px;
            padding: 4px 8px;
            border-radius: 3px;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .platform-badge.kalshi {
            background: rgba(138, 43, 226, 0.2);
            color: #ba55d3;
            border: 1px solid #ba55d3;
        }

        .platform-badge.polymarket {
            background: rgba(0, 212, 255, 0.2);
            color: var(--accent-blue);
            border: 1px solid var(--accent-blue);
        }

        .category-badge {
            font-size: 10px;
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-secondary);
            border: 1px solid var(--terminal-border);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .unusual-badge {
            font-size: 11px;
            padding: 5px 10px;
            background: var(--accent-yellow);
            color: var(--terminal-bg);
            font-weight: 700;
            letter-spacing: 1px;
            animation: flash 1.5s ease-in-out infinite;
        }

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

        .market-title {
            font-size: 15px;
            font-weight: 500;
            line-height: 1.4;
            color: var(--text-primary);
            margin: 0;
        }

        .market-body {
            padding: 20px;
        }

        .price-section {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--terminal-border);
        }

        .current-price {
            font-size: 36px;
            font-weight: 700;
            font-family: 'Space Mono', monospace;
        }

        .price-change {
            font-size: 16px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .price-change.positive { color: var(--accent-green); }
        .price-change.negative { color: var(--accent-red); }

        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .metric {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .metric-label {
            font-size: 10px;
            color: var(--text-dim);
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .metric-value {
            font-size: 18px;
            font-weight: 700;
            font-family: 'Space Mono', monospace;
        }

        .volume-bar {
            width: 100%;
            height: 3px;
            background: var(--terminal-border);
            margin-top: 5px;
            position: relative;
            overflow: hidden;
        }

        .volume-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
            transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .volume-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .loading {
            text-align: center;
            padding: 60px;
            font-size: 14px;
            color: var(--text-dim);
            animation: fadeIn 0.5s ease-out;
        }

        .loading::before {
            content: '▓▓▓▓▓▓▓▓▓▓';
            display: block;
            margin-bottom: 20px;
            font-size: 20px;
            animation: loadingBlink 1.5s steps(10) infinite;
            color: var(--accent-green);
        }

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

        @media (max-width: 768px) {
            /* ============================================ */
            /* COMPREHENSIVE MOBILE OPTIMIZATIONS */
            /* Optimized for iPhone 14 Pro Max and similar */
            /* ============================================ */

            /* Fix scrolling issues */
            html, body {
                overflow-x: hidden;
                overflow-y: scroll !important;
                -webkit-overflow-scrolling: touch;
                width: 100%;
                min-height: 100vh;
            }

            /* Container and spacing */
            .container {
                padding: 12px;
                max-width: 100%;
                width: 100%;
            }

            /* Header - compact but readable */
            .header {
                padding: 16px 18px;
                margin-bottom: 16px;
                box-shadow: 0 0 15px var(--glow-green);
            }

            .header-content {
                flex-direction: column;
                gap: 12px;
                align-items: flex-start;
            }

            .logo {
                font-size: 24px;
                letter-spacing: 1px;
            }

            .logo-subtitle {
                font-size: 9px;
                letter-spacing: 2px;
            }

            .live-indicator {
                font-size: 11px;
                gap: 8px;
            }

            .live-dot {
                width: 10px;
                height: 10px;
            }

            /* Stats bar - 2 columns on mobile */
            .stats-bar {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                margin-bottom: 16px;
            }

            .stat-card {
                padding: 14px;
            }

            .stat-label {
                font-size: 9px;
                margin-bottom: 6px;
            }

            .stat-value {
                font-size: 20px;
            }

            .stat-change {
                font-size: 10px;
            }

            /* Filters - vertical stack */
            .filters {
                flex-direction: column;
                gap: 12px;
                margin-bottom: 16px;
            }

            .filter-group {
                width: 100%;
                gap: 8px;
            }

            .filter-label {
                font-size: 10px;
            }

            /* Search input - full width, prevent zoom */
            input[type="search"] {
                width: 100%;
                min-width: 100%;
                font-size: 16px; /* Prevents iOS auto-zoom */
                padding: 14px;
            }

            select, input {
                font-size: 16px; /* Prevents iOS auto-zoom */
                padding: 12px 14px;
                width: 100%;
            }

            /* Markets grid - single column */
            .markets-grid {
                grid-template-columns: 1fr;
                gap: 14px;
            }

            /* Market cards - properly sized */
            .market-card {
                padding: 0;
                overflow: hidden;
                /* Prevent text overflow */
                word-wrap: break-word;
                overflow-wrap: break-word;
                max-width: 100%;
            }

            .market-card:hover {
                transform: none; /* Disable hover effects on mobile */
                box-shadow: 0 5px 20px rgba(0, 212, 255, 0.15);
            }

            .market-header {
                padding: 12px 14px;
            }

            .market-meta {
                flex-wrap: wrap;
                gap: 8px;
                margin-bottom: 10px;
            }

            .platform-badge,
            .category-badge,
            .unusual-badge {
                font-size: 9px;
                padding: 4px 7px;
            }

            .market-title {
                font-size: 13px;
                line-height: 1.5;
                /* Better text wrapping */
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
            }

            .market-body {
                padding: 14px;
            }

            .price-section {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                margin-bottom: 16px;
                padding-bottom: 12px;
            }

            .current-price {
                font-size: 28px;
            }

            .price-change {
                font-size: 14px;
            }

            .metrics-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .metric-label {
                font-size: 9px;
            }

            .metric-value {
                font-size: 15px;
            }

            /* AI Panel - mobile optimized */
            .ai-panel {
                padding: 14px;
                margin-bottom: 16px;
            }

            .ai-signal-card {
                padding: 14px;
                margin-bottom: 12px;
                /* Prevent overflow */
                word-wrap: break-word;
                overflow-wrap: break-word;
                max-width: 100%;
            }

            .ai-signal-card h4 {
                font-size: 13px;
                line-height: 1.4;
                word-wrap: break-word;
                overflow-wrap: break-word;
            }

            .ai-signal-card p,
            .ai-signal-card div {
                font-size: 11px;
                line-height: 1.4;
                word-wrap: break-word;
                overflow-wrap: break-word;
            }

            /* AI dashboard grid - 2 columns */
            .ai-dashboard {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px;
            }

            /* AI filter buttons - 2 per row */
            .ai-filter-buttons {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
            }

            .ai-filter-buttons button {
                flex: 1 1 calc(50% - 4px);
                min-width: 0;
                min-height: 44px; /* Touch-friendly */
                padding: 12px 10px;
                font-size: 11px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            /* Buttons - touch-friendly */
            button {
                min-height: 44px;
                font-size: 14px;
                padding: 12px 16px;
                /* Better tap targets */
                touch-action: manipulation;
            }

            /* Modal - full screen on mobile */
            .modal {
                padding: 10px;
            }

            .modal-content {
                width: 100%;
                max-width: 100%;
                height: calc(100vh - 20px);
                max-height: calc(100vh - 20px);
                margin: 0;
                border-radius: 0;
                overflow-y: scroll;
                -webkit-overflow-scrolling: touch;
            }

            .modal-header {
                padding: 14px;
                position: sticky;
                top: 0;
                z-index: 10;
                background: var(--terminal-surface);
            }

            .modal-body {
                padding: 14px;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            /* Chart - responsive */
            canvas {
                max-width: 100% !important;
                height: auto !important;
                touch-action: pan-y pinch-zoom;
            }

            /* Chart tabs - stack */
            .chart-tabs {
                display: flex;
                flex-wrap: wrap;
                gap: 6px;
            }

            .chart-tabs button {
                flex: 1 1 calc(33.333% - 4px);
                min-width: 0;
                font-size: 11px;
                padding: 10px 8px;
            }

            /* Content with chat - stack vertically */
            .content-with-chat {
                flex-direction: column;
                overflow-y: auto;
            }

            .main-content-area {
                width: 100%;
                max-width: 100%;
                overflow-y: visible;
            }

            .chat-sidebar {
                width: 100%;
                max-width: 100%;
                position: relative;
                min-height: 400px;
                max-height: 500px;
                margin-top: 20px;
                border-top: 2px solid var(--terminal-border);
            }

            /* Orderbook - compact */
            .orderbook {
                font-size: 10px;
            }

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

            .orderbook table {
                font-size: 10px;
            }

            .orderbook-spread {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                font-size: 10px;
            }

            /* Price and volume badges */
            .price-badge,
            .volume-badge {
                font-size: 11px;
                padding: 5px 10px;
            }

            /* Tabs - better mobile layout */
            .tabs {
                display: flex;
                gap: 6px;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none; /* Firefox */
            }

            .tabs::-webkit-scrollbar {
                display: none; /* Chrome/Safari */
            }

            .tabs button {
                flex-shrink: 0;
                min-width: auto;
                padding: 10px 14px;
                font-size: 12px;
            }

            /* Disable hover effects on touch */
            .stat-card:hover,
            .market-card:hover {
                transform: none;
            }

            /* Disable animations for better performance */
            body::after {
                animation: none;
                display: none;
            }

            body::before {
                animation: none;
                opacity: 0.05;
            }

            /* Reduce complex animations */
            .volume-fill::after {
                animation: none;
            }

            /* Tooltip - disable on mobile */
            .tooltip:hover .tooltip-text {
                display: none;
            }
        }

        /* Extra small devices (phones < 480px in portrait) */
        @media (max-width: 480px) {
            /* Even more compact for smaller phones */
            .container {
                padding: 8px;
            }

            .header {
                padding: 12px 14px;
            }

            .logo {
                font-size: 20px;
            }

            .logo-subtitle {
                font-size: 8px;
            }

            .stats-bar {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .stat-value {
                font-size: 18px;
            }

            .market-title {
                font-size: 12px;
            }

            .current-price {
                font-size: 24px;
            }

            .metric-value {
                font-size: 13px;
            }

            .ai-signal-card h4 {
                font-size: 12px;
            }

            .ai-signal-card p,
            .ai-signal-card div {
                font-size: 10px;
            }

            /* Single column for AI filters on very small screens */
            .ai-filter-buttons button {
                flex: 1 1 100%;
            }
        }