@font-face {
  font-family: SansRegular;
  src: url('PTSans-Regular.ttf');
  font-style: normal
}

@font-face {
  font-family: SansBold;
  src: url('PTSans-Bold.ttf');
  font-style: normal
}

* {
  margin: 0;
  padding: 0;
  font-family: 'SansRegular';
  font-size: 16px;
  line-height: 20px;
}

body {
  margin: 20px auto;
  max-width: 1200px;
}


b,
strong,
h1,
h2 {
  font-family: 'SansBold';
  color: #2086c6;
}

h1,
h2 {
  font-size: 30px;
  line-height: normal;
  margin-bottom: 10px;
  color: #f58200;
}

h1 {
  font-size: 35px;
  text-align: center;
  margin-bottom: 30px;
}

li {
  margin-top: 10px;
}

li li {
  margin-top: 5px;
}



li ul {
  margin-left: 5%;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

}

.game-wrapper {
  max-width: clamp(500px, 50%, 650px);
  width: 50%;
  border-radius: 5px;
  box-shadow: 0px 0px 8px 4px #ddd;
  display: flex;
  flex-direction: column;
  padding: clamp(10px, 2%, 20px);
}

.game-rules {
  width: 40%;
  margin-left: 5%;
}

.game-controls {
  max-width: 330px;
  margin: auto;
  text-align: center;
}

.game-controls span {
  padding: 5px 15px;
  display: inline-block;
  margin-bottom: 15px;
}

#reset {
  background: green;
  border-radius: 20px;
  color: white;
  cursor: pointer;
}

#container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  position: relative;
}


#container.shuffle-cards:before {
  content: '';
  background: #555;
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
  opacity: 0.7;
}

#container.shuffle-cards:after {
  content: '';
  animation: spinner-loader 1500ms infinite linear;
  border-radius: 0.5em;
  box-shadow: rgba(255, 255, 255, 1)1.5em 0 0 0,
    rgba(255, 255, 255, 1)1.1em 1.1em 0 0,
    rgba(255, 255, 255, 1)0 1.5em 0 0,
    rgba(255, 255, 255, 1)-1.1em 1.1em 0 0,
    rgba(255, 255, 255, 1)-1.5em 0 0 0,
    rgba(255, 255, 255, 1)-1.1em -1.1em 0 0,
    rgba(255, 255, 255, 1)0 -1.5em 0 0,
    rgba(255, 255, 255, 1)1.1em -1.1em 0 0;
  display: inline-block;
  width: 1em;
  height: 1em;
  position: absolute;
  top: 48%;
  left: 49%;
  transform: translate(-50%, -50%);
}

@keyframes spinner-loader {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#rating i,
#final-rating i,
#final-rating[class="3-Stars"] i {
  color: #2086c6;
}

#rating[class="2-Stars"] i:last-child,
#final-rating[class="2-Stars"] i:last-child {
  color: grey;
}

#rating[class="1-Star"] i:nth-child(2),
#rating[class="1-Star"] i:nth-child(3),
#final-rating[class="1-Star"] i:nth-child(2),
#final-rating[class="1-Star"] i:nth-child(3) {
  color: grey;
}

.item {
  width: calc(92%/4);
  list-style: none;
  height: 105px;
  background: #777;
  margin: 1% 0;
  font-size: 0 !important;
  border-radius: 5px;
  box-shadow: 0px 0px 8px 4px #ddd;
  display: flex !important;
  transition: all 0.5s ease;
  cursor: pointer;
}

.item.active {
  transform: rotateY(180deg);
  background: #f58200;
  pointer-events: none;
}

.item.selected:before,
.item.notsame:before,
.item.active:before {
  font-size: 25px !important;
  color: #fff;
  margin: auto;
}

.item.selected {
  background: green;
  pointer-events: none;
}

.item.notsame {
  transform: rotateY(180deg);
  background: red;
  pointer-events: none;
}

#sucess-card {
  display: none;
  margin: auto;
  pointer-events: none;
}

footer {
  margin: 30px auto 0;
  text-align: center;
}

@media screen and (max-width:768px) {
  .wrapper {
    flex-direction: column;
  }

  .game-wrapper,
  .game-rules {
    margin: auto auto 30px;
    width: clamp(80%, 80%, 650px);
  }

  .item {
    height: 70px;
  }
}