@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-Regular.ttf");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: Poppins;
  src: url("../fonts/Poppins-Bold.ttf");
  font-weight: 700;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins;
  line-height: 1.2;
  color: rgb(20, 25, 39);
  user-select: none;
}

button {
  cursor: pointer;
  font-weight: 700;
  border: 2px solid rgb(100, 102, 229);
  border-radius: 10px;
  transition: box-shadow 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
  background-color: #f5f5f5;
}

button:hover {
  box-shadow: 0px 0px 5px 0px rgb(100, 102, 229);
}

.wrapper {
  max-width: 1040px;
  margin: 20px auto;
  padding: 0 20px;
}

/* ================================================================================================================ */
/* ================================================== Exam Rules ================================================== */

/* Rules Title */
#rules-title-wrap {
  padding: 30px 0 20px;
  text-align: center;
}

/* Rules List */
#rules-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  row-gap: 20px;
}

/* Button Start Exam */
#btn-start-exam-wrap {
  padding: 50px 0;
  text-align: center;
}

#btn-start-exam {
  padding: 10px 20px;
  font-size: 18px;
}

/* ================================================================================================================ */
/* ==================================================== Timer ===================================================== */

#timer {
  background-color: whitesmoke;
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  display: none;
}

#timer-inner {
  padding: 45px 0 20px;
  box-shadow: 0px -5px 10px 3px rgb(100, 102, 229);

  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 40px;
}

.timer-items-wrapper {
  width: 86px;
  aspect-ratio: 1/1;
  border: 4px solid rgb(100, 102, 229);
  border-radius: 50%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-items-wrapper span:first-child {
  font-size: 22px;
  font-weight: 700;
}
.timer-items-wrapper span:last-child {
  font-size: 14px;
  font-weight: 700;
}

.show-timer {
  display: block !important;
}

/* ================================================================================================================= */
/* ==================================================== Exam ======================================================= */

#exam,
.tasks,
.options-lists,
#result-top,
.result-options-lists {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 20px;
}

.tasks {
  row-gap: 10px;
}

.options-lists,
.result-options-lists {
  list-style-type: none;
  row-gap: 8px;
}

.options-items {
  font-size: 14px;
  padding: 8px;
  border: 1px solid rgb(100, 102, 229);
  border-radius: 20px;
  transition: box-shadow 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);

  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  grid-column-gap: 10px;
}

.questions {
  font-weight: 700;
}

input[type="radio"] {
  accent-color: rgb(100, 102, 229);
  width: 20px;
  aspect-ratio: 1/1;
  cursor: pointer;
}

.correct-answers {
  background-color: #ffe035;
  border-radius: 20px;
  padding: 10px;
}

/* Button Finish Exam */
#btn-finish-exam-wrap {
  padding: 50px 0;
  text-align: center;
}

#btn-finish-exam {
  padding: 10px 20px;
  font-size: 18px;
}

.btn-finish-exam-wrap-hidden {
  display: none;
}

#exam {
  display: none;
  padding: 40px 0;
}

.show-exam {
  display: flex !important;
}

/* =================================================================================================================== */
/* ==================================================== Result ======================================================= */
#result {
  padding: 30px 0;
  box-shadow: 0px -5px 10px 3px rgb(100, 102, 229);
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 40px;
}

#result-title {
  font-size: 25px;
}

#result-statistics {
  list-style-type: none;

  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 30px;
}

.result-statistics-items {
  font-weight: 700;

  width: 126px;
  aspect-ratio: 1/1;
  border: 6px solid rgb(100, 102, 229);
  border-radius: 50%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 5px;
}

.result-statistics-items span:first-child {
  font-size: 12px;
}
.result-statistics-items span:last-child {
  font-size: 26px;
}

.result-statistics-items:last-child span:last-child {
  font-size: 22px;
}

#btn-try-again {
  padding: 10px 20px;
  font-size: 16px;
}

#result {
  display: none;
}

.show-result {
  display: flex !important;
}

/* ================================================================================================================ */
/* ================================================= Dark Theme ================================================== */

#dark-theme-body {
  background-color: #131826;
}

#dark-theme-body #timer,
#dark-theme-body #result {
  background-color: #1e233b;
}

#dark-theme-body .correct-answers {
  color: #131826;
}

#dark-theme-body h2,
#dark-theme-body li,
#dark-theme-body p,
#dark-theme-body span {
  color: #ffffff;
}

#dark-theme-body button {
  border: 2px solid #6466e5;
  background-color: #1e233b;
  color: #ffffff;
}

/* ======================================================================================================= */
/* ============================================== Theme Switcher ========================================= */

#theme-switcher {
  cursor: pointer;
  overflow: hidden;
  border: none !important;
  border-radius: 20px;
  box-shadow: none;
  background-color: transparent !important;
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 60px;
}

#theme-switcher img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* ================================================================================================================ */
/* ================================================= Media Query ================================================== */

@media (max-width: 640px) {
  #result-statistics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 30px 50px;
  }
}

@media (max-width: 500px) {
  #timer-inner {
    column-gap: 20px;
  }

  .timer-items-wrapper {
    width: 70px;
    border: 3px solid rgb(100, 102, 229);
  }

  .timer-items-wrapper span:first-child {
    font-size: 16px;
    font-weight: 700;
  }

  .timer-items-wrapper span:last-child {
    font-size: 12px;
    font-weight: 700;
  }
}

@media (max-width: 375px) {
  #timer-inner {
    column-gap: 10px;
  }

  .timer-items-wrapper {
    width: 60px;
    border: 2px solid rgb(100, 102, 229);
  }

  .timer-items-wrapper span:first-child {
    font-size: 14px;
  }

  .timer-items-wrapper span:last-child {
    font-size: 10px;
  }

  .options-items {
    font-size: 12px;
    padding: 6px;
  }

  .questions,
  .correct-answers {
    font-size: 14px;
  }

  #result-statistics {
    grid-gap: 30px 30px;
  }
}
