#main-game {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  font-size: 15pt;
  margin: 20px;
  margin-bottom: 0px;
  padding: 20px 20px 0px 20px;

  width: 100%;
  height: calc(100% - 20px);
}

article {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* flex-grow: 2; */
  border: 2px solid var(--green_dark3);
  margin: 20px;
  padding: 10px;
  min-height: unset;
  min-width: unset;
  max-width: 100%;
  background-color: var(--green_light1a);
  color: var(--gray_light1);
}
.game_container {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  /*align-items: center;*/
  margin: 30px;
  margin-top: 0px;
  padding: 20px 30px 30px 30px;

  width: 90%;
  max-width: 800px;
  background-color: var(--pink_a);
}

.game {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
  margin: 10px;
  background-color: aliceblue;
  width: clamp(300px, 80vw, 700px); /* min, tercih edilen, max */
  aspect-ratio: 1 / 1; /* her zaman kare kalır, height otomatik hesaplanır */

  box-sizing: border-box;
}

.box {
  border: 2px solid black;
  animation: popUp 0.5s ease-in-out;
  transition: transform 0.3s ease-in-out;
}
.box-paired {
  border: 2px solid black;
  animation: paired 0.5s ease-in-out;
  /* transition: transform 0.3s ease-in-out; */
}

.box-open {
  /* border: 2px solid black; */
  animation: openUp 0.5s ease-in-out;
  /* transition: transform 0.3s ease-in-out; */
}

.box:hover {
  transform: scale(1.04);
}

.box-closed {
  background-color: var(--green);
  width: 100%;
  height: 100%;
  /* display: none; */
  box-sizing: border-box;
}
img {
  /* box-sizing: border-box; */
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.win-screen {
  display: none;
  width: 100%;
  background-color: var(--green_dark3);
  border: 2px solid var(--green_light1);
  text-align: center;
  padding: 0px;
  font-size: 30px;
}
.lose-screen {
  display: none;
  width: 100%;
  background-color: rgb(255, 54, 54);
  border: 2px solid var(--green_dark3);
  text-align: center;
  padding: 0px;
  font-size: 30px;
}

.removeBox {
  animation: removeBox 0.3s ease-in-out;
}

@keyframes removeBox {
  0% {
    transform: scale(1);
    transform: rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: scale(0.1);
    transform: rotate(100deg);
    opacity: 0;
  }
}

@keyframes gameScreenFin {
  0% {
    translate: scaleY(1);
  }
  100% {
    transform: scaleY(0);
  }
}

@keyframes openUp {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  10% {
    transform: scale(1.1);
    opacity: 0.75;
  }
  20% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes popUp {
  0% {
    transform: scale(0); /* Startet unsichtbar/winzig */
    opacity: 0;
  }
  70% {
    transform: scale(
      1.1
    ); /* Leichtes "Ãœbersteuern" fÃ¼r einen coolen Bounce-Effekt */
  }
  100% {
    transform: scale(1); /* Endet in NormalgrÃ¶ÃŸe */
    opacity: 1;
  }
}
@keyframes scoreUp {
  0% {
    transform: scale(1); /* Startet unsichtbar/winzig */
    opacity: 1;
  }
  40% {
    transform: scale(1.4);
    opacity: 0.7;
  }
  60% {
    transform: scale(1);
    opacity: 1;
  }
  80% {
    transform: scale(1.4); /* Endet in NormalgrÃ¶ÃŸe */
    opacity: 0.6;
  }
  100% {
    transform: scale(1); /* Endet in NormalgrÃ¶ÃŸe */
    opacity: 1;
  }
}

@keyframes paired {
  0% {
    transform: scale(1);
    transform: rotateY(0deg);
    opacity: 1;
  }
  25% {
    transform: scale(1.02);
    transform: rotateY(20deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(1);
    transform: rotateY(0deg);
    opacity: 1;
  }
  75% {
    transform: scale(1.02);
    transform: rotateY(-20deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    transform: rotateY(0deg);
    opacity: 1;
  }
}

.score-time-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  /* max-height: 100%; */
  border: 2px solid var(--green_dark3);
  /* margin: 5px;
  padding: 5px; */
}

.st-table {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-right: 15px;
  margin-left: 15px;
  font-size: 25px;
}

#score-container {
  margin-left: 25px;
}

#score-value {
  margin-left: 15px;
  margin-right: 15px;
}
#time-value {
  margin-left: 15px;
  margin-right: 5px;
  width: 45px;
}
/* #score-container h3 {
  margin: 5px;
} */

#time {
  display: flex;
  flex-direction: row;
  width: 100%;
}
.replay-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: var(--green);
  color: var(--green_light1);
  border: 2px solid var(--green_light1);
  font-size: 30px;
}

.replay-screen:hover {
  background-color: var(--green_light1);
  color: var(--green_dark1);
  border: 2px solid var(--green_dark2);
  cursor: pointer;
}
