html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    padding: 0;
    margin: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    background-image: url('purple-bg.jpg');
    background-size: 100% 100%;
    background-repeat: no-repeat;

}


.question-with-image {
    display: flex;
    align-items: center;
}

.question-with-image span {
    margin-right: 1rem;
}

.question-with-image img {
    max-width: 200px;
    max-height: 200px;
}

body.correct {
    background-color: #c8e6c9; /* Brighter green */
}

body.wrong {
    background-color: #ffccbc; /* Soft red */
}

.container {
    width: 800px;
    max-width: 80%;
    height: 70%;
    background-color: #ffffff; /* White */
    border-radius: 10px; /* Rounded corners */
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 0 40px 5px;
    border: 2px dashed #4b4b4b; /* Dashed border */
}

.centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.welcome-message {
    text-align: center;
}

#question {
    text-align: center;
    font-weight: bold;
    font-size: 2em;
    color: #020202; /* Teal color */
}

.btn-grid {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 15px; /* Increased gap */
    margin: 20px 0;
}

.btn {
    background-color: #bb8af3; 
    border-radius: 10px; /* Rounded corners */
    padding: 10px 20px;
    color: #ffffff; /* Black text */
    outline: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s; /* Animation */
    padding-bottom: 100px;
}

.btn:hover {
    transform: translateY(-3px); /* Bounce effect */

}

.btn.correct {
    color: #09ff00; /* Green color */
    text-decoration: white;
}

.btn.wrong {
    color: #ff0000; /* Red color */
    text-decoration: white;
}

.btn,
.start-btn,
.next-btn {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 10px 20px;
    
}

.start-btn,
.next-btn {
    /* box-shadow: #626263 0 10px 30px 5px !important; */
    width: 80px;
    height: 40px;
    border-radius: 5px;

    
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hide {
    display: none;
}

.credit {
    position: absolute;
    right: 41%;
    top: 85%;
    display: block;
}

.credit p {
    text-align: center;
}

.timer {
    position: absolute;
    top: -70px;
    padding-left: 35%;
    padding-right: 65%;
    font-size: 24px;
    align-items: center;
    width: max-content;
    background-color: #ffecb3; /* Soft yellow background */
    padding: 10px; /* Add padding */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 5px #ffd54f; /* Subtle shadow */
}

/* Responsive & Media Queries */

@media screen and (max-width:768px) {
    .welcome-message p {
        font-size: 18px;
        margin: 20px 0;
    }

    #question-container {
        width: 480px;
    }

    #question {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 10px 20px;
        font-weight: 600;
    }

    .btn-grid {
        margin-bottom: 30px;
    }

    .credit {
        position: absolute;
        right: 35%;
        top: 85%;
        display: block;
    }
}

@media screen and (min-width:768px) {
    .welcome-message p {
        font-size: 18px;
        margin: 20px 0;
    }

    #question-container {
        width: 480px;
    }

    #question {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 10px 20px;
        font-weight: 600;
    }

    .btn-grid {
        margin-bottom: 30px;
    }

    .credit {
        position: absolute;
        right: 33%;
        top: 85%;
        display: block;
    }
}

@media screen and (max-width: 767px) {
    .container {
        max-width: 90%;
        max-height: 50%;
    }

    .welcome-message h1 {
        font-size: 1rem;
    }

    .welcome-message p {
        font-size: 15px;
        margin: 20px 0;
    }

    .btn {
        font-size: 15px;
        padding: 10px 20px;
    }

    #question-container {
        width: 300px;
    }

    #question {
        font-size: 1rem;
    }

    .credit {
        position: absolute;
        right: 25%;
        top: 82%;
    }
}

#timer {
    position: absolute;
    top: -70px;
   padding-left: 35%;
   padding-right: 65%;
    font-size: 24px;
    /* align-items: center; */
    width: max-content;
}

#lives-left {
    position: absolute;
    top: -40px;
   padding-left: 40%;
   padding-right: 60%;
    font-size: 24px;
    align-items: center;
    width: max-content;
}
#start-btn{
    background-color: #d1ae45;
    height: 40px;
    width: 168px;
    border-radius: 5px;
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: none;
    width: 40%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }
  .modal-content p {
    font-size: 24px;
    color: #8460de;
    margin-bottom: 20px;
  }
  .modal-content .popButton {
    padding: 10px 20px;
    font-size: 24px;
    background-color: #8460de;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .modal-content .popButton:hover {
    background-color: #8460de;
  }
  /* Position the button at the top-left corner */

  .howToPlayBtn {
    position: absolute;
    top: 25px;
    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: #793DAE;  
    /* color: #8460de;  */
    border: none;
    font-weight: bolder;
    background-color: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
   }
  
  
  /* Add a hover effect */
  .howToPlayBtn:hover {
    background-color: #c2b7b7; /* Slightly darker purple on hover */
  }
  .modal {
    display: none;
    position: fixed;
    z-index: 2; /* Ensure the modal is above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
  }
  
  /* Style the modal content */
  .modal-content {
    background-color: #ffffff; /* Use a white background for the modal content */
    font-family: "Poppins", sans-serif; /* Use the same font as the game */
    color: #000000; /* Set the text color to black */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); /* Add a subtle shadow */
    border-radius: 10px; /* Rounded corners */
  }
  
  
  .close {
    color: #8460de;
    float: right;
    font-size: 24px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  .modal-header {
    text-align: center;
    margin-bottom: 10px;
}

.modal-header img {
    max-width: 50%; /* Set the maximum width to 50% of the parent container */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Make the image a block-level element */
    margin: 0 auto; /* Center the image horizontally */
}
.modal-content iframe {
    margin-top: 20px; /* Added margin-top for the iframe */
}
.homeBtn {
    position: absolute;
    top: 145px; /* Adjust the top position as needed */
    left: 10px;
    z-index: 1;
  
  }
  
  /* Style the home button */
  .homeBtn button {
    font-family: "Poppins", sans-serif;
    background-color: #793DAE;  
    font-size: 16px; 
    border: none;
    font-weight: bolder;
    border-radius: 5px;
    padding: 15px 20px;
    cursor: pointer;
    /* box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); */
    transition: background-color 0.3s ease;
  }
  @media screen and (max-width:768px) {
    .welcome-message p {
        font-size: 18px;
        margin: 20px 0;
    }

    #question-container {
        width: 480px;
    }

    #question {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 10px 20px;
        font-weight: 600;
    }

    .btn-grid {
        margin-bottom: 30px;
    }

    .credit {
        position: absolute;
        right: 35%;
        top: 85%;
        display: block;
    }
}

@media screen and (min-width:768px) {
    .welcome-message p {
        font-size: 18px;
        margin: 20px 0;
    }

    #question-container {
        width: 480px;
    }

    #question {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 10px 20px;
        font-weight: 600;
    }

    .btn-grid {
        margin-bottom: 30px;
    }

    .credit {
        position: absolute;
        right: 33%;
        top: 85%;
        display: block;
    }
}

@media screen and (max-width: 767px) {
    .container {
        max-width: 90%;
        max-height: 50%;
    }

    .welcome-message h1 {
        font-size: 1rem;
    }

    .welcome-message p {
        font-size: 15px;
        margin: 20px 0;
    }

    .btn {
        font-size: 15px;
        padding: 10px 20px;
    }

    #question-container {
        width: 300px;
    }

    #question {
        font-size: 1rem;
    }

    .credit {
        position: absolute;
        right: 25%;
        top: 82%;
    }
}

#timer {
    position: absolute;
    top: -70px;
   padding-left: 35%;
   padding-right: 65%;
    font-size: 24px;
    /* align-items: center; */
    width: max-content;
}

#lives-left {
    position: absolute;
    top: -40px;
   padding-left: 40%;
   padding-right: 60%;
    font-size: 24px;
    align-items: center;
    width: max-content;
}
#start-btn{
    background-color: #d1ae45;
    height: 40px;
    width: 168px;
    border-radius: 5px;
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: none;
    width: 40%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
  }
  .modal-content p {
    font-size: 24px;
    color: #8460de;
    margin-bottom: 20px;
  }
  .modal-content .popButton {
    padding: 10px 20px;
    font-size: 24px;
    background-color: #8460de;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .modal-content .popButton:hover {
    background-color: #8460de;
  }
  /* Position the button at the top-left corner */
  .howToPlayBtn {
    position: absolute;
    top: 25px;
    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: #793DAE;  
    /* color: #8460de;  */
    border: none;
    font-weight: bolder;
    background-color: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
   }
  
  /* Add a hover effect */
  .howToPlayBtn:hover {
    background-color: #c2b7b7; /* Slightly darker purple on hover */
  }
  .modal {
    display: none;
    position: fixed;
    z-index: 2; /* Ensure the modal is above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
  }
  
  /* Style the modal content */
  .modal-content {
    background-color: #ffffff; /* Use a white background for the modal content */
    font-family: "Poppins", sans-serif; /* Use the same font as the game */
    color: #000000; /* Set the text color to black */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); /* Add a subtle shadow */
    border-radius: 10px; /* Rounded corners */
  }
  
  
  .close {
    color: #8460de;
    float: right;
    font-size: 24px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  .modal-header {
    text-align: center;
    margin-bottom: 10px;
}

.modal-header img {
    max-width: 50%; /* Set the maximum width to 50% of the parent container */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Make the image a block-level element */
    margin: 0 auto; /* Center the image horizontally */
}
.modal-content iframe {
    margin-top: 20px; /* Added margin-top for the iframe */
}
.homeBtn {
    position: absolute;
    top: 145px; /* Adjust the top position as needed */
    left: 10px;
    z-index: 1;
  
  }
  
  /* Style the home button */
  .homeBtn button {
    font-family: "Poppins", sans-serif;
    background-color: #793DAE;  
    font-size: 16px; 
    border: none;
    font-weight: bolder;
    border-radius: 5px;
    padding: 15px 20px;
    cursor: pointer;
    /* box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); */
    transition: background-color 0.3s ease;
  }
 
  @media screen and (max-width: 480px) {
    #start-screen {
      display: flex;
      justify-content: center;
      align-items: center;
      top: 0;
      left: 0;
      width: 100%;
      height: 45%;
      background-color: rgb(255, 255, 255);
      z-index: 999;
      align-content: center;
      text-align: center;
      border: 2px dashed;
      border-radius: 20px;
    }
      
    .homeBtn {
      position: absolute;
      top: 90px; /* Adjust the top position as needed */
      left: 10px;
      z-index: 1;
    
    
    }
    #imgbtn {
      height: 50px;
      width: 50px;
    }

    #lives-left {
        position: absolute;
        top: -40px;
        padding-left: 37%;
        padding-right: 60%;
        font-size: 24px;
        align-items: center;
        width: max-content;
    }


    .btn-grid {
        display: grid;
        grid-template-columns: repeat(2, auto);
        gap: 15px; /* Increased gap */
        margin: 20px -25px;
    }
  }
  @media (max-width: 480px) {
    /* Styles for screens with a maximum width of 480px (smartphones) */
    .container {
      max-width: 85%;
      padding: 0.5rem;
    }
  
    .modal-content {
      width: 90%;
      margin: 40% auto;
    }
  
    .modal-content p {
      font-size: 16px;
    }
  
    .modal-header img {
      max-width: 50%;
    }
  
    .modal-content iframe {
      height: 200px;
      width: 350px;
    }
}
  
  

  