body {
  margin: 0;
  font-family: Arial;
  background: #f5f7fb;
  overflow: hidden;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 35px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#timer {
  font-size: 30px;
  font-weight: bold;
  color: #007bff;
}

.test-layout {
  height: calc(100vh - 145px);
  padding: 15px 30px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.work-area {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 20px;
  height: 72%;
}

.calculator-box,
.question-box {
  background: white;
  border-radius: 18px;
  padding: 20px;
  overflow: auto;
  height: 100%;
  box-sizing: border-box;
}

.desmos {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
}

.question-nav {
  background: white;
  border-radius: 18px;
  padding: 12px;
  min-height: 80px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#questionNav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.question-number {
  width: 40px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
}

button {
  padding: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.nav-buttons {
  margin-top: 25px;
  display: flex;
  gap: 14px;
  align-items: center;
}

#nextBtn {
  background: #007bff;
  color: white;
}

#backBtn {
  background: #ddd;
}

#submitBtn {
  width: 160px;
  padding: 10px 14px;
  margin-left: auto;
  background: green;
  color: white;
  font-size: 13px;
  border-radius: 10px;
}

#markBtn {
  background: orange;
  color: white;
  margin: 10px 0 15px;
}

.back-dashboard {
  display: inline-block;
  margin: 12px 35px;
  padding: 9px 16px;
  background: white;
  color: #007bff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.back-dashboard:hover {
  background: #eef5ff;
}

.option {
  display: block;
  background: #f1f1f1;
  padding: 14px;
  border-radius: 12px;
  margin: 12px 0;
}

.instructions-card {
  max-width: 700px;
  margin: 20px auto;
  background: white;
  padding: 45px;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.08);
}
.instructions-card h1 {
  margin-bottom: 20px;
}

.instructions-card p {
  font-size: 18px;
  margin-bottom: 20px;
}

.instructions-card li {
  font-size: 17px;
  margin: 14px 0;
}

.start-btn {
  margin-top: 30px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: #007bff;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .test-layout {
    height: auto;
  }

  .work-area {
    grid-template-columns: 1fr;
    height: auto;
  }

  .desmos {
    height: 300px;
  }
}
.question-number.marked {
  background: orange;
  color: white;
}
.question-image {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin: 15px 0;
  border-radius: 12px;
}
.question-number.answered {
  background: #1f9d55;
  color: white;
}

.student-answer {
  width: 160px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 18px;
}
body:has(.instructions-card) {
  overflow: auto;
}
.inside-back{
display:inline-block;

margin-bottom:20px;

color:#007bff;

font-weight:bold;

text-decoration:none;
}
.result-card {
  max-width: 900px;
  margin: 30px auto;
  background: white;
  padding: 35px;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.08);
}

.review-card {
  margin: 18px 0;
  padding: 18px;
  border-radius: 16px;
  background: #f5f5f5;
}

.review-card.right {
  border-left: 8px solid green;
}

.review-card.wrong {
  border-left: 8px solid red;
}
.submit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.submit-card {
  background: white;
  padding: 30px;
  border-radius: 22px;
  width: 360px;
  text-align: center;
}
.student-answer {
  width: 180px;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid #ddd;
  font-size: 18px;
  margin-top: 15px;
}
.result-page {
  height: auto;
  min-height: 100vh;
  overflow-y: auto !important;
}

.result-page .result-card {
  margin-bottom: 60px;
}

.result-page {
  overflow: auto !important;
}