@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
}

/* Modal styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
    padding-top: 60px;
  }
  
  .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
  }
  
  .close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close-button:hover,
  .close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px; /* Maximum width of the popup */
    border-radius: 10px;
    text-align: left;
}

.modal-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: left;
}

/* #modalQuestions{
    text-align: left;
}
#modalOptions{
    color: #FFF1E1;
} */

/* .modal-content ul {
    list-style-type: disc; 
    padding-left: 20px; 
  }
  
  .modal-content li {
    margin-bottom: 10px; 
  }
   */

   /* Remove bullets from unordered lists */
ul {
  list-style-type: none; /* Removes the bullets */
  padding-left: 0; /* Removes the padding */
  margin: 0; /* Removes the margin */
}

/* Further styling for list items if needed */
ul li {
  margin-bottom: 10px; /* Adds space between list items */
}

  .modal-content button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    text-align: left; /* Align text to the left */
    background-color: #ffeeda;
    border: none;
  }

  .modal-content button:hover{
    background-color: #f8c080;
  }

.modal-footer {
    text-align: right;
    margin-top: 15px;
}

.modal-footer button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.modal-footer button:hover {
    background-color: #45a049;
}


.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: #FFF1E1;
    opacity: 90%;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    width: 600px; /* Set a max-width to prevent it from being too large on wide screens */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
   
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

canvas {
    border: 1px solid #ffffff;
    background-color: #fff;
    width: 100%;
    max-width: 500px; /* Adjust based on the preferred size for the game canvas */
    height: auto;
    border-radius: 5px;
}
h1{
    font-size: 28PX;
}

#question-box, #final-score-box, #restart-container{
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
    display: block; /* Ensure it's displayed */
    padding: 10px;
    border-radius: 5px;
}

#score-box {
    font-size: 20px;
    color: green;
    margin: 10px;
    margin-left: -60%;
    font-weight: bold;
    /* margin-top: 6%; */
}

#timer-box {
    font-size: 20px;
    color: red;
    margin: 10px;
    margin-left: 50%;
    margin-top: -8%; 
    font-weight: bold;    
  }
  

.button {
    padding: 10px 20px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
}

.button:hover {
    /* background-color: #45a049; */
    transform: scale(1.05);
}

.controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.direction-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.horizontal-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}


/* Styles to remove the outer boxes of the arrow buttons */
.direction-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.direction-button:hover {
    transform: scale(1.1);
}

.direction-button img {
    width: 50px;
    height: 50px;
}

.button img {
    width: 100%; /* Adjust size as needed */
    height: auto; /* Maintain aspect ratio */
    cursor: pointer; /* Change cursor to pointer on hover */
}

.btn img {
    width: 45px; /* Adjust size as needed */
    height: auto; /* Maintain aspect ratio */
    cursor: pointer; /* Change cursor to pointer on hover */
}

/* Position the button to the left */
#start-container, #restart-container {
    display: flex;
    justify-content: flex-start; /* Align to the left */
    align-items: center; /* Vertically center */
    padding-right: 300px; /* Optional: Add some padding from the left edge */
}
#start-button, #restart-button {
    position: relative;
    top: 135px; /* Adjust this value to move the button down */
}

/* Example of hiding the default text */
.button {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    .button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .direction-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .horizontal-buttons {
        flex-direction: row;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 5px;
    }

    .button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .direction-button img {
        width: 45px;
        height: 45px;
    }
    #start-button, #restart-button {
      position: relative;
      top: 130px; /* Adjust this value to move the button down */
  }
   .howToPlayBtn img{
    width: 50%;
    height: auto;
    margin-bottom: -135px;
   }
   #score-box {
    font-size: 20px;
    color: green;
    margin: 10px;
    margin-left: -60%;
    font-weight: bold;
    /* margin-top: 6%; */
    margin-bottom: -8px;
}
}

.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;
    overflow: hidden;
    text-align: left;
  }
  
  @keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
  }
  .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: none;
    width: 350px;
    text-align: left;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
  }
  .modal-content p {
    font-size: 24px;
    color: #000000;
    margin-bottom: 20px;
  }
  .modal-content .popButton {
    padding: 10px 20px;
    font-size: 24px;
    background-color: #8460de;
    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; 
    font-size: 26px;
     background-color: #793DAE;  
    color: #8460de;
    border: none;
    font-weight: bolder;
    
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); 
    transition: background-color 0.3s ease; 
  } */
  .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: transparent;  
    /* color: #8460de;  */
    border: none;
    font-weight: bolder;
    background-color: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    /* box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2);  */
    /* transition: background-color 0.3s ease; */
  }
  
  /* Add a hover effect */
  /* .howToPlayBtn:hover {
    background-color: #c2b7b7; 
  } */
  
  .close {
    font-family: "Poppins", sans-serif;
    color: #000000;
    float: right;
    font-size: 24px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    font-family: "Poppins", sans-serif;
    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: transparent;  
    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;
  }

  .rules{
    text-align: left;
    font-weight: bold;
    font-size: 17px;
    line-height: 1.5;
  }
  
  /* Add a hover effect */
  /* .homeBtn button:hover {
    background-color: #c2b7b7;
  } */