/* ── Eyebrow ─────────────────────────────────────────────────────────────── */

.qwords-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 6px;
  text-align: center;
}

/* ── Example screen ──────────────────────────────────────────────────────── */

.qwords-example-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.qwords-example-card {
  background: rgba(47, 159, 232, 0.06);
  border: 1.5px solid rgba(47, 159, 232, 0.18);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 24px;
}

.qwords-example-sentence {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 10px;
  -webkit-font-smoothing: antialiased;
}

.qwords-answer-highlight {
  color: var(--primary);
  font-weight: 900;
  background: rgba(47, 159, 232, 0.12);
  border-radius: 6px;
  padding: 1px 6px;
}

.qwords-example-note {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.qwords-example-note strong {
  color: var(--primary);
}

.qwords-start-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: var(--primary);
  box-shadow: 0 4px 0 var(--primary-dark);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  -webkit-font-smoothing: antialiased;
}

.qwords-start-btn:hover  { transform: translateY(-2px); }
.qwords-start-btn:active { transform: translateY(3px); box-shadow: none; }

/* ── Bank label ──────────────────────────────────────────────────────────── */

.qwords-bank-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ── Question area ───────────────────────────────────────────────────────── */

.qwords-question-area {
  animation: qwordsFadeIn 0.32s ease both;
}

@keyframes qwordsFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qwords-sentence {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 700;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  line-height: 1.6;
  margin: 0 0 28px;
  -webkit-font-smoothing: antialiased;
}

/* ── Blank ───────────────────────────────────────────────────────────────── */

.qwords-blank {
  display: inline-block;
  min-width: clamp(60px, 18vw, 90px);
  border-bottom: 3px dashed var(--primary);
  color: var(--primary);
  font-weight: 800;
  text-align: center;
  padding: 0 8px 3px;
  vertical-align: baseline;
  transition: color 0.2s, border-color 0.2s;
}

.qwords-blank--filled {
  animation: blankPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.qwords-blank--correct { color: #15803d; border-color: #22c55e; }
.qwords-blank--wrong   { color: #b91c1c; border-color: #ef4444; }

@keyframes blankPop {
  0%   { transform: scale(0.85); }
  100% { transform: scale(1); }
}

/* ── Word bank ───────────────────────────────────────────────────────────── */

.qwords-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Chips ───────────────────────────────────────────────────────────────── */

.qwords-chip {
  padding: 13px 20px;
  min-height: 44px;
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  text-align: center;
  border: 2px solid rgba(6, 38, 61, 0.14);
  border-bottom: 4px solid rgba(6, 38, 61, 0.22);
  transition: transform 0.1s ease, border-bottom-width 0.08s ease,
              background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.qwords-chip:hover:not(:disabled) {
  background: rgba(47, 159, 232, 0.08);
  border-color: rgba(47, 159, 232, 0.35);
  border-bottom-color: rgba(47, 159, 232, 0.5);
  color: var(--primary);
  transform: translateY(-2px);
}

.qwords-chip:active:not(:disabled) {
  transform: translateY(3px);
  border-bottom-width: 2px;
}

.qwords-chip:disabled { cursor: default; }

.qwords-chip--correct {
  background: #f0fdf4;
  border-color: #22c55e;
  border-bottom-color: #16a34a;
  color: #15803d;
  animation: chipPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.qwords-chip--wrong {
  background: #fef2f2;
  border-color: #ef4444;
  border-bottom-color: #dc2626;
  color: #b91c1c;
  animation: chipShake 0.42s ease both;
}

.qwords-chip--dim { opacity: 0.32; }

@keyframes chipPop {
  0%   { transform: scale(0.92) translateY(3px); }
  60%  { transform: scale(1.06) translateY(-2px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes chipShake {
  0%, 100% { transform: translateX(0); }
  18%       { transform: translateX(-6px); }
  36%       { transform: translateX(6px); }
  54%       { transform: translateX(-4px); }
  72%       { transform: translateX(4px); }
  90%       { transform: translateX(-2px); }
}

/* ── Feedback panel ──────────────────────────────────────────────────────── */

.qwords-feedback {
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 16px;
  border: 2px solid transparent;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.qwords-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.qwords-feedback--correct {
  background: #dcfce7;
  border-top-color: #22c55e;
}

.qwords-feedback--wrong {
  background: #fee2e2;
  border-top-color: #ef4444;
}

.qwords-feedback-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.qwords-feedback-left {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.qwords-feedback-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.qwords-feedback-msg {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
}

.qwords-feedback--correct .qwords-feedback-msg { color: #15803d; }
.qwords-feedback--wrong   .qwords-feedback-msg { color: #b91c1c; }

.qwords-continue {
  flex-shrink: 0;
  padding: 14px 30px;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  color: #fff;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s;
}

.qwords-continue:hover  { transform: translateY(-2px); }
.qwords-continue:active { transform: translateY(2px); box-shadow: none !important; }

.qwords-feedback--correct .qwords-continue {
  background: #22c55e;
  box-shadow: 0 4px 0 #16a34a;
}

.qwords-feedback--correct .qwords-continue:hover { background: #16a34a; }

.qwords-feedback--wrong .qwords-continue {
  background: #ef4444;
  box-shadow: 0 4px 0 #dc2626;
}

.qwords-feedback--wrong .qwords-continue:hover { background: #dc2626; }

/* ── Score modal ─────────────────────────────────────────────────────────── */

.score-encourage {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin: 6px 0 0;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .game--qwords .progress-row {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 6px;
  }

  .game--qwords .progress-meta { text-align: center; }

  .game--qwords .progress-track {
    width: 100%;
    flex: none;
  }

  .qwords-feedback { margin-top: 10px; padding: 16px 18px; }
  .qwords-feedback-inner { gap: 12px; }
}

@media (max-width: 480px) {
  .qwords-chip { padding: 11px 14px; }
  .qwords-bank { gap: 8px; }
  .qwords-feedback { padding: 14px 16px; border-radius: 14px; }
  .qwords-feedback-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .qwords-continue { text-align: center; padding: 13px; }
}
