        :root {
            --primary-color: #0f0; /* Matrix Green */
            --secondary-color: #03a062;
            --bg-color: #050505;
            --panel-bg: rgba(10, 20, 10, 0.85);
            --border-color: #33ff33;
            --error-color: #ff3333;
            --glow: 0 0 10px var(--primary-color);
        }

        * {
            box-sizing: border-box;
            user-select: none; /* Prevent selection */
        }

        body {
            margin: 0;
            padding: 0;
            font-family: 'Share Tech Mono', monospace;
            background-color: var(--bg-color);
            color: var(--primary-color);
            overflow: hidden;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* Background Canvas for Matrix Rain */
        #matrixCanvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            opacity: 0.3;
        }

        /* Scanline Overlay */
        .scanlines {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                to bottom,
                rgba(255,255,255,0),
                rgba(255,255,255,0) 50%,
                rgba(0,0,0,0.2) 50%,
                rgba(0,0,0,0.2)
            );
            background-size: 100% 4px;
            z-index: 100;
            pointer-events: none;
        }

        /* Main Container */
        .terminal-container {
            position: relative;
            z-index: 10;
            width: 900px;
            max-width: 95%;
            height: 600px; /* Fixed height for terminal look */
            background: var(--panel-bg);
            border: 2px solid var(--secondary-color);
            box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
            display: grid;
            grid-template-columns: 2fr 1fr; /* Split into main control and log panel */
            grid-template-rows: 40px 1fr 30px;
            backdrop-filter: blur(5px);
        }

        /* Header Bar */
        .terminal-header {
            grid-column: 1 / -1;
            background: rgba(0, 50, 0, 0.8);
            border-bottom: 1px solid var(--secondary-color);
            display: flex;
            align-items: center;
            padding: 0 15px;
            justify-content: space-between;
        }

        .header-title {
            font-size: 1.2rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .header-title::before {
            content: '';
            display: inline-block;
            width: 10px;
            height: 10px;
            background: var(--primary-color);
            border-radius: 50%;
            box-shadow: var(--glow);
            animation: blink 1s infinite;
        }

        /* Main Control Area */
        .control-panel {
            padding: 20px;
            border-right: 1px solid var(--secondary-color);
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        /* Input Group Styling */
        .input-group {
            position: relative;
            margin-bottom: 30px;
        }

        .input-group label {
            position: absolute;
            top: -10px;
            left: 10px;
            background: #000;
            padding: 0 5px;
            font-size: 0.8rem;
            color: var(--secondary-color);
        }

        input[type="number"] {
            width: 100%;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid var(--secondary-color);
            color: var(--primary-color);
            padding: 15px;
            font-family: 'Share Tech Mono', monospace;
            font-size: 1.5rem;
            outline: none;
            transition: 0.3s;
        }

        input[type="number"]:focus {
            border-color: var(--primary-color);
            box-shadow: var(--glow);
        }

        /* Buttons */
        .btn-main {
            background: transparent;
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            padding: 15px 30px;
            font-family: 'Share Tech Mono', monospace;
            font-size: 1.2rem;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
            width: 100%;
            margin-top: 10px;
        }

        .btn-main:hover {
            background: var(--primary-color);
            color: #000;
            box-shadow: 0 0 20px var(--primary-color);
        }

        .btn-main:active {
            transform: scale(0.98);
        }

        /* Result Display */
        .result-area {
            margin-top: 30px;
            text-align: center;
            border: 1px dashed var(--secondary-color);
            padding: 20px;
            background: rgba(0, 20, 0, 0.5);
            position: relative;
        }

        .result-label {
            font-size: 0.9rem;
            color: var(--secondary-color);
            margin-bottom: 10px;
            text-align: left;
        }

        #randomNumber {
            font-size: 4rem;
            font-weight: bold;
            text-shadow: 2px 2px 0px rgba(0,0,0,0.5), 0 0 15px var(--primary-color);
            min-height: 80px;
            display: block;
        }

        .copy-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: transparent;
            border: 1px solid var(--secondary-color);
            color: var(--secondary-color);
            cursor: pointer;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.8rem;
            padding: 5px 10px;
        }

        .copy-btn:hover {
            background: var(--secondary-color);
            color: #000;
        }

        /* Data Conversions (Hex/Binary) */
        .data-stream {
            margin-top: 15px;
            font-size: 0.8rem;
            color: var(--secondary-color);
            display: flex;
            justify-content: space-between;
        }

        /* Log Panel (Right Side) */
        .log-panel {
            padding: 10px;
            background: #000;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            font-size: 0.8rem;
        }

        .log-header {
            border-bottom: 1px solid #333;
            padding-bottom: 5px;
            margin-bottom: 5px;
            color: #fff;
        }

        #systemLog {
            flex-grow: 1;
            overflow-y: auto;
            color: #aaa;
            font-family: 'Courier New', Courier, monospace;
        }

        .log-entry {
            margin-bottom: 2px;
        }

        .log-success { color: var(--primary-color); }
        .log-warn { color: yellow; }
        .log-error { color: red; }
        .log-info { color: cyan; }

        /* Scrollbar for logs */
        #systemLog::-webkit-scrollbar {
            width: 5px;
        }
        #systemLog::-webkit-scrollbar-thumb {
            background: var(--secondary-color);
        }

        /* Footer */
        .terminal-footer {
            grid-column: 1 / -1;
            border-top: 1px solid var(--secondary-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            font-size: 0.8rem;
            background: rgba(0, 0, 0, 0.9);
        }

        /* Animations */
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }

        @keyframes glitch {
            0% { transform: translate(0) }
            20% { transform: translate(-2px, 2px) }
            40% { transform: translate(-2px, -2px) }
            60% { transform: translate(2px, 2px) }
            80% { transform: translate(2px, -2px) }
            100% { transform: translate(0) }
        }

        .glitch-text {
            animation: glitch 2s infinite; 
            color: #fff;
        }

        /* Notifications */
        .notification-box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.95);
            border: 2px solid var(--primary-color);
            padding: 20px;
            z-index: 200;
            text-align: center;
            display: none;
            box-shadow: 0 0 50px rgba(0, 255, 0, 0.3);
        }
        
        .notification-box h3 { margin-top: 0; }

        /* Decorative Elements */
        .corner {
            position: absolute;
            width: 20px;
            height: 20px;
            border: 2px solid var(--primary-color);
            transition: all 0.5s;
        }
        .tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
        .tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
        .bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
        .br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .terminal-container {
                grid-template-columns: 1fr;
                grid-template-rows: 40px auto 150px 30px;
                height: 90vh;
                overflow-y: auto;
            }
            .control-panel { border-right: none; border-bottom: 1px solid var(--secondary-color); }
        }

        /* Custom FPS */
        #fpsDisplay {
            color: var(--error-color);
            font-weight: bold;
        }