@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #007bff;
}

.start-btn,
.info-box,
.quiz-box,
.result-box {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  box-shadow: 0px 10px 10px 0 rgba(0, 0, 0, 0.2),
              0px 10px 20px 0 rgba(0, 0, 0, 0.20);
  transition: all 0.3s ease;
}

.info-box.activeInfo,
.quiz-box.activeQuiz,
.result-box.activeResult {
  z-index: 5;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* start quiz button styling */
.start-btn button {
  font-size: 25px;
  font-weight: 500;
  color: #007bff;
  padding: 15px 30px;
  outline: none;
  border: none;
  border-radius: 5px;
  background-color: #fff;
  cursor: pointer;
}

.start-btn button:hover {
  color: #fff;
  background-color: #0263ca;
  border: 2px solid #fff;
}

.info-box {
  width: 540px;
  background-color: #fff;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.info-box .info-title {
  height: 60px;
  width: 100%;
  border-bottom: 1px solid lightgrey;
  display: flex;
  align-items: center;
  padding: 0 30px;
  font-size: 20px;
  font-weight: 600;
}

.info-box .info-list {
  padding: 15px 35px;
}

.info-box .info-list .info {
  margin: 5px 0;
  font-size: 17px;
}

.info-box .info-list .info span {
  font-weight: 600;
  color: #007bff;
}

.info-box .buttons {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 35px;
  border-top: 1px solid lightgray;
}

.info-box .buttons button {
  margin: 0 5px;
  height: 40px;
  width: 100px;
  outline: none;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buttons button.restart {
  color: #fff;
  background-color: #007bff;
}

.buttons button.restart:hover {
  background-color: #0263ca;
}

.buttons button.quit {
  color: #007bff;
}

.buttons button.quit:hover {
  color: #fff;
  background-color: #007bff;
}

.quiz-box {
  width: 550px;
  background-color: #fff;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.quiz-box header {
  position: relative;
  z-index: 99;
  height: 70px;
  padding: 0 30px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 3px 5px 1px rgba(0, 0, 0, 0.1);
}

.quiz-box header .title {
  font-size: 20px;
  font-weight: 600;
  user-select: none;
}

.quiz-box header .timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 145px;
  height: 45px;
  background-color: #cce5ff;
  border: 1px solid #b8daff;
  border-radius: 5px;
  padding: 0 8px;
}

.quiz-box header .timer .time-text {
  font-size: 17px;
  font-weight: 400;
  user-select: none;
}

.quiz-box header .timer .timer-sec {
  font-size: 18px;
  font-weight: 500;
  background-color: #343a40;
  height: 30px;
  width: 45px;
  color: #fff;
  text-align: center;
  line-height: 30px;
  border-radius: 5px;
  border: 1px solid #343a40;
  user-select: none;
}

.quiz-box header .time-line {
  position: absolute;
  bottom: 0px;
  left: 0px;
  height: 3px;
  background-color: #007bff;
}

.flash {
  animation: flash 0.8s infinite;
}

@keyframes flash {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.pop {
  animation: pop 0.5s;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.quiz-box section {
  padding: 25px 30px 20px 30px;
  background-color: #fff;
}

.quiz-box section .question-text {
  font-size: 25px;
  font-weight: 600;
}

.quiz-box section .option-list {
  padding: 20px 0;
  display: block;
}

section .option-list .option {
  font-size: 17px;
  background-color: aliceblue;
  border: 1px solid #84c5fe;
  border-radius: 5px;
  padding: 8px 15px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
}

section .option-list .option:hover{
  color: #004085;
  background-color: #cce5ff;
  border-color: #b8daff;
}

.option-list .option:last-child {
  margin-bottom: 0px;
}

.option-list .option .icon {
  height: 26px;
  width: 26px;
  border: 2px solid transparent;
  border-radius: 50%;
  text-align: center;
  font-size: 13px;
  line-height: 24px;
  pointer-events: none;
}

.option-list .option .icon.tick {
  color: #23903c;
  border-color: #23903c;
  background-color: #d4edda;
}

.option-list .option .icon.cross {
  color: #a42834;
  background-color: #f8d7da;
  border-color: #a42834;
}

.option-list .option.correct {
  color: #155724;
  border-color: #d4edda;
  background-color: #c3e6cb;
}

.option-list .option.incorrect {
  color: #721c24;
  border-color: #f8d7da;
  background-color: #f5c6cb;
}

.option-list .option.disabled {
  pointer-events: none;
}

.quiz-box footer {
  height: 60px;
  width: 100%;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-box footer .total-questions span {
  display: flex;
  user-select: none;
}

footer .total-questions span p {
  font-weight: 500;
  padding: 0 5px;
}

.total-questions span p:first-child {
  padding-left: 0px;
}

footer .next-btn {
  display: none;
  height: 40px;
  padding: 0 13px;
  font-size: 18px;
  font-weight: 400;
  border: none;
  outline: none;
  color: #fff;
  background-color: #007bff;
  border-radius: 5px;
  border: 1px solid #007bff;
  cursor: pointer;
  transition: all 0.3s ease;
}

footer .next-btn:hover {
  background-color: #0263ca;
}

.result-box {
  background-color: #fff;
  width: 450px;
  padding: 25px 30px;
  border-radius: 5px;
  display: flex;
  text-align: center;
  align-items: center;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.result-box .icon {
  font-size: 100px;
  color: #007bff;
  margin-bottom: 10px;
}

.result-box .complete-text {
  font-size: 20px;
  font-weight: 500;
}

.result-box .score-text span {
  display: flex;
  margin: 10px 0;
  font-size: 18px;
  font-weight: 500;
}

.score-text span p {
  font-weight: 600;
  padding: 0 4px;
}

.result-box .buttons {
  display: flex;
  margin: 20px 0;
}

.result-box .buttons button {
  margin: 0 10px;
  height: 45px;
  padding: 0 20px;
  border: none;
  outline: none;
  font-size: 18px;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid #007bff;
  cursor: pointer;
  transition: all 0.3s ease;
}