html {
    box-sizing: border-box;
}

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

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

body {
    background: #ffffff url('../img/geometry2.png');
    /*font-family: 'Coda', cursive;*/
    color: #393939;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h1 {
    font-family: 'Arial', sans-serif;
    font-weight: 300;
}

/*
 * Styles for the deck of cards
 */
.deck {
    width: 660px;
    min-height: 680px;
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    padding: 32px;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 3em;
    list-style-type: none;
}

.deck .card-custom {
    height: 150px;
    width: 150px;
    /*height: 125px;*/
    /*width: 125px;*/
    background: #2e3d49;
    font-size: 0;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: unset;
    padding: 0;
    margin: 0;
    /*box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);*/
}

.deck .card-custom.open {
    transform: rotateY(0);
    background: #02b3e4;
    cursor: default;
}

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

.deck .card-custom.show .card-image {
    display: unset;
}

.deck .hidden {
    opacity: 0;
    background: unset!important;
    border: unset;
    box-shadow: unset;
}
.deck .hidden img {
    display: none!important;
}

.deck .card-custom.match {
    cursor: default;
    background: #02ccba;
    font-size: 33px;
}

.deck .card-custom.match .card-image {
    display: unset;
}

.deck .card-custom.wrong {
  background: #fa5050;
}

.deck .card-custom .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    display: none;
    margin: auto;
    max-height: 100%;
    border-radius: 8px;
}

/*
 * Styles for the Score Panel
 */

.score-panel {
    text-align: left;
    width: 545px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.score-panel .stars {
    margin: 0;
    padding: 0;
    display: inline-block;
    margin: 0 5px 0 0;
    color: #ffcd00;
}

.score-panel .stars li {
    list-style-type: none;
    display: inline-block;
}

.score-panel .restart {
    cursor: pointer;
}

#restart i {
  padding-left: 5px;
}

#timer {
  display: inline-block;
}

#timer-text {
  color: #058A8c;
}

#restart-text {
  color: #764F92;
}

/* Winning Popup */
.popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 0; /* Location of the box */
    margin: 0 auto;
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.popup-content {
    background-color: white;
    margin: 0 auto;
    height: 100%;
    width: 100%;
    padding: 20px;
    text-align: center;
    font-family: 'Helvetica';
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 1.5s;
    animation-name: animatetop;
    animation-duration: 1.5s;
}

/* Add Animation */
@-webkit-keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.popup-content h1 {
  font-size: 3em;
  padding-top: 4em;
  color: #18bf8f;
  font-weight: bolder;
}

.popup-content h3 {
  font-weight: normal;
  color: #4f4f4f;
}

#play-again-btn {
  background-color: #8c4ed6;
  color: white;
  font-size: 16px;
  font-weight: normal;
  padding: 10px 25px;
  border: none;
  border-radius: 8px;
  margin-top: 15px;
  box-shadow: 7px 7px 30px #999999;
  transition: box-shadow 0.5s;
}

#play-again-btn:hover {
  box-shadow: 3px 3px 8px #6F6F6F;
  background-color: #9759E3;
  cursor: pointer;
}

.star-rating {
    margin-bottom: 0.5rem;
}
#star-rating-text {
  padding-left: 15px;
}

.point-text {
    margin-bottom: 0.5rem;
}
/*#point-text {*/
/*    padding-left: 15px;*/
/*}*/

/* The Close Button */
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/*
 * Media queries
 */

@media only screen and (max-width: 780px) {
  .deck {
    max-width: 300px;
    min-height: auto;
    padding-bottom: 17px;
  }
  .top-player {
      /*max-width: 350px;*/
      min-height: auto;
      padding-bottom: 17px;
  }

  .deck .card-custom {
    height: 80px;
    width: 80px;
    /*height: 50px;*/
    /*width: 50px;*/
    /*margin-bottom: 17px;*/
  }

  .score-panel {
    /*max-width: 70%;*/
    padding-bottom: 0;
    display: block;
    text-align: center;
    line-height: 1.7em;
  }

  h1 {
    margin: 0;
    padding: 10px 0;
  }
}

#win-popup.zoomIn {
  animation-delay: 1s;
}

/* Animation by theappguruz.com */
#win-popup.zoomIn {
  -webkit-animation-name: zoomIn;
  animation-name: zoomIn;
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  }
  @-webkit-keyframes zoomIn {
  0% {
  opacity: 0;
  -webkit-transform: scale3d(.3, .3, .3);
  transform: scale3d(.3, .3, .3);
  }
  50% {
  opacity: 1;
  }
  }
  @keyframes zoomIn {
  0% {
  opacity: 0;
  -webkit-transform: scale3d(.3, .3, .3);
  transform: scale3d(.3, .3, .3);
  }
  50% {
  opacity: 1;
  }
  }

.deck .card-custom.flipInY {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInY;
animation-name: flipInY;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
100% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-transition-timing-function: ease-in;
transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
100% {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}

.deck .card-custom.shake {
-webkit-animation-name: shake;
animation-name: shake;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes shake {
0%, 100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%, 30%, 50%, 70%, 90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%, 40%, 60%, 80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
@keyframes shake {
0%, 100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%, 30%, 50%, 70%, 90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%, 40%, 60%, 80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}

.deck .card-custom.bounceIn {
-webkit-animation-name: bounceIn;
animation-name: bounceIn;
-webkit-animation-duration: .75s;
animation-duration: .75s;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes bounceIn {
0%, 20%, 40%, 60%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
0% {
opacity: 0;
-webkit-transform: scale3d(.3, .3, .3);
transform: scale3d(.3, .3, .3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(.9, .9, .9);
transform: scale3d(.9, .9, .9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(.97, .97, .97);
transform: scale3d(.97, .97, .97);
}
100% {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}


.top-player {
    width: 100%;
    /*min-height: 680px;*/
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    padding: 32px;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    justify-content: space-between;
    align-items: center;
    margin: 0 0 3em;
    list-style-type: none;
}

.top-player .box-shading {
    box-shadow: 0 4px 2px -2px #ebebeb;
    padding-bottom: 30px;
}

.top-player .box-shading .box-icon {
    text-align: center;
    padding: 15px 0;
}
.box-shading .box-icon img {
    max-width: 160px;
}
.box-shading .title-rank {
    border: unset;
    background-color: transparent;
    color: #4a4a4a;
    padding: 0;
    font-size: 22px;
}

.title-rank {
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
