*{
     box-sizing: border-box;
}

html{
     height: 100%;
     width: 100%;
}

body {
     padding: 0;
     padding-top: 100px;
     margin: 0;
     /* min-height: 100%; */
     /* height: 100%; */
     /* min-width: 100%; */
     /* width: 100%; */
     color: white;

     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
}

#background{
     background: linear-gradient(
     rgb(37, 106, 216),
     rgb(11, 176, 241)
     );
     z-index: -2;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
}

#container{
     margin: 0 auto;
     padding: 20px;
     display: flex;
     min-width: 544px;
     max-width: 644px;
}

#board{
     border: 2px solid rgb(19, 167, 159);
     min-width: 304px;
     max-width: 304px;
     min-height: 304px;
     max-height: 304px;
}

button {
     width: 100px;
     height: 100px;
     border: 1px solid rgb(19, 167, 159);
     margin: 0;
     padding: 0;
     outline: none;
     cursor: pointer;
     font-size: 38px;
     background-color: #efefef;
     color: black;
}

button:hover{
     background-color: #d6d6d6;
}




#console{
     border-left: 5px solid rgb(19, 167, 159);
     margin-left: 50px;
     padding: 10px 15px;
     display: flex;
     flex-direction: column;
     min-width: 150px;
     width: 30vw;
     max-width: 250px;
}

#div {
     font-size: 20px;
     border-bottom:3px solid rgb(19, 167, 159);
     text-align: center;
     width: 100%;
     padding-bottom: 8px;
}

#messages > span{
     display: block;
     padding: 8px 5px;
}

#messages > .win{
     color: rgb(120, 228, 58);
     font-weight: bolder;
     font-size: 18px;
}

#messages > .playAgain{
     font-size: 14px;
     width: 100%;
     cursor: pointer;
}

#messages > .error{
     color: rgb(255, 96, 96);
}

#difficulty{
     margin: 15px 0;
     width: 100%;
     text-align: center;
}

.setting{
     font-size: 18px;
     padding: 0 5px;
     cursor: pointer;
}

.setting:hover{
     color: wheat;
}

.back{
     display: block;
     margin: 5px auto;
     color: wheat;
     font-weight: 700;
     text-decoration: none;
     width: 300px;
     text-align: center;
}

.back:hover{
     color: white;
}

footer{
     position: absolute;
     bottom: 0;
     background-color: #bbb;
     color: #333;
     width: 100%;
     padding: 20px 10px;
}

footer > a{
     color: black;
     font-weight: bolder;
     text-decoration: none;
}

@media only screen and (max-width: 475px){
     #container{
          flex-direction: column;
          padding: 0;
          min-width: unset;
          width: 85%;
          max-width: unset;
          margin: 0 auto;
     }

     #board{
          margin: 20px auto;
     }

     #console{
          margin: 10px 0;
          padding: 0;
          height: 304px;
          width: 100%;
          max-width: unset;
          border: none;
          height: 100px;
          overflow-y: auto;
     }

     .back{
          position: absolute;
          top: 20px;
          width: 100%;
          text-align: center;
          margin: 5px;
     }

     footer{
          font-size: 14px;
          padding: 5px;
     }
}

@media only screen and (max-width: 370px){

     body{
          padding-top: 30px;
     }

     #container{
          width: 95%;
     }

     #board{
          min-width: 184px;
          max-width: 184px;
          min-height: 184px;
          max-height: 184px;
     }

     #board > button {
          width: 60px;
          height: 60px;
     }

     .back{
          top: 10px;
     }

     footer{
          font-size: 10px;
     }
}