.mg_content_box {
  padding: 32px;
  border-radius: 4px;
  background: #FFF;
  box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.05);
}

.mg_content {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid #F2F3F5;
}

.mg_title {
  font-size: 24px;
  font-weight: 600;
  line-height: 130%;
  margin-bottom: 20px;
}

.mg_info {
  font-size: 14px;
  font-weight: 500;
  line-height: 150%;
  margin-bottom: 24px;
}

.mg_pdf_title {
  font-size: 16px;
  font-weight: 600;
  line-height: 130%;
  margin-bottom: 8px;
}
.mg_pdf_link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  line-height: 130%;
  color: #2b2b2b;
}
.mg_pdf_link img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mg_pdf_link_left {
  display: flex;
  align-items: center;
  gap: 4px;
}

@media only screen and (max-width: 767px) {
  .matching_game .act-title h2 {
    margin: 0;
  }

  .mg_content_box {
    padding: 16px 12px 28px 12px;
    border: 0.5px solid #F2F3F5;
    box-shadow: 0 0 4.276px 0 rgba(0, 0, 0, 0.05);
  }

  .mg_content {
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .mg_title {
    font-size: 14px;
    margin-bottom: 8px;
  }
  .mg_info {
    margin-bottom: 16px;
  }
  .mg_pdf_title {
    font-size: 14px;
    margin-bottom: 8px;
  }
  .mg_pdf_link {
    font-size: 12px;
  }
}
/* game style */
.act_game_header {
  text-align: center;
}
.mg_game_title {
  font-size: 24px;
  line-height: 130%;
  font-weight: 600;
  margin-bottom: 20px;
}
.mg_game_score {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.act_title_game {
  font-size: 16px;
  line-height: 130%;
  font-weight: 500;
  margin-right: 7px;
}
.star-rating {
  display: flex;
  justify-content: center;
}

.star-rating li {
  margin: 0 5px;
  width: 16px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.star-rating li.star-empty {
  background-image: url('https://cdn.aosomcdn.com/upload/tem/new_ui/images/star_icon.svg');
}

.star-rating li.star-full {
  background-image: url('https://cdn.aosomcdn.com/upload/tem/new_ui/images/star_full.svg');
}

.act_game_moves {
  font-size: 16px;
  font-weight: 500;
  line-height: 130%;
  margin-bottom: 8px;
}

.timer-container {
  font-size: 16px;
  font-weight: 500;
  line-height: 130%;
  margin-bottom: 20px;
}

.act_game_header {
  position: relative;
  max-width: 1200px;
  margin: auto;
}

.act_game_images {
  display: none;
  text-align: center;
}

.act_game_images img {
  width: 100px;
  height: 100px;
  margin-right: 10px;
}

.act_game_footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.act_game_footer .reset-btn {
  height: 48px;
  padding: 11px 48px;
  font-size: 16px;
  font-weight: 600;
  line-height: 130%;
  text-transform: capitalize;
  border-radius: 4px;
  color: #fff;
  background-color: #2b2b2b;
  min-width: 200px;
}

.deck_box {
  padding: 20px 20px 0;
  background-color: #F2F3F5;
  display: flex;
  max-width: 900px;
  margin: auto;
  border-radius: 8px;
}

.deck {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.deck li {
  width: 23.2558%;
  margin-bottom: 20px;
  background: #E7EBEF;
  border-radius: 12px;
  overflow: hidden;
  transform: rotateY(180deg);
}

.deck li span {
  display: block;
  height: 0;
  padding-bottom: 100%;
}

.star_rating_box .icon-star:before {
  content: "\e641";
}

.deck img {
  visibility: hidden;
  width: 100%;
  max-width: 100%;
  display: block;
}

.deck .card.flip {
  cursor: default;
  transform: rotateY(360deg);
  transition: transform 0.3s linear;
  pointer-events: none;
}

.flip img {
  visibility: visible;
}

.deck .card.match {
  visibility: visible;
  cursor: default;
  animation: pulse 1s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  80% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 99;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  margin: 0 auto;
  width: 790px;
  border-radius: 4px;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  padding-bottom: 12px;
}

.modal-content h2 {
  font-size: 32px;
  line-height: 130%;
  margin: 32px 0 20px;
}

.modal-info {
  font-size: 20px;
  margin: 0;
  color: #606060;
  text-align: center;
}

/* The Close Button */
.close {
  color: #2b2b2b;
  font-size: 40px;
  position: absolute;
  top: 5px;
  right: 15px;
}

.close:hover,
.close:focus {
  text-decoration: none;
  cursor: pointer;
}

/* Modal Image*/
#modal .modal-img {
  display: inline-block;
  margin: 20px 0;
  width: 145px;
}

p.stats {
  font-size: 20px;
  color: #2b2b2b;
  margin: 0 0 12px;
  text-align: center;
}

p.stats:last-child {
  margin-bottom: 20px;
}

.play-again-btn {
  background: #2b2b2b;
  margin-bottom: 20px;
  font-size: 20px;
  color: #fff;
  padding: 0 85px;
  height: 48px;
  line-height: 48px;
  border: 0 none;
  outline: 0 none;
  border-radius: 4px;
}

@media only screen and (max-width: 1000px) {
  .modal-content {
    width: 590px;
  }
}

@media only screen and (max-width: 767px) {
  .act_title_game {
    font-size: 14px;
    margin-right: 4px;
  }

  .mg_game_title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .mg_game_score {
    margin-bottom: 4px;
  }

  .star-rating li {
    width: 12px;
    height: 12px;
    margin: 0 4px;
  }

  .act_game_moves {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .timer-container {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .act_game_footer {
    margin-top: 16px;
  }
  .act_game_footer .reset-btn {
    min-width: 160px;
  }

  .deck_box {
    padding: 8px 8px 0;
    border-radius: 4px;
  }

  .deck li {
    width: 31.6173%;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .modal-content h2 {
    font-size: 22px;
    margin: 32px 0 8px;
  }

  .modal-content {
    width: 300px;
    padding-bottom: 8px;
  }

  .close {
    font-size: 30px;
    top: 5px;
    right: 10px;
  }

  .modal-info {
    font-size: 14px;
    margin: 0 12px;
  }

  #modal .modal-img {
    width: 80px;
    margin: 12px 0;
  }

  .play-again-btn {
    font-size: 16px;
    padding: 0 60px;
    margin-bottom: 12px;
  }

  p.stats {
    font-size: 14px;
    margin: 0 12px 4px;
  }
  p.stats:last-child {
    margin-bottom: 12px;
  }
}

@media only screen and (max-width: 361px) {
  .timer-container {
    text-align: left;
  }
}