@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  background: url("./img/background-2.jpg");
  background-size: 100rem;
  background-position: center;
  background-repeat: no-repeat;
}

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

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

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

.info-box-active-info {
  z-index: 5;
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(0.9);
}

.info-box .info-title {
  height: 60px;
  width: 100%;
  border: 1px solid lightgrey;
  display: flex;
  align-items: center;
  padding: 0 35px;
  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-size: 600;
  color: #007bff;
}

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

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

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

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

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

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

.quiz-box {
  display: none;
  width: 550px;
  background: #fff;
  border-radius: 5px;
}

.quiz-box-active-box {
  display: block;
  z-index: 5;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(0.9);
}

.quiz-box header {
  position: relative;
  z-index: 99;
  height: 70px;
  padding: 0 30px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  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;
}

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

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

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

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

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

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

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

section .option-list .option {
  background: aliceblue;
  border: 1px solid #84c5fe;
  border-radius: 5px;
  font-size: 17px;
  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: #cce5ff;
  border-color: #b8daff;
}

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

.option-list .option .icon {
  height: 26px;
  width: 26px;
  border: 1px 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: #d4edda;
}

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

.option-list .option.correct {
  color: #155224;
  background: #d4edda;
  border-color: #c3e6cb;
}
.option-list .option.incorrect {
  color: #721c24;
  background: #f8d7da;
  border-color: #f5c6c6;
}

.option-list .option.disable {
  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-que span {
  display: flex;
  user-select: none;
}

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

.total-que 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;
  cursor: pointer;
  background: #007bff;
  border-radius: 5px;
  border: 1px solid #007bff;
  transition: all 0.3s ease;
}

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

.result-box-active {
  z-index: 5;
  opacity: 1;
  pointer-events: all;
  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;
}

.score-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.2em;
  margin-top: 20px;
}

.score-text span {
  display: inline;
  margin: 0 2px;
  font-weight: bold;
}

.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.3 ease;
}

@media screen and (max-width: 600px) {
  .info-box,
  .quiz-box,
  .result-box {
    width: 90%;
    padding: 15px;
  }

  .info-title,
  .info-box .buttons {
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2);
    border: none;
  }
  .quiz-box header .time-line {
    display: none;
  }
}
