body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #42a5f5, #7e57c2);
  }
  
  .game-container {
    text-align: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
  
  h1 {
    color: #333;
  }
  
  .info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .card {
    background: #1a237e;
    color: white;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s, background 0.3s;
  }
  
  .card.flipped {
    background: #ffab40;
    color: #333;
    transform: rotateY(180deg);
  }
  
  .card.matched {
    background: #4caf50;
    color: white;
    cursor: not-allowed;
  }
  
  #restart {
    padding: 10px 20px;
    background: #1a237e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  #restart:hover {
    background: #0d47a1;
  }
  
  /* Popup Modal Styling */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's above all other elements */
  }
  
  .popup.hidden {
    display: none; /* Hide popup by default */
  }
  
  .popup-content {
    background: #fff;
    padding: 20px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .popup-content h2 {
    font-size: 2rem;
    color: #1a237e; /* Deep blue color */
    margin-bottom: 20px;
  }
  
  .popup-content p {
    font-size: 1.2rem;
    color: #333; /* Neutral text color */
    margin-bottom: 20px;
  }
  
  .popup-content button {
    background: #1a237e;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .popup-content button:hover {
    background: #0d47a1;
  }
  