* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #111;
}

/* ── Intro overlay ── */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.intro-overlay.hidden { display: none; }

.intro-box {
  max-width: 560px;
  text-align: center;
  padding: 48px 32px;
}
.intro-logo {
  width: 100%;
  max-width: 380px;
  display: block;
  margin: 0 auto 28px;
  /* logo text is near-white — darken so it reads on a white background */
  filter: brightness(0.45) saturate(1.4);
}
.intro-title {
  font-size: 30px;
  font-weight: 800;
  color: #111;
  margin-bottom: 16px;
}
.intro-desc {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 36px;
}
.btn-start {
  padding: 14px 48px;
  background: #6d28d9;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-start:hover { background: #5b21b6; }

/* ── Quiz page layout ── */
.quiz-page { display: flex; flex-direction: column; flex: 1; min-height: 100vh; }
.quiz-page.hidden { display: none; }

/* Question header */
.question-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 48px;
  border-bottom: 1px solid #e5e7eb;
}

.question-num {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  color: #111;
}

.question-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  flex: 1;
  line-height: 1.4;
}

.q-icons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #555;
  transition: border-color 0.15s;
}
.icon-btn:hover { border-color: #6d28d9; color: #6d28d9; }

/* Main two-column */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 48px;
  gap: 0;
}

/* Left: image column */
.image-col { padding-right: 40px; }

.image-wrapper {
  position: relative;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  border-radius: 4px;
  overflow: hidden;
}

.zoom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 12px;
}

.zoom-bar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #374151;
  text-transform: uppercase;
  cursor: pointer;
}

.zoom-bar-icon {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: #555;
  background: #fff;
}

.question-image {
  width: 100%;
  display: block;
  cursor: zoom-in;
  max-height: 400px;
  object-fit: contain;
  background: #fff;
}

.image-source {
  font-size: 13px;
  color: #6b7280;
  margin-top: 10px;
}

.image-sub-progress {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* Feedback */
.feedback-area {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}
.feedback-area.show { display: block; }
.feedback-area.correct-fb {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.feedback-area.wrong-fb {
  background: #fff5f5;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.fb-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
}

/* Right: answers column */
.answers-col {
  padding-left: 40px;
  border-left: 1px solid #e5e7eb;
}

.answers-header {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #374151;
  text-transform: uppercase;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
  margin-bottom: 16px;
}

.answer-btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 10px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  color: #111;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.answer-btn:hover:not(:disabled) {
  border-color: #6d28d9;
  background: #f5f3ff;
}
.answer-btn:disabled { cursor: default; }

.answer-btn.correct {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}
.answer-btn.wrong {
  border-color: #dc2626;
  background: #fff5f5;
  color: #991b1b;
  font-weight: 600;
}

/* ── Navigation bar ── */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-top: 1px solid #e5e7eb;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.nav-btn {
  padding: 11px 32px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: #374151;
  text-transform: uppercase;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.nav-btn:hover:not(:disabled) {
  border-color: #6d28d9;
  color: #6d28d9;
}
.nav-btn.skip {
  border-color: #d1d5db;
  color: #374151;
  text-transform: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
}
.nav-btn.skip:hover { border-color: #9ca3af; color: #111; }

#btnNext { color: #9ca3af; border-color: #d1d5db; }
#btnNext.active { border-color: #6d28d9; color: #6d28d9; }
#btnNext.active:hover { background: #6d28d9; color: #fff; }

/* ── Result overlay ── */
.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.result-overlay.show { display: flex; }

.result-box {
  background: #fff;
  border-radius: 16px;
  padding: 52px 48px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.result-emoji { font-size: 56px; margin-bottom: 16px; }
.result-title {
  font-size: 26px;
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
}
.result-score {
  font-size: 52px;
  font-weight: 900;
  color: #6d28d9;
  margin: 16px 0;
  line-height: 1;
}
.result-score span {
  font-size: 20px;
  color: #6b7280;
  font-weight: 400;
}
.result-message {
  font-size: 15px;
  color: #555;
  line-height: 1.65;
  margin-bottom: 32px;
}
.btn-restart {
  padding: 14px 44px;
  background: #6d28d9;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-restart:hover { background: #5b21b6; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 80;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
  object-fit: contain;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  /* Intro */
  .intro-box { padding: 32px 20px; }
  .intro-logo { max-width: 260px; }
  .intro-title { font-size: 22px; }
  .intro-desc { font-size: 14px; }
  .btn-start { padding: 13px 32px; font-size: 15px; }

  /* Question header */
  .question-bar { padding: 12px 16px; gap: 8px; flex-wrap: wrap; }
  .question-num { font-size: 13px; }
  .question-title { font-size: 14px; line-height: 1.35; }
  .icon-btn { width: 30px; height: 30px; font-size: 12px; }

  /* Single-column layout */
  .main-content {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  /* Image */
  .image-col { padding-right: 0; margin-bottom: 0; }
  .question-image { max-height: 240px; }
  .zoom-bar-label { font-size: 10px; }
  .image-source, .image-sub-progress { font-size: 12px; }

  /* Answers below image, no separator */
  .answers-col {
    padding-left: 0;
    border-left: none;
    border-top: none;
    padding-top: 14px;
  }
  .answers-header { font-size: 10px; margin-bottom: 10px; }
  .answer-btn {
    padding: 13px 14px;
    font-size: 15px;
    margin-bottom: 8px;
    /* bigger touch target */
    min-height: 48px;
  }

  /* Feedback */
  .feedback-area { font-size: 13px; padding: 12px 14px; margin-top: 12px; }
  .fb-title { font-size: 13px; }

  /* Navigation */
  .nav-bar { padding: 10px 16px; gap: 6px; }
  .nav-btn { padding: 10px 14px; font-size: 12px; letter-spacing: 0.02em; }
  .nav-btn.skip { font-size: 13px; padding: 10px 14px; }

  /* Result */
  .result-box { padding: 32px 20px; }
  .result-title { font-size: 22px; }
  .result-score { font-size: 40px; }
  .result-message { font-size: 14px; }
  .btn-restart { padding: 12px 32px; font-size: 15px; }
}
