@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('../assets/fonts/Roboto/Roboto-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #001f54;
  --color-bg: #ebecf0;
  --color-muted: rgba(0, 31, 84, 0.3);
  --color-border-correct: #22c55e;
  --color-bg-correct: rgba(34, 197, 94, 0.1);
  --color-border-wrong: #ef4444;
  --color-bg-wrong: rgba(239, 68, 68, 0.1);
  --color-shadow: rgb(186, 190, 204);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none;
}

body {
  background-color: var(--color-bg);
  font-family: 'Roboto', sans-serif;
  width: 100vw;
  height: 100vh;
}

.container {
  width: 1320px;
}

.page-title {
  color: var(--color-primary);
  text-shadow: 1px 1px 1px #fff;
  font-size: 52px;
  text-align: center;
  margin-bottom: 48px;
}

.quiz-container {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
}

.question-number {
  font-size: 22px;
  color: var(--color-primary);
  font-weight: 600;
}

.separator,
.total-questions {
  font-size: 14px;
  color: var(--color-muted);
}

.question-title {
  font-size: 24px;
  line-height: 1.6;
  color: var(--color-primary);
  text-shadow: 1px 1px 1px #fff;
  margin-bottom: 12px;
}

.quiz-option {
  color: var(--color-primary);
  opacity: 0.5;
  text-shadow: 1px 1px 1px #fff;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 50px;
  box-shadow:
    inset 2px 2px 5px #babecc,
    inset -5px -5px 10px #fff;
}

.quiz-option.correct {
  box-shadow: none;
  border: 1.5px solid var(--color-border-correct);
  background-color: var(--color-bg-correct);
}
.quiz-option.correct .checkbox-wrapper .container .checkmark:after {
  border-color: var(--color-border-correct);
}

.quiz-option.wrong {
  box-shadow: none;
  border: 1.5px solid var(--color-border-wrong);
  background-color: var(--color-bg-wrong);
}

.quiz-option.wrong .checkbox-wrapper .container .checkmark:after {
  border-color: var(--color-border-wrong);
}

/* ------------------- chechbox ------------------- */

.option-input {
  display: none;
}

.option-label {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.checkmark {
  position: relative;
  height: 1.2em;
  width: 1.2em;
  border-radius: 50%;
  background: #e8e8e8;
  box-shadow:
    3px 3px 5px var(--color-shadow),
    -3px -3px 5px #ffffff;
}

.option-input:checked ~ .checkmark {
  box-shadow:
    inset 3px 3px 5px var(--color-shadow),
    inset -3px -3px 5px #ffffff;
}

.checkmark::after {
  content: '';
  position: absolute;
  opacity: 0;
}

.option-input:checked ~ .checkmark::after {
  opacity: 1;
}

.checkmark::after {
  left: 0.45em;
  top: 0.25em;
  width: 0.25em;
  height: 0.5em;
  border: solid #001f5486;
  border-width: 0 0.15em 0.15em 0;
  transform: rotate(45deg);
  transition: all 250ms;
}
/* ------------------- chechbox ------------------- */

.quiz-btn {
  font-family: inherit;
  font-size: 16px;
  border: none;
  background-color: inherit;
  color: var(--color-primary);
  box-shadow:
    -5px -5px 20px #fff,
    5px 5px 20px var(--color-shadow);
  border-radius: 50px;
  font-weight: bold;
  padding: 14px;
  cursor: pointer;
  transition: box-shadow 0.3s;
}

.quiz-btn:not(:disabled):hover {
  box-shadow:
    -2px -2px 5px #fff,
    2px 2px 5px var(--color-shadow);
}

.quiz-btn:disabled {
  cursor: not-allowed;
  color: var(--color-muted);
}

.option-input:disabled {
  cursor: not-allowed;
}

/* -------------------------------------------------------------
                            Modal
------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.modal-content {
  flex-direction: column;
  gap: 16px;
  width: 300px;
  border-radius: 16px;
  padding: 25px;
  background-color: var(--color-bg);
  transform: scale(0);
  color: var(--color-primary);
  transition: 0.3s;
  box-shadow:
    -6px -6px 14px rgba(255, 255, 255, 0.7),
    -6px -6px 10px rgba(255, 255, 255, 0.5),
    6px 6px 8px rgba(255, 255, 255, 0.075),
    6px 6px 10px rgba(0, 0, 0, 0.15);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal.show .modal-content {
  transform: scale(1);
}

.score-section {
  width: 160px;
  height: 160px;
  position: relative;
  border-radius: 50%;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  font-weight: 500;
  box-shadow:
    -8px -4px 8px 0px #ffffff,
    8px 4px 12px 0px #d1d9e6;
}

.score-section::after,
.score-section::before {
  content: '';
  position: absolute;
  top: 13%;
  left: 13%;
  height: 75%;
  width: 75%;
  border-radius: 50%;
}

.score-section::after {
  background-color: #ecf0f3;
  box-shadow:
    -4px -2px 4px 0px #fff,
    4px 2px 8px 0px #d1d9e6;
  transform: scale3d(1, 1, 1);
  transition:
    opacity 0.25s ease-in-out,
    transform 0.25s ease-in-out;
}

.score-section::before {
  box-shadow:
    -4px -2px 4px 0px #d1d9e6,
    4px 2px 8px 0px #fff;
}

.score-label,
.result-score {
  position: relative;
  z-index: 10;
}

.score-value {
  font-size: 24px;
}

.score-total {
  color: var(--color-muted);
  font-size: 20px;
}

.total-value,
.correct-value,
.wrong-value {
  font-size: 18px;
  font-weight: 600;
}

.total-value {
  color: var(--color-primary);
}

.correct-value {
  color: var(--color-border-correct);
}

.wrong-value {
  color: var(--color-border-wrong);
}

.modal-actions {
  width: 100%;
  gap: 12px;
  margin-top: 16px;
}

.modal-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  padding: 12px;
  flex-basis: 50%;
  background-color: var(--color-bg);
  color: var(--color-primary);
  cursor: pointer;
  box-shadow:
    -5px -5px 20px #fff,
    5px 5px 20px var(--color-shadow);
  transition: box-shadow 0.3s;
}

.modal-btn:hover {
  box-shadow:
    -2px -2px 5px #fff,
    2px 2px 5px var(--color-shadow);
}

/* -------------------------------------------------------------
                          Loader
------------------------------------------------------------- */
.loader-wrapper {
  background-color: var(--color-bg);
  position: fixed;
  inset: 0;
  opacity: 1;
  visibility: visible;
  transition: 0.3s;
}

.loader-wrapper.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  width: 250px;
  border-radius: 50%;
  box-shadow:
    inset -10px -10px 15px rgba(255, 255, 255, 1),
    inset 10px 10px 10px rgba(0, 0, 0, 0.1);

  z-index: 1000;
}
.loader-circle::before {
  content: '';
  position: absolute;
  height: 150px;
  width: 150px;
  border-radius: 50%;
  box-shadow:
    -10px -10px 15px rgba(255, 255, 255, 1),
    10px 10px 10px rgba(0, 0, 0, 0.1);
}

.loader-dot {
  height: 156px;
  width: 180px;
  position: absolute;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.loader-dot::before {
  content: '';
  position: absolute;
  height: 30px;
  border-radius: 50%;
  width: 30px;
  background: var(--color-primary);
  box-shadow: 0 5px 10px rgb(0 0 0 / 30%);
}

.loader-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1.5px;
  color: var(--color-primary);
}

/* -------------------------------------------------------------
                         Responsive Design
------------------------------------------------------------- */
@media (max-width: 1200px) {
  .container {
    width: 1140px;
  }
  .quiz-container {
    width: 55%;
  }
}

@media (max-width: 992px) {
  .container {
    width: 960px;
  }

  .quiz-container {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .container {
    width: 720px;
  }

  .quiz-container {
    width: 70%;
  }
}

@media (max-width: 576px) {
  .container {
    width: 540px;
  }

  .quiz-container {
    width: 75%;
  }

  .page-title {
    font-size: 40px;
    margin-bottom: 38px;
  }

  .question-number {
    font-size: 18px;
  }

  .separator,
  .total-questions {
    font-size: 12px;
  }

  .question-title {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 8px;
  }

  .quiz-option {
    padding: 12px 14px;
  }

  .option-text {
    font-size: 14px;
    line-height: 1.5;
  }

  .checkbox-wrapper .container {
    font-size: 14px;
  }

  .quiz-btn {
    font-size: 14px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 450px;
  }

  .quiz-container {
    width: 85%;
  }

  .page-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .question-number {
    font-size: 16px;
  }

  .separator,
  .total-questions {
    font-size: 10px;
  }

  .question-title {
    font-size: 18px;
  }

  .quiz-option {
    padding: 10px 12px;
  }

  .option-text {
    font-size: 12px;
  }

  .checkbox-wrapper .container {
    font-size: 12px;
  }

  .quiz-btn {
    font-size: 12px;
    padding: 10px;
  }

  .modal-content {
    width: 280px;
  }

  .score-section {
    width: 140px;
    height: 140px;
  }

  .score-value {
    font-size: 20px;
  }

  .score-total {
    font-size: 16px;
  }

  .score-label,
  .result-questions,
  .correct-count,
  .wrong-count {
    font-size: 14px;
  }

  .total-value,
  .correct-value,
  .wrong-value {
    font-size: 16px;
  }

  .modal-actions {
    gap: 10px;
    margin-top: 10px;
}

  .modal-btn {
    font-size: 13px;
  }

  .loader-circle {
    height: 200px;
    width: 200px;
  }

  .loader-circle::before {
    height: 120px;
    width: 120px;
  }

  .loader-dot {
    height: 140px;
    width: 136px;
  }

  .loader-dot::before {
    width: 23px;
    height: 23px;
  }

  .loader-text {
    font-size: 16px;
  }
}
