:root {
  --default1: #b8b0b0;
  --default2: #596a64;
  --hp: #FF5959;
  --attack: #F5AC78;
  --defense: #FAE078;
  --special-attack: #9DB7F5;
  --special-defense: #A7DB8D;
  --speed: #FA92B2;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  margin: 0;
  padding: 0;
  height: fit-content;
  background: rgb(0, 0, 0);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 
  'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 62.5%;
  color: white;
}

body {
  font-size: 1.6rem;
  margin: 0;
  padding: 0;
  height: fit-content;
  background: linear-gradient(var(--default1), var(--default2));
  float: left;
  width: 100vw;
  text-align: center;
  text-transform: capitalize;
}

.back{
  position: absolute;
  top: 1.2rem;
  left: 0;
  width: 6rem;
  height: 5rem;
  padding: 0.8rem 0.8rem 0.8rem 1.2rem;
  z-index: 10;
}

.back-icon {
  position: absolute;
  top: 0rem;
  left: 0;
  width: 4rem;
  height: 4rem;
  padding: 0.8rem 0.8rem 0.8rem 1.2rem;
  background-color: rgba(19, 18, 18, 0.5);
  border-radius: 0 1.2rem 1.2rem 0;
}

.all-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem 0 1rem 0;
  justify-content: start;
}

.top-element {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.highscore-container {
  text-align: center;
  margin-top: 4rem;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  height: 4rem;
  
}

.scores-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
}

.highscore {
  font-size: 1.8rem;
  opacity: 0.5;
}
.current-score {
  font-size: 1.4rem;
}

@keyframes scoreCelebration {
  30% {
      transform: rotate(0deg) scale(1);
      bottom: 0;
  }

    75% {
      transform: scale(1.2);
      bottom: 0;
      font-weight: 500;
      color: #7EEE57;
  }

  100% {
      transform: rotate(0deg) scale(1);
      bottom: 0;
  }
}

.header {
  background: rgba(255, 255, 255, 0.25);
  padding: 1rem;
  gap: 1rem;
  display: grid;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25) ;
  margin-bottom: 1rem;
}

.header-icon {
  width: 2rem;
  margin: auto;
  aspect-ratio: 1 / 1;
}

.main-container {
  display: grid;
  grid-template-columns:  repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.6rem 1.2rem 0 1.2rem;
  padding: auto;
  transition: all 2s;
}

.choice {
  background-color: rgb(255, 255, 255, 0.25);
  font-size: 1.6rem;
  width: 100%;
  height: fit-content;
  border-radius: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  margin: auto;
  padding: 0.6rem;
  animation: appear 1.5s forwards ;
  transition-timing-function: cubic-bezier(1,.18,.56,1.09);
  position: relative;
}

@keyframes appear {
  0% {
      opacity: 0; /* Start with 0 opacity */
      bottom: -8rem; /* Start with 0 scale */
  }
  90% {
    bottom: 3; /* Fully scale to 1 */
  }
  100% {
    opacity: 1; /* Fully appear with 1 opacity */
    bottom: 0; /* Fully scale to 1 */
  }
}

.choice img {
  width: 70%;
}

.choice-name {
  position: relative;
  width: 100%;
  margin-bottom: 0.5rem;
}

.choice-name::after {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 10%;
  width: 80%;
  height: 1px;
  background-color: rgb(0, 0, 0, 0.1);
}

.bottom-container {
  display: flex;
  flex-direction: column;
  justify-content: end;
  justify-self: end;
  margin-top: 2rem;
  align-items: center;
  gap: 1.2rem;
  min-height: 8rem;
}

.extra-text {
  width: 80vw;
  height: min-content;
}

.bottom-element {
  background-color: rgb(255, 255, 255, 0.25);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25) ;
  padding: 1.2rem 2.4rem;
  border-radius: 1.2rem;
  width: fit-content;
}

.false {
  background-color: #AC2C2C;
  color: black;
  opacity: 75%;
  animation: wrong 3s forwards;
}

@keyframes wrong {
0% {
    transform: rotate(0);
}
1% {
    transform: rotate(-1deg);
}
5% {
    transform: rotate(1deg) scale(1);
}
7% {
    transform: rotate(-1deg) scale(0.98);
 }
8% {
  transform: rotate(0deg) scale(0.98);
}
9% {
  transform: rotate(-1deg) scale(1);
} 
11% {
  transform: rotate(1deg) ;
}
100% {
    transform:rotate(0);
}}

.correct {
  background-color: #7EEE57;
  color: black;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5) ;
  animation: celebration 1s forwards, idle 2s ease-in-out infinite ;
  transition-timing-function: cubic-bezier(1,.18,.56,1.09);
}

@keyframes celebration {
  0% {
      transform: rotate(0deg) scale(1);
      bottom: 0;
  }
  20% {
      transform: scale(1.05);
      bottom: 1rem;
  }
  40% {
      transform: scale(0.95);
      bottom: 0;
  }
  60% {
      transform: scale(1.05);
      bottom: 1rem;
  }
  80% {
      transform: scale(0.95);
      bottom: 0;
  }
  100% {
      transform: rotate(0deg) scale(1);
      bottom: 0;
  }
}

@keyframes idle {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-2deg);
  }
  75% {
    transform: rotate(2deg);
  }
  90% {
    transform: rotate(5deg) scale(1.02);
    z-index: 10;
  }
  100% {
    transform: rotate(0) scale(1);
  }
}


.selected {
  border: 5px solid hsla(60, 6%, 19%, 0.5) ;
  animation: selected celebration 0.2s forwards ;
  transition-timing-function: cubic-bezier(1,.18,.56,1.09);
}

@keyframes selected {
  0% {
    border: 0px solid hsla(60, 6%, 19%, 0.5) ;
  }
  100% {
    border: 5px solid hsla(60, 6%, 19%, 0.5) ;
  }
}


/* General Pokemon type styling */
.pokemon-types-container {
  display: flex;
  margin-right: auto;
}

.pokemon-type {
  padding: 0.6rem 1.2rem;
  border-radius: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 2rem;
  margin-right: 4px; 
  color: #fff;
  text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Normal type */
.type-normal {
  background-color: #A8A878;
}

/* Fire type */
.type-fire {
  background-color: #F08030;
}

/* Water type */
.type-water {
  background-color: #6890F0;
}

/* Electric type */
.type-electric {
  background-color: #F8D030;
}

/* Grass type */
.type-grass {
  background-color: #78C850;
}

/* Ice type */
.type-ice {
  background-color: #98D8D8;
}

/* Fighting type */
.type-fighting {
  background-color: #C03028;
}

/* Poison type */
.type-poison {
  background-color: #A040A0;
}

/* Ground type */
.type-ground {
  background-color: #E0C068;
}

/* Flying type */
.type-flying {
  background-color: #A890F0;
}

/* Psychic type */
.type-psychic {
  background-color: #F85888;
}

/* Bug type */
.type-bug {
  background-color: #A8B820;
}

/* Rock type */
.type-rock {
  background-color: #B8A038;
}

/* Ghost type */
.type-ghost {
  background-color: #705898;
}

/* Dragon type */
.type-dragon {
  background-color: #7038F8;
}

/* Dark type */
.type-dark {
  background-color: #705848;
}

/* Steel type */
.type-steel {
  background-color: #B8B8D0;
}

/* Fairy type */
.type-fairy {
  background-color: #EE99AC;
}

@media all and (orientation: landscape) {
  html {
    font-size: 50%;
  }
  .back{
    top: 0.6rem;
  }  
  .all-container{
    height: 100vh;
  }
  .scores-container{
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.4rem;
  }
  .header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.4rem;
  }
  .header-icon{
    margin: 0;
  }
  .main-container{
    display: flex;
    flex-direction: row;
  }
  
}