/* Oturum ekranı: ilerleme, soru kartı, seçenekler, geri bildirim paneli. */

.quiz-shell {
  width: min(720px, 100%);
}

.quiz-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 0.85rem;
}

.back-button {
  padding-inline: 0.75rem;
  font-size: 0.9rem;
}

.quiz-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.stat-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--bg-surface);
  font-size: 0.86rem;
  font-weight: 750;
}

.stat-pill strong {
  font-weight: 800;
}

.correct-pill {
  border-color: var(--success-border);
  color: var(--success);
  background: var(--success-light);
}

.wrong-pill {
  border-color: var(--danger-border);
  color: var(--danger);
  background: var(--danger-light);
}

.streak-pill {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  font-size: 0.78rem;
}

.streak-pill.is-hot {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.streak-dots {
  display: inline-flex;
  gap: 3px;
}

.streak-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.progress-area {
  margin-bottom: 1.5rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-surface-soft);
  appearance: none;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  border-radius: var(--radius-full);
  background: var(--bg-surface-soft);
}

progress::-webkit-progress-value {
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 250ms ease-out;
}

progress::-moz-progress-bar {
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.question-card {
  min-width: 0;
  padding: clamp(1.25rem, 4vw, 2.2rem) clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  color: var(--accent);
  background: var(--accent-light);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.category-chip:empty {
  display: none;
}

.level-pill {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.level-pill-kolay { color: var(--level-kolay); }
.level-pill-orta { color: var(--level-orta); }
.level-pill-zor { color: var(--level-zor); }
.level-pill-uzman { color: var(--level-uzman); }

.question-prompt {
  margin-bottom: 1.75rem;
  font-size: clamp(1.25rem, 2.7vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.42;
  text-wrap: balance;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.choice-button {
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-surface-alt);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}

.choice-button:not(:disabled):hover {
  border-color: var(--primary);
  background: var(--bg-surface-soft);
  transform: translateX(3px);
}

.choice-key {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
  background: var(--bg-surface);
  font-size: 0.82rem;
  font-weight: 750;
}

.choice-text {
  line-height: 1.4;
}

.choice-state {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: right;
}

.choice-button.is-correct {
  border-color: var(--success);
  background: var(--success-light);
}

.choice-button.is-correct .choice-key {
  border-color: var(--success);
  color: var(--on-accent);
  background: var(--success);
}

.choice-button.is-correct .choice-state {
  color: var(--success);
}

.choice-button.is-wrong {
  border-color: var(--danger);
  background: var(--danger-light);
}

.choice-button.is-wrong .choice-key {
  border-color: var(--danger);
  color: var(--on-accent);
  background: var(--danger);
}

.choice-button.is-wrong .choice-state {
  color: var(--danger);
}

.choice-button:disabled {
  opacity: 1;
  transform: none;
}

.keyboard-hint {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.feedback-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  /* Açılış boyunca yüksekliği kırpar; pay, odak halkası ve gösterge parıltısı
     için bırakıldı. */
  overflow: clip;
  overflow-clip-margin: 12px;
  animation: feedback-grow 420ms linear backwards, feedback-reveal 300ms var(--ease-out) backwards;
}

.feedback-panel.is-empty {
  display: none;
}

.feedback-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.feedback-title-wrap {
  display: flex;
  flex: 1 1 240px;
  align-items: center;
  gap: 0.6rem;
}

.feedback-indicator {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--border-strong);
}

.feedback-panel.is-correct .feedback-indicator {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.feedback-panel.is-wrong .feedback-indicator {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

.feedback-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.feedback-panel.is-correct .feedback-title {
  color: var(--success);
}

.feedback-panel.is-wrong .feedback-title {
  color: var(--danger);
}

.feedback-head .next-button {
  flex: 0 0 auto;
  margin-left: auto;
}

.feedback-copy {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-surface-soft);
  font-size: 0.96rem;
  line-height: 1.6;
}

.feedback-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.feedback-pace {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- Dar ekran ---- */

@media (max-width: 780px) {
  .keyboard-hint {
    display: none;
  }

  .choice-button:not(:disabled):hover {
    transform: none;
  }

  .feedback-head .next-button {
    width: 100%;
    min-height: 50px;
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .quiz-top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .back-button {
    align-self: flex-start;
  }
}
