body {
  background: linear-gradient(to bottom, #141c24, #090c0f);
  font-family: Arial, sans-serif;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

@keyframes shrinkBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
@keyframes popUp {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
      transform: scale(1);
    opacity: 1;
  }
}

@keyframes showWrong {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

.fade-in {
  animation: fadeIn 0.7s ease;
}

@keyframes fadeIn {
  from { opacity: 0;
        transform: translateY(40px);
  }
  to   { opacity: 1;
      transform: translateY(0px);
  }
}

.enter-info {
  text-align: center;
  align-items: center;
}

#user-form {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);

  flex-direction: column;
  align-items: center;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
  color: #fff;
}

h1, h2 {
  margin-bottom: 1rem;
  text-align: center;
}

#username {
  width: 100%;
  padding: 0.5rem;
  font-size: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 1rem;
}

button {
  font-weight: bold;
  background-color: #e57474;
  color: #FFFFFF;
  font-size: 1.2rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #e57474;
}



.hidden {
  display: none;
}

.users-holder {
  display: flex;
  width: 100%;
  justify-content: space-between;
  flex-direction: row;
  text-align: center;
  margin-top: 2rem;

  #user0 {
    position: fixed;
    left: 10px;
    top: 10px;

  }
  #user1 {
    position: fixed;
    right: 10px;
    top: 10px;
  }

}

#lobby-page {
  text-align: center;

  div {
    margin-top: 1rem;
  }
}

#difficulty-page {
  text-align: center;
}

#topics-container{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.topic-btn {
  font-weight: bold;
  color: #FFFFFF;
  font-size: 1.2rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 0.5rem;
  transition: background-color 0.3s ease;
  background-color: #7674e5b6;

}

.difficulty-btn {
  font-weight: bold;
  color: #FFFFFF;
  font-size: 1.2rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 0.5rem;

}

.selected {
    outline: 2px solid #ffffff;
    box-shadow: #cccc 0px 0px 15px;
}

#easy-btn {
  background-color: #48bb3d;
}
#medium-btn {
  background-color: #e56c38;
}
#hard-btn {
  background-color: #b43c3c;
}

#question-amount {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1rem;

  
  input[type="range"] {
    width: 40vw;
    padding: 0.5rem;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-left: 1rem;
    text-align: center;
    accent-color: #e57474;
  }

  
}

#question-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 2rem;
  width: 100%;

  #bar-holder {
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 600px;
    max-width: 95vw;
    height: 20px;
    background-color: #e57474b6;
    border-radius: 10px;
    overflow: hidden;
    align-items: center;
  
    #bar {
    height: 100%;
    width: 100%;
    background-color: #e57474;
    border-radius: 10px;
    animation: shrinkBar 15s linear forwards;
    }
  
  }

}

#answer-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.choice-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 80vw;
  max-width: 600px;
  height: 20vh;
  max-height: max-content;

  list-style: none;
  padding: 0;
  margin: 1rem;

  justify-content: center;
  text-align: center;


  .choice {

    transform: scale(0.2);
    opacity: 0;

    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    
    &:hover {
      transform: scale(1.05);
      box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.2);
      transition: transform 0.2s, box-shadow 0.2s;
    }

    &.pop-up {
  animation: popUp 0.6s cubic-bezier(.25,.8,.25,1) forwards;
      animation-fill-mode: forwards;
    }
    
    &.wrong {
      animation: showWrong 0.4s ease-in-out forwards;
      animation-fill-mode: forwards;
    }
    

  }

  #answer0 {
    background-color: #b43c3c;
  }

  #answer1 {
    background-color: #7674e5b6;
  }

  #answer2 {
    background-color: #48bb3d;
  }

  #answer3 {
    background-color: #e56c38;
  }

}

#scoreboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;

  h2 {
    font-size: xxx-large;
  }

  button {
    transform: scale(1);
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    
    &:hover {
      transform: scale(1.05);
      box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.2);
      transition: transform 0.2s, box-shadow 0.2s;
    }
  }
}

#score-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  margin-bottom: 4.5rem;
  width: 100%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.score-entry {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.score-entry img {
  border-radius: 50%;
}

.rank {
  font-size: 1.3rem;
  font-weight: bold;
  width: 2rem;
  text-align: center;
}

.score-name {
  flex: 1;
  margin: 0;
}

.score-value {
  font-weight: bold;
  margin: 0;
}