@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap");

body {
  background: linear-gradient(to bottom, #b4c5d4, #e0e3e8);
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: "Poppins", sans-serif;
}
.title {
  text-align: center;
  margin-bottom: 30px;
  color: #495561;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}
.quiz-app {
  display: flex;
  flex-direction: row;
  margin-top: 50px;
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  margin: 10px;
  height: 600px;
  margin-bottom: 10px;
}
.timer,
.count {
  width: fit-content;
  height: fit-content;
  border-radius: 20px;
  background: linear-gradient(90deg, #8c9dadec, #6c7a87);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    5px 5px 15px rgba(163, 177, 198, 0.4),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  color: azure;
}
.warning {
  background: linear-gradient(90deg, #e05c5c, #ce5252e6);
  animation: pulse-warning 1s infinite;
}
@keyframes pulse-warning {
  0%,
  100% {
    box-shadow:
      5px 5px 15px rgba(224, 92, 92, 0.4),
      inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      5px 5px 25px rgba(224, 92, 92, 0.7),
      inset 0 0 10px rgba(255, 255, 255, 0.3);
  }
}

.menu {
  background-color: #b4c5d4;
  border-radius: 12px;
  box-shadow: 10px 10px 20px rgba(163, 177, 198, 0.4);
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  max-height: 500px;
  overflow: hidden;
  margin-top: 15px;
  width: 100%;
}
.hamburger-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background-color: #8c9dadec;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  transition: background-color 0.2s ease;
}
.hamburger-btn:hover {
  background-color: #6c7a87;
}
.hamburger-btn svg {
  stroke: white;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}
.icon-arrow {
  display: none;
}
.hamburger-btn.open .icon-hamburger {
  display: none;
}
.hamburger-btn.open .icon-arrow {
  display: block;
}

.menu-bar {
  transition: flex 0.3s ease;
  width: 120px;
  display: flex;
  flex-direction: column;
}
.menu-bar.closed {
  flex: 0 0 auto;
}
.menu-bar.closed .menu {
  display: none;
}
.quiz-area {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.info {
  display: flex;
  gap: 200px;
  margin-bottom: 20px;
  font-size: 20px;
  align-items: center;
}

/* .menu-bar p {
  margin: 0;
  font-weight: bold;
  border: none;
  cursor: pointer;
  padding: 9px;
  border-radius: 13px;
  background-color: #b8babfc8;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Roboto", sans-serif;
} */
.question {
  width: 100%;
}
.question h3 {
  padding: 15px;
  border-radius: 13px;
  text-align: center;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  margin: 18px;
  background-color: #e2dbcf;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
}
.options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.answer {
  width: fit-content;
  margin: 15px;
  text-align: center;
  border-radius: 13px;
  font-size: 17px;
  padding: 12px;
  background-color: #8c9dadec;
  color: white;
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.2),
    -5px -5px 10px rgba(255, 255, 255, 0.1);
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  cursor: pointer;
}
.answer:has(input[type="radio"]:checked):not(.correct):not(.wrong) {
  background-color: #6c7a87;
  color: #ffffff;
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);
}
.answer input,
.answer label {
  cursor: pointer;
}
ul {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  justify-content: flex-start;
  overflow-y: auto;
  flex: 1;
}
ul li {
  background-color: #f2f3f5;
  list-style: none;
  margin: 6px;
  font-size: 14px;
  text-align: center;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
}
.menu ul li button {
  all: unset;
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #f2f3f5;
  color: inherit;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  text-align: center;
  border-radius: 12px;
  padding: 4px;
  cursor: pointer;
}

.menu ul li button.active {
  background-color: #9ea6b6;
  font-weight: bold;
}
.menu ul li button:not(.active):hover {
  background-color: #dbe0e8;
  cursor: pointer;
}

/* .menu ul li button:hover {
  background-color: #dbe0e8;
} */
.menu ul::-webkit-scrollbar {
  width: 10px;
}

.menu ul::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.menu ul::-webkit-scrollbar-thumb {
  background-color: #8c9dadec;
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.menu ul::-webkit-scrollbar-thumb:hover {
  background-color: #6c7a87;
}
.control {
  display: flex;
  justify-content: space-between;
  margin: 15px;
  gap: 30px;
}
.submit {
  padding: 13px;
  font-size: 14px;
  border: none;
  border-radius: 13px;
  background-color: #b8babfc8;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  cursor: pointer;
}
.finish {
  width: 90%;
  padding: 13px;
  font-size: 14px;
  border: none;
  border-radius: 13px;
  background-color: #b8babfc8;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  cursor: pointer;
  margin-top: 25px;
}
footer {
  bottom: 0;
  text-align: center;
  padding: 10px;
  left: 0;
  width: 100%;
  color: aliceblue;
  background-color: #5a5e66cf;
}
.result {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.show {
  display: flex;
}
.finish:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.result-box {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 40px 30px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 10px 10px 30px rgba(163, 177, 198, 0.5);
  text-align: center;
}
.result-circle {
  --progress: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 25px;
  background: conic-gradient(
    #6c7a87 calc(var(--progress) * 1%),
    rgba(140, 157, 173, 0.25) 0
  );
  box-shadow: 5px 5px 15px rgba(163, 177, 198, 0.4);
}
.result-circle::before {
  content: "";
  position: absolute;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.result-score {
  position: relative;
  z-index: 1;
  color: #1a1d20;
  font-size: 20px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

.result-text {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  color: #444;
  margin: 0 0 20px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.result-btn {
  padding: 12px;
  border: none;
  border-radius: 13px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
}
.new-quiz-btn {
  background-color: #b8babfc8;
}
.review-btn {
  background-color: #8c9dadec;
  color: white;
}
.answer.correct {
  background-color: #7fa37f;
  color: white;
}
.answer.wrong {
  background-color: #b84545c9;
  color: white;
}
.menu ul li button.correct {
  background-color: #a9c9a9;
  color: #1a1d20;
}
.menu ul li button.wrong {
  background-color: #b84545c9;
  color: #1a1d20;
}
.menu ul li button.correct.active,
.menu ul li button.wrong.active {
  font-weight: bold;
  box-shadow: inset 0 0 0 2px #6c7a87;
}
.menu ul li button.skipped {
  background-color: #8d949e;
  color: #252b34;
}

.menu ul li button.skipped.active {
  font-weight: bold;
  box-shadow: inset 0 0 0 2px #6c7a87;
}
@media (max-width: 650px) {
  body {
    height: auto;
    min-height: 100vh;
  }

  .title h1 {
    font-size: 22px;
    margin-top: 15px;
    margin-bottom: 15px;
  }

  .quiz-app {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 120px);
    margin: 10px;
    padding: 15px;
    position: relative;
  }

  .menu-bar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
  }

  .hamburger-btn {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
  }

  .menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    width: 50%;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    max-height: 450px;
    margin-top: 5px;
    border-radius: 20px;
    padding: 15px;
    box-sizing: border-box;
  }
  .menu ul {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 8px;
    overflow-y: auto;
    max-height: 400px;
  }
  .menu ul li {
    margin: 0;
  }
  .menu ul li button {
    padding: 10px 0;
    font-size: 14px;
  }
  .quiz-area {
    width: 100%;
    margin-top: 15px;
  }

  .info {
    width: 100%;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
  }

  .timer,
  .count {
    padding: 6px 14px;
    font-size: 13px;
  }

  .question {
    width: 100%;
  }

  .question h3 {
    margin: 10px 0;
    padding: 12px;
    font-size: 15px;
    line-height: 1.4;
  }

  .options {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .answer {
    width: auto;
    margin: 6px 0;
    padding: 10px 14px;
    font-size: 14px;
    text-align: left;
  }

  .control {
    width: 100%;
    gap: 10px;
    margin: 15px 0 5px;
  }

  .submit {
    flex: 1;
    padding: 10px;
    font-size: 13px;
  }

  .finish {
    width: 100%;
    padding: 11px;
    font-size: 13px;
    margin-top: 10px;
  }

  .result-box {
    width: 50%;
    padding: 20px 15px;
  }
  .title {
  margin-bottom: 10px;
  color: #495561;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
}
}
