*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 10px;
}
body{
 font-size: 1.6rem;
 font-family: 'Roboto', sans-serif;
}
.wrapper{
  width: 100vw;
  user-select: none;
  background-color: beige;
}
.game-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 600px;
  height: 100vh;
  margin: 0 auto;
  gap: 20px;

  position: relative;
}
.game-title {
  color: darkred;
  text-transform: uppercase;
  letter-spacing: 1rem;
  text-align: center;
  font-size: 5rem;

}
.buttons__block{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;

}
.button {
  padding: 10px;
  border-radius: 5px;
  border: none;
  font-size: 2rem;

  color: white;
  background-color: #003380;
  cursor: pointer;
}
.button:active {
  background-color: darkred;
}

.counter__block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;

}

.sound {
  background-image: url('./svg/sound-on.svg');
  background-repeat: no-repeat;
  background-position: center;
  width: 32px;
  height: 32px;
}
.sound.off{
  background-image: url('./svg/sound-off.svg');
  background-repeat: no-repeat;
  background-position: center;
}
.moves,
.time {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 130px;
  gap: 5px;
}
.moves-text ,
.moves-counter,
.time-text{
 font-size: 1.8rem;
}
.moves-text,
.time-text{
  text-transform:uppercase ;
}
.time-counter span {
  font-size: 1.8rem;
}
.win-message {
  display: none;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 5%;
  z-index: 1;
  width: 90%;
  padding: 10px;
  border-radius: 10px;
  background: darkred;
  color: white;
  text-align: center;
}
.win-message.show {
  display: flex;
}
.results {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  /* background-color: rgba(0, 0, 0, 0.4); */
}
.results.show {
  display: flex;
}
.results__content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 50px;
  border-radius: 10px;
  width: 100%;
  height: 83%;
  background-color: #003380;
}
.results__cross {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background-image: url('./svg/burger-cross.svg');
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}
.results__titles {
  display: flex;
  justify-content: space-around;
  color: #f3f351;
  margin-bottom: 20px;
}
/* .scoreboard {
  display: flex;
  flex-direction: column;
  gap: 15px;

} */

.score-item {
  display: flex;
  justify-content: space-around;
  color: #f3f351;
  margin-bottom: 15px;
}
.score-item :last-child {
  margin-bottom: 0;
}
.game__field {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding-bottom: 100%;
  background-color: #f3f351;
}
.game__field.blocked {
  pointer-events: none;
  opacity: 0.6;
}
.game__field.win  {
  pointer-events: none;
  opacity: 0.6;
}

/*3 -33.33 4-25 5-20 6-16.7  7 -14.3 8- 12.5%*/
.game__field.frame3 .game-block {
  width: 33.333%;
  height: 33.333%;
  font-size: 5rem;
}

.game__field.frame5 .game-block {
  width: 20%;
  height: 20%;
}
.game__field.frame6 .game-block {
  width: 16.7%;
  height: 16.7%;
  font-size: 3.5rem;
}
.game__field.frame7 .game-block {
  width: 14.3%;
  height: 14.3%;
  font-size: 3rem;
}
.game__field.frame8 .game-block {
  width: 12.5%;
  height: 12.5%;
  font-size: 3rem;
}

.game-block {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 25%;
  font-size: 4rem;
  background-color: #003380;
  border: 1px solid darkgray;
  color: #f3f351;
  cursor: pointer;
  transition: transform 0.2s;
}


.frame-size{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-size: 1.8rem;
}
 
.size {
  display: inline-block;
  cursor: pointer;
}
.size:hover {
  transform: scale(1.2);
}


.other-sizes{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.sizes-text{

}
.sizes-choice{
 display: flex;
 gap: 10px;
}


/*MEDIA QUERIES*/
@media (max-width: 640px){
  .game-container{
    max-width: 95%;
  }
  .results__content {
    height: 80%;
  }
  .frame-size {
    font-size: 1.7rem;
  }
}
@media (max-width: 480px){
  .game-title {
    font-size: 4.5rem;
  }
  .results__content {
    height: 65%;
  }
  .button {
    font-size: 1.8rem;
  }
  .frame-size {
    font-size: 1.6rem;
  }
  .other-sizes {
    font-size: 1.5rem;
    gap: 10px;
  }
  .moves-text,
  .time-text{
   font-size: 1.6rem ;
  }
  .game__field.frame8 .game-block {
    font-size: 2.5rem;
  }
}
@media (max-width: 380px){
  .results__content {
    height: 55%;
  }
  .button {
    font-size: 1.7rem;
    padding: 5px;
  }
  .frame-size {
    font-size: 1.5rem;
  }
  .other-sizes {
    font-size: 1.4rem;
    gap: 5px;
  }
  .game__field.frame7 .game-block {
    font-size: 2.8rem;
  }
}
