body {
  background-color: var(--bg);
  color: #fff;
  font-family: "Salsa", cursive;
  padding: 0;
  margin: 0;
}
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

* {
  box-sizing: border-box;
}
:root {
  --bg: #251f18;
  --beige: #af9876;
  --orange: #ff9800;
}

.container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px;
  max-width: 700px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

#letters {
  text-align: center;
  height: 180px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
}
#letters button {
  background-color: var(--beige);
  border: 1px solid #ffdca9;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 10px;
  border-radius: 3px;
  box-shadow: 0 0 5px 5px rgba(1, 1, 1, 0.2);
  cursor: pointer;
  transition: 0.3s;
  position: relative;
  z-index: 10;
}
#letters .letter {
  position: relative;
}
#letters .letter button.clone {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9;
}

#letters .letter button:hover {
  background-color: #ffdca9;
}
#letters button:active {
  transform: scale(0.94);
}

.guess {
  display: flex;
  justify-content: center;
  margin: 60px 0 60px;
}
.guess .slot {
  width: 80px;
  height: 80px;
  background-color: #1c1813;
  border: 1px solid #000;
  margin: 5px;
  border-radius: 5px;
}

.guess .slot .letter {
  width: 100%;
  height: 100%;
  background-color: var(--beige);
  border: 1px solid #ffdca9;
  border-radius: 3px;
  box-shadow: 0 0 5px 5px rgba(1, 1, 1, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 2rem;
}

.header {
  position: absolute;
  display: flex;
  padding: 20px 20px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}
.header h1 {
  margin: 0;
  color: #ecdcc2;
}
.header .info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header .info .buy-button {
  display: flex;
  align-items: center;
  margin-right: 20px;
  padding: 5px 10px;
  background-color: #609038;
  border: 1px solid #8ddc4b;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(1, 1, 1, 0.2);
  cursor: pointer;
  transition: 0.3s;
}
.header .info .buy-button:hover {
  background-color: #8ddc4b;
}
.header .info .buy-button:disabled {
  opacity: 0.4;
}
.header .info .buy-button:active {
  transform: scale(0.98);
}
.header .info .buy-button img {
  width: 16px;
  margin: 0 5px;
}

.coins {
  display: flex;
  align-items: center;
  justify-content: center;
}
.coins img {
  width: 30px;
  margin-right: 10px;
}
.coins .count {
  font-size: 1.6rem;
}

/* .coins .count .coins-count {
  view-transition-name: coins;
} */

.lives .hearts {
  display: flex;
  margin-right: 20px;
}
.lives .hearts img {
  width: 25px;
  margin: 0 2px;
}

.result {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 100%;
  background-color: rgb(34 26 26 / 89%);
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.result.hide {
  display: none;
}
.result .result-inner {
  padding: 40px 20px 20px;
  background-color: #322c25;
  border: 5px solid #49443e;
}
.result .result-inner h3 {
  margin: 0;
  font-size: 2rem;
  text-align: center;
}
.result .result-inner .guess {
  margin: 30px 0 40px;
}
.result .result-inner .new-game-button {
  padding: 15px;
  width: 100%;
  background-color: #609038;
  border: 1px solid #8ddc4b;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(1, 1, 1, 0.2);
  cursor: pointer;
  transition: 0.3s;
}
.result .result-inner .new-game-button:hover {
  background-color: #8ddc4b;
}
.result .result-inner .new-game-button:active {
  transform: scale(0.98);
}

::view-transition-old(*),
::view-transition-new(*) {
  animation: none;
  mix-blend-mode: normal;
}

@keyframes pop-out {
  to {
    opacity: 0;
    transform: scale(0);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

::view-transition-old(*):only-child {
  animation: 0.25s ease-out both pop-out;
}
::view-transition-new(*):only-child {
  animation: 0.25s ease-out both pop-in;
}

::view-transition-old(coins) {
  animation: 0.25s ease-out both pop-out;
}
::view-transition-new(coins) {
  animation: 0.25s ease-out both pop-in;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(2);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes scale-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(2);
  }
}

::view-transition-old(modal):only-child {
  animation: 0.25s ease-out both scale-out;
}
::view-transition-new(modal):only-child {
  animation: 0.25s ease-out both scale-in;
}
