/* importing google fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* General Styles */

/* Quote Container */

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #87f0eb, #feb0c9);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  flex-direction: column; /* Stack elements vertically */
}

.quote-container {
  background: rgba(255, 255, 255, 0.414);
  padding: 10px 55px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 80%;
  max-width: 90%;
  font-size: 19px; /* Smaller text for a compact look */
  font-weight: 500;
  white-space: normal; /* Keep the quote in one line */
  overflow: hidden;
  word-wrap: break-word;
  margin-top: -30px;
  text-overflow: ellipsis;
  /* Show "..." if quote is too long */
  position: absolute; /* Fixes the quote at the top of the quiz container */
  top: 50px; /* Adjusts the position above the quiz */
  left: 50%;
  transform: translateX(-50%); /* Centers the quote horizontally */

  /* Media query for small screens (phones) */
  @media (max-width: 600px) {
    .quote-container {
      font-size: 16px; /* Reduce font size for smaller screens */
      padding: 10px 20px; /* Adjust padding */
      width: 95%; /* Utilize full screen width */
    }
  }

  /* Media query for very small screens (below 400px) */
  @media (max-width: 400px) {
    .quote-container {
      font-size: 14px; /* Further reduce font size */
      padding: 8px 15px;
    }
  }
}

p {
  font-size: 18px;
  color: #333;
  margin-top: 15px;
  margin-bottom: 10px;
}

h5 {
  color: #666;
  margin-bottom: 15px;
  font-size: 15px;
}

/* Quiz Container */

.quiz_config {
  background: rgb(251, 251, 251);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  width: 350px;
  max-width: 90%;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 170px;
}

/* Header section for Quick Quiz */
.quiz_header {
  background: rgb(251, 95, 121); /* Adjust to your preferred color */
  padding: 10px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15%;
}

.quiz_header h2 {
  color: white;
  margin: 0;
  font-size: 36px;
  font-weight: 600;
}

#this {
  margin-top: 60px;
}
/* Category, Difficulty, Question Count Selection */
.quiz_config label {
  font-size: 24px;
  font-weight: 500;
  margin-top: 20px;
  margin-bottom: 15px;
  display: block;
}

/* Custom Styled Buttons */
.select-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.select-group button {
  background: white;
  border: 2px solid #b3b3b3;
  padding: 8px 14px;
  border-radius: 8px;

  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

.select-group button.selected {
  background: rgb(255, 67, 99);
  color: white;
  border-color: rgb(255, 67, 99);
}

/* Select Dropdown Styling */
.quiz_config select {
  width: 50%;
  padding: 8px;
  border: 2px solid #b3b3b3;
  border-radius: 8px;
  font-size: 18px;
  margin-top: 5px;
}

/* Start Quiz Button */
#startQuizBtn {
  background: rgb(255, 67, 99);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: 0.3s;
}

#startQuizBtn:hover {
  background: rgb(155, 19, 41);
}

.start_btn,
.info_box,
.quiz_box,
.result_box {
  margin-top: 17px;

  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.info_box.activeInfo,
.quiz_box.activeQuiz,
.result_box.activeResult {
  opacity: 1;
  z-index: 5;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.start_btn button {
  font-size: 25px;
  font-weight: 500;
  color: rgb(255, 67, 99);
  padding: 15px 30px;
  outline: none;
  border: none;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.info_box {
  max-width: 500px;
  width: 95%;
  background: #fff;
  border-radius: 5px;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.info_box .info-title {
  height: 60px;
  width: 100%;
  border-bottom: 1px solid lightgrey;
  display: flex;
  align-items: center;
  padding: 0 30px;
  border-radius: 5px 5px 0 0;
  font-size: 20px;
  font-weight: 600;
}

.info_box .info-list {
  padding: 15px 30px;
}

.info_box .info-list .info {
  margin: 5px 0;
  font-size: 17px;
}

.info_box .info-list .info span {
  font-weight: 600;
  color: rgb(255, 67, 99);
}

.info_box .buttons {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 30px;
  border-top: 1px solid lightgrey;
}

.info_box .buttons button {
  margin: 0 5px;
  height: 40px;
  width: 100px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 5px;
  border: 1px solid #5372f0;
  transition: all 0.3s ease;
}

.quiz_box {
  max-width: 500px;
  margin-top: 50px;
  width: 95%;
  background: #fff;
  border-radius: 5px;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.quiz_box header {
  position: relative;
  z-index: 2;
  height: 70px;
  padding: 0 30px;
  background: #fff;
  border-radius: 5px 5px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 3px 5px 1px rgba(0, 0, 0, 0.1);
}

.quiz_box header .title {
  font-size: 20px;
  font-weight: 600;
}

.quiz_box header .timer {
  color: #004085;
  background: #cce5ff;
  border: 1px solid #b8daff;
  height: 45px;
  padding: 0 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 145px;
}

.quiz_box header .timer .time_left_txt {
  font-weight: 400;
  font-size: 17px;
  user-select: none;
}

.quiz_box header .timer .timer_sec {
  font-size: 18px;
  font-weight: 500;
  height: 30px;
  width: 45px;
  color: #fff;
  border-radius: 5px;
  line-height: 30px;
  text-align: center;
  background: #343a40;
  border: 1px solid #343a40;
  user-select: none;
}

.quiz_box header .time_line {
  position: absolute;
  bottom: 0px;
  left: 0px;
  height: 3px;
  background: rgb(255, 67, 99);
}

section {
  padding: 25px 30px 20px 30px;
  background: #fff;
}

section .que_text {
  font-size: 25px;
  font-weight: 600;
}

section .option_list {
  padding: 20px 0px;
  display: block;
}

section .option_list .option {
  background: aliceblue;
  border: 1px solid #84c5fe;
  border-radius: 5px;
  padding: 8px 15px;
  font-size: 17px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

section .option_list .option:last-child {
  margin-bottom: 0px;
}

section .option_list .option:hover {
  color: #004085;
  background: #cce5ff;
  border: 1px solid #b8daff;
}

section .option_list .option.correct {
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

section .option_list .option.incorrect {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}

section .option_list .option.disabled {
  pointer-events: none;
}

section .option_list .option .icon {
  height: 26px;
  width: 26px;
  border: 2px solid transparent;
  border-radius: 50%;
  text-align: center;
  font-size: 13px;
  pointer-events: none;
  transition: all 0.3s ease;
  line-height: 24px;
}

.option_list .option .icon.tick {
  color: #23903c;
  border-color: #23903c;
  background: #d4edda;
}

.option_list .option .icon.cross {
  color: #a42834;
  background: #f8d7da;
  border-color: #a42834;
}

footer {
  height: 60px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid lightgrey;
}

footer .total_que span {
  display: flex;
  user-select: none;
}

footer .total_que span p {
  font-weight: 500;
  padding: 0 5px;
}

footer .total_que span p:first-child {
  padding-left: 0px;
}

footer button {
  height: 40px;
  padding: 0 13px;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  border: none;
  outline: none;
  color: #fff;
  border-radius: 5px;
  background: rgb(255, 67, 99);
  border: 1px solid rgb(255, 67, 99);
  line-height: 10px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

footer button:hover {
  background: rgb(255, 67, 99);
}

footer button.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.result_box {
  background: #fff;
  border-radius: 5px;
  display: flex;
  padding: 25px 30px;
  max-width: 400px;
  width: 95%;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.result_box .icon {
  font-size: 100px;
  color: rgb(255, 67, 99);
  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;
}

.result_box .score_text span p {
  padding: 0 6px;
  margin-top: -0.7px;
  font-weight: 600;
}

.result_box .buttons {
  display: flex;
  margin: 20px 0;
}

.result_box .buttons button {
  margin: 0 10px;
  height: 45px;
  padding: 0 20px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 5px;
  border: 1px solid rgb(255, 67, 99);
  transition: all 0.3s ease;
}

.buttons button.restart {
  color: #fff;
  background: rgb(255, 67, 99);
}

.buttons button.restart:hover {
  background: rgb(255, 67, 99);
}

.buttons button.quit {
  color: rgb(255, 67, 99);
  background: #fff;
}

.buttons button.quit:hover {
  color: #fff;
  background: rgb(255, 67, 99);
}

/* Responsive media query code for small devices */
@media (max-width: 768px) {
  section {
    padding: 25px 15px 20px 15px;
  }

  .quiz_box header,
  .info_box .info-title,
  .info_box .buttons {
    padding: 0 15px;
  }

  .result_box {
    padding: 25px 10px;
  }

  .info_box .info-list {
    padding: 15px;
  }

  .start_btn button {
    font-size: 20px;
    padding: 10px 25px;
  }
}

.start_btn,
.info_box,
.quiz_box,
.result_box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%; /* Increased width */
  min-height: 350px; /* Ensuring uniform height */
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  padding: 20px; /* More padding for spacing */
}

img {
  width: 160px;
  height: auto;
  margin-top: -20px;
  margin-bottom: -50px;
}

.quiz_config {
  width: 54%;
  height: auto;
  margin-top: 90px;
  min-height: 350px; /* Same as other elements */
}

.info_box,
.quiz_box,
.result_box {
  max-width: 600px; /* Make them a bit larger */
  width: 50%;
}
.quiz_box {
  margin-top: 70px;
}
@media (max-width: 968px) {
  .start_btn,
  .info_box,
  .quiz_box,
  .result_box,
  .quiz_config {
    width: 80%; /* Adjust for small screens */
    min-height: 300px;
  
  }
}
