        /* --- CORE VARIABLES --- */
        :root {
            --bg-color: #050505;
            --panel-bg: rgba(10, 15, 20, 0.75);
            --primary-neon: #00f3ff;
            --secondary-neon: #ff0055;
            --accent-neon: #00ff66;
            --text-main: #e0e0e0;
            --text-dim: #6c7a89;
            --border-color: rgba(0, 243, 255, 0.3);
            --glass-blur: 10px;
            --grid-line: rgba(0, 243, 255, 0.05);
        }

        /* --- GLOBAL RESET & TYPOGRAPHY --- */
        * { box-sizing: border-box; outline: none; user-select: none; }
        body {
            font-family: 'Share Tech Mono', monospace;
            margin: 0; padding: 0;
            background-color: var(--bg-color);
            color: var(--text-main);
            overflow-x: hidden;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* --- BACKGROUND ANIMATION LAYER --- */
        #canvas-bg {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            z-index: -1;
            opacity: 0.6;
        }
        .grid-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background-image: 
                linear-gradient(var(--grid-line) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
            background-size: 30px 30px;
            z-index: -1;
            pointer-events: none;
        }

        /* --- SCROLLBAR --- */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #000; }
        ::-webkit-scrollbar-thumb { background: var(--primary-neon); border-radius: 4px; }

        /* --- LAYOUT STRUCTURE --- */
        .app-container {
            display: grid;
            grid-template-columns: 350px 1fr;
            grid-template-rows: 80px 1fr 40px;
            height: 100vh;
            gap: 15px;
            padding: 15px;
            max-width: 1600px;
            margin: 0 auto;
            width: 100%;
        }

        /* --- HEADER --- */
        .top-bar {
            grid-column: 1 / -1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px solid var(--primary-neon);
            padding: 0 20px;
            background: var(--panel-bg);
            backdrop-filter: blur(var(--glass-blur));
            box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
        }

        .logo h1 {
            font-size: 28px;
            letter-spacing: 2px;
            text-transform: uppercase;
            margin: 0;
            text-shadow: 0 0 10px var(--primary-neon);
        }
        .logo span { color: var(--secondary-neon); }

        .sys-status {
            display: flex;
            gap: 20px;
            font-size: 14px;
            color: var(--accent-neon);
        }

        /* --- SIDEBAR (CONTROLS) --- */
        .sidebar {
            grid-row: 2 / 3;
            background: var(--panel-bg);
            border: 1px solid var(--border-color);
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 25px;
            backdrop-filter: blur(var(--glass-blur));
            position: relative;
            overflow-y: auto;
        }

        .section-title {
            font-size: 18px;
            color: var(--primary-neon);
            border-bottom: 1px dashed var(--border-color);
            padding-bottom: 5px;
            margin-bottom: 15px;
            text-transform: uppercase;
        }

        /* Custom Color Input */
        .color-input-wrapper {
            position: relative;
            height: 150px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 2px solid var(--text-dim);
            border-radius: 50%;
            width: 150px;
            margin: 0 auto;
            overflow: hidden;
            transition: 0.5s;
            box-shadow: 0 0 30px rgba(0,0,0,0.5);
        }
        .color-input-wrapper:hover {
            border-color: var(--primary-neon);
            box-shadow: 0 0 50px var(--primary-neon);
        }
        input[type="color"] {
            position: absolute;
            top: -50%; left: -50%;
            width: 200%; height: 200%;
            cursor: pointer;
            transform: scale(1.5);
            opacity: 0;
        }
        #colorPreviewCircle {
            width: 100%; height: 100%;
            background-color: #ff0000;
            border-radius: 50%;
        }

        /* Value Inputs */
        .input-group {
            position: relative;
        }
        .input-group label {
            display: block;
            color: var(--text-dim);
            font-size: 12px;
            margin-bottom: 5px;
        }
        .cyber-input {
            width: 100%;
            background: rgba(0,0,0,0.5);
            border: 1px solid var(--border-color);
            color: var(--primary-neon);
            padding: 10px;
            font-family: inherit;
            font-size: 16px;
            transition: 0.3s;
            text-transform: uppercase;
        }
        .cyber-input:focus {
            background: rgba(0, 243, 255, 0.1);
            box-shadow: 0 0 15px var(--border-color);
        }

        /* Buttons */
        .cyber-btn {
            background: transparent;
            border: 1px solid var(--primary-neon);
            color: var(--primary-neon);
            padding: 8px 15px;
            cursor: pointer;
            font-family: inherit;
            font-size: 12px;
            text-transform: uppercase;
            transition: 0.3s;
            display: inline-block;
            margin-top: 5px;
        }
        .cyber-btn:hover {
            background: var(--primary-neon);
            color: #000;
            box-shadow: 0 0 20px var(--primary-neon);
        }
        .copy-success {
            color: var(--accent-neon);
            font-size: 10px;
            margin-left: 10px;
            opacity: 0;
            transition: 0.5s;
        }

        /* --- MAIN DASHBOARD (RESULTS) --- */
        .dashboard {
            grid-row: 2 / 3;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            overflow-y: auto;
            padding-right: 10px;
        }

        .panel {
            background: var(--panel-bg);
            border: 1px solid var(--border-color);
            padding: 20px;
            position: relative;
            backdrop-filter: blur(var(--glass-blur));
        }
        /* Corner decorations */
        .panel::before {
            content: ''; position: absolute; top: -1px; left: -1px;
            width: 10px; height: 10px; border-top: 2px solid var(--primary-neon); border-left: 2px solid var(--primary-neon);
        }
        .panel::after {
            content: ''; position: absolute; bottom: -1px; right: -1px;
            width: 10px; height: 10px; border-bottom: 2px solid var(--primary-neon); border-right: 2px solid var(--primary-neon);
        }

        /* Data Visualization Bars */
        .data-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .bar-container {
            flex-grow: 1;
            height: 8px;
            background: #222;
            margin: 0 10px;
            position: relative;
        }
        .bar-fill {
            height: 100%;
            background: var(--secondary-neon);
            width: 0%;
            transition: width 0.5s ease;
            box-shadow: 0 0 10px var(--secondary-neon);
        }
        .val-display { width: 40px; text-align: right; color: var(--text-main); }

        /* Color Palettes */
        .palette-container {
            display: flex;
            height: 60px;
            margin-top: 10px;
            cursor: pointer;
        }
        .palette-box {
            flex: 1;
            transition: 0.2s;
            position: relative;
        }
        .palette-box:hover { flex: 1.5; z-index: 2; box-shadow: 0 0 15px #000; }
        .palette-box:hover::after {
            content: attr(data-color);
            position: absolute;
            bottom: -25px; left: 50%; transform: translateX(-50%);
            background: #000; color: #fff; padding: 2px 5px; font-size: 10px;
        }

        /* History */
        .history-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
        }
        .history-item {
            height: 30px;
            border: 1px solid #444;
            cursor: pointer;
            transition: 0.2s;
        }
        .history-item:hover { transform: scale(1.2); border-color: #fff; }

        /* Contrast Checker */
        .contrast-box {
            padding: 15px;
            margin-bottom: 10px;
            text-align: center;
            border: 1px solid #555;
            font-weight: bold;
        }

        /* --- FOOTER --- */
        .footer {
            grid-column: 1 / -1;
            border-top: 1px solid #333;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            font-size: 12px;
            background: #000;
        }
        .footer a { color: var(--primary-neon); text-decoration: none; }
        .footer a:hover { text-shadow: 0 0 10px var(--primary-neon); }

        /* --- RESPONSIVE --- */
        @media (max-width: 900px) {
            .app-container {
                grid-template-columns: 1fr;
                grid-template-rows: auto auto 1fr auto;
                height: auto;
            }
            .sidebar { grid-row: 2; height: auto; }
            .dashboard { grid-row: 3; height: auto; }
        }

        /* --- NOTIFICATIONS --- */
        #notification-area {
            position: fixed;
            bottom: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 9999;
        }
        .toast {
            background: rgba(0, 20, 0, 0.9);
            border-left: 4px solid var(--accent-neon);
            padding: 10px 20px;
            color: var(--accent-neon);
            animation: slideIn 0.3s forwards;
            box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
        }
        @keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
