/* ============================================================
   CIVICS PREP QUIZ — style.css
   Mobile-first. Four colors only. No gradients. No heavy effects.
   Colors:
     Primary Blue  : #2563EB
     Hover Blue    : #1D4ED8
     White         : #FFFFFF
     Light Gray    : #F3F4F6
     Dark Text     : #1F2937
     Correct Green : #10B981
     Incorrect Red : #EF4444 / #FEE2E2
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.site-title{
  display: none;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #FFFFFF;
  color: #1F2937;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  background-color: #FFFFFF;
  border-bottom: 1px solid #F3F4F6;
  padding: 12px 16px;
  text-align: center;
}

.logo {
  height: 48px;
  width: auto;
  display: block;
  margin: 0 auto 8px;
  object-fit: contain;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563EB;
  letter-spacing: -0.01em;
}

/* ── Main Container ── */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}

/* ── Card ── */
.card {
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  border-radius: 8px;
  padding: 20px 16px;
  margin-bottom: 16px;
}

/* ── Utility ── */
.hidden {
  display: none !important;
}

/* ── Start Screen ── */
#start-screen h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 6px;
}

.subtitle {
  color: #1F2937;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #1F2937;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #F3F4F6;
  border-radius: 8px;
  font-size: 1rem;
  color: #1F2937;
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input[type="text"]:focus {
  border-color: #2563EB;
}

.checkbox-group {
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #1F2937;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563EB;
  cursor: pointer;
  flex-shrink: 0;
}

.hint {
  font-size: 0.82rem;
  color: #6B7280;
  margin-top: 10px;
  text-align: center;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s;
  line-height: 1.2;
}

.btn-primary {
  background: #2563EB;
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #1D4ED8;
}

.btn-primary:disabled {
  background: #F3F4F6;
  color: #6B7280;
  cursor: not-allowed;
}

.btn-secondary {
  background: #F3F4F6;
  color: #1F2937;
}

.btn-secondary:hover {
  background: #E5E7EB;
}

.btn-outline {
  background: #FFFFFF;
  color: #2563EB;
  border: 1px solid #2563EB;
}

.btn-outline:hover {
  background: #F3F4F6;
}

.btn-full {
  width: 100%;
}

/* ── Quiz Top Bar ── */
.quiz-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.progress-text {
  font-size: 0.85rem;
  color: #1F2937;
  font-weight: 600;
}

.score-display {
  font-size: 0.85rem;
  color: #1F2937;
  font-weight: 600;
}

.timer-display {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1F2937;
  background: #F3F4F6;
  padding: 4px 10px;
  border-radius: 6px;
  min-width: 52px;
  text-align: center;
  transition: color 0.2s, background-color 0.2s;
}

.timer-display.timer-warning {
  color: #EF4444;
  background: #FEE2E2;
}

/* ── Progress Bar ── */
.progress-bar-track {
  height: 8px;
  background: #F3F4F6;
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #2563EB;
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ── Question Card ── */
.question-card {
  margin-bottom: 0;
}

.question-number {
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Answer Options ── */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.option-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1F2937;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s, background-color 0.15s;
  line-height: 1.4;
}

.option-btn:hover:not(:disabled) {
  border-color: #2563EB;
  background: #F3F4F6;
}

.option-btn:disabled {
  cursor: not-allowed;
}

.option-label {
  font-weight: 700;
  color: #2563EB;
  flex-shrink: 0;
  width: 20px;
  text-transform: uppercase;
}

/* Answer state classes */
.option-btn.correct {
  background: #D1FAE5;
  border-color: #10B981;
  color: #065F46;
}

.option-btn.correct .option-label {
  color: #065F46;
}

.option-btn.incorrect {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #991B1B;
}

.option-btn.incorrect .option-label {
  color: #991B1B;
}

/* ── Feedback ── */
.feedback {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.feedback.feedback-correct {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #10B981;
}

.feedback.feedback-incorrect {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}

/* ── Nav Buttons ── */
.nav-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.nav-buttons .btn {
  min-width: 140px;
}

/* ── Result Screen ── */
.result-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 20px;
  text-align: center;
}

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid #F3F4F6;
  border-radius: 8px;
  overflow: hidden;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.9rem;
  color: #6B7280;
  font-weight: 500;
}

.result-value {
  font-size: 0.95rem;
  color: #1F2937;
  font-weight: 600;
  text-align: right;
}

.result-correct .result-value {
  color: #059669;
}

.result-incorrect .result-value {
  color: #DC2626;
}

.result-percent {
  font-size: 1.3rem;
  color: #2563EB !important;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-actions .btn {
  width: 100%;
  text-align: center;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: #6B7280;
  border-top: 1px solid #F3F4F6;
  margin-top: auto;
}

/* ============================================================
   DESKTOP — min-width: 640px
   ============================================================ */
@media (min-width: 640px) {
  .site-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
  }

  .logo {
    height: 52px;
    margin: 0;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .container {
    padding: 24px 16px;
  }

  .card {
    padding: 28px 32px;
  }

  .quiz-topbar {
    flex-wrap: nowrap;
  }

  .question-text {
    font-size: 1.1rem;
  }

  .result-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .result-actions .btn {
    flex: 1;
    min-width: 150px;
  }

  .nav-buttons .btn {
    min-width: 160px;
  }
}