feat: question-count tiers, footer in main, pregunta footer

- Pricing: 0,99€/10q · 9,99€/200q · 19,99€/unlimited (all 30 days)
- DB: max_questions + questions_used columns on credits table;
  consumeCreditQuestion() atomically validates, creates question,
  and decrements quota in a single transaction
- Server: updated CREDIT_TIERS, /api/credito/estado returns questionsLeft,
  /api/pregunta/enviar returns updated questionsLeft after each submission
- pregunta.tsx: badge shows live question count; submit disabled when exhausted;
  questionsLeft synced to localStorage after each submission; Cloud Host footer added
- footer: moved from Standings sidebar into <main> (scrolls with game content);
  also added to all pregunta page states

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 17:13:02 +01:00
parent e772fb5cc0
commit d42e93b013
6 changed files with 214 additions and 88 deletions

View File

@@ -226,6 +226,12 @@ body {
white-space: nowrap;
}
.pregunta__credit-badge--empty {
color: var(--text-muted);
background: rgba(255, 255, 255, 0.03);
border-color: var(--border);
}
/* ── Success banner ────────────────────────────────────────────── */
.pregunta__success {
@@ -296,14 +302,20 @@ body {
}
.tier-card__price {
font-size: 22px;
font-size: 20px;
font-weight: 700;
color: var(--accent);
}
.tier-card__label {
font-size: 12px;
color: var(--text-dim);
font-weight: 500;
color: var(--text);
}
.tier-card__sub {
font-size: 11px;
color: var(--text-muted);
}
/* ── Spinner ───────────────────────────────────────────────────── */
@@ -321,3 +333,25 @@ body {
@keyframes pregunta-spin {
to { transform: rotate(360deg); }
}
/* ── Site footer ───────────────────────────────────────────────── */
.pregunta__footer {
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid var(--border);
font-size: 11px;
color: var(--text-muted);
line-height: 1.9;
text-align: center;
}
.pregunta__footer a {
color: var(--text-dim);
text-decoration: none;
}
.pregunta__footer a:hover {
color: var(--text);
text-decoration: underline;
}