html {
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: #ffffff url("../images/BG-2.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  font-family: sans-serif;
  overflow: hidden;
  font-family: Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -ms-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-transform: none;
  transform: none;
}

html {
  overscroll-behavior: none;
  overflow: hidden;
  -ms-scroll-chaining: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
}

.container {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 20px;
}

h1 {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
}

.moves {
  margin-left: 10px;
}

.deck {
  width: 680px;
  min-height: 700px;
  background: #9648c5;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  align-items: center;
  margin: 0 0 3em;
}

.deck .card {
  height: 125px;
  width: 125px;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.6s ease, background-color 0.2s ease;
  transition: transform 0.6s ease, background-color 0.2s ease,
    -webkit-transform 0.6s ease, -moz-transform 0.6s ease,
    -o-transform 0.6s ease;
  background: transparent;
}

.deck .card:focus {
  outline: none;
}

body.tv-device .deck .card:focus {
  outline: 4px solid #f8a33e;
  background-color: rgba(255, 215, 0, 0.2);
}

.deck .card .card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  border-radius: 12px;
}

.deck .card .front {
  background: url("../images/Group 57.png");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: #9648c5;
}

.deck .card .back {
  transform: rotateY(180deg);
}

.deck .card.open,
.deck .card.match {
  transform: rotateY(180deg);
}

.deck .card.match {
  pointer-events: none;
  cursor: default;
}

.deck .card.flip-up {
  animation: flipUp 0.3s ease forwards;
}

.deck .card.flip-back {
  animation: flipBack 0.3s ease forwards;
}

@keyframes flipUp {
  0% {
    transform: translateY(0) rotateY(0deg);
  }
  25% {
    transform: translateY(-20px) rotateY(45deg);
  }
  50% {
    transform: translateY(-20px) rotateY(90deg);
  }
  75% {
    transform: translateY(-20px) rotateY(135deg);
  }
  100% {
    transform: translateY(0) rotateY(180deg);
  }
}

@keyframes flipBack {
  0% {
    transform: translateY(0) rotateY(180deg);
  }
  25% {
    transform: translateY(-20px) rotateY(135deg);
  }
  50% {
    transform: translateY(-20px) rotateY(90deg);
  }
  75% {
    transform: translateY(-20px) rotateY(45deg);
  }
  100% {
    transform: translateY(0) rotateY(0deg);
  }
}

.deck .card .back.cup {
  height: 125px;
  width: 125px;
  background: url("../images/cup-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.cup {
  height: 125px;
  width: 125px;
  background: url("../images/cup-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.star {
  height: 125px;
  width: 125px;
  background: url("../images/star-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.star {
  height: 125px;
  width: 125px;
  background: url("../images/star-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.chest {
  height: 125px;
  width: 125px;
  background: url("../images/chest-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.chest {
  height: 125px;
  width: 125px;
  background: url("../images/chest-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.bug {
  height: 125px;
  width: 125px;
  background: url("../images/bug-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.bug {
  height: 125px;
  width: 125px;
  background: url("../images/bug-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.compass {
  height: 125px;
  width: 125px;
  background: url("../images/compass-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.compass {
  height: 125px;
  width: 125px;
  background: url("../images/compass-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.key {
  height: 125px;
  width: 125px;
  background: url("../images/key-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.key {
  height: 125px;
  width: 125px;
  background: url("../images/key-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.ship {
  height: 125px;
  width: 125px;
  background: url("../images/ship-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.ship {
  height: 125px;
  width: 125px;
  background: url("../images/ship-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card .back.train {
  height: 125px;
  width: 125px;
  background: url("../images/train-open.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: pointer;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.deck .card.match .back.train {
  height: 125px;
  width: 125px;
  background: url("../images/train-match.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  font-size: 0;
  color: #ffffff;
  border-radius: 12px;
  cursor: default;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  border: 0;
}

.modal-body {
  margin: 0 25px;
}

.modal-body,
.modal-footer {
  font-size: 33px;
  color: white;
  text-align: center;
  border: none;
}

.modal-footer {
  margin-bottom: 10px;
}

.modal-header {
  font-size: 50px;
  color: white;
  border: none;
  margin-top: 10px;
}

.deck .card.show {
  font-size: 33px;
}

.score-panel {
  width: 680px;
  margin-bottom: 20px;
  background: #9648c5;
  padding: 20px 20px 14px;
  border-radius: 10px;
  box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
  font-size: 30px;
  font-weight: bold;
  color: #fff;
}

.score-panel .stars {
  text-align: right;
  margin: 0;
  padding: 0;
  display: inline-block;
  margin: 0 5px 0 0;
}

.stars li {
  list-style: none;
  display: inline-block;
  margin-right: 5px;
}

.stars img {
  width: 50px;
  height: 50px;
}

.score-panel .info,
.score-panel .play,
.score-panel .pause,
.score-panel .restart {
  float: right;
  cursor: pointer;
  transition: filter 0.2s ease;
  transition: filter 0.2s ease;
}

.score-panel .info:focus,
.score-panel .play:focus,
.score-panel .pause:focus,
.score-panel .restart:focus {
  outline: none;
}

body.tv-device .score-panel .info:focus,
body.tv-device .score-panel .play:focus,
body.tv-device .score-panel .pause:focus,
body.tv-device .score-panel .restart:focus {
  outline: 3px solid #f8a33e;
  filter: brightness(1.2);
}

.info img,
.play img,
.pause img,
.restart img {
  width: 70px;
  height: 70px;
}

#container {
  width: 820px;
  height: 1000px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -500px 0 0 -410px;
}

.score-panel-wrapper-button > div {
  margin: 20px 10px 0 0;
}

.score-panel .info {
  margin-right: 0;
}

.score-panel-wrapper {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  align-items: center;
}

.timer-wrapper {
  background-color: #5e2e97;
  box-shadow: inset 1px 1px 4px rgba(0, 0, 0, 0.2),
    inset -1px -1px 4px rgba(0, 0, 0, 0.2);
  font-style: normal;
  display: -ms-flexbox;
  display: flex;
  font-size: 34px;
  color: #fff;
  padding: 5px 14px;
  border-radius: 15px;
  position: relative;
  text-shadow: 1px 1px 0 #6229be, -1px 1px 0 #6229be, 1px -1px 0 #6229be,
    -1px -1px 0 #6229be;
  -ms-flex-align: center;
  align-items: center;
}

.timer-wrapper img {
  width: 50px;
  height: 50px;
}

.modal-title {
  font-size: 28px;
  font-weight: bold;
  padding-top: 52px;
  text-align: center;
  background: url("../images/win_logo_animation 1.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  width: 380px;
  height: 174px;
  margin: 0 auto;
}

.modal-content {
  background: url("../images/sactx-0-2048x2048-ETC2-NewUI1-22003f99 3.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: none;
}

.modal {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.button-restart {
  font-size: 37px;
  font-weight: bold;
  padding-top: 55px;
  text-align: center;
  background: url("../images/button.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  width: 400px;
  height: 178px;
  margin: 0 auto 20px;
  cursor: pointer;
  transition: filter 0.2s ease;
  transition: filter 0.2s ease;
}

.button-restart:focus {
  outline: none;
}

body.tv-device .button-restart:focus {
  outline: 4px solid #f8a33e;
  filter: brightness(1.2);
}

.modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
}

.modal-wrapper {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.howToPlay,
.title-win {
  margin-top: 20px;
}

.modal-info {
  margin: 8% auto;
  max-width: 500px;
  background: url("../images/sactx-0-2048x2048-ETC2-NewUI1-22003f99 3.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: none;
  font-size: 20px;
}

#close-modal-info {
  font-size: 37px;
  font-weight: bold;
  padding-top: 24px;
  text-align: center;
  background: url("../images/button.png");
  background-position: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  width: 247px;
  height: 110px;
  margin: 0 auto 20px;
  cursor: pointer;
  transition: filter 0.2s ease;
  transition: filter 0.2s ease;
}

#close-modal-info:focus {
  outline: none;
}

body.tv-device #close-modal-info:focus {
  outline: 4px solid #f8a33e;
  filter: brightness(1.2);
}

.modal-backdrop {
  position: static;
}

.modal-win {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  display: none;
  overflow: hidden;
  outline: 0;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-clip: padding-box;
  border-radius: 0.3rem;
  outline: 0;
}
