/* quiz.css */

.question-wrap { animation: slideIn .3s cubic-bezier(.4,0,.2,1) both; }

.question-number {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.question-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.25;
}
.question-hint {
  font-size: .86rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.optional-tag {
  font-size: .68rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-light);
  border-radius: 99px;
  padding: 2px 8px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}

/* ── Text/textarea inputs ── */
.q-input-wrap { display: flex; flex-direction: column; }
.q-input {
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.q-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,142,247,.12);
}
.q-input::placeholder { color: var(--text-light); font-weight: 400; font-size: .95rem; }

/* ── Choice grid ── */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.choice-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.choice-btn:hover {
  border-color: var(--primary);
  color: var(--text);
  background: var(--primary-light);
}
.choice-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}
.choice-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── Custom answer chip (single-select) ── */
.custom-chip-row {
  margin-bottom: 10px;
}
.custom-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  border: 1.5px solid var(--accent);
  border-radius: 99px;
  padding: 6px 10px 6px 14px;
  max-width: 100%;
}
.custom-chip-label {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.custom-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(168,85,247,.15);
  color: var(--accent);
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .15s;
}
.custom-chip-remove:hover {
  background: rgba(168,85,247,.35);
  color: #fff;
  transform: scale(1.12);
}

/* ── Removable multi-chips ── */
.multi-chip--removable {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  padding: 3px 8px 3px 10px;
}
.multi-chip--removable:hover {
  background: rgba(248,113,113,.15);
  border-color: #f87171;
  color: #f87171;
}
.multi-chip-bin {
  display: flex;
  align-items: center;
  opacity: .65;
  transition: opacity .15s;
}
.multi-chip--removable:hover .multi-chip-bin { opacity: 1; }
.custom-input-wrap { margin-top: 10px; }
.custom-input-label {
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.custom-input-wrap .q-input-custom {
  width: 100%;
}
.q-input-custom {
  flex: 1;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  font-size: .9rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.q-input-custom:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(168,85,247,.1);
}
.q-input-custom::placeholder { color: var(--text-light); font-weight: 400; }
.btn-use-custom {
  padding: 11px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  transition: all .2s;
  white-space: nowrap;
}
.btn-use-custom:hover { background: #9333ea; }

/* ── Nav buttons ── */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}
/* On mobile, stick the nav to the bottom of the viewport */
@media (max-width: 640px) {
  .quiz-nav {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(15,17,23,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 10px 14px;
    margin-top: 0;
    gap: 10px;
  }
  .btn-prev, .btn-next {
    flex: 1;
    justify-content: center;
    padding: 13px 10px;
  }
}
.btn-prev, .btn-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  transition: all .2s;
}
.btn-prev {
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.btn-prev:hover:not(:disabled) { color: var(--text); background: var(--bg-elevated); }
.btn-prev:disabled { opacity: .3; cursor: not-allowed; }
.btn-next {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(79,142,247,.25);
}
.btn-next:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(79,142,247,.35); }

/* ── Multi-select hint + chips ── */
.multi-hint {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  min-height: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.multi-count {
  font-weight: 700;
  color: var(--primary);
  font-size: .8rem;
}
.multi-chip {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: .75rem;
  font-weight: 700;
}
.choice-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,142,247,.15);
}

/* ── Villain / choice descriptions ── */
.choice-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.choice-label-main {
  font-size: .9rem;
  font-weight: 700;
}
.choice-desc {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: normal;
}
.choice-btn--has-desc {
  align-items: flex-start;
  grid-column: span 2; /* full width so desc text has room */
}
.choice-btn--has-desc .choice-icon {
  margin-top: 2px;
  flex-shrink: 0;
}
.choice-btn--has-desc.selected .choice-desc {
  color: rgba(79,142,247,.75);
}
