body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Arial', sans-serif;
  overflow-x: hidden;
  background: #000;
  color: white;
}

canvas#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: 500px;
  max-width: 95%;
  margin: 20px auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  text-align: center;
}

h1 {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: #FFD700;
  text-shadow: 2px 2px 8px #ff0000;
}

.settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

select,
button,
.modal input {
  padding: 12px 15px;
  border-radius: 12px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

select,
.modal input {
  background: #111;
  color: white;
}

select:focus,
.modal input:focus {
  outline: none;
  box-shadow: 0 0 8px #0072ff;
}

button {
  background: linear-gradient(to right, #ff4e50, #f9d423);
  color: black;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.card {
  padding: 15px;
  border-radius: 12px;
  background: rgba(50, 50, 50, 0.9);
  margin-top: 10px;
  transition: all 0.3s;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.answers button {
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  background: #1E90FF;
  color: white;
}

.answers button.correct {
  background: #28a745;
  animation: correctAnim 0.5s;
}

.answers button.wrong {
  background: #dc3545;
  animation: wrongAnim 0.5s;
}

#nextBtn {
  margin-top: 10px;
  background: #ff9800;
  color: black;
}

#timer {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
}

#timerBarContainer {
  width: 100%;
  height: 10px;
  background: #444;
  border-radius: 5px;
  margin-bottom: 10px;
  overflow: hidden;
}

#timerBar {
  width: 100%;
  height: 100%;
  background: #00FF00;
  transition: width 1s linear;
}

.hidden {
  display: none;
}

@keyframes correctAnim {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

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

@keyframes wrongAnim {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(15deg);
  }

  50% {
    transform: rotate(-15deg);
  }

  75% {
    transform: rotate(15deg);
  }

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

#leaderboard ul {
  list-style: none;
  padding: 0;
}

#leaderboard li {
  margin: 5px 0;
  background: linear-gradient(to right, #ff4e50, #f9d423);
  color: black;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: bold;
}

/* MODAL */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  z-index: 10;
  width: 90%;
  max-width: 350px;
}

.modal.hidden {
  display: none;
}

.modal input,
.modal select,
.modal button {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border-radius: 15px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

/* RESPONSIVO MOBILE */
@media screen and (max-width: 600px) {
  h1 {
    font-size: 1.8em;
  }

  .modal {
    width: 95%;
    padding: 20px;
  }

  .modal input,
  .modal select,
  .modal button,
  .answers button {
    font-size: 14px;
    padding: 10px;
  }

  #scoreChart {
    height: 120px !important;
  }
}
