
.quiz-shell{
  max-width:1100px;
  margin:0 auto;
  padding:24px;
}

.quiz-header{
  background:#fff;
  border-radius:16px;
  padding:24px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06);
  margin-bottom:20px;
}

.quiz-header h1{
  margin:0 0 8px;
  color:#1d2c53;
}

.quiz-card{
  background:#fff;
  border-radius:16px;
  padding:22px;
  margin-bottom:20px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06);
}

.q-grid,
.op-grid{
  display:grid;
  gap:14px;
}

.q-grid{
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}

.op-grid{
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}

.q-item,
.op-item{
  background:#f8faff;
  border:1px solid #dbe5ff;
  border-radius:12px;
  padding:12px;
}

.q-item label,
.op-item label{
  display:block;
  font-weight:700;
  margin-bottom:8px;
  color:#24365f;
}

select,
input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #c9d6f3;
  font-size:14px;
  box-sizing:border-box;
}

.vector-input-row{
  display:flex;
  gap:12px;
  max-width:360px;
}

.check-btn,
.finish-btn,
.modal-box button{
  margin-top:16px;
  border:none;
  border-radius:999px;
  padding:12px 18px;
  font-weight:700;
  cursor:pointer;
  background:linear-gradient(180deg, #4a8cff 0%, #245fe6 100%);
  color:#fff;
}

.finish-btn{
  background:linear-gradient(180deg, #7a4a26 0%, #4b2f1d 100%);
}


/*3rd question */

.check-btn3,
.finish-btn3,
.modal-box button{
  margin-top:16px;
  border:none;
  border-radius:999px;
  padding:12px 18px;
  font-weight:700;
  cursor:pointer;
  background:linear-gradient(180deg, #4a8cff 0%, #245fe6 100%);
  color:#fff;
}

.finish-btn3{
  background:linear-gradient(180deg, #7a4a26 0%, #4b2f1d 100%);
}
/* 4th question*/

.check-btn4,
.finish-btn4,
.modal-box button{
  margin-top:16px;
  border:none;
  border-radius:999px;
  padding:12px 18px;
  font-weight:700;
  cursor:pointer;
  background:linear-gradient(180deg, #4a8cff 0%, #245fe6 100%);
  color:#fff;
}

.finish-btn4{
  background:linear-gradient(180deg, #7a4a26 0%, #4b2f1d 100%);
}



.muted{
  color:#56657f;
}

.final-answers{
  margin-top:18px;
  padding:18px;
  border-radius:14px;
  background:#f8fbff;
  border:1px solid #d9e7ff;
}

.hidden{
  display:none;
}

.correct{
  border-color:#23a55a !important;
  background:#effcf4 !important;
}

.incorrect{
  border-color:#d93025 !important;
  background:#fff1f0 !important;
}

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-overlay.hidden{
  display: none !important;
}
.modal-box{
  width:min(92%, 420px);
  background:#fff;
  border-radius:18px;
  padding:24px;
  text-align:center;
  box-shadow:0 16px 36px rgba(0,0,0,0.2);
}

.modal-box h3{
  margin-top:0;
  color:#1d7a35;
}

.question-image-slot{
  margin: 16px 0 18px;
  min-height: 140px;
  border: 1px dashed #cdd8f3;
  border-radius: 12px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7a96;
  font-size: 14px;
  text-align: center;
  padding: 12px;
}

.question-image-slot img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.quiz-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.solution-step{
  margin-bottom: 12px;
  line-height: 1.8;
}

.solution-step strong{
  color: #20345f;
}

.answer-highlight{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eef7ff;
  border: 1px solid #cfe3ff;
  font-weight: 700;
  color: #18345d;
}

.question-image-slot{
  margin: 16px 0 18px;
  padding: 10px;
  border: 1px solid #d9e2f3;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.question-image-slot img{
  display: block;
  width: 100%;
  max-width: 420px;   /* keeps image small */
  height: auto;
  object-fit: contain;
  border-radius: 8px;

  /* crisp rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/*final part */



.quiz-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.solution-step{
  margin-bottom: 12px;
  line-height: 1.8;
}

.solution-step strong{
  color: #20345f;
}

.answer-highlight{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eef7ff;
  border: 1px solid #cfe3ff;
  font-weight: 700;
  color: #18345d;
}