@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;600;700&display=swap');
/* Defaults */
html, body, #quizzie {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
* {
    box-sizing: border-box;
}
body {
  background: linear-gradient(62deg, #95e9e3 30%, #1fbed2 41%, #0b2632 85%);
  font-family: 'Be Vietnam Pro', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-y: auto;
}

h1 {
  font-family: 'Satisfy', 'cursive';
  font-size: 2.5em;
}
h2,p {
  font-family: 'Pathway Gothic One', 'sans-serif';
  font-size: 2em;
}
h1,h2,p {
    text-align: center;
    display: block;
    width: auto;
    margin: 1%;
}
#quizzie {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px #0002;
  max-width: 800px;
  width: 98vw;
  min-height: 720px;
  margin: auto;
  padding: 2.5em 2em 2em 2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 100px; /* Add extra space at the bottom for the fixed footer */
}

#score-progress {
  font-size: 1.2em;
  margin-bottom: 1.5em;
  color: #1f8197;
  font-weight: 600;
  letter-spacing: 1px;
}

.quiz-step {
  width: 100%;
}

/* Individual Steps/Sections */
ul {
    list-style: none;
    display: block;
    width: auto;
    margin: 2% 2%;
    padding: 2%;
    overflow: auto;
    display:none;
  &.current {
    display: block;
  }
  
  /* Step Questions and Answer Options */
  li {
      display: inline-block;
      width: 49%;
      margin-right: 2%;
      overflow: auto;
      text-align: center;
    &.quiz-answer {
        cursor: pointer;
    }
    &.question {
        display: block;
        float: none;
        width: 100%;
        text-align: center;
        margin: 0;
        margin-bottom: 2%;
    }
    &.results-inner {
        padding: 5% 2%;
        img {
            width: 250px;
        }
    }
  }
  li:last-child {
      margin-right: 0;
  }
}

/* Content */
.question-wrap {
    margin-bottom: 1.5em;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
}
.question-wrap h2 {
  font-size: 1.5em;
  color: #1f8197;
  margin: 0 0 0.5em 0;
  font-weight: 700;
}

.question-wrap p {
  font-size: 1.2em;
  color: #222;
  margin: 0;
}

.answers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.answers-grid-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 2em auto;
}
.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5em;
  width: 100%;
  max-width: 38vw;
  min-height: 10em;
  align-items: stretch;
}
.grid-cell {
  width: 100%;
  height: 100%;
  min-width: 210px;
  min-height: 80px;
  display: flex;
  align-items: stretch;
}

.quiz-answer {
  width: 100%;
  height: 100%;
  margin-bottom: 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  transition: box-shadow 0.2s;
  display: block;
  position: relative;
  float: none;
}

.quiz-answer .answer-wrap {
  width: 100%;
  height: 100%;
  background: #f7fafc;
  color: #1f8197;
  font-size: 0.80em;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1em 1em;
  text-align: center;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  user-select: none;
  min-height: 80px;
  min-width: 210px;
  max-width: 100%;
  word-break: break-word;
  white-space: pre-line;
  box-sizing: border-box;
}

.quiz-answer.correct .answer-wrap {
  background: #42ff73 !important;
  color: #fff;
  box-shadow: 0 0 0 3px #42ff73;
}

.quiz-answer.incorrect .answer-wrap {
  background: #ff6161 !important;
  color: #fff;
  box-shadow: 0 0 0 3px #ff6161;
}

.checkmark, .xmark {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 2em;
  font-weight: bold;
  color: #fff;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.quiz-answer.show-check .checkmark {
  opacity: 1;
  animation: flashMark 0.7s;
}
.quiz-answer.show-x .xmark {
  opacity: 1;
  animation: flashMark 0.7s;
}
@keyframes flashMark {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

#results {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  width: 100vw;
}

#results .results-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#results img.result-img {
  display: block;
  margin: 1.5em auto 0 auto;
  max-width: 250px;
  border-radius: 10px;
  box-shadow: 0 2px 12px #2228;
}

button, .quiz-button {
  background: #1f8197;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 2em;
  font-size: 1.1em;
  font-weight: 600;
  margin: 1.5em 0 0 0;
  cursor: pointer;
  box-shadow: 0 2px 8px #0001;
  transition: background 0.2s;
}

button:hover, .quiz-button:hover {
  background: #1fbed2;
}

#results, #results .results-inner, #results h1, #results .desc, #results p {
  color: #1f8197 !important;
  background: #fff !important;
}

@media (max-height: 900px) {
  #quizzie {
    margin-top: 2em;
    margin-bottom: 2em;
    min-height: 500px;
    padding-top: 1.5em;
    padding-bottom: 1.5em;
  }
}

@media (max-width: 900px) {
  #quizzie {
    max-width: 98vw;
    min-height: 400px;
    padding: 1em 0.5em 1em 0.5em;
    padding-bottom: 2.5em; /* Ensure space for footer on mobile */
  }
}

/* Add a small spacer before the footer */
#quiz-footer-spacer {
  height: 10px;
  width: 100%;
  display: block;
}

#quiz-opening {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Removed justify-content: center to allow content to start at the top */
  min-height: 100vh;
  width: 100vw;
  background: #cf3a39;
  position: relative;
  padding-top: 60px; /* Increased for more space at the top */
  padding-bottom: 60px;
  box-sizing: border-box;
  overflow-y: auto;
}

#quiz-opening::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('splash_bg.jpg') center top/cover repeat;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}
/* Remove the ::after pseudo-element entirely */
#quiz-opening::after {
  content: none;
  display: none;
}
#quiz-opening > * {
  position: relative;
  z-index: 1;
}
#quiz-opening a {
  color: #ffe066;
  text-decoration: underline;
  font-weight: 700;
  background: linear-gradient(90deg, #fff 60%, transparent 100%);
  padding: 0.1em 0.2em;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
#quiz-opening a:hover {
  color: #cf3a39;
  background: #fff;
}

#quiz-settings select,
#quiz-settings button {
  vertical-align: middle;
  font-size: 1.1em;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  height: 2.4em;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
