@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap');

*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body{
    font-family: 'Lato', sans-serif;
    background: #FC466B;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #3F5EFB, #FC466B);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #3F5EFB, #FC466B); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    color: #fafafa;
}

.container{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    bottom: 25px;
}


header{
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 0 0 0;
    position: relative;
    margin-bottom: 100px;
}

header h1{
    margin-right: 25px;
    letter-spacing: .8px;
}

header h1 a{
  text-decoration: none;
  color: #fafafa;
}

.boardIcon{
    display: flex;
    flex-direction: column;
    border: 3px solid #111;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 25px;
}

.top, .bottom{
    display: flex;
}

.whitee, .blackk{
    width: 12px;
    height: 12px;
}

.whitee{
    background-color: #fafafa;
}

.blackk{
    background-color: #111;
}

.options{
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    background-color: #1e1e1e;
    width: 100%;
    height: 100px;
    top: 0;
    left: -100%;
    transition: .4s;
}

.color{
    margin: 0 25px;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
}

.c1{
    background: #FC466B;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #3F5EFB, #FC466B);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #3F5EFB, #FC466B); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    border: 2px solid #fafafa;
}

.c2{
    background: #36D1DC;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #5B86E5, #36D1DC);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #5B86E5, #36D1DC); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

.c3{
    background: #159957;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #155799, #159957);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #155799, #159957); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

}

.c4{
    background: #FF512F;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #F09819, #FF512F);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #F09819, #FF512F); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

}

.options .fa-xmark{
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translate(0,-50%);
    font-size: 30px;
    cursor: pointer;
    transition: .4s;
}

.fa-xmark:hover{
    color: #ed472a;
}

.options p{
    position: absolute;
    bottom: 8px;
    font-size: 12px;
    color: #a8a8a8;
    word-spacing: 5px;
    letter-spacing: 1.2px;
}

.chessBoard{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 850px;
    height: 850px;
  }
  
  .y{
    display: flex;
  }
  
  .white, .black{
    width: 90px;
    height: 90px;
    display: flex;
    align-items: flex-end;
    padding: 4px;
    position: relative;
    cursor: pointer;
  }
  
  .black{
   background: #111; 
  }
  
  .white{
    background: none;
  }
  
  span{
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 18px;
  }

  .d{
    font-size: 18px;
  }

  section{
    font-size: 60px;
    margin-bottom: 20px;
  }

  .results{
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 25px 0;
    font-size: 20px;
  }

  .results article{
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .results article i{
    margin-right: 10px;
  }

  .time{
    font-size: 20px;
    margin-top: 25px;
    width: 80%;
    display: flex;
    justify-content: space-between;
  }

  .time article{
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .time article i{
    margin-right: 10px;
  }

  .time .start{
    color: #d6d6d6e0;
  }

  .resultPage{
    position: absolute;
    left: 50%;
    top: -50%;
    transform: translate(-50%,-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background-color: #1f1f1f;
    width: 500px;
    height: 250px;
    border-radius: 8px;
    font-size: 24px;
    transition: .8s;
    box-shadow: 6px 6px 200px #575858;
  }

  .resultPage h2{
    font-size: 30px;
  }

  .resultCont{
    position: relative;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 500px;
  }

  .resultCont div{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 65px;
  }

  #closeResult{
    position: absolute;
    top: -100px;
    right: 25px;
    font-size: 20px;
    cursor: pointer;
    transition: .4s;
  }


@media only screen and (max-width: 600px) {
    .color{
        margin: 0 15px;
    }
}

@media only screen and (max-height: 1070px) {
  .container{
    position: relative;
    bottom: 50px;
  }

  .white, .black{
    width: 80px;
    height: 80px;
  }

  .chessBoard{
    width: 800px;
    height: 800px;
  }

  #notation{
    position: relative;
    top: 40px;
    font-size: 50px;
  }
}

@media only screen and (max-height: 950px) {
  .container{
    position: relative;
    bottom: 110px;
  }

  .white, .black{
    width: 75px;
    height: 75px;
  }

  .chessBoard{
    width: 750px;
    height: 750px;
  }

  #notation{
    position: relative;
    top: 40px;
    font-size: 45px;
  }
}

@media only screen and (max-width: 750px) and (max-height: 950px) {
  .container{
    position: relative;
    bottom: 20px;
  }


  #notation{
    position: relative;
    top: 40px;
    font-size: 45px;
  }
}

@media only screen and (max-width: 1440px) {
  .white, .black{
      width: 80px;
      height: 80px;
    }

    .chessBoard{
      width: 800px;
      height: 800px;
    }
}


  @media only screen and (max-width: 1000px) {
    .white, .black{
        width: 75px;
        height: 75px;
      }

      .chessBoard{
        width: 750px;
        height: 750px;
      }

      span{
        font-size: 15px;
      }
    
      .d{
        font-size: 15px;
      }
  }

  @media only screen and (max-width: 950px) {
    .white, .black{
        width: 55px;
        height: 55px;
      }

      .chessBoard{
        width: 550px;
        height: 550px;
      }

      span{

        font-size: 10px;
      }
    
      .d{
        font-size: 10px;
      }

      section{
        font-size: 45px;
      }

      .resultPage{
        width: 350px;
        height: 200px;
        font-size: 20px;
      }

      .resultCont{
        width: 420px;
      }

      .resultCont div{
        height: 55px;
      }

      .resultPage h2{
        font-size: 26px;
      }

      #closeResult{
        position: absolute;
        top: -80px;
        right: 55px;
        font-size: 20px;
        cursor: pointer;
        transition: .4s;
      }

      #notation{
        position: relative;
        top: 20px;
        font-size: 40px;
      }
  }

  @media only screen and (max-width: 550px) {
    .white, .black{
      width: 40px;
      height: 40px;
    }

    .chessBoard{
      width: 400px;
      height: 400px;
    }

  }

  @media only screen and (min-width: 950px) and (max-height: 895px) {
    .container{
      position: relative;
      bottom: 100px;
    }
  
  
    #notation{
      position: relative;
      top: 40px;
      font-size: 45px;
    }

    .white, .black{
      width: 60px;
      height: 60px;
    }

    .chessBoard{
      width: 600px;
      height: 600px;
    }
  }



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

    #notation{
      position: relative;
      bottom: 60px;
      font-size: 30px;
    }


    .white, .black{
      width: 30px;
      height: 30px;
    }

    .chessBoard{
      width: 300px;
      height: 300px;
    }

    article p{
      font-size: 14px;
    }

    header h1{
      font-size: 25px;
    }

    .container{
      position: relative;
      bottom: 60px;
    }

    .resultPage{
      width: 250px;
      height: 150px;
      font-size: 16px;
    }

    .resultCont{
      width: 320px;
    }

    .resultCont div{
      height: 45px;
    }

    .resultPage h2{
      font-size: 22px;
    }

    #closeResult{
      position: absolute;
      top: -60px;
      right: 60px;
      font-size: 20px;
      cursor: pointer;
      transition: .4s;
    }
  }