@font-face {
  font-family: "Kingthings Lupineless";
  src: url("Assets/Fonts/Kingthings Lupineless.ttf");
}

@font-face {
  font-family: "Kingthings Lupine";
  src: url("Assets/Fonts/Kingthings Lupine1.1.ttf");
}

* {
  box-sizing: border-box;
  margin: 0;
}
html {
  min-height: 100vh;
  cursor: url("Assets/Cursors/Ghost.cur"), auto;
}
body {
  margin: 0 auto;
  background: radial-gradient(#ff0001, #8d0209);
}
.page-title {
  font-family: "Kingthings Lupine", serif;
  font-weight: normal;
  text-align: center;
  font-size: 8em;
}
.game-info-container {
  grid-column: 1/ -1;
  display: flex;
  justify-content: space-between;
}
.game-info {
  font-family: "Kingthings Lupineless", serif;
  color: #ffffff;
  font-size: 3em;
  font-weight: normal;
}
.game-container {
  display: grid;
  grid-template-columns: repeat(8, auto);
  grid-gap: 10px;
  margin: 50px;
  margin-top: 2px;
  justify-content: center;
  perspective: 500px;
}
.card {
  position: relative;
  height: 175px;
  width: 125px;
}
.card:hover {
  cursor: url("Assets/Cursors/GhostHover.cur"), auto;
}
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  border-width: 1px;
  border-style: solid;
  transition: transform 500ms ease-in-out;
}
.card.visible .card-back {
  transform: rotateY(-180deg);
}
.card.visible .card-front {
  transform: rotateY(0);
}
.card.matched .card-value {
  animation: dance 1s linear infinite 500ms;
}
.overlay-text {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  z-index: 100;
  color: #f85f07;
  font-family: "Kingthings Lupine", serif;
}
.overlay-text-small {
  font-size: 0.3em;
}
.overlay-text.visible {
  display: flex;
  flex-direction: column;
  animation: overlay-grow 500ms forwards;
}

@keyframes overlay-grow {
  from {
    background-color: rgba(252, 252, 252, 0);
    font-size: 0;
  }
  to {
    background-color: rgba(0, 2, 2, 0.6);
    font-size: 8em;
  }
}
@keyframes dance {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-30deg) !important;
  }
  75% {
    transform: rotate(30deg);
  }
}
.card-back {
  background-color: black;
  border-color: orangered;
}

.card-front {
  background-color: #ffbb89;
  border-color: #333;
  transform: rotateY(180deg);
}
.card-value {
  transform: scale(1);
  transition: transform 100ms ease-in-out;
}
.card-front:hover .card-value {
  transform: scale(1);
}
.cob-web {
  position: absolute;
  width: 47px;
  height: 47px;
  transition: width 100ms ease-in-out, height 100ms;
}
.card-face:hover .cob-web {
  width: 52px;
  height: 52px;
}
.cob-web-top-left {
  transform: rotate(270deg);
  top: 0;
  left: 0;
}
.cob-web-top-right {
  top: 0;
  right: 0;
}
.cob-web-bottom-left {
  transform: rotate(180deg);
  bottom: 0;
  left: 0;
}
.cob-web-bottom-right {
  transform: rotate(90deg);
  bottom: 0;
  right: 0;
}
.spider {
  align-self: flex-start;
  transform: translatey(-10px);
  transition: transform 100ms ease-in-out;
}
.card-back:hover .spider {
  transform: translateY(0);
}
@media screen and (max-width: 1100px) {
  .spider {
    width: 120px;
  }
  .game-container {
    grid-gap: 10px;
    grid-template-columns: repeat(4, auto);
  }
  .card {
    position: relative;
    height: 275px;
    width: 232px;
  }
  .cob-web {
    width: 65px;
    height: 65px;
  }
  .card-face:hover .cob-web {
    width: 75px;
    height: 75px;
  }
}
@media screen and (max-width: 800px) {
  .spider {
    width: 80px;
  }
  .page-title {
    font-size: 6rem;
  }
  .game-container {
    grid-gap: 8px;
  }
  .card {
    position: relative;
    height: 200px;
    width: 170px;
  }
  .cob-web {
    width: 45px;
    height: 45px;
  }
  .card-face:hover .cob-web {
    width: 55px;
    height: 55px;
  }
  @keyframes overlay-grow {
    from {
      background-color: rgba(252, 252, 252, 0);
      font-size: 0;
    }
    to {
      font-size: 7em;
      background-color: rgba(0, 2, 2, 0.6);
      text-align: center;
    }
  }
}
@media screen and (max-width: 600px) {
  .spider {
    width: 60px;
  }
  .page-title {
    font-size: 4rem;
  }
  .game-info {
    font-size: 2rem;
  }
  .game-container {
    grid-gap: 2px;
  }
  .card {
    height: 148px;
    width: 120px;
  }
  .cob-web {
    width: 30px;
    height: 30px;
  }
  .card-face:hover .cob-web {
    width: 40px;
    height: 40px;
  }
}

@media screen and (max-width: 450px) {
  .spider {
    width: 50px;
  }
  .game-info-container {
    flex-direction: column;
    align-items: center;
  }
  .card {
    position: relative;
    height: 120px;
    width: 86px;
  }
  .card-value {
    width: 50px;
  }
  .page-title {
    font-size: 3rem;
  }
  .game-info {
    font-size: 1rem;
  }
  @keyframes overlay-grow {
    from {
      background-color: rgba(252, 252, 252, 0);
      font-size: 0;
    }
    to {
      font-size: 5em;
      background-color: rgba(0, 2, 2, 0.6);
      text-align: center;
    }
  }
}
