@font-face {
  font-family: "Outfit";
  font-stretch: 25% 150%;
  font-style: normal;
  font-weight: 100 900;
  src: url(Outfit.ttf) format('truetype');
}

:root {
  --faff: #ffaff3;
  --code-melon: #ffd596;
  --cream: #fffbe8;
  --black: #292d3e;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--black);
  margin: 0;
  font-size: 18px;
}

#app {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.title-screen {
  background-color: var(--cream);
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.title-screen h1 {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
}

.title-screen img {
  height: 200px;
  margin: 2rem;
}

.card {
  padding: 30px;
  width: 90vw;
  max-width: 750px;
  min-height: 460px;
  background-color: var(--cream);
  border-radius: 50px;
  border: 6px solid var(--faff);
  box-shadow: 10px 10px 35px 0px rgba(0,0,0,0.33);

}

.card-background {
  animation: fade-in 0.5s ease-in-out 0s;
  height: 100vh;
  width: 100vw;
  background-color: var(--code-melon);
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
}

.game .status {
  display: flex;
  justify-content: space-between;
  align-self: stretch;
}

.game .hearts {
  display: flex;
  height: 30px;
}

.game .hearts img {
  margin: 0 2px;
}

.game .hearts img.empty {
  animation: heart-shake 0.2s linear forwards 0s 3;
}

@keyframes heart-shake {
  0% {
    transform: translateX(0px);
  }
  20% {
    transform: translateX(4px);
  }
  40% {
    transform: translateX(0px);
  }
  80% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0px);
  }
}

.game .diamonds {
  display: flex;
  height: 33px;
  align-items: center;
  justify-content: right;
  border-radius: 25px;
  border: 1px solid #584355;
  background: rgba(195, 193, 185, 0.50);
  padding: 0 8px;
  gap: 5px;
  min-width: 4.5rem;
}

.game .diamonds img {
  height: 25px;
}

.game .diamonds .scored {
  animation: diamond-hop 0.1s ease forwards;
}

@keyframes diamond-hop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.word-placeholder {
  position: relative;
  top: 2px;
  border-bottom: 3px dashed black;
}

.word-selected,
.word-placeholder {
  display: inline-block;
  width: 105px;
  margin: 0 4px;
}

.images {
  align-self: stretch;
  display: flex;
  justify-content: center;
  margin: 2rem;
}

.images img {
  height: 150px;
}

.fixed-chunk {
  font-size: 24px;
}

button {
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  padding: 0 8px;
  white-space: nowrap;

  border-radius: 10px;
  border: 2px solid rgba(88, 67, 85, 0.50);
  background: #F0EEFF;
  box-shadow: 0 2px 2px 0 rgba(88, 67, 85, 0.20);
  transition: all 0.3s;
  transition-property: border-bottom, margin-bottom, transform;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

button:disabled {
  cursor: unset;
}

.game button:not(:disabled):hover {
  --size: 3px;
  border-bottom: 5px solid grey;
  margin-bottom: -3px;
  transform: translateY(-3px);
}

ul {
  padding: 0;
  list-style: none;
}

.game ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

.game li {
  display: inline-block;
}

.credits-background {
  width: 100vw;
  height: 100vh;
  background-color: black;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.credits {
  min-height: 100vh;
  max-width: 95vw;
  width: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  animation: credits-scroll 25s linear forwards;
  position: relative;
}

@keyframes credits-scroll {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-1300px);
  }
}

.credits .end {
  position: absolute;
  bottom: -600px;
}

.credits h1,
.credits h2 {
  text-align: center;
  margin: 1rem;
}

.credit {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  white-space: nowrap;
}

.credit > * {
  flex: 1;
}

.credit-role {
  text-align: right;
}

.credit li {
  display: block;
  text-transform: uppercase;
}

.credits .disclaimer {
  margin-top: 4rem;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 480px)  {
  .credit {
    flex-direction: column;
    margin-bottom: 2rem;
  }
  .credit-role {
    margin-bottom: -1rem;
  }
  .credit * {
    text-align: center;
  }
}

.logo-screen {
  background-color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
}

.logo-screen img {
  width: 500px;
  max-width: 90vw;
  animation:
    logo-fade-in 0.8s ease-in-out 0s,
    logo-fade-out 0.4s ease-in-out 2.9s forwards;
}

@keyframes logo-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes logo-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}


.intro {
  display: flex;
  align-items: stretch;
}

.intro article {
  background-color: var(--black);
  border-radius: 35px;
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.intro h1 {
  font-size: 24px;
  font-weight: normal;
  color: #ffd596;
  line-height: 1.2;
}

.intro p:nth-of-type(1),
.intro p:nth-of-type(3) {
  color: #ffaff3;
}

.intro p:nth-of-type(2) {
  color: #c8ffa7;
}

.intro p:nth-of-type(4) {
  color: #9de7ff;
  font-weight: bold;
  text-align: right;
}

.intro span {
  color: #c8ffa7;
}

.loss,
.victory {
  overflow: clip;
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
}

.loss video,
.victory video {
  min-width: 600px;
  transition: opacity 0.5s linear;
}

.loss video {
  transition-delay: 500ms;
}

.loss .played,
.victory .played {
  opacity: 0;
}
