/* GBSN EDAIC Prep – Quiz Engine CSS */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f5f5f0;
  color: #1a1a2e;
  line-height: 1.6;
}

/* ===== HEADER ===== */
.header {
  background: #1a1a2e;
  color: white;
  padding: 2rem 1rem 1.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -40%; right: -15%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(15,123,108,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.header-logo { margin-bottom: 0.5rem; }

.header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
  position: relative;
}

.header p {
  font-size: 0.85rem;
  opacity: 0.5;
  position: relative;
}

.header .back-link {
  position: absolute;
  top: 1rem; left: 1rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.header .back-link:hover { color: white; }

/* ===== CONTAINER ===== */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ===== START SCREEN ===== */
.start-screen {
  text-align: center;
  padding: 2rem 1rem;
}

.start-screen h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

.start-desc {
  color: #4a5568;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.question-bank-info {
  background: #e8f5f2;
  color: #0a6358;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.mode-select {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
  text-align: left;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.mode-select label {
  background: white;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 2px solid #e2e8f0;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.mode-select label:hover {
  border-color: #0f7b6c;
  background: #f0faf8;
}

.mode-select input[type="radio"] {
  width: 20px; height: 20px;
  accent-color: #0f7b6c;
  flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #0f7b6c;
  color: white;
}
.btn-primary:hover {
  background: #0a6358;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,123,108,0.3);
}
.btn-primary:disabled {
  background: #a0a09a;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #e8e8e3;
  color: #4a5568;
}
.btn-secondary:hover { background: #ddddd8; }

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== PROGRESS BAR ===== */
.progress-section { margin-bottom: 1.5rem; }

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #4a5568;
  margin-bottom: 0.4rem;
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f7b6c, #16a085);
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* ===== QUESTION CARD ===== */
.question-card {
  background: white;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.question-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f7b6c;
  background: #e8f5f2;
  padding: 4px 12px;
  border-radius: 20px;
}

.report-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #8a8a9a;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 20px;
  transition: all 0.2s;
}
.report-link:hover {
  color: #c0392b;
  background: #fdecea;
}
.report-link svg { width: 13px; height: 13px; }

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ===== QUESTION IMAGE ===== */
.question-graph {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  overflow-x: auto;
}

.question-graph svg,
.question-graph img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ===== MCQ OPTIONS ===== */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.option:hover:not(.disabled) {
  border-color: #0f7b6c;
  background: #f0faf8;
}

.option.selected {
  border-color: #0f7b6c;
  background: #f0faf8;
}

.option.correct {
  border-color: #38a169;
  background: #f0fff4;
}

.option.incorrect {
  border-color: #e53e3e;
  background: #fff5f5;
}

.option.show-correct {
  border-color: #38a169;
  background: #f0fff4;
}

.option.disabled { cursor: default; }

.option-letter {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #edf2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #4a5568;
  flex-shrink: 0;
}

.option.correct .option-letter { background: #38a169; color: white; }
.option.incorrect .option-letter { background: #e53e3e; color: white; }
.option.show-correct .option-letter { background: #38a169; color: white; }

/* ===== FEEDBACK ===== */
.feedback {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  font-size: 0.93rem;
  line-height: 1.5;
  display: none;
}

.feedback.show { display: block; }

.feedback.correct-feedback {
  background: #f0fff4;
  border-left: 4px solid #38a169;
  color: #22543d;
}

.feedback.incorrect-feedback {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
  color: #742a2a;
}

.next-btn-container {
  text-align: center;
  margin-top: 1.2rem;
  display: none;
}

.next-btn-container.show {
  display: block;
  position: sticky;
  bottom: 0;
  padding: 1rem 1rem 1.2rem;
  background: linear-gradient(to bottom, rgba(245,245,240,0), #f5f5f0 35%);
  z-index: 10;
}

/* ===== RESULTS ===== */
.results-card {
  background: white;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-align: center;
}

.results-score {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 1rem 0;
}

.results-score.great { color: #38a169; }
.results-score.ok { color: #e8c547; }
.results-score.needs-work { color: #e53e3e; }

.results-message {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 2rem;
}

.results-breakdown {
  text-align: left;
  margin: 1.5rem 0 2rem;
  max-height: 400px;
  overflow-y: auto;
}

.result-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.result-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.result-question { color: #4a5568; }

/* ===== SYNC BAR ===== */
.sync-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #4a5568;
}

.sync-bar button {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #4a5568;
  transition: all 0.2s;
}
.sync-bar button:hover {
  border-color: #0f7b6c;
  color: #0f7b6c;
}

#gbsn-user-info {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* ===== UTILITIES ===== */
.hidden { display: none; }

@media (max-width: 600px) {
  .header h1 { font-size: 1.4rem; }
  .question-card { padding: 1.3rem; }
  .question-text { font-size: 1rem; }
  .option { padding: 0.8rem 1rem; font-size: 0.9rem; }
}
