For my new project, I'm exploring a concept inspired by Windows 7. The idea is that when you double click on an icon, a window will open. If you keep double clicking on the same icon, multiple windows should appear. The challenge I'm facing is implementing the z-index functionality to ensure that the clicked window comes to the front among others. Currently, the code only allows one window to open upon clicking an icon, and subsequent clicks do not trigger any action.
let pc = document.getElementById('pc')
// Remaining JavaScript code...
// CSS styles...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
// Head content...
</head>
<body>
// HTML structure...
</body>
</html>