body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #f0f0f0;
  }
  
  #controls {
    margin-bottom: 10px;
    text-align: center;
  }
  
  #controls button {
    padding: 5px 15px;
    margin-right: 5px;
    cursor: pointer;
  }
  
  #game {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px; /* Adds space between controls and the board */
  }
  
  #board {
    display: grid;
    gap: 1px;
    border: 2px solid #808080;
  }
  
  .cell {
    width: 20px;
    height: 20px;
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
  }
  
  .cell.revealed {
    background-color: #eee;
  }
  
  .cell.mine {
    background-color: red;
    color: white;
  }
  
  .cell.flag {
    background-color: #ff0;
  }

  #mine-counter {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
  }

  #game-status {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
  }

  #game-status.win-message {
    color: darkgreen;
  }
  
  #game-status.lose-message {
    color: darkred;
  }
  
  .win-background {
    background-color: #ccffcc; /* Light green for win */
  }
  
  .lose-background {
    background-color: #ffcccc; /* Light red for lose */
  }