@import url(https://fonts.googleapis.com/css?family=Bubblegum+Sans);

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  background-color: #1A1A1A;
  font-family: "Bubblegum Sans", sans-serif;
      padding: 0;
    margin: 0;
}

img {

  max-width: 100%;
}

.info {
  position: relative;
  width: 100%;
  max-width: 950px;
}

.btn-sound {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/225363/icon-sound-on.svg);
  background-size: 100%;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 999;
  -webkit-animation: pulse 1s linear infinite;
          animation: pulse 1s linear infinite;
}
.btn-sound:active {
  transform: translateY(1px);
}
.btn-sound:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -10%;
  margin: auto;
  width: 120%;
  height: 1px;
  background-color: white;
  box-shadow: 0 0 0 2px black;
  transform: rotate(35deg);
}
@media (min-width: 450px) {
  .btn-sound {
    position: absolute;
    top: 10px;
    right: 30px;
    bottom: auto;
  }
}
.btn-sound.is-playing {
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/225363/icon-sound-on.svg);
  -webkit-animation: shake 10s 0.6s 3;
          animation: shake 10s 0.6s 3;
}
.btn-sound.is-playing:before {
  display: none;
}

.score {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    width: 100%;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    color: white;
    background-color: rgba(26, 26, 26, 0.8);
    gap: 15px;
}

.text {

      padding: 0;
    margin: 0;
    text-align: center;
    color: #fff;
        padding-left: 10px;
    padding-right: 10px;
}

.score > * {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3px;
    gap: 5px;
        font-size: 11px;
}
.score > * span {
  font-size: 1.4em;
  color: #DBB6AB;
}
.score > * span.is-updating {
  -webkit-animation: bounce 1s;
          animation: bounce 1s;
}
.score > * span.last-turn {
  color: red;
}

main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 950px;
  margin: auto;
  padding: 24px 0;
  margin-top: 0;
  gap: 10px;
}

.card,
.success-icon {
  position: relative;
  min-width: 100px;
  display: flex;
  height: 130px;
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
  transition: transform 0.4s ease-out;
  border-radius: 3px;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.is-selected,
[data-matched=true] {
  transform: translate3d(0, 0, 0) rotateY(180deg);
}

[data-matched=true] {
  -webkit-animation: matchSuccess 0.4s ease-out 3;
          animation: matchSuccess 0.4s ease-out 3;
}

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  background-color: #030B54;
  z-index: 999;
  opacity: 0;
  transform: translate3d(100%, 0, 0);
  transition: opacity 0.2s ease-out, transform 0s 0.2s;
  padding-left: 10px;
  padding-right: 10px;
}
.text-p {
  color: #fff;
  margin: 0;
  padding: 0;
  padding-bottom: 10px;
  font-family: Arial;
}

.text-p strong {
  color: yellow;
}
.success.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 100px);
  transition: opacity 0.2s ease-out, transform 0s;
}
.success .success-message {
    color: white;
    font-size: 2.1rem;
    margin: 10px 0px;
}
@media (min-width: 450px) {
  .success .success-message {
    font-size: 3rem;
    margin: 0;
  }
}
.success .score {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
  background-color: transparent;
}

@media (max-width: 450px) {

  .success img {

        width: 70%;
  }

  .success .score > * {
    flex-direction: column;
  }

}

@media (min-width: 600px) {
  .success .score {
    flex-direction: row;
    margin-bottom: 12px;
  }
}
.success .score > * {
  margin: 2px;
  padding: 8px;
  color: black;
  background-color: white;
  border-radius: 3px;
  overflow: hidden;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
@media (min-width: 450px) {
  .success .score > * {
    margin: 6px;
  }
}
.success .score > * span {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  font-size: 1.5rem;
  color: #000000;
  z-index: 2;
}

.success-icon {
  position: relative;
  transform: scale(1.5);
}
.success-icon .front {
  background-color: transparent;
  box-shadow: none;
  transform: rotateY(0);
  opacity: 0;
  transition: opacity 0.2s 0.4s;
}
.is-visible .success-icon .front {
  opacity: 1;
  -webkit-animation: bounce 0.5s 0.4s ease-out forwards;
          animation: bounce 0.5s 0.4s ease-out forwards;
}

.btn-continue {
  position: relative;
  margin-bottom: 12px;
  padding: 6px 24px;
  font-family: "Bubblegum Sans", sans-serif;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
  background-color: #C9531D;
  border: none;
  border-radius: 6px;
  outline: none;
  box-shadow: 0 1px 0 #e1662e, 0 4px 0 #a54418;
}
.btn-continue:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  margin: auto;
  width: 100%;
  height: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}
.btn-continue:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #a54418;
}

.front,
.back {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border-radius: 6px;
}
.front:before, .front:after,
.back:before,
.back:after {

}

.front {
  transform: rotateY(180deg);
}

.back {
  transform: rotateY(0);
}

@-webkit-keyframes matchSuccess {
  0% {
    transform: translate3d(0, 0, 0) rotateY(180deg) scale(1);
  }
  50% {
    transform: translate3d(0, 0, 0) rotateY(180deg) scale(1.05);
  }
  100% {
    transform: translate3d(0, 0, 0) rotateY(180deg) scale(1);
  }
}

@keyframes matchSuccess {
  0% {
    transform: translate3d(0, 0, 0) rotateY(180deg) scale(1);
  }
  50% {
    transform: translate3d(0, 0, 0) rotateY(180deg) scale(1.05);
  }
  100% {
    transform: translate3d(0, 0, 0) rotateY(180deg) scale(1);
  }
}
@-webkit-keyframes bounce {
  0% {
    transform: scale(0.1);
  }
  20% {
    transform: scale(1.4);
  }
  40% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.1);
  }
  80% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes bounce {
  0% {
    transform: scale(0.1);
  }
  20% {
    transform: scale(1.4);
  }
  40% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.1);
  }
  80% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
@-webkit-keyframes shake {
  2% {
    transform: rotate(2deg);
  }
  4% {
    transform: rotate(-2deg);
  }
  6% {
    transform: rotate(5deg);
  }
  8% {
    transform: rotate(-5deg);
  }
  10% {
    transform: rotate(10deg);
  }
  12% {
    transform: rotate(-10deg);
  }
  14% {
    transform: rotate(5deg);
  }
  16% {
    transform: rotate(-5deg);
  }
  18% {
    transform: rotate(2deg);
  }
  20% {
    transform: rotate(-2deg);
  }
  22% {
    transform: rotate(0);
  }
}
@keyframes shake {
  2% {
    transform: rotate(2deg);
  }
  4% {
    transform: rotate(-2deg);
  }
  6% {
    transform: rotate(5deg);
  }
  8% {
    transform: rotate(-5deg);
  }
  10% {
    transform: rotate(10deg);
  }
  12% {
    transform: rotate(-10deg);
  }
  14% {
    transform: rotate(5deg);
  }
  16% {
    transform: rotate(-5deg);
  }
  18% {
    transform: rotate(2deg);
  }
  20% {
    transform: rotate(-2deg);
  }
  22% {
    transform: rotate(0);
  }
}
@-webkit-keyframes pulse {
  50% {
    opacity: 0.6;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.6;
  }
}
@media (max-width: 330px) {
  .card {
    flex: 1 1 100px;
  }
  .card .front:before,
  .card .front:after,
  .card .back:before,
  .card .back:after {
    top: 18px;
    left: 6px;
    transform: scale(0.5);
  }
}


@media (max-width: 320px) {
    .card {
        flex: 1 1 70px;
    }

    .card, .success-icon {

      min-width: 75px;
      height: 115px;

    }
}