self.addEventListener('install', (event) => {
  event.waitUntil(
    caches.open('blackrock-cache-v1').then((cache) => {
      return cache.addAll([
        '/',
        '/home.php',
        '/task.php',
        '/team.php',
        '/vip.php',
        '/me.php',
        '/css/style.css', // add your CSS/JS as needed
        '/icon-192.png',
        '/icon-512.png'
      ]);
    })
  );
});

self.addEventListener('fetch', (event) => {
  event.respondWith(
    caches.match(event.request).then((response) => {
      return response || fetch(event.request);
})
);
});
