.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  justify-content: center;
}

.scrollable {
  height: auto;
  max-height: 80vh;
  overflow: auto;
}

ul {
  list-style: none;
}

body {
  background-image: url('/public/img/example-image.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
}
h1 {
  position: relative;
  z-index: 10;
  top: 50px;
}

.welcome-title {
  font-size: 5rem;
  margin-top: 0.7rem;
}

#welcome-page-name-input {
  margin-bottom: 2rem;
  width: 80%;
  box-sizing: border-box;
  font-size: 1.2rem;
}

#difficulty-selector-container {
  margin-top: 6px;
}

#user-interface {
  background-color: rgba(191, 175, 57, 0.766);
  width: 70%;
  max-height: 80vh;
  display: grid;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 1rem;
  overflow-y: auto;
  font-family: Arial, Helvetica, sans-serif;
}

h1,
#next-question-button {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin: 10px 0;
  bottom: 20px;
}

#start-quiz-button {
  width: 8rem;
  padding: 0.4rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 15px;
  border-style: hidden;
  background-color: #d8457be7;
}
#start-quiz-button:hover {
  background-color: #dbcdd2e7;
}

#answers-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  margin-bottom: 0.8rem;
  animation: fade-in 0.5s backwards;
  transition: all 0.3s smooth;
}

button {
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1rem;
  padding: 1rem;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

li {
  flex: 1 1 48%;
  margin: 0.5rem;
  padding: 0.5rem;
  display: flex;
  transition: background-color 0.3s ease;
}

#answers-list button > span {
  text-transform: uppercase;
  padding-right: 0.5rem;
}

#next-question-button {
  width: 9rem;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: bold;
  font-style: italic;
  border-radius: 13px;
  border-style: hidden;
  background-color: #cd658be7;
}
#next-question-button:hover {
  background-color: #da316fe7;
}

#answers-list .correct-answer {
  background-color: rgb(10, 156, 10);
  color: black;
  font-weight: 600;
}

#answers-list .wrong-answer {
  background-color: red;
  color: black;
}
#score {
  font-size: 1.3rem;
  margin-bottom: 35rem;
  border: 2px solid #0e0e0e;
  border-radius: 5px;
  box-sizing: border-box;
  text-align: center;
  position: fixed;
  padding: 0.8rem;
  font-weight: bold;
  position: fixed;
  top: 0.1rem;
  right: 20px;
  z-index: 5;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
#remaining {
  font-weight: bold;
  position: fixed;
  top: 10px;
  left: 20px;
}

#scoreFeedback {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#scoreView {
  font-weight: 700;
  border: 3px solid rgb(150, 140, 57);
  padding: 10px;
  box-shadow: 1px 1px 6px 10px rgba(238, 231, 165, 0.582);
}

#feedbackText {
  color: black;
  align-self: center;
  justify-self: start;
  font-size: 20px;
  animation: change-size 0.9s forwards;
  transition: all 0.6s ease-in-out;
}

#gif {
  max-width: 100%;
  max-height: 250px;
  border: 5px rgb(223, 210, 235) solid;
  animation: expand 0.7s 1;
  transition: all 1s ease-in-out;
  box-shadow: 4px 4px 6px 4px rgba(37, 36, 23, 0.829);
}

#restart-button {
  align-self: center;
  width: 130px;
  height: 50px;
  background-color: #cd658be7;
  font-size: 0.9rem;
  font-weight: bold;
  margin-top: 20px;
  border-radius: 15px;
  border-style: hidden;
}
#restart-button:hover {
  background-color: #bb8db9c7;
  border: solid white 3px;
}

@media (max-width: 680px) {
  #answers-list {
    flex-direction: column;
  }
  li {
    flex: 1 1 auto;
    margin: 0.5rem 0;
  }
  button {
    font-size: 0.8rem;
  }
  #score {
    font-size: 0.7rem;
    top: 10px;
    right: 10px;
    margin-bottom: 20rem;
  }

  h2 {
    font-size: 2rem;
  }
  ul {
    font-size: 0.9rem;
  }
  h1 {
    font-size: 1rem;
    top: 40px;
  }
  .welcome-title {
    font-size: 3rem;
  }
  #user-interface {
    width: 95%;
    padding: 10px;
  }
  h1,
  #next-question-button {
    font-size: 0.7rem;
    bottom: 1rem;
  }
  #remaining {
    font-size: 0.7rem;
  }
}

@media (max-width: 990px) {
  h1 {
    font-size: 1.5rem;
  }
  button {
    font-size: 0.8rem;
  }
  #next-question-button {
    font-size: 0.7rem;
    bottom: 2rem;
  }
  #score {
    font-size: 0.8rem;
  }
  #remaining {
    font-size: 0.8rem;
  }
}

@keyframes expand {
  0% {
    transform: scale(0.2);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes change-size {
  0% {
    transform: scale(5);
    color: goldenrod;
  }

  50% {
    transform: scale(0.5);
    color: olive;
  }

  100% {
    transform: scale(1);
    color: rgba(0, 0, 0, 0.753);
  }
}

@keyframes fade-in {
  from {
    opacity: 0.1;
  }
  to {
    opacity: 1;
  }
}
