*{
  box-sizing: border-box;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 900;
  color: gray;
}

.hidden {
  opacity: 0;
}

body{
  margin: 0.5% 1%;
  display: flex;
  flex-direction: column;
}

header{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  margin: 0% 1%;
}

main{
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  transition: all 0.7s ease-in-out;
  margin: 0 1%;
}

h1{
  text-align: center;
  font-size: 4.5rem;
  margin: 0.2% 1%;
  transition: all 0.7s ease-in-out;
}

.header-div {
  transition: all 0.7s ease-in-out;
}
.message{
  font-size: 3rem;
  margin: 1% 0 1% 0;
}

.initializing {
  animation: fade 0.6s linear 0.2s 3 alternate
}

@keyframes fade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.player-1-text, .player-2-text {
  font-size: 2.5rem;
}

.aside-divs {
  position: absolute;
  width: 100%;
}

.active-player {
  animation: pulse-player 0.6s linear infinite alternate;
}

@keyframes pulse-player {
  0% {
    font-size: 2.5rem;
  }
  100% {
    font-size: 3rem;
  }
}

.boxes{
  display: flex;
  flex-wrap: wrap;
  height: 560px;
  width: 560px;
}

.box{
  height: 30%;
  width: 30%;
  margin: auto;
  border: dotted 1px black;
  border-radius: 10%;
  cursor: pointer;
  transition: all 0.2s ease-in;
}

.player1{
  background-color: gray;
}

.player2{
  background-color: lightgray;
}

.box:hover{
  box-shadow: 5px 5px 4px  rgba(0, 0, 0, 0.15);
}

.win-box{
  animation: pulse-shadow 0.6s linear infinite alternate;
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0px 0px 0px  rgba(0, 0, 0, 0.15);
  }
  100% {
    box-shadow: 6px 6px 5px  rgba(0, 0, 0, 0.60); 
  }
}

aside{
  font-size: 2rem;
  text-align: center;
  position: relative;
  width: 16%
}

.p1score, .p2score{
  font-size: 7rem;
}

.active-score {
  animation: pulse-score 0.6s linear infinite alternate;
}

@keyframes pulse-score {
  0% {
    font-size: 7rem;
  }
  100% {
    font-size: 9rem;
  }
}

/* Button animation */
button {
  border-radius: 40px;
  padding: 1% 2%;
  overflow: hidden;
  transition: all 1.2s, border 0.5s 1s, box-shadow 0.3s 1s;
  white-space: nowrap;
  font-size: 1.5rem;
  margin: 0 auto;
  cursor: pointer; 

  text-indent: 34%;
  background: #AED6D1;
  color: #55706D;
  width: 15%;
  border: 5px solid transparent;
}

button span {
  display: inline-block;
  font-size: 1.8rem;
  color: yellow;
  opacity: 0;
}

button:focus{
  outline: none;
}

.activate-btn {
  text-indent: 0;
  background: #55706D;
  color: yellow;
  width: 18%;
  border: 5px solid #8DCCC4;
  box-shadow: 3px 3px 2px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

.activate-btn-span {
  opacity: 1;
}

@media screen and (max-width: 991px) {
    
  h1 {
    font-size: 4rem;
  }

  .boxes {
    display: flex;
    flex-wrap: wrap;
    height: 400px;
    width: 400px;
  }

  .player-1-text, .player-2-text {
    font-size: 2.5rem;
  }

  @keyframes pulse-player {
    0% {
      font-size: 2.2rem;
    }
    100% {
      font-size: 2.8rem;
    }
  }

  .p1score, .p2score{
    font-size: 5rem;
  }

  @keyframes pulse-score {
    0% {
      font-size: 5rem;
    }
    100% {
      font-size: 8rem;
    }
  }

  .message{
    font-size: 2.5rem;
  }

  button {
    border-radius: 40px;
    padding: 1% 2%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 1.8rem;
    margin: 0 auto;
    cursor: pointer; 
  
    text-indent: 34%;
    background: #AED6D1;
    color: yellow;
    width: 22%;
    border: 5px solid transparent;
    text-indent: 0;
  }
  
  button span {
    display: inline-block;
    font-size: 1.8rem;
    color: yellow;
    opacity: 1;
  }

  .activate-btn {
    background: #AED6D1;;
    color: yellow;
    width: 22%;
    border: 5px solid #AED6D1;
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.15);
    opacity: 1;
  }
  
  .activate-btn-span {
    opacity: 1;
  }

}

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

  h1 {
    font-size: 3.5rem;
  }

  .boxes {
    display: flex;
    flex-wrap: wrap;
    height: 350px;
    width: 350px;
  }

  .player-1-text, .player-2-text {
    font-size: 1.5rem;
  }

  @keyframes pulse-player {
    0% {
      font-size: 1.5rem;
    }
    100% {
      font-size: 2.1rem;
    }
  }

  .p1score, .p2score{
    font-size: 3.5rem;
  }

  @keyframes pulse-score {
    0% {
      font-size: 3.5rem;
    }
    100% {
      font-size: 5.5rem;
    }
  }

  .message{
    font-size: 2rem;
  }

  button {
    border-radius: 40px;
    padding: 1% 2%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.8rem;
    margin: 0 auto;
    cursor: pointer; 
  
    text-indent: 34%;
    background: #AED6D1;
    color: yellow;
    width: 22%;
    border: 5px solid transparent;
    text-indent: 0;
  }
  
  button span {
    display: inline-block;
    font-size: 0.8rem;
    color: yellow;
    opacity: 1;
  }

  .activate-btn {
    background: #AED6D1;;
    color: yellow;
    width: 22%;
    border: 5px solid #AED6D1;
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.15);
    opacity: 1;
  }
  
  .activate-btn-span {
    opacity: 1;
  }

}

@media screen and (max-width: 599px) {
  
  h1 {
    font-size: 3.25rem;
  }
  
  .boxes {
    display: flex;
    flex-wrap: wrap;
    height: 300px;
    width: 300px;
  }

  .player-1-text, .player-2-text {
    font-size: 1.5rem;
  }

  @keyframes pulse-player {
    0% {
      font-size: 1.5rem;
    }
    100% {
      font-size: 1.8rem;
    }
  }

  .p1score, .p2score{
    font-size: 3.25rem;
  }

  @keyframes pulse-score {
    0% {
      font-size: 3.25rem;
    }
    100% {
      font-size: 5rem;
    }
  }

  .message{
    font-size: 1.75rem;
  }

  button {
    border-radius: 40px;
    padding: 1% 2%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.8rem;
    margin: 0 auto;
    cursor: pointer; 
  
    text-indent: 34%;
    background: #AED6D1;
    color: yellow;
    width: 22%;
    border: 5px solid transparent;
    text-indent: 0;
  }
  
  button span {
    display: inline-block;
    font-size: 0.8rem;
    color: yellow;
    opacity: 1;
  }

  .activate-btn {
    background: #AED6D1;;
    color: yellow;
    width: 22%;
    border: 5px solid #AED6D1;
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.15);
    opacity: 1;
  }
  
  .activate-btn-span {
    opacity: 1;
  }

}

@media screen and (max-width: 460px) {
  
  h1 {
    font-size: 3rem;
  }
  
  .boxes {
    display: flex;
    flex-wrap: wrap;
    height: 200px;
    width: 200px;
  }

  .player-1-text, .player-2-text {
    font-size: 1rem;
  }

  @keyframes pulse-player {
    0% {
      font-size: 1rem;
    }
    100% {
      font-size: 1.2rem;
    }
  }

  .p1score, .p2score{
    font-size: 3rem;
  }

  @keyframes pulse-score {
    0% {
      font-size: 3rem;
    }
    100% {
      font-size: 4.5rem;
    }
  }

  .message{
    font-size: 1.5rem;
  }

  button {
    border-radius: 40px;
    padding: 1% 2%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.8rem;
    margin: 0 auto;
    cursor: pointer; 
  
    text-indent: 34%;
    background: #AED6D1;
    color: yellow;
    width: 22%;
    border: 5px solid transparent;
    text-indent: 0;
  }
  
  button span {
    display: inline-block;
    font-size: 0.8rem;
    color: yellow;
    opacity: 1;
  }

  .activate-btn {
    background: #AED6D1;;
    color: yellow;
    width: 22%;
    border: 5px solid #AED6D1;
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.15);
    opacity: 1;
  }
  
  .activate-btn-span {
    opacity: 1;
  }

}
