:root {
            --bg-color: #030303;
            --accent-green: #00ffaa;
            --accent-cyan: #00ffff;
            --accent-red: #ff3b30;
            --glass-bg: rgba(8, 10, 15, 0.75);
            --glass-border: rgba(0, 255, 170, 0.18);
            --panel-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
            --grid-color: rgba(0, 255, 170, 0.08);
        }

        * {
            box-sizing: border-box;
            user-select: none;
        }

        body, html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background-color: var(--bg-color);
            background-image: 
                radial-gradient(var(--grid-color) 1.5px, transparent 1.5px);
            background-size: 24px 24px;
            color: #ffffff;
            font-family: 'Outfit', sans-serif;
            overflow: hidden;
        }

        /* Ambient glows */
        .ambient-glow-1 {
            position: fixed;
            top: 20%;
            left: 15%;
            width: 45vw;
            height: 45vw;
            background: radial-gradient(circle, rgba(0, 255, 170, 0.04) 0%, transparent 70%);
            pointer-events: none;
            z-index: 0;
        }
        .ambient-glow-2 {
            position: fixed;
            bottom: 10%;
            right: 10%;
            width: 50vw;
            height: 50vw;
            background: radial-gradient(circle, rgba(0, 255, 255, 0.035) 0%, transparent 70%);
            pointer-events: none;
            z-index: 0;
        }

        /* HEADER CONTROL BAR */
        header {
            position: relative;
            width: 100%;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 30px;
            background: rgba(4, 5, 8, 0.9);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            z-index: 1000;
            box-shadow: 0 5px 25px rgba(0,0,0,0.5);
        }

        .header-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            font-size: 1.4rem;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .header-logo span {
            color: var(--accent-green);
            text-shadow: 0 0 10px rgba(0, 255, 170, 0.6);
        }

        .system-status {
            display: flex;
            align-items: center;
            gap: 20px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            letter-spacing: 1px;
        }

        .status-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(0, 255, 170, 0.06);
            border: 1px solid rgba(0, 255, 170, 0.2);
            padding: 4px 12px;
            border-radius: 4px;
        }

        .status-dot {
            width: 6px;
            height: 6px;
            background: var(--accent-green);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--accent-green);
            animation: pulse-dot 1.5s infinite ease-in-out;
        }

        .control-buttons {
            display: flex;
            gap: 15px;
        }

        .btn {
            background: transparent;
            border: 1px solid rgba(0, 255, 170, 0.3);
            color: var(--accent-green);
            font-family: 'Outfit', sans-serif;
            font-weight: 600;
            font-size: 0.85rem;
            padding: 8px 18px;
            border-radius: 4px;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 0 15px rgba(0, 255, 170, 0.05);
        }

        .btn:hover {
            background: var(--accent-green);
            color: #000;
            box-shadow: 0 0 20px rgba(0, 255, 170, 0.4);
            border-color: var(--accent-green);
            transform: translateY(-2px);
        }

        .btn-cyan {
            border-color: rgba(0, 255, 255, 0.3);
            color: var(--accent-cyan);
        }

        .btn-cyan:hover {
            background: var(--accent-cyan);
            color: #000;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
            border-color: var(--accent-cyan);
        }

        /* GRID DESKTOP CONTAINER */
        #desktop {
            position: relative;
            width: 100%;
            height: calc(100vh - 70px);
            padding: 40px;
            z-index: 10;
        }

        /* PREMIUM GLASSMORPHIC CARD */
        .section {
            position: absolute !important;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            box-shadow: var(--panel-shadow);
            backdrop-filter: blur(12px) saturate(180%);
            -webkit-backdrop-filter: blur(12px) saturate(180%);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
            z-index: 100;
        }

        .section:hover {
            border-color: rgba(0, 255, 170, 0.4);
            box-shadow: 0 15px 50px rgba(0, 255, 170, 0.1), var(--panel-shadow);
        }

        /* Card active drag state */
        .ui-draggable-dragging {
            border-color: var(--accent-cyan) !important;
            box-shadow: 0 20px 60px rgba(0, 255, 255, 0.2), var(--panel-shadow) !important;
            z-index: 1000 !important;
        }

        /* PANEL HEADER / DRAG HANDLE */
        .panel-header {
            width: 100%;
            height: 42px;
            background: rgba(0, 0, 0, 0.4);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            cursor: move;
        }

        .panel-title {
            font-size: 0.8rem;
            font-weight: 800;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.9);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .panel-title::before {
            content: '◈';
            color: var(--accent-green);
        }

        .panel-title-link {
            color: rgba(255, 255, 255, 0.9);
            text-decoration: none;
            transition: all 0.2s ease-in-out;
            border-bottom: 1px dashed transparent;
        }

        .panel-title-link:hover {
            color: var(--accent-green);
            text-shadow: 0 0 8px rgba(0, 255, 170, 0.5);
            border-bottom-color: rgba(0, 255, 170, 0.4);
        }

        /* Drag Pattern handle */
        .panel-drag-pattern {
            flex-grow: 1;
            height: 6px;
            margin: 0 20px;
            background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
            background-size: 4px 4px;
            opacity: 0.7;
        }

        .panel-meta {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .panel-bounds {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.35);
        }

        .panel-close {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.4);
            font-size: 1.1rem;
            cursor: pointer;
            transition: color 0.2s;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .panel-fullscreen {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.9rem;
            cursor: pointer;
            transition: color 0.2s;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .panel-fullscreen:hover {
            color: var(--accent-cyan);
        }

        .panel-close:hover {
            color: var(--accent-red);
        }

        .panel-link-btn {
            background: rgba(0, 255, 170, 0.06);
            border: 1px solid rgba(0, 255, 170, 0.16);
            color: var(--accent-green);
            padding: 3px 8px;
            font-size: 0.65rem;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            text-transform: uppercase;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            border-radius: 3px;
            transition: all 0.2s ease-in-out;
            cursor: pointer;
            margin-right: 4px;
            line-height: 1;
        }

        .panel-link-btn svg {
            transition: transform 0.2s ease-in-out;
        }

        .panel-link-btn:hover {
            background: rgba(0, 255, 170, 0.18);
            color: #fff;
            border-color: var(--accent-green);
            box-shadow: 0 0 10px rgba(0, 255, 170, 0.15);
        }

        .panel-link-btn:hover svg {
            transform: translate(1px, -1px);
        }

        /* PANEL CONTENT VIEWPORT */
        .panel-content {
            flex: 1;
            width: 100%;
            height: 0;
            min-height: 0;
            position: relative;
            overflow: hidden;
        }

        /* RESIZABLE HANDLES OVERRIDE */
        .ui-resizable-handle {
            background: transparent;
            z-index: 101 !important;
        }
        .ui-resizable-se {
            width: 14px;
            height: 14px;
            right: 2px;
            bottom: 2px;
            background-image: linear-gradient(135deg, transparent 40%, rgba(0, 255, 170, 0.5) 40%);
            border-bottom-right-radius: 4px;
            cursor: se-resize;
        }

        /* DYNAMIC MODULE 1: SOLARID BOARD */
        .solari-container {
            width: 100%;
            height: 100%;
            display: flex;
            background: #000;
        }

        .solari-media-link {
            width: 40%;
            height: 100%;
            display: block;
            border-right: 1px solid rgba(0, 255, 170, 0.12);
            position: relative;
            overflow: hidden;
            text-decoration: none;
        }

        .solari-media-window {
            width: 100%;
            height: 100%;
            background: #050505;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .solari-media-overlay {
            position: absolute;
            top: 15px;
            left: 15px;
            background: rgba(0,255,170,0.08);
            backdrop-filter: blur(4px);
            padding: 4px 10px;
            font-size: 9px;
            letter-spacing: 2px;
            color: var(--accent-green);
            border: 1px solid rgba(0, 255, 170, 0.3);
            text-transform: uppercase;
            font-weight: 800;
            z-index: 10;
        }

        .solari-media-slot {
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .solari-reel {
            width: 100%;
            display: flex;
            flex-direction: column;
            transition: transform 3.0s cubic-bezier(0.1, 0, 0.1, 1);
        }

        .solari-reel img, .solari-reel video {
            width: 100%;
            object-fit: cover;
            filter: contrast(1.1) brightness(0.85);
        }

        .solari-media-window.spinning .solari-reel {
            filter: blur(10px) brightness(1.3) contrast(1.2);
            scale: 0.96;
        }

        .solari-board-side {
            width: 60%;
            height: 100%;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
            background: linear-gradient(135deg, #09090b 0%, #030303 100%);
        }

        .solari-board-header {
            font-family: 'JetBrains Mono', monospace;
            font-size: 9px;
            letter-spacing: 4px;
            color: rgba(0, 255, 170, 0.4);
            margin-bottom: 15px;
            text-transform: uppercase;
            font-weight: 800;
        }

        .solari-flap-grid {
            display: grid;
            grid-template-columns: repeat(20, 1fr);
            gap: 4px;
            width: 100%;
        }

        .solari-flap {
            position: relative;
            width: 100%;
            aspect-ratio: 0.72;
            background: #151515;
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: clamp(8px, 1.2vw, 20px);
            font-weight: 900;
            text-align: center;
            perspective: 300px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        }

        .solari-flap > div {
            position: absolute;
            left: 0;
            width: 100%;
            height: 50%;
            overflow: hidden;
            background: linear-gradient(to bottom, #1d1d1f, #0d0d0f);
            color: #ffffff;
            display: flex;
            justify-content: center;
        }

        .solari-flap span {
            height: 200%;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        /* ROW STYLING */
        .solari-flap.accent-row span { color: var(--accent-green); text-shadow: 0 0 8px rgba(0,255,170,0.3); }
        .solari-flap.white-row span { color: #ffffff; }
        .solari-flap.dim-row span { color: rgba(0, 255, 170, 0.6); }
        .solari-flap.quote-row span { color: #bbbbbb; font-style: italic; }

        .solari-flap .top {
            top: 0;
            border-radius: 4px 4px 0 0;
            border-bottom: 1px solid rgba(0,0,0,0.6);
            align-items: flex-start;
            z-index: 1;
        }

        .solari-flap .bottom {
            bottom: 0;
            border-radius: 0 0 4px 4px;
            border-top: 1px solid rgba(255,255,255,0.04);
            align-items: flex-end;
            z-index: 0;
        }

        .solari-flap .leaf {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 50%;
            z-index: 2;
            transform-origin: bottom;
            transition: transform 0.015s linear;
            transform-style: preserve-3d;
        }

        .solari-flap .leaf-front, .solari-flap .leaf-back {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            display: flex;
            justify-content: center;
            overflow: hidden;
        }

        .solari-flap .leaf-front {
            align-items: flex-start;
            border-radius: 4px 4px 0 0;
            border-bottom: 1px solid #000;
            background: linear-gradient(to bottom, #1d1d1f, #0d0d0f);
            z-index: 2;
        }

        .solari-flap .leaf-back {
            align-items: flex-end;
            border-radius: 0 0 4px 4px;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(to bottom, #050507, #1d1d1f);
            transform: rotateX(-180deg);
        }

        .solari-flap .leaf-back span {
            transform: rotateX(180deg);
        }

        .solari-flap.flipping .leaf {
            transform: rotateX(-180deg);
        }

        .solari-sound-toggle {
            position: absolute;
            top: 15px;
            right: 15px;
            cursor: pointer;
            z-index: 10;
            opacity: 0.4;
            transition: opacity 0.3s;
        }

        .solari-sound-toggle:hover {
            opacity: 1.0;
        }

        .solari-sound-toggle svg {
            width: 18px;
            height: 18px;
            fill: var(--accent-green);
        }

        /* DYNAMIC MODULE 2: LEAFLET IFRAME */
        .iframe-container {
            width: 100%;
            height: 100%;
            border: none;
            background: #000000;
        }

        /* DYNAMIC MODULE 3: LIVE STREAM MUSIC HUD */
        .music-hud {
            width: 100%;
            height: 100%;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            background: #020306 url('/blue_logo.png') center/contain no-repeat;
            border: 1px solid rgba(0, 242, 255, 0.4);
            box-shadow: 0 0 20px rgba(0, 242, 255, 0.12);
            font-family: 'Space Mono', monospace;
            position: relative;
            overflow: hidden;
            color: #00f2ff;
        }

        .music-hud::after {
            content: "";
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(rgba(2, 3, 6, 0.8) 0%, rgba(2, 3, 6, 0.95) 100%);
            z-index: 0;
            pointer-events: none;
        }
        
        .music-hud > * {
            z-index: 1;
        }

        .music-visualizer-box {
            position: relative;
            width: 100%;
            height: 100px;
            border-radius: 2px;
            background: #000000;
            border: 1px solid rgba(0, 242, 255, 0.2);
            overflow: hidden;
        }

        #visualizer {
            width: 100%;
            height: 100%;
            display: block;
        }

        .visualizer-overlay {
            position: absolute;
            top: 10px;
            left: 10px;
            font-family: 'Space Mono', monospace;
            font-size: 7.5px;
            letter-spacing: 1.5px;
            color: #00f2ff;
            text-shadow: 0 0 8px rgba(0, 242, 255, 0.6);
            z-index: 6;
            text-transform: uppercase;
        }

        .music-controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 6;
        }

        .track-metadata {
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 6;
        }

        .track-details {
            display: flex;
            flex-direction: column;
        }

        .track-title {
            font-family: 'Space Mono', monospace;
            font-size: 0.85rem;
            font-weight: 700;
            color: #fff;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .track-desc {
            font-family: 'Space Mono', monospace;
            font-size: 0.65rem;
            color: #00f2ff;
            opacity: 0.7;
            margin-top: 3px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .playback-progress {
            display: flex;
            align-items: center;
            gap: 10px;
            font-family: 'Space Mono', monospace;
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.5);
            z-index: 6;
        }

        .progress-bar-container {
            flex-grow: 1;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            position: relative;
            cursor: pointer;
        }

        .progress-bar-fill {
            height: 100%;
            width: 0%;
            background: #00f2ff;
            box-shadow: 0 0 8px #00f2ff;
            transition: width 0.1s linear;
        }

        .media-button-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 5px;
            z-index: 6;
        }

        .control-btns {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .music-btn {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .music-btn:hover {
            color: #00f2ff;
            transform: scale(1.15);
            filter: drop-shadow(0 0 8px #00f2ff);
        }

        .music-btn-play {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(0, 242, 255, 0.05);
            border: 1px solid rgba(0, 242, 255, 0.3);
            color: #00f2ff;
            box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
        }

        .music-btn-play:hover {
            background: #00f2ff;
            color: #000;
            box-shadow: 0 0 25px #00f2ff;
            border-color: #00f2ff;
            transform: scale(1.1) !important;
        }

        .volume-box {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 120px;
        }

        .volume-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            outline: none;
            cursor: pointer;
        }

        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #00f2ff;
            box-shadow: 0 0 6px #00f2ff;
            cursor: pointer;
        }

        .tracks-select-box {
            width: 100%;
            background: #000000;
            border: 1px solid rgba(0, 242, 255, 0.2);
            border-radius: 2px;
            padding: 8px 12px;
            color: #00f2ff;
            font-family: 'Space Mono', monospace;
            font-size: 0.75rem;
            outline: none;
            cursor: pointer;
            z-index: 6;
        }
        .tracks-select-box option {
            background: #050505;
            color: #00f2ff;
        }

        /* CUSTOM MODAL FOR ADDING MODULE */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(8px);
            z-index: 9999;
            display: none;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .modal-box {
            width: 480px;
            background: #0a0d14;
            border: 1px solid var(--accent-green);
            box-shadow: 0 0 40px rgba(0, 255, 170, 0.25);
            border-radius: 8px;
            padding: 30px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }

        .modal-title {
            font-size: 1.2rem;
            font-weight: 800;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: #fff;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            padding-bottom: 10px;
        }

        .modal-modules-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin: 10px 0;
            max-height: 320px;
            overflow-y: auto;
            padding-right: 5px;
        }
        
        .modal-modules-list::-webkit-scrollbar {
            width: 4px;
        }
        
        .modal-modules-list::-webkit-scrollbar-thumb {
            background: rgba(0, 255, 170, 0.3);
            border-radius: 2px;
        }

        .modal-module-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.05);
            padding: 12px 16px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .modal-module-item:hover {
            background: rgba(0, 255, 255, 0.02);
            border-color: rgba(0, 255, 255, 0.15);
        }

        .modal-module-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .modal-module-name {
            font-size: 0.85rem;
            font-weight: 700;
            color: #fff;
            font-family: 'Outfit', sans-serif;
        }

        .modal-module-domain {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.4);
            font-family: 'JetBrains Mono', monospace;
        }

        .modal-ingest-btn {
            background: transparent;
            border: 1px solid var(--accent-cyan);
            color: var(--accent-cyan);
            padding: 6px 12px;
            font-size: 0.7rem;
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
            cursor: pointer;
            border-radius: 3px;
            transition: all 0.2s ease;
        }

        .modal-ingest-btn:hover:not(:disabled) {
            background: var(--accent-cyan);
            color: #000;
            box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
        }

        .modal-ingest-btn:disabled {
            border-color: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.2);
            cursor: not-allowed;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            margin-top: 10px;
        }

        /* MODULE 4: LABS SANDBOX VIEWPORT */
        .labs-hud {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            background: #020306;
            position: relative;
            overflow: hidden;
        }

        .labs-viewport-container {
            flex-grow: 1;
            position: relative;
            background: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid rgba(0, 255, 170, 0.1);
            overflow: hidden;
        }

        .labs-video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0.8;
        }

        .labs-matrix-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0.85;
            display: none;
        }

        .labs-scanner-line {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(to bottom, rgba(0, 255, 170, 0.3), rgba(0, 255, 170, 0));
            box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
            animation: scan-vertical 6s linear infinite;
            z-index: 4;
            pointer-events: none;
        }

        @keyframes scan-vertical {
            0% { top: 0%; }
            100% { top: 100%; }
        }

        .labs-feed-overlay {
            position: absolute;
            top: 10px;
            left: 12px;
            z-index: 5;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--accent-green);
            text-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
            background: rgba(0, 0, 0, 0.6);
            padding: 3px 6px;
            border: 1px solid rgba(0, 255, 170, 0.3);
            border-radius: 2px;
        }

        .labs-feed-selector {
            position: absolute;
            top: 10px;
            right: 12px;
            z-index: 5;
            display: flex;
            gap: 5px;
        }

        .labs-selector-btn {
            background: rgba(0, 0, 0, 0.7);
            border: 1px solid rgba(0, 255, 170, 0.2);
            color: rgba(0, 255, 170, 0.6);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            padding: 2px 6px;
            cursor: pointer;
            border-radius: 2px;
            transition: all 0.2s ease;
        }

        .labs-selector-btn:hover {
            color: #fff;
            border-color: var(--accent-green);
        }

        .labs-selector-btn.active {
            background: var(--accent-green);
            color: #000;
            font-weight: 800;
            border-color: var(--accent-green);
            box-shadow: 0 0 8px rgba(0, 255, 170, 0.4);
        }

        .labs-logs-box {
            height: 110px;
            background: rgba(4, 6, 12, 0.95);
            padding: 8px 12px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--accent-cyan);
            overflow-y: hidden;
            display: flex;
            flex-direction: column;
            gap: 4px;
            border-top: 1px solid rgba(0, 242, 255, 0.1);
        }

        .labs-log-row {
            opacity: 0.85;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            animation: fade-log-in 0.2s ease-out;
        }

        @keyframes fade-log-in {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 0.85; transform: translateY(0); }
        }

        /* MODULE 5: INNOV8 PROFILE SLIDES */
        .profile-slides-hud {
            width: 100%;
            height: 100%;
            background: #020203;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
        }

        .profile-slide-wrapper {
            flex-grow: 1;
            position: relative;
            overflow: hidden;
            width: 100%;
        }

        .profile-slides-container {
            display: flex;
            flex-direction: row;
            width: 600%; /* 6 slides */
            height: 100%;
            transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .profile-slide {
            width: 16.666%; /* 1/6th */
            height: 100%;
            flex-shrink: 0;
            position: relative;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 24px;
        }

        .profile-slide::before {
            content: '';
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 45%, rgba(0,0,0,0.2) 100%);
            z-index: 1;
        }

        .profile-slide-content {
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .profile-slide-tag {
            align-self: flex-start;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            font-weight: 800;
            background: rgba(0, 255, 170, 0.1);
            border: 1px solid rgba(0, 255, 170, 0.3);
            color: var(--accent-green);
            padding: 2px 8px;
            border-radius: 2px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .profile-slide-title {
            font-family: 'Montserrat', sans-serif;
            font-size: 1.6rem;
            font-weight: 900;
            color: #fff;
            letter-spacing: 1px;
            text-transform: uppercase;
            line-height: 1.1;
        }

        .profile-slide-desc {
            font-family: 'Outfit', sans-serif;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.65);
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        .profile-slide-btn {
            align-self: flex-start;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #fff;
            padding: 6px 14px;
            font-size: 0.7rem;
            font-family: 'JetBrains Mono', monospace;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            border-radius: 2px;
            transition: all 0.2s ease;
        }

        .profile-slide-btn:hover {
            border-color: var(--accent-green);
            color: var(--accent-green);
            background: rgba(0, 255, 170, 0.04);
            box-shadow: 0 0 10px rgba(0, 255, 170, 0.15);
        }

        .profile-slides-nav {
            height: 48px;
            background: rgba(4, 5, 8, 0.95);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .profile-nav-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            padding: 0;
        }

        .profile-nav-dot:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        .profile-nav-dot.active {
            background: var(--accent-green);
            box-shadow: 0 0 8px var(--accent-green);
            transform: scale(1.2);
        }

        /* NEURAL SYNC OVERLAY */
        #neuralSync {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.96);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(12px);
            transition: opacity 0.6s ease;
        }

        .sync-btn {
            background: #000;
            border: 2px solid var(--accent-green);
            color: var(--accent-green);
            padding: 25px 60px;
            font-size: 1.5rem;
            letter-spacing: 5px;
            font-weight: 900;
            font-family: 'Outfit', sans-serif;
            cursor: pointer;
            text-transform: uppercase;
            box-shadow: 0 0 20px rgba(0, 255, 170, 0.4);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            border-radius: 8px;
        }

        .sync-btn:hover {
            background: #000;
            color: var(--accent-green);
            box-shadow: 0 0 50px rgba(0, 255, 170, 0.9);
            transform: scale(1.1);
        }
        
        .sync-btn:active {
            transform: scale(0.95);
            box-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
        }

        @keyframes pulse-dot {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 1; }
        }

        /* MOBILE / RESPONSIVE LAYOUT OPTIMIZATIONS */
        @media (max-width: 768px) {
            body, html {
                overflow-x: hidden !important;
                overflow-y: auto !important;
                height: 100% !important;
                -webkit-overflow-scrolling: touch;
            }

            header {
                height: auto !important;
                flex-direction: column !important;
                padding: 15px !important;
                gap: 12px !important;
                align-items: stretch !important;
                text-align: center;
            }

            .header-logo {
                justify-content: center !important;
                font-size: 1.15rem !important;
            }

            .system-status {
                flex-direction: column !important;
                gap: 8px !important;
                align-items: center !important;
            }

            .control-buttons {
                justify-content: center !important;
                width: 100%;
            }

            .btn {
                flex-grow: 1;
                font-size: 0.75rem !important;
                padding: 10px !important;
                text-align: center;
            }

            #desktop {
                position: static !important;
                display: flex !important;
                flex-direction: column !important;
                gap: 24px !important;
                padding: 15px !important;
                width: 100% !important;
                height: auto !important;
                min-height: auto !important;
            }

            .section {
                position: relative !important;
                left: 0 !important;
                top: 0 !important;
                width: 100% !important;
                margin-left: 0 !important;
                margin-top: 0 !important;
                box-shadow: var(--panel-shadow) !important;
            }

            .section[data-id="Studio Pulse Board"] {
                height: 480px !important;
                min-height: 480px !important;
            }

            .section[data-id="Vault Map & Gallery"] {
                height: 420px !important;
                min-height: 420px !important;
            }

            .section[data-id="Live Audio Streaming HUD"] {
                height: auto !important;
                min-height: 340px !important;
            }

            .section[data-id="Labs Sandbox Viewport"] {
                height: 480px !important;
                min-height: 480px !important;
            }

            .section[data-id="Innov8 Profile Slides"] {
                height: 600px !important;
                min-height: 600px !important;
            }

            .section[data-id="Innov8 TV Broadcast"] {
                height: 100vw !important;
                min-height: 100vw !important;
                max-height: 100vw !important;
            }

            /* Disable resize handles visual cues */
            .ui-resizable-handle {
                display: none !important;
            }

            .panel-bounds {
                display: none !important;
            }

            .panel-drag-pattern {
                margin: 0 10px !important;
            }

            .panel-header {
                cursor: default !important;
            }

            /* solari container vertical stack for mobile readability */
            .solari-container {
                flex-direction: column !important;
            }

            .solari-media-link {
                width: 100% !important;
                height: 180px !important;
                border-right: none !important;
                border-bottom: 1px solid rgba(0, 255, 170, 0.12) !important;
            }

            .solari-board-side {
                width: 100% !important;
                height: calc(100% - 180px) !important;
                padding: 15px !important;
            }

            .solari-flap-grid {
                gap: 2px !important;
            }

            .solari-flap {
                font-size: clamp(6px, 2.5vw, 14px) !important;
            }

            /* Neural sync responsive button */
            .sync-btn {
                padding: 14px 28px !important;
                font-size: 0.8rem !important;
                letter-spacing: 3px !important;
            }
        }

        /* Ensure fullscreen always overrides mobile/desktop specifics */
        .section.fullscreen {
            position: fixed !important;
            top: 70px !important;
            left: 10px !important;
            width: calc(100vw - 20px) !important;
            height: calc(100vh - 80px) !important;
            max-height: none !important;
            min-height: auto !important;
            margin: 0 !important;
            z-index: 9999999 !important;
        }

        @media (max-width: 768px) {
            .section.fullscreen {
                top: 5px !important;
                left: 5px !important;
                width: calc(100vw - 10px) !important;
                height: calc(100vh - 10px) !important;
                min-height: calc(100vh - 10px) !important;
                margin-left: 0 !important;
                margin-top: 0 !important;
            }
        }

        /* Minimize Icon Enhancements */
        .section.fullscreen .panel-fullscreen {
            color: #00FF41 !important;
            font-size: 1.5rem !important;
            text-shadow: 0 0 10px rgba(0, 255, 65, 0.8) !important;
            background: rgba(0, 255, 65, 0.15) !important;
            border: 1px solid #00FF41 !important;
            border-radius: 4px;
            padding: 2px 8px;
            margin-right: 5px;
            transition: all 0.2s ease;
        }

        .section.fullscreen .panel-fullscreen:hover {
            background: rgba(0, 255, 65, 0.3) !important;
            box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
        }

        @media (max-width: 768px) {
            .section.fullscreen .panel-fullscreen {
                font-size: 1.8rem !important;
                padding: 4px 12px;
                box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
            }
        }

        /* TERMINAL DOCK */
        #terminal-dock {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 8px 20px;
            background: rgba(5, 5, 5, 0.8);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-top: 1px solid rgba(0, 255, 170, 0.2);
            font-family: 'Space Mono', monospace;
            font-size: 11px;
            letter-spacing: 2px;
            color: rgba(255, 255, 255, 0.5);
            z-index: 10000;
            text-align: center;
            white-space: nowrap;
            overflow-x: auto;
        }

        #terminal-dock a {
            color: var(--accent-green);
            text-decoration: none;
            transition: all 0.3s ease;
        }

        #terminal-dock a:hover {
            color: #fff;
            text-shadow: 0 0 8px rgba(0, 255, 170, 0.8);
        }

        /* EXTERNAL PORTAL GLOW CONTEXT */
        .section.external-portal {
            border-color: rgba(0, 255, 170, 0.3);
            box-shadow: 0 0 15px rgba(0, 255, 170, 0.1), inset 0 0 10px rgba(0, 255, 170, 0.05);
        }

        .section.external-portal .panel-header {
            border-bottom: 1px solid rgba(0, 255, 170, 0.3);
            background: rgba(0, 255, 170, 0.05);
        }

        /* EXTERNAL ROUTE CURSOR HINTS */
        .panel-title-link {
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            display: inline-flex;
            align-items: center;
            text-decoration: none;
            color: inherit;
        }

        .panel-title-link:hover {
            color: var(--accent-green);
            text-shadow: 0 0 8px rgba(0, 255, 170, 0.8);
        }

        /* ABOUT FAB */
        #about-fab {
            position: fixed;
            bottom: 45px;
            right: 20px;
            z-index: 9999;
            background: rgba(0, 0, 0, 0.8) !important;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            border-radius: 20px;
            padding: 10px 20px !important;
            box-shadow: 0 4px 15px rgba(0, 255, 170, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--accent-green) !important;
            font-size: 0.9rem !important;
            font-weight: 800 !important;
            white-space: nowrap !important;
            opacity: 1 !important;
            visibility: visible !important;
        }

        /* ABOUT DRAWER */
        .glass-drawer {
            position: fixed;
            top: 0;
            right: -450px;
            width: 400px;
            max-width: 100vw;
            height: 100vh;
            background: rgba(8, 10, 15, 0.95);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border-left: 1px solid var(--glass-border);
            box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
            z-index: 99999999 !important;
            transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
            display: flex;
            flex-direction: column;
        }

        .glass-drawer.open {
            right: 0;
        }

        .drawer-content {
            padding: 20px;
            overflow-y: auto;
            flex-grow: 1;
            font-family: 'Outfit', sans-serif;
            color: rgba(255, 255, 255, 0.85);
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            transform: translateZ(0); /* Hardware accelerate to prevent backdrop-filter lag */
        }

        /* Custom scrollbar for the drawer */
        .drawer-content::-webkit-scrollbar {
            width: 6px;
        }
        .drawer-content::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
        }
        .drawer-content::-webkit-scrollbar-thumb {
            background: rgba(0, 255, 170, 0.3);
            border-radius: 10px;
        }
        .drawer-content::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 255, 170, 0.6);
        }

        .about-module {
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .about-module:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

        .about-module h3 {
            color: var(--accent-green);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            letter-spacing: 1px;
            text-transform: uppercase;
            margin-top: 0;
            margin-bottom: 10px;
        }

        .about-module p {
            font-size: 0.85rem;
            line-height: 1.6;
            margin: 0;
        }

        /* MOBILE ADJUSTMENTS FOR TERMINAL DOCK & FAB */
        @media (max-width: 768px) {
            #terminal-dock {
                position: relative !important;
                white-space: normal !important;
                line-height: 2 !important;
                padding: 15px !important;
                border-top: none !important;
                background: rgba(0,0,0,0.5) !important;
                margin-top: 20px;
                z-index: 10;
            }

            #about-fab {
                bottom: 20px;
                z-index: 9999999 !important;
            }

            .glass-drawer {
                right: -100%;
                width: 100%;
                border-left: none;
            }
        }