*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
  
html, body{
    height: 100%;
}


body{
    font-family: serif;
}

main{
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(to right, #34e89e, #0f3443);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.game-quiz-container{
    width: 90%;
    height: 96rem;
    background-image: linear-gradient(to right, rgba(54, 209, 220, 0.4), rgba(91, 134, 229, 0.3));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    border-radius: 30px;
    border: 6px solid white;
}

.game-details-container{
    width: 80%;
    height: 4rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.game-details-container h1{
    font-size: 2rem;
    font-family: 'Courier New', Courier, monospace;
    color:rgb(81, 26, 231);
}

.game-question-container{
    width: 80%;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    position: relative;
}

.game-question-container h1{
    font-size: 4.5rem;
    text-align: center;
    padding: 3px;
    color: rgb(250, 198, 86);
    font-weight: bold;
}

.game-question-container h1:after {
    position: absolute;
    content: '';
    bottom: -8px;
    left: 0px;
    height: 2px;
    width: 0%;
    background-color: rgb(0, 255, 234);
    animation: underline 2s ease-in-out 2s infinite; /* remove infinite if you want only once */
  }
  @keyframes underline {
    to {
      width: 100%;
    }
}

.game-options-container{
    width: 100%;
    height: 25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
}

.game-options-container span{
    width: 100%;
    height: 8rem;
    margin: 1px;
    background: rgb(32, 216, 216);
    overflow: hidden;
    text-align: center;
}

span label{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    font-size: 2.4rem;
    font-family: Tahoma, sans-serif;
    font-weight: 400;
    color: rgb(255, 255, 255);
    background: linear-gradient(to left, rgb(32, 216, 216) 50%, lightblue 50%) right;
    background-size: 200%;
    transition: .5s ease-out;
}

span label:hover{
    color: rgb(11, 68, 78);
    background-position: left;
}

input[type="radio"] {
    position: relative;
    display: none;
}


input[type=radio]:checked ~ .option {
	background: paleturquoise;
    color: rgb(11, 68, 78);
}

.next-button-container{
    width: 50%;
    height: 3rem;
    display: flex;
    justify-content: center;
}
.next-button-container button{
    width: 10rem;
    height: 5rem;
    background-color: rgb(81, 26, 231);
    font-family: Arial, Helvetica, sans-serif;
    color:rgb(255, 255, 255);
    font-size: 1.7rem;
    font-weight: 600;
    border: 2px solid rgb(255, 255, 255);
    border-radius: 10px;
    cursor: pointer;
    outline: none;
}
.next-button-container button:hover{
    border-radius: 10px;
}

.modal-container{
    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); 
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    -webkit-animation: fadeIn 1.2s ease-in-out;
    animation: fadeIn 1.2s ease-in-out;
}

.modal-content-container{
    height: 70rem;
    width: 60rem;
    background-color: rgb(43, 42, 42);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    border-radius: 25px;
}

.modal-content-container h1{
    font-size: 3rem;
    height: 8rem;
    color: lightgray;
    text-align: center;
}

.grade-details{
    width: 35rem;
    height: 22rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.grade-details p{
    font-size: 1.8rem;
    color: white;
    text-align: center;
}

.modal-button-container{
    height: 6rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-button-container button{
    width: 20rem;
    height: 6rem;
    background: none;
    outline: none;
    border: 1px solid rgb(252, 242, 241);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    border-radius: 20px;
}
.modal-button-container button:hover{
    background-color: rgb(83, 82, 82);
}

@media(min-width : 300px) and (max-width : 350px){
    .game-quiz-container{
        width: 90%;
        height: 80vh;
     }
     .game-details-container h1{
        font-size: 0.8rem;
     }
 
     .game-question-container{
        height: 6rem;
     }
     .game-question-container h1{
       font-size: 0.9rem;
    }
 
    .game-options-container span{
        width: 90%;
        height: 2.5rem;
    }
    .game-options-container span label{
        font-size: 0.8rem;
    }
    .modal-content-container{
        width: 90%;
        height: 25rem;
    }
    
    .modal-content-container h1{
        font-size: 1.2rem;
    }
}

@media(min-width : 350px) and (max-width : 700px){
   .game-quiz-container{
       width: 90%;
       height: 80vh;
    }
    .game-details-container h1{
        font-size: 1rem;
    }

    .game-question-container{
        height: 8rem;
    }

    .game-question-container h1{
        font-size: 0.9rem;
     }

    .game-options-container span{
        width: 90%;
    }
    .modal-content-container{
        width: 90%;
        height: 25rem;
    }
    .modal-content-container h1{
        font-size: 1.2rem;
    }
}



@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity:1 ;}
  }

  @-webkit-keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
  }