.modal { display: none; position: fixed; z-index: 1; left: 0; top: -2%; width: 100%; height: 102%; overflow: auto; background-color: rgba(0, 0, 0, 0.4); animation: fadeIn 0.3s; } @keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} } .modal-content { background-color: #fefefe; margin: 15% auto; padding: 20px; border: none; width: 30%; text-align: center; box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); border-radius: 10px; } .modal-content p { font-size: 24px; color: #000000; margin-bottom: 20px; } .modal-content .popButton { padding: 10px 20px; font-size: 24px; background-color: #3FBAD9; color: #000000; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease; } .modal-content .popButton:hover { background-color: #000000; } /* Position the button at the top-left corner */ .howToPlayBtn { position: absolute; top: 10px; left: 10px; z-index: 1; } /* Style the button to match the game theme */ .howToPlayBtn { font-family: "Poppins", sans-serif; /* Use the same font as the game */ font-size: 16px; /* Adjust the font size as needed */ background-color: #ffffff; /* Use the same purple color as the game */ color: #3FBAD9; /* Set the text color to white */ border: none; border-radius: 5px; padding: 10px 20px; cursor: pointer; box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */ transition: background-color 0.3s ease; /* Add a transition effect */ } /* Add a hover effect */ .howToPlayBtn:hover { background-color: #c2b7b7; /* Slightly darker purple on hover */ } .close { color: #3FBAD9; float: right; font-size: 24px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; }