        @import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
        
        body {
            background: #232323 !important;
            color: #e0e0e0 !important;
            font-family: 'VT323', monospace, monospace !important;
            margin: 0 !important;
            padding: 0 !important;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .crt {
            width: 100vw;
            height: 100vh;
            position: absolute;
            top: 0; left: 0;
            display: flex;
            flex-direction: column;
            border-radius: 48px;
            box-shadow: 0 0 0 32px #000, 0 0 0 64px #111, 0 0 120px 0 #000a, 0 0 180px 0 #000a inset;
            background: radial-gradient(ellipse at 50% 60%, #1a2d1a 80%, #0a0f0a 100%), linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.08) 100%);
            overflow: hidden;
        }

        .crt-content {
            color: #6aff6a;
            font-size: 1.4rem;
            padding: 80px 40px 20px 60px;
            text-shadow: 0 0 8px #00ff00, 0 0 2px #00ff00, 0 0 1px #00ff00;
            letter-spacing: 1.5px;
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
        }

        .terminal-text {
            white-space: pre;
            line-height: 1.5;
            font-size: 1.2rem;
        }

        .crt-scanlines {
            pointer-events: none;
            position: absolute;
            left: 0; top: 0; width: 100%; height: 100%;
            z-index: 2;
            background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.10) 0px, rgba(0,0,0,0.10) 2px, transparent 2px, transparent 6px);
            mix-blend-mode: multiply;
        }

        .crt-scanline-anim {
            pointer-events: none;
            position: absolute;
            left: 0; width: 100%; height: 8px;
            z-index: 3;
            background: linear-gradient(to bottom, rgba(180,255,180,0.18) 0%, rgba(0,0,0,0.01) 100%);
            animation: scanline-move 6s linear infinite;
        }

        .crt-vignette {
            pointer-events: none;
            position: absolute;
            left: 0; top: 0; width: 100%; height: 100%;
            z-index: 4;
            background: radial-gradient(ellipse at 50% 60%, transparent 60%, #000 100%);
        }

        .crt-input-area {
            position: absolute;
            left: 60px;
            bottom: 20px;
            display: flex;
            align-items: center;
            z-index: 12;
            font-family: 'VT323', monospace !important;
            color: #6aff6a !important;
            font-size: 1.8rem !important;
            cursor: text;
        }

        .crt-input-area > span {
            font-family: 'VT323', monospace;
            color: #6aff6a;
            text-shadow: 0 0 8px #00ff00, 0 0 2px #00ff00, 0 0 1px #00ff00;
            font-size: 1.8rem;
        }

        .crt-input-tap {
            position: relative;
            display: flex;
            align-items: center;
            width: 100%;
        }

        #crt-input-display {
            min-width: 1ch;
            font-family: 'VT323', monospace;
            color: #6aff6a;
            text-shadow: 0 0 8px #00ff00, 0 0 2px #00ff00, 0 0 1px #00ff00;
            font-size: 1.8rem;
        }

        #crt-hidden-input {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            z-index: 2;
            border: none;
            background: transparent;
            font-size: inherit;
            font-family: inherit;
            color: transparent;
            caret-color: transparent;
        }

        .blinking-cursor {
            background-color: #6aff6a;
            display: inline-block;
            width: 0.6em;
            height: 1.2em;
            margin-left: 1px;
            animation: blink 1s step-end infinite;
        }

        @keyframes scanline-move {
            0% { top: 0; }
            100% { top: 100%; }
        }

        @keyframes blink {
            0%, 49% { opacity: 1; }
            50%, 100% { opacity: 0; }
        }

        @media (max-width: 700px) {
            .crt-content {
                padding: 60px 30px 80px 30px;
                font-size: 1.1rem;
            }
            .crt-input-area {
                left: 30px;
                right: 30px;
                bottom: 20px;
            }
        }

            /* Responsive Design for Mobile and Tablet */
            @media (max-width: 1024px) {
                /* Base responsive adjustments */
                .crt {
                    border-radius: 0;
                    box-shadow: none;
                    height: 100vh;
                    height: 100dvh; /* Dynamic viewport height for mobile */
                }
                
                .crt-content {
                    padding: 40px 20px 120px 20px;
                    font-size: 1.2rem;
                    height: calc(100vh - 140px);
                    height: calc(100dvh - 140px); /* Dynamic viewport height for mobile */
                    overflow-y: auto;
                }
                
                .crt-input-area {
                    left: 20px;
                    right: 20px;
                    bottom: var(--keyboard-height, 20px);
                    position: fixed;
                    z-index: 20;
                    transition: bottom 0.2s ease;
                }
            
                /* DAILY VIEW - Mobile responsive */
                #daily-view {
                    padding-bottom: 140px;
                }
                
                #daily-view .metrics-row {
                    flex-direction: column;
                    gap: 0.5rem;
                    margin-bottom: 1.5rem;
                }
                
                        #daily-view .metric-box {
                    margin-bottom: 1.5rem;
                    padding: 1rem 0;
                }
                
                        #daily-view .metric-label {
                    font-size: 1.4rem;
                    margin-bottom: 12px;
                    font-weight: bold;
                }
                
                        #daily-view .metric-value {
                    font-size: 4rem;
                    line-height: 1.1;
                }
                
                                    /* Show only OPEN POSITIONS (position value) and DAILY P/L (daily profit) on mobile */
                #daily-view .metric-box:nth-child(2),
                #daily-view .metric-box:nth-child(3) {
                    display: none;
                }
                
                /* REMOVE ALL TABLES FROM DAILY VIEW ON MOBILE */
                #daily-view .tables-container {
                    display: none;
                }
                
                /* STATS VIEW (Dashboard) - Mobile responsive */
                #dashboard-view {
                    padding-bottom: 140px;
                    overflow-y: auto;
                }
                
                #dashboard-view .metrics-row {
                    flex-direction: column;
                    gap: 0.5rem;
                    margin-bottom: 1.5rem;
                }
                
                        #dashboard-view .metric-box {
                    margin-bottom: 0.5rem;
                }
                
                #dashboard-view .metric-label {
                    font-size: 1.1rem;
                    margin-bottom: 8px;
                }
                
                #dashboard-view .metric-value {
                    font-size: 2.2rem;
                    line-height: 1.2;
                }
                
                #dashboard-view .trend-arrow {
                    font-size: 1.8rem;
                    margin-left: 10px;
                }
                
                #dashboard-view .tables-container {
                    flex-direction: column;
                    gap: 1rem;
                }
                
                #dashboard-view .table-section {
                    padding: 0.8rem;
                    overflow-x: auto;
                }
                
                #dashboard-view .table-title {
                    font-size: 1.2rem;
                    margin-bottom: 0.8rem;
                }
                
                #dashboard-view .data-table {
                    font-size: 0.8rem;
                    min-width: 100%;
                    white-space: nowrap;
                }
                
                #dashboard-view .data-table th,
                #dashboard-view .data-table td {
                    padding: 0.4rem 0.3rem;
                    font-size: 0.8rem;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    max-width: 120px;
                }
                
                /* Prevent horizontal scrolling by making tables responsive */
                #dashboard-view .data-table th:nth-child(2),
                #dashboard-view .data-table td:nth-child(2) {
                    max-width: 80px;
                }
                
                #dashboard-view .data-table th:nth-child(5),
                #dashboard-view .data-table td:nth-child(5) {
                    display: none; /* Hide timestamp column on mobile */
                }
                
                /* System view responsive */
                #system-view {
                    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
                    gap: 1rem;
                    padding-bottom: 140px;
                }
                
                .status-box {
                    padding: 0.8rem;
                }
                
                .status-icon-large {
                    font-size: 2.5rem;
                    margin-bottom: 0.5rem;
                }
                
                .status-title {
                    font-size: 1rem;
                }
                
                .status-value {
                    font-size: 1.4rem;
                }
                
                .status-details {
                    font-size: 0.9rem;
                    margin: 0.5rem 0;
                }
                
                        /* Power view responsive - mobile only */
                #power-view {
                    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
                    gap: 1rem;
                    padding-bottom: 140px;
                }
                
                /* Logs view responsive */
                #logs-view {
                    padding-bottom: 140px;
                }
                
                #logs-view .data-table {
                    font-size: 0.75rem;
                }
                
                #logs-view .data-table th,
                #logs-view .data-table td {
                    padding: 0.3rem 0.2rem;
                    font-size: 0.75rem;
                }
                
                /* Hide less important columns on mobile for logs */
                #logs-view .data-table th:nth-child(6),
                #logs-view .data-table td:nth-child(6),
                #logs-view .data-table th:nth-child(7),
                #logs-view .data-table td:nth-child(7) {
                    display: none;
                }
                
                /* Realtime view responsive */
                #realtime-view {
                    padding-bottom: 140px;
                    font-size: 0.9rem;
                }
                
                #realtime-log-output {
                    font-size: 0.8rem !important;
                }
                
                /* About view responsive */
                #about-view {
                    padding: 1rem;
                    padding-bottom: 140px;
                }
                
                .about-content {
                    font-size: 1.1rem;
                    line-height: 1.5;
                }
                
                /* User count display responsive */
                #user-count-display {
                    right: 20px !important;
                    bottom: 140px !important;
                    font-size: 1rem !important;
                }
            }
            
                        /* Portrait orientation specific adjustments */
            @media (max-width: 768px) and (orientation: portrait) {
                .crt-input-area {
                    bottom: var(--keyboard-height, 15px);
                    left: 15px;
                    right: 15px;
                }
                
                #daily-view .metric-value {
                    font-size: 3.5rem;
                }
                
                #dashboard-view .metric-value {
                    font-size: 2rem;
                }
                
                /* Single column layout for power view on very small screens */
                #power-view {
                    grid-template-columns: 1fr !important;
                }
            }
            
            /* Initial CSS custom property */
            :root {
                --keyboard-height: 20px;
            }
        
        /* Landscape orientation for mobile */
        @media (max-width: 1024px) and (orientation: landscape) {
            .crt-content {
                padding: 20px 20px 100px 20px;
            }
            
                        .crt-input-area {
                bottom: 10px;
            }
            
            #daily-view .metrics-row {
                flex-direction: row;
                flex-wrap: wrap;
            }
            
            #daily-view .metric-box {
                flex: 1 1 45%;
                min-width: 45%;
            }
            
            #dashboard-view .metrics-row {
                flex-direction: row;
                flex-wrap: wrap;
            }
            
            #dashboard-view .metric-box {
                flex: 1 1 30%;
                min-width: 30%;
            }
        }

        /* Daily View Styles */
        #daily-view {
            display: none;
            width: 100%;
            height: 100%;
        }

        /* About View Styles */
        #about-view {
            display: none;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            padding: 2.5rem 1.5rem 1.5rem 2.5rem; /* top, right, bottom, left */
            animation: slideDown 0.5s ease-out;
        }

        @keyframes slideDown {
            from {
                transform: translateY(-100%);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .about-content {
            margin: 0;
            line-height: 1.6;
            white-space: pre-wrap;
            text-align: left;
        }

        .metrics-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1rem;
            gap: 1.5rem;
        }

        .metric-box {
            flex: 1;
            text-align: center;
        }

        .metric-label {
            font-size: 1.2rem;
            color: #888888;
            margin-bottom: 5px;
        }

        .metric-value {
            font-size: 4.8rem; /* MODIFIED: Shrunk to fit 5 metrics */
            font-weight: bold;
            color: #00ff00;
            text-shadow: 0 0 10px #00ff00;
            margin: 5px 0;
            line-height: 1.1;
        }

        /* NEW: Styles for trend arrow */
        .trend-arrow {
            display: inline-block;
            margin-left: 15px;
            font-size: 3rem;
            vertical-align: middle;
        }
        .trend-up {
            color: #39ff14;
            text-shadow: 0 0 10px #39ff14;
        }
        .trend-down {
            color: #ff4f4f;
            text-shadow: 0 0 10px #ff4f4f;
        }
        
        .tables-container {
            display: flex;
            gap: 2rem;
            margin-bottom: 1rem;
        }

        .table-section {
            flex: 1;
            background: rgba(0, 255, 0, 0.05);
            border: 1px solid rgba(0, 255, 0, 0.2);
            border-radius: 4px;
            padding: 1rem;
        }

        .table-title {
            font-size: 1.4rem;
            margin-bottom: 1rem;
            opacity: 0.9;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 0.5rem;
            opacity: 0.8;
            border-bottom: 1px solid rgba(0, 255, 0, 0.2);
        }

        .data-table td {
            padding: 0.5rem;
            border-bottom: 1px solid rgba(0, 255, 0, 0.1);
            white-space: nowrap; /* Prevent text wrapping */
            overflow: hidden; /* Hide overflow */
            text-overflow: ellipsis; /* Show ellipsis for overflow */
        }

        .data-table tr:last-child td {
            border-bottom: none;
        }
        
        /* System View Styles */
        #system-view {
            display: none;
            width: 100%;
            height: 100%;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 1.2rem;
            padding-bottom: 80px;
            overflow-y: auto;
        }

        .status-box {
            background: rgba(0, 255, 0, 0.05);
            border: 1px solid rgba(0, 255, 0, 0.2);
            border-radius: 4px;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            text-align: center;
        }
        
        .status-title {
            font-size: 1.1rem;
            color: #aaaaaa;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            text-transform: uppercase;
        }

        .status-title .icon {
            display: none; /* Hide icon from title span */
        }
        
        .status-value {
            font-size: 1.6rem;
            font-weight: bold;
        }

        #status-network-speed .status-value {
            line-height: 1.2; /* Adjust line height for two lines */
        }

        .status-icon-large {
            font-size: 4rem;
            margin-bottom: 0.75rem;
            position: relative;
            filter: grayscale(1) brightness(1.2) sepia(1) hue-rotate(50deg) saturate(7);
        }

        .status-icon-large::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: repeating-linear-gradient(
                to bottom,
                rgba(0, 0, 0, 0.2) 0,
                rgba(0, 0, 0, 0.2) 2px,
                transparent 2px,
                transparent 4px
            );
            pointer-events: none;
            z-index: 1;
        }
        
        .status-value.ok { color: #6aff6a; }
        .status-value.error { color: #ff6b6b; }

        .status-details {
            font-size: 1rem;
            color: #888;
            margin: 0.75rem 0;
            word-break: break-word;
        }

        .error-command {
            color: #ff4f4f !important;
            text-shadow: 0 0 6px #ff4f4f !important;
        }

        /* Launch Screen */
        #launch-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            cursor: pointer;
        }

        #launch-text {
            font-family: 'VT323', monospace;
            font-size: 4rem;
            color: #00ff00;
            text-shadow: 0 0 20px #00ff00, 0 0 10px #00ff00, 0 0 5px #00ff00;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .hidden {
            display: none !important;
        }

        .container {
            padding: 30px;
            position: relative;
            height: 100%;
            box-sizing: border-box;
        }

        .content-wrapper {
            height: calc(100% - 30px); /* Adjust based on input container height */
            overflow-y: auto;
            /* Custom scrollbar for webkit browsers */
        }
        .content-wrapper::-webkit-scrollbar {
            width: 8px;
        }
        .content-wrapper::-webkit-scrollbar-track {
            background: #001a00;
        }
        .content-wrapper::-webkit-scrollbar-thumb {
            background-color: #0F0;
            border-radius: 4px;
            border: 2px solid #001a00;
        }

        pre {
            white-space: pre-wrap;
        }

        #loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #111;
            display: none; /* Toggled by JS */
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000; /* Increased z-index to cover everything */
            overflow: hidden; /* Hide text that moves out of bounds */
        }

        #loading-text-output {
            white-space: pre;
            line-height: 1.5;
            font-size: 1.2rem;
            text-align: center;
            color: #6aff6a;
            text-shadow: 0 0 8px #00ff00, 0 0 2px #00ff00, 0 0 1px #00ff00;
        }

        .slide-animation {
            animation: slide-across 1s ease-in-out;
        }

        @keyframes slide-across {
            0% {
                transform: translateX(-150%);
            }
            100% {
                transform: translateX(150%);
            }
        }

        /* Power View Styles */
        #power-view {
            display: none;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 1.2rem;
            width: 100%;
            padding-bottom: 80px;
        }

        /* Hide scrollbar for realtime view */
        #realtime-view::-webkit-scrollbar {
            display: none;
        }
        #realtime-view {
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }

        .admin-nav {
            display: flex !important;
            gap: 30px !important;
            margin-bottom: 30px !important;
            justify-content: center !important;
            background: #181818 !important;
            padding: 20px 0 10px 0 !important;
            border-bottom: 1px solid #333 !important;
            z-index: 1000 !important;
        }
        .admin-nav a {
            color: #6aff6a !important;
            font-size: 20px !important;
            text-decoration: none !important;
            font-family: 'VT323', monospace !important;
            padding: 0 10px !important;
            transition: color 0.2s !important;
        }
        .admin-nav a:hover {
            text-decoration: underline !important;
            color: #e384ff !important;
        }
        .admin-container {
            max-width: 900px !important;
            margin: 40px auto 0 auto !important;
            padding: 40px 30px 60px 30px !important;
            background: #181818 !important;
            border-radius: 12px !important;
            box-shadow: 0 2px 16px #000a !important;
            min-height: 400px !important;
            text-align: center !important;
        }
