title: How to disable clicking on a background after modal box pops up
body: <p>My memory game is almost complete, it has one last error to fix. Timer stops and returns to zero after the game is complete and a modal box appears to congratulate the player with total time and stars scored. However, while in this state, clicking somewhere in the deck (colored with linear-gradient property) causes it to start back again. Normally, it shouldn't start until the player has restarted the game and clicked on one of the closed cards.</p>
  
  <p>How can I prevent it in a way so that after the modal box kicks in, clicking anywhere on the screen will NOT cause the timer to start?</p>
  
  <p>Here is my project. If you finish and click someplace on the deck you'll see the timer starting even though the game is finished. I want to prevent that from happening.  </p>
  
  <p><a href="https://codepen.io/Caysle/pen/aYYKRp" rel="nofollow noreferrer">https://codepen.io/Caysle/pen/aYYKRp</a></p>
  
  <p>Here is the bit that collects all the progress you've made in the game:</p>
  
  <pre><code>//Collect cards to check if all are open and match:
  
  let matchingCards = document.getElementsByClassName('card match open show');
  if (matchingCards.length == 16) {
    setTimeout (function() {document.querySelector(".winPage").className = 
  "winPage"}, 1000);
    stopTimer = true;
    }
  }
  </code></pre>