@import url("./confetti.css");
@import url("./canvas.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Neuton", serif;
  font-weight: 400;
  background-color: rgb(10, 5, 14);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
}

.name-info {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 2;
}

.container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 30px;
  background: rgb(37, 24, 64);
  padding: 40px 60px;
  box-shadow: 0 0px 8px 0px #8e8383;
  border-radius: 14px;
  z-index: 2;
  max-width: 1000px;
}

.best-result-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.input {
  padding: 30px 40px;
  background-color: rgb(164, 164, 36);
  border: none;
  font-size: 3rem;
  text-transform: uppercase;
  color: beige;
  border-radius: 14px;
  font-family: "Neuton", serif;
  font-weight: 400;
  font-style: italic;
  outline: none;
  box-shadow: 0 0px 8px 0px #0395ea;
  color: #ea033d;
  letter-spacing: 0.1rem;
}

.input::placeholder {
  color: #ea033d;
  text-transform: capitalize;
  letter-spacing: 0.1rem;
}

.play-button {
  padding: 30px 60px;
  margin: 40px;
  border: none;
  outline: none;
  border-radius: 20px;
  letter-spacing: 0.1rem;
  font-family: "Neuton", serif;
  font-weight: 600;
  font-size: 2.5rem;
  font-style: italic;
  background-color: aqua;
  cursor: pointer;
}
.play-button:hover {
  transition: all 0.2s ease-in-out, color 0.2s ease-in-out;
  background-color: #1ac144;
  color: black;
}

h1 {
  text-align: center;
  color: beige;
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  z-index: 2;
  margin: 50px;
}

h2 {
  color: beige;
  font-family: "Neuton", serif;
  font-weight: 400;
  font-size: 1.9rem;
  font-style: italic;
}

.best-res {
  font-size: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}

.timer {
  color: beige;
  font-size: 2rem;
}

.reset-button {
  background-color: #ba0b77;
  padding: 10px 20px;
  outline: none;
  border-radius: 15px;
  border: none;
  font-family: "Neuton", serif;
  font-weight: 400;
  font-size: 1.9rem;
  font-style: italic;
  color: beige;
  letter-spacing: 0.1rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.reset-button:hover {
  opacity: 0.7;
}

.game {
  width: 430px;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  transform-style: preserve-3d;
  perspective: 500px;
}

.buttons {
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  height: auto;
  border-radius: 15px;
}

.card-button {
  padding: 10px 50px;
  margin: 0 39px;
  border-radius: 40px;
  border: none;
  background-color: #ba0b77;
  color: beige;
  font-family: "Neuton", serif;
  font-weight: 400;
  font-size: 1.9rem;
  font-style: italic;
  text-align: center;
  cursor: pointer;
}

.card-button:hover {
  transition: all 0.3s ease-in-out, color 0.3s ease-in-out;
  background-color: #1ac144;
  color: #fff;
}

.item {
  position: relative;
  width: 100px;
  height: 100px;
  background-color: rgb(52, 135, 180);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  transition: 0.25s;
  border-radius: 15px;
  border: 1px solid rgb(137, 137, 125);
  box-shadow: 0 1px 5px 1px #9d9494;
  transform: rotateY(180deg);
  cursor: pointer;
}

.item.boxOpen,
.item.boxMatch {
  transform: rotateY(0deg);
}

.item::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgb(46, 89, 113);
  transition: 0.25s;
  transform: rotateY(0deg);
  backface-visibility: hidden;
  border-radius: 15px;
  background-image: url("yin-yang.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60px;
  display: block;
}

.boxOpen::after {
  transform: rotateY(180deg);
}

.boxMatch::after {
  display: none;
}

.result {
  font-size: 2em;
  color: beige;
  letter-spacing: 0.1rem;
}

@media screen and (max-width: 768px) {
  .container {
    padding: 20px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    box-shadow: 0 0 0 0;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2[data-best-result] {
    font-size: 1.4rem;
    margin: 0.5rem 0.2em;
    border-radius: 12px;
    background-color: #ba0b77;
    box-shadow: 0 0px 7px -1px #8d8787;
    color: beige;
    opacity: 0.7;
  }

  .input {
    padding: 1.5rem 0;
    font-size: 2.5rem;
    text-align: center;
  }
  .input::placeholder {
    font-size: 2rem;
    text-align: center;
  }

  .best-res {
    margin-bottom: 1rem;
    margin-top: 1rem;
  }

  .timer {
    font-size: 1.5rem;
  }

  .reset-button {
    font-size: 1.5rem;
    padding: 8px 16px;
  }

  .game {
    max-width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
  }

  .buttons {
    gap: 10px;
    width: auto;
    height: auto;
    display: inline-block;
  }

  .card-button {
    padding: 1.1rem 1.3rem;
    margin: 0.1rem 0.4rem;
    font-size: 1.2rem;
  }

  .item {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    border-radius: 12px;
  }

  .result {
    font-size: 1.5rem;
  }
}

.records {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
