@import url("https://fonts.googleapis.com/css2?family=K2D:wght@300;400;500;600;700;800&display=swap");

* {
  font-family: "K2D", sans-serif;
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-image: url("./backupscaled.jpeg");
  background-attachment: fixed;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center top;
  height: 100vh;
}

.main {
  display: flex;
  justify-content: center;
  place-items: center;
}
.count-container {
  display: flex;
  flex-direction: column;
  place-items: center;
  width: 16vw;
  padding: 2rem 0;
  /* margin: auto;
  margin-bottom: 2vh; */
  margin-right: 70px;
}

.attempts {
  font-size: 2rem;
  color: #333;
  font-weight: 800;
  background-color: #d9d9d9;
  padding: 1rem;
  border: 5px solid black;
  border-radius: 40px;
  margin-top: 10px;
  margin-bottom: 10px;
  width: auto;
  text-align: center;
}

.reset {
  font-size: 2rem;
  color: #333;
  cursor: pointer;
  font-weight: 800;
  background-color: #d9d9d9;
  padding: 1rem;
  border: 5px solid black;
  border-radius: 40px;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 220px;
  text-align: center;
}

.reset:hover {
  transform: scale(1.2);
}

.time {
  font-size: 2rem;
  color: #333;
  font-weight: 800;
  background-color: #d9d9d9;
  padding: 1rem 0rem;
  border: 5px solid black;
  border-radius: 40px;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 222px;
  text-align: center;
}

.grid {
  max-width: 1200px;
  background: url(./back.jpg);
  background-attachment: fixed;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center top;
  padding: 20px;
  margin: 2vh auto;
  display: flex;
  height: 94vh;
  flex-wrap: wrap;
  justify-content: space-evenly;
  border: 5px solid black;
  border-radius: 30px;
}

.card {
  position: relative;
  transition: all 0.3s linear;
  transform-style: preserve-3d;
  margin: 5px;
}

.card,
.back,
.front {
  height: 170px;
  width: 170px;
  border-radius: 10px;
  border: 2px solid #333;
}

.back,
.front {
  position: absolute;
  backface-visibility: hidden;
}

.front {
  background: #fab942 url("./Question.jpg") no-repeat center center / contain;
}

.back {
  transform: rotateY(180deg);
  background-color: white;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

.selected {
  border: 4px solid #333333;
  transform: rotateY(180deg);
}

.match .front {
  border: 2px solid black;
  background: rgb(4, 44, 2) url("./victory.jpg") no-repeat center center /
    contain !important;
  cursor: not-allowed;
  transform: none !important;
}
