contextMenu.querySelectorAll('.context-menu-item').forEach(item => { item.addEventListener('click', (e) => { const action = item.getAttribute('data-action'); switch (action) { case 'new': alert('New functionality would open a submenu in Windows 95'); break; case 'properties': alert('Display Properties would open here in Windows 95'); break; } contextMenu.style.display = 'none'; }); }); } // Mouse move for dragging document.addEventListener('mousemove', (e) => { if (!isDragging || !currentWindow) return; currentWindow.style.left = (e.clientX - dragOffsetX) + 'px'; currentWindow.style.top = (e.clientY - dragOffsetY) + 'px'; }); // Mouse up for dragging document.addEventListener('mouseup', () => { isDragging = false; currentWindow = null; });