/*header font Oleo script*/
/*leipis font Sofia sans semi condensed*/
@font-face {
  font-family: "Sofia Sans Semi Condensed";
  src: url("fonts/SofiaSansSemiCondensed-VariableFont_wght.ttf")
    format("truetype");
}

@font-face {
  font-family: "Oleo Script";
  src: url("fonts/OleoScript-Regular.ttf") format("truetype");
}

/* * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
} */

#lintu-container {
  font-family: "Sofia Sans Semi Condensed", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-items: center;
  height: auto;
  width: 100%;
  background: white;
  font-size: large;
  color: var(--lintu-dark-blue);
  box-sizing: content-box;
  margin-top: 10px;
}

/* * {
  box-sizing: content-box !important;
} */

:root {
  --lintu-card-border-radius: 8px;
  --lintu-space-between-cards: 5px;
  --lintu-fade-animation-duration: 0.2s;
  --lintu-dark-blue: #1d1d63;
  --lintu-dark-green: #296b6b;
  --lintu-light-green: #d6ddac;
}

/*dark mode*/
@media (prefers-color-scheme: dark) {
  #lintu-container {
    background: black;
  }
}

#lintu-start-view {
  text-align: center;
}

.bird-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  min-height: 60vh;
  width: 100%;
}

.header-text {
  font-family: "Oleo Script", cursive;
  margin-bottom: 10px;
}

#lintu-start-view .grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
}

#lintu-start-view .grid-item {
}

#lintu-start-view .grid-item img {
  border-radius: var(--lintu-card-border-radius);
  width: 100%;
  height: 100%;
}

#lintu-start-view .grid-item:first-child {
  transform: rotate(-10deg);
  z-index: 1;
}

#lintu-start-view .grid-item:nth-child(2) {
  z-index: 2;
  transform: translateY(-18px);
}

#lintu-start-view .grid-item:last-child {
  transform: rotate(12deg);
  z-index: 3;
}

#lintu-end-view {
  display: none;
}

@keyframes lintuFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lintuFadeOut {
  to {
    opacity: 0;
  }
}

#lintu-muistipeli-view {
  opacity: 0;
  display: none;
}

.lintu-fade-in {
  animation: lintuFadeIn var(--lintu-fade-animation-duration) ease forwards;
}

.lintu-fade-out {
  animation: lintuFadeOut var(--lintu-fade-animation-duration) ease forwards;
}

.lintu-button:disabled,
.lintu-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed !important;
}

#lintu-start-button {
  margin-top: 1rem;
}

.lintu-button {
  width: 9em;
  background: var(--lintu-dark-green);
  color: var(--lintu-light-green);
  border-radius: 8px;
  outline: none;
  padding: 10px;
  border: 0px;
  font-size: larger;
  cursor: pointer;
  font-family: "Oleo Script", cursive;
  transition: box-shadow 0.15s ease-in, transform 0.25s ease;
}

@media (hover: hover) {
  .lintu-button:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    transform: scale(1.08);
  }
}

#lintu-wrapper {
  padding: 25px;
  border-radius: 10px;
  background: linear-gradient(
    124deg,
    rgba(214, 221, 172, 1) 0%,
    rgba(249, 225, 217, 1) 100%
  );
  max-width: 600px;
  width: 95%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  /*min-height: 70vh;*/
}

#bird-description,
#bird-name {
  margin-top: 5px;
  text-align: center;
}

#bird-name {
  font-weight: 600;
}

#lintu-game-header {
  display: flex;
  flex-direction: row;
  width: 95%;
  align-items: center;
  justify-content: space-between;
  margin-right: 10px;
  margin-left: 10px;
  margin-top: 0px;
  margin-bottom: 10px;
}

#bird-score {
  font-family: "Oleo Script", cursive;
  font-size: xx-large;
  margin: unset;
}

.bird-sound-icon {
  width: 3em;
  height: auto;
  cursor: pointer;
}

.cards,
.card,
.view {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cards {
  height: 520px;
  width: 520px;
  flex-wrap: wrap;
  justify-content: space-between;
  left: 50%;
  position: relative;
  transform: translateX(-50%);
  margin: 0;
  padding-inline-start: 0;
}

.cards .card {
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  height: calc(100% / 4 - var(--lintu-space-between-cards));
  width: calc(100% / 4 - var(--lintu-space-between-cards));
}

.card img {
  border-radius: var(--lintu-card-border-radius);
}
.card.shake {
  animation: shake 0.2s ease-in-out;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}
.card .view {
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 7px;
  background: #fff;
  pointer-events: none;
  backface-visibility: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.45s linear;
}
.card .front-view img {
  width: 100%;
}
.card .back-view img {
  max-width: 100%;
}
.card .back-view {
  transform: rotateY(-180deg);
}
.card.flip .back-view {
  transform: rotateY(0);
}
.card.flip .front-view {
  transform: rotateY(180deg);
}

@media screen and (max-width: 700px) {
  .cards {
    height: 460px;
    width: 460px;
  }
  .card .front-view img {
    width: 100%;
  }
  .card .back-view img {
    width: 100%;
  }
}

@media screen and (min-width: 700px) and (max-height: 747px) {
  .cards {
    height: 460px;
    width: 460px;
  }
  .card .front-view img {
    width: 100%;
  }
  .card .back-view img {
    width: 100%;
  }
}

@media screen and (min-width: 700px) and (max-height: 660px) {
  .cards {
    height: 300px;
    width: 300px;
  }
  .card .front-view img {
    width: 100%;
  }
  .card .back-view img {
    width: 100%;
  }
}

@media screen and (max-width: 530px) {
  .cards {
    height: 320px;
    width: 320px;
  }
  .card .front-view img {
    width: 100%;
  }
  .card .back-view img {
    width: 100%;
  }

  #lintu-game-header {
    width: 100%;
  }
}

@media screen and (max-width: 375px) {
  .cards {
    height: 310px;
    width: 310px;
  }
  .card .front-view img {
    width: 100%;
  }
  .card .back-view img {
    width: 100%;
  }

  #bird-description,
  #bird-name {
    font-size: medium;
  }

  .bird-sound-icon {
    width: 2.7em;
    height: auto;
    cursor: pointer;
  }
  #lintu-game-header {
    margin-left: 0px;
    margin-top: -15px;
  }

  .bird-center {
    gap: 0em;
  }
}
