/* ============================================================
   quiz-player.css – Focused quiz play experience
============================================================ */
.quiz-play-body {
  background: #0f172a;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.quiz-app { width: 100%; }

/* Loading */
.quiz-loading {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: #fff;
}
.quiz-loading-inner { text-align: center; }
.quiz-loading-inner p { margin-top: 1.25rem; color: #94a3b8; font-size: .9rem; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid #1e293b;
  border-top-color: #4338ca;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto;
}
.spinner-success { border-top-color: #16a34a; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Quiz player container */
.quiz-player {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  width: 100%;
}

/* Top bar */
.qp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  color: #fff;
}
.qp-quit {
  font-size: .85rem;
  color: #64748b;
  text-decoration: none !important;
  transition: color .2s;
  flex-shrink: 0;
}
.qp-quit:hover { color: #ef4444; }
.qp-title { font-family: 'Sora', sans-serif; font-size: .9rem; font-weight: 700; color: #94a3b8; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qp-timer {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #22c55e;
  flex-shrink: 0;
  transition: color .3s;
}
.qp-timer.timer-warn   { color: #f59e0b !important; }
.qp-timer.timer-danger { color: #ef4444 !important; }
.qp-timer.timer-danger #timerDisplay { animation: pulse .5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* Progress */
.qp-progress-wrap {
  height: 5px;
  background: #1e293b;
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: .4rem;
}
.qp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4338ca, #7c3aed);
  border-radius: 50px;
  transition: width .4s ease;
}
.qp-progress-text { text-align: right; font-size: .75rem; color: #475569; margin-bottom: 1.75rem; }

/* Question card */
.question-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform .15s ease;
}
.question-card.slide-in { animation: slideIn .25s ease; }
@keyframes slideIn {
  from { opacity: .4; transform: translateX(20px); }
  to   { opacity: 1;  transform: translateX(0); }
}
.question-num  { font-size: .75rem; font-weight: 700; color: #4338ca; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.question-text { font-size: 1.1rem; font-weight: 600; color: #f1f5f9; line-height: 1.6; margin-bottom: 1.5rem; font-family: 'Sora', sans-serif; }

/* Options */
.options-grid { display: flex; flex-direction: column; gap: .65rem; }
.option-btn {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 10px;
  padding: .9rem 1.1rem;
  cursor: pointer;
  text-align: left;
  transition: all .18s;
  color: #e2e8f0;
  font-size: .95rem;
  width: 100%;
}
.option-btn:hover { border-color: #4338ca; background: #1a1f35; }
.option-btn.selected { border-color: #4338ca; background: #1e1f3b; color: #c7d2fe; }
.opt-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #1e293b;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
  transition: all .18s;
}
.option-btn:hover   .opt-letter,
.option-btn.selected .opt-letter {
  background: #4338ca;
  color: #fff;
}
.opt-text { flex: 1; line-height: 1.5; }

/* Nav */
.qp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.qp-question-dots {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  justify-content: center;
  flex: 1;
  max-height: 80px;
  overflow-y: auto;
}
.q-dot {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1.5px solid #334155;
  background: #1e293b;
  color: #64748b;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.q-dot.dot-answered { background: #166534; border-color: #22c55e; color: #fff; }
.q-dot.dot-active   { background: #4338ca; border-color: #6366f1; color: #fff; }

/* Submit */
.qp-submit-wrap {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}
.submit-summary {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  font-size: .9rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.submit-summary strong { color: #f1f5f9; }

/* Override btn colors for dark bg */
.quiz-player .btn-primary  { background: #4338ca; border-color: #4338ca; }
.quiz-player .btn-primary:hover { background: #3730a3; border-color: #3730a3; }
.quiz-player .btn-outline  { color: #94a3b8; border-color: #334155; }
.quiz-player .btn-outline:hover { color: #fff; border-color: #64748b; background: #1e293b; }
.quiz-player .btn-success  { background: #16a34a; border-color: #16a34a; }
.quiz-player .btn-success:hover { background: #15803d; }
.quiz-player .btn:disabled { opacity: .3; }
