/* https://github.com/WebDevSimplified/Mix-Or-Match */

/* fondamento-regular - latin */
@font-face {
  font-family: 'Fondamento';
  font-style: normal;
  font-weight: 400;
  src: local(''),
       url('../historische-bruecken-erfurt/AssetsGame/Fonts/fondamento-v11-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('../historische-bruecken-erfurt/AssetsGame/Fonts/fondamento-v11-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

* {
  box-sizing: border-box;
}

html {
  position: relative;
  min-height: 100vh;
}

body {
  margin: 0;
}

.page-title {
  color: #000;
  font-weight: normal;
  text-align: center;
  font-size: 3em;
}

.game-info-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  background-color: #EDE9D0;
  border: 2px solid #392C1C;
  box-shadow: -3px -2px 29px -2px rgba(41,23,13,1);
  -webkit-box-shadow: -3px -2px 29px -2px rgba(41,23,13,1);
  -moz-box-shadow: -3px -2px 29px -2px rgba(41,23,13,1);
  font-family: 'Fondamento';
}

.game-info {
  color: #392C1C;
  font-size: 3em;
  margin:20px;
  min-width: 220px;
}

.game-container {
  margin-top: 0vh;
  display: grid;
  grid-template-columns: repeat(5, auto);
  grid-gap: 10px;
  justify-content: center;
  cursor: url("../historische-bruecken-erfurt/AssetsGame/Cursors/lanze.cur"), auto;
}

@media (min-height: 0px) and (max-height: 600px) {
  .game-container {
    margin-top: -35vh;
    -webkit-transform: scale(0.5);
    -moz-transform: scale(0.5);
    -ms-transform: scale(0.5);
    -o-transform: scale(0.5);
    transform: scale(0.5);
  }
}

@media (min-height: 601px) and (max-height: 780px) {
  .game-container {
    margin-top: -20vh;
    webkit-transform: scale(0.6);
    -moz-transform: scale(0.6);
    -ms-transform: scale(0.6);
    -o-transform: scale(0.6);
    transform: scale(0.6);
  }
}

@media (min-height: 781px) and (max-height: 1200px) {
  .game-container {
    webkit-transform: scale(0.8);
    -moz-transform: scale(0.8);
    -ms-transform: scale(0.8);
    -o-transform: scale(0.8);
    transform: scale(0.8);
  }
}

.card {
  position: relative;
  cursor: url("../historische-bruecken-erfurt/AssetsGame/Cursors/lanzeHover2.cur"), auto;
  height: 197px;
  width: 191px;
  margin: 5px; 
  
}

.card-face {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: transform 500ms ease-in-out;
  backface-visibility: hidden;
  box-shadow: -3px -2px 29px -2px rgba(41,23,13,1);
  -webkit-box-shadow: -3px -2px 29px -2px rgba(41,23,13,1);
  -moz-box-shadow: -3px -2px 29px -2px rgba(41,23,13,1);
  -webkit-backface-visibility: hidden;
}

.card.visible .card-back {
  -webkit-transform: rotateY(-180deg);
  -moz-transform: rotateY(-180deg);
  -ms-transform: rotateY(-180deg);
  -o-transform: rotateY(-180deg);
  transform: rotateY(-180deg);  
}

.card.visible .card-front {
  -webkit-transform: rotateY(0);
  -moz-transform: rotateY(0);
  -ms-transform: rotateY(0);
  -o-transform: rotateY(0);
  transform: rotateY(0);
}

.card.matched .card-front .card-value {
  -webkit-animation: dance 2s linear infinite 500ms;
  animation: dance 2s linear infinite 500ms
}

.card-back {
  -webkit-transform: rotateY(0);
  -moz-transform: rotateY(0);
  -ms-transform: rotateY(0);
  -o-transform: rotateY(0);
  transform: rotateY(0); 
}

.cob-web {
  position: absolute;
  -webkit-transition: width 100ms ease-in-out, height 100ms ease-in-out;
  -o-transition: width 100ms ease-in-out, height 100ms ease-in-out;
  transition: width 100ms ease-in-out, height 100ms ease-in-out;
  width: 47px;
  height: 47px;
}

.card-face:hover .cob-web {
  width: 52px;
  height: 52px;
}

.cob-web-top-left {
  -webkit-transform: rotate(270deg);
  -moz-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  -o-transform: rotate(270deg);
  transform: rotate(270deg);
  top: 0;
  left: 0;
}

.cob-web-top-right {
  top: 0;
  right: 0;
}

.cob-web-bottom-left {
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  transform: rotate(180deg);
  bottom: 0;
  left: 0;
}

.cob-web-bottom-right {
  -webkit-transform: rotate(90deg);
  -moz-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  -o-transform: rotate(90deg);
  transform: rotate(90deg);
  bottom: 0;
  right: 0;
}

.spider {
  align-self: flex-start;
  transition: transform 100ms ease-in-out;
  -webkit-transform: translateY(-10px);
  -moz-transform: translateY(-10px);
  -ms-transform: translateY(-10px);
  -o-transform: translateY(-10px);
  transform: translateY(-10px);
}

.card-back:hover .spider {
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -ms-transform: translateY(0);
  -o-transform: translateY(0);
  transform: translateY(0);
}

.card-value {
  position: relative;
  transition: transform 100ms ease-in-out;
  -webkit-transform: scale(.95);
  -moz-transform: scale(.95);
  -ms-transform: scale(.95);
  -o-transform: scale(.95);
  transform: scale(.95);
}

.card-front:hover .card-value {
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -ms-transform: scale(1);
  -o-transform: scale(1);
  transform: scale(1);
}

.card-front {
  background: rgba(237, 233, 208);
  border-color: #333;
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  transform: rotateY(180deg);
}


.overlay-text {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: none;
  color: #9f998a;
  position: fixed;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: 'Fondamento';
  -webkit-transition: background-color 500ms, font-size 500ms;
  -o-transition: background-color 500ms, font-size 500ms;
  transition: background-color 500ms, font-size 500ms;
}

.overlay-text a {font-size: calc(20px + (35 - 20) * ((100vw - 320px) / (1600 - 320)));color: #9f998a;}
.overlay-text .headline {font-size: calc(40px + (90 - 40) * ((100vw - 320px) / (1600 - 320)));color: #9f998a;}
.overlay-text hr {background: #9f998a; height: 1px; border: none; width: 50%; margin: 0px; padding:0px;}

.overlay-text-small {
  margin-top: 30px;
  font-size: .15em;
}

.info-browser {
  margin-top: 30px;
  font-size: .1em;
  text-align: center;
  line-height: 23px;
}

.overlay-text.visible {
  display: flex;
  -webkit-animation: overlay-grow 500ms forwards;
  animation: overlay-grow 500ms forwards;
}

@-webkit-keyframes dance {
  0%, 100% {
    -webkit-transform: rotate(0);
            transform: rotate(0)
  }
  25% {
    -webkit-transform: rotate(-2deg);
            transform: rotate(-2deg)
  }
  75% {
    -webkit-transform: rotate(2deg);
            transform: rotate(2deg)
  }
}
@keyframes dance {
  0%, 100% {
    -webkit-transform: rotate(0);
            transform: rotate(0)
  }
  25% {
    -webkit-transform: rotate(-2deg);
            transform: rotate(-2deg)
  }
  75% {
    -webkit-transform: rotate(2deg);
            transform: rotate(2deg)
  }
}

@-webkit-keyframes overlay-grow {
  from {
    background-color: rgba(0, 0, 0, 0);
    font-size: 0;
  }
  to {
    background-color: rgba(0, 0, 0, .65);
    font-size: 10em;
  }
}
@keyframes overlay-grow {
  from {
    background-color: rgba(0, 0, 0, 0);
    font-size: 0;
  }
  to {
    background-color: rgba(0, 0, 0, .65);
    font-size: 10em;
  }
}


@media (max-width: 1045px) {
  .game-container {
    grid-template-columns: repeat(4, auto)
  }
  /* .game-info-container, siehe Original */
}

@media (max-width: 785px) {
  .game-container {
    grid-template-columns: repeat(2, auto)
  }

}
