/* ==============================
   RESET & BASE
   ============================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue:       #1D3D66;
  --blue-light: #e8eef6;
  --gold:       #c9a84c;
  --green:      #2e7d52;
  --green-light:#e8f5ee;
  --red:        #c0392b;
  --red-light:  #fdf0ee;
  --white:      #ffffff;
  --off-white:  #f7f8fa;
  --text:       #1a1a2e;
  --text-soft:  #4a5568;
  --text-muted: #8a96a8;
  --border:     #d0d9e8;
}

html, body {
  font-family: 'Montserrat', sans-serif;
  background: var(--off-white);
  color: var(--text);
}

a { text-decoration: none; color: inherit; }

/* ==============================
   PAGE
   ============================== */
.test-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================
   HEADER
   ============================== */
.test-header {
  background: var(--blue);
  padding: 18px 40px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.test-header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.back-link:hover { color: var(--white); }

.test-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ==============================
   MAIN
   ============================== */
.test-main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 40px 80px;
}

.test-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.test-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 400;
}

/* ==============================
   QUESTION CARD
   ============================== */
.question {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 24px 28px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.question.correct { border-color: var(--green); background: var(--green-light); }

.question-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 18px;
}

.question-num {
  color: var(--blue);
  margin-right: 6px;
}

/* ==============================
   OPTIONS
   ============================== */
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s;
}

.option:last-of-type { margin-bottom: 0; }

.option:hover {
  background: var(--blue-light);
  border-color: var(--border);
}

.option input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--blue);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.option-letter {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  min-width: 18px;
  padding-top: 1px;
  flex-shrink: 0;
}

.option-text {
  font-size: 0.83rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* Correct answer highlight after check */
.option.correct-answer {
  background: var(--green-light);
  border-color: var(--green);
}

.option.correct-answer .option-letter,
.option.correct-answer .option-text {
  color: var(--green);
  font-weight: 600;
}

/* Wrong answer highlight */
.option.wrong-answer {
  background: var(--red-light);
  border-color: var(--red);
}

.option.wrong-answer .option-letter,
.option.wrong-answer .option-text {
  color: var(--red);
}

/* ==============================
   SUBMIT AREA
   ============================== */
.submit-wrap {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.submit-btn {
  padding: 14px 36px;
  background: var(--blue);
  color: var(--white);
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.22s, transform 0.15s;
}

.submit-btn:hover {
  background: #152d4d;
  transform: translateY(-1px);
}

.submit-btn:active { transform: translateY(0); }

.reset-btn {
  padding: 14px 28px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.reset-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ==============================
   RESULT BLOCK
   ============================== */
.result-block {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 18px 24px;
  background: var(--green-light);
  border-left: 4px solid var(--green);
}

.result-block.visible { display: flex; }

.result-icon {
  font-size: 1.2rem;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.result-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.03em;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 600px) {
  .test-header { padding: 14px 16px; }
  .test-main { padding: 28px 16px 56px; }
  .question { padding: 18px 16px; }
  .submit-btn, .reset-btn { width: 100%; justify-content: center; }
}
