Umbau zu "Wanted!"-Minigame

- Neues Spielprinzip: Fahndungsplakat + Feld voller Fuesse/Deko, gesuchten Fuss
  antippen bevor Timer ablaeuft; sofort neue Runde mit anderer Farbe.
- Progression: Raster -> wild verteilt -> Bewegung (2-3 Gruppen -> einzeln),
  Anzahl + Tempo steigen mit Score.
- Farben: 8 klar unterscheidbare Fuss-Farben (kein Braun/Hautton-Doppel) ->
  die gesuchte Farbe kommt garantiert nur EINMAL vor.
- Serverseitige Rangliste (data/leaderboard.json), Top 10 auf der Startseite,
  Name einmalig abgefragt + in localStorage gecacht.
- Reset per Befehl: npm run reset-stats
- Server stark vereinfacht (/api/feet, /api/leaderboard, /api/score); Pan/Zoom-,
  Wimmelbild- und Szenen-Generator-Code entfernt.
- WANTED-Plakat groesser, Timer schlanker, Startseite sauber zentriert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Guido
2026-08-04 21:57:13 +02:00
parent adc0fae93f
commit 5a6a1f363b
28 changed files with 795 additions and 1347 deletions

View File

@@ -1,297 +1,140 @@
/* fuesse.sexy — verspielter, klarer Look im Dark Mode. Vollflaechig, kein Scrollen. */
/* fuesse.sexy — "Wanted!" · Dark Mode, vollflaechig, kein Scrollen */
:root {
--pink: #ff4d8d;
--pink-soft: #ff86b3;
--ink: #ececf5;
--muted: #a49fc0;
--bg: #0e0e18; /* Seite / Letterbox */
--panel: #1b1b2c; /* Leiste, Buttons */
--card: #262640; /* Legenden-Karten */
--border: #34345020;
--border-solid: #3a3a58;
--bg: #0e0e18;
--panel: #1b1b2c;
--card: #262640;
--border: #3a3a58;
--ok: #34d399;
--miss: #f87171;
--gold: #ffcf3f;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
height: 100%;
overflow: hidden;
margin: 0; height: 100%; overflow: hidden;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
color: var(--ink);
background: var(--bg);
-webkit-user-select: none;
user-select: none;
color: var(--ink); background: var(--bg);
-webkit-user-select: none; user-select: none;
}
#game {
display: flex;
flex-direction: column;
height: 100%;
}
/* ---- Gesucht-Leiste ---- */
#legend {
display: flex;
align-items: center;
gap: 14px;
padding: 8px 14px;
background: var(--panel);
box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
border-bottom: 1px solid var(--border-solid);
z-index: 5;
}
.legend-label { display: flex; flex-direction: column; line-height: 1.1; }
.brand {
font-weight: 800;
font-size: 20px;
color: var(--pink);
letter-spacing: -0.5px;
}
.brand-dot { color: var(--pink-soft); }
.legend-sub { font-size: 12px; color: var(--muted); }
#legend-items {
display: flex;
gap: 10px;
flex: 1;
overflow-x: auto;
}
.legend-item {
flex: 0 0 auto;
width: 58px;
height: 58px;
border-radius: 14px;
background: var(--card);
border: 3px solid var(--border-solid);
display: grid;
place-items: center;
position: relative;
transition: transform 0.15s ease, opacity 0.2s ease, border-color 0.2s ease;
}
.legend-thumb { width: 44px; height: 44px; display: grid; place-items: center; }
.legend-thumb img { max-width: 100%; max-height: 100%; }
.legend-emoji { font-size: 34px; line-height: 1; }
.legend-item.found {
border-color: var(--ok);
opacity: 0.5;
}
.legend-item.found::after {
content: "✓";
position: absolute;
right: -6px;
top: -8px;
width: 22px;
height: 22px;
border-radius: 50%;
background: var(--ok);
color: #0e0e18;
font-size: 14px;
font-weight: 800;
display: grid;
place-items: center;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.legend-counter {
flex: 0 0 auto;
font-weight: 800;
font-size: 18px;
color: var(--pink-soft);
background: var(--card);
padding: 6px 12px;
border-radius: 999px;
}
/* ---- Buehne / Karte ---- */
#stage {
position: relative;
flex: 1;
overflow: hidden;
background: var(--bg);
touch-action: none; /* eigene Pinch/Pan-Gesten */
}
#stage {
cursor: grab;
-webkit-touch-callout: none; /* kein Langdruck-Menü auf iOS */
}
#stage:active { cursor: grabbing; }
#world {
position: absolute;
top: 0;
left: 0;
transform-origin: 0 0;
will-change: transform;
}
#scene-img {
display: block;
width: 100%;
height: 100%;
pointer-events: none;
-webkit-user-drag: none;
user-select: none;
}
.category-name {
position: absolute;
left: 12px;
bottom: 12px;
font-size: 12px;
font-weight: 600;
color: var(--muted);
background: rgba(0, 0, 0, 0.45);
padding: 4px 10px;
border-radius: 999px;
pointer-events: none;
}
/* ---- Zoom-Steuerung ---- */
#controls {
position: absolute;
right: 14px;
bottom: 14px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 4;
}
#controls button {
width: 46px;
height: 46px;
border-radius: 12px;
border: 1px solid var(--border-solid);
background: var(--panel);
color: var(--ink);
font-size: 22px;
font-weight: 700;
cursor: pointer;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
display: grid;
place-items: center;
}
#controls button:hover { color: var(--pink-soft); border-color: var(--pink); }
#controls button:active { transform: translateY(1px); }
/* ---- Ping-Feedback (Treffer/Daneben) ---- */
.ping {
position: absolute;
width: 46px;
height: 46px;
margin: -23px 0 0 -23px; /* auf (left/top) zentrieren */
border-radius: 50%;
border: 6px solid var(--ok);
pointer-events: none;
animation: ping 0.6s ease-out forwards;
}
.ping-ok { border-color: var(--ok); }
.ping-miss { border-color: var(--miss); }
@keyframes ping {
0% { transform: scale(0.3); opacity: 0.95; }
100% { transform: scale(2.3); opacity: 0; }
}
/* ---- Toast ---- */
#toast {
position: absolute;
left: 50%;
bottom: 78px;
transform: translateX(-50%) translateY(10px);
background: rgba(0, 0, 0, 0.85);
color: #fff;
padding: 8px 16px;
border-radius: 999px;
font-size: 14px;
border: 1px solid var(--border-solid);
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* ---- Lade-Spinner ---- */
#loading {
position: absolute;
inset: 0;
display: grid;
place-items: center;
background: rgba(14, 14, 24, 0.8);
z-index: 6;
}
.spinner {
width: 46px;
height: 46px;
border: 5px solid var(--border-solid);
border-top-color: var(--pink);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ---- Gewinn-Overlay ---- */
#win-overlay {
position: absolute;
inset: 0;
display: grid;
place-items: center;
background: rgba(0, 0, 0, 0.7);
z-index: 10;
}
.win-card {
background: var(--panel);
padding: 32px 40px;
border-radius: 24px;
text-align: center;
border: 1px solid var(--border-solid);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
animation: pop 0.3s ease;
}
.win-emoji { font-size: 52px; }
.win-card h2 { margin: 10px 0 20px; color: var(--pink-soft); }
#next-scene {
border: none;
background: var(--pink);
color: #fff;
font-size: 18px;
font-weight: 700;
padding: 12px 28px;
border-radius: 999px;
cursor: pointer;
box-shadow: 0 6px 18px rgba(255, 77, 141, 0.45);
}
#next-scene:hover { background: var(--pink-soft); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* ---- Fehleranzeige ---- */
#error-box {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
max-width: 82%;
background: #2a1020;
color: #ffd0e2;
border: 1px solid var(--pink);
padding: 16px 20px;
border-radius: 12px;
font-size: 14px;
line-height: 1.4;
text-align: center;
z-index: 20;
}
#app, #home, #game { height: 100%; }
.hidden { display: none !important; }
/* Mobile */
@media (max-width: 560px) {
.brand { font-size: 16px; }
.legend-item { width: 50px; height: 50px; }
.legend-thumb { width: 38px; height: 38px; }
button { font-family: inherit; cursor: pointer; }
.big-btn {
border: none; background: var(--pink); color: #fff; font-weight: 800;
font-size: 20px; padding: 14px 30px; border-radius: 999px;
box-shadow: 0 8px 22px rgba(255, 77, 141, 0.45);
}
.big-btn:hover { background: var(--pink-soft); }
.big-btn:active { transform: translateY(1px); }
.big-btn.small { font-size: 16px; padding: 10px 18px; }
.link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 14px; }
.link-btn:hover { color: var(--pink-soft); }
/* ===== Startseite ===== */
#home { display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; }
.home-inner { width: 100%; max-width: 460px; margin: auto; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.brand { font-size: 42px; font-weight: 900; letter-spacing: -1px; color: var(--pink); margin: 6px 0 0; }
.brand-dot { color: var(--pink-soft); }
.tagline { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.4; }
.board { width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; }
.board.tight { padding: 10px 14px; }
.board h2 { margin: 2px 0 10px; font-size: 18px; }
.leaderboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.leaderboard li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--card); font-size: 15px; min-width: 0; }
.leaderboard li.top3 { background: #2f2a1a; }
.leaderboard li.top3 .lb-rank { color: var(--gold); }
.lb-rank { width: 26px; font-weight: 800; color: var(--muted); text-align: right; }
.lb-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 800; color: var(--pink-soft); }
.lb-empty { justify-content: center; color: var(--muted); font-size: 14px; }
/* ===== Spiel ===== */
#game { display: flex; flex-direction: column; }
#hud {
display: flex; align-items: center; gap: 14px; padding: 10px 14px;
background: var(--panel); border-bottom: 1px solid var(--border); z-index: 5;
}
/* Fahndungsplakat */
.wanted-poster {
flex: 0 0 auto; width: 150px; text-align: center;
background: #efe2c4; color: #3a2c17; border-radius: 10px; padding: 8px 8px 6px;
border: 3px solid #b79a63; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
transform: rotate(-2deg);
}
.wanted-title { font-weight: 900; letter-spacing: 3px; font-size: 20px; font-family: "Georgia", "Times New Roman", serif; }
.wanted-foot { background: #fbf4e2; border: 2px solid #c9b483; border-radius: 8px; margin: 4px 0; height: 92px; display: grid; place-items: center; }
.wanted-foot img { width: 78px; height: 78px; }
.wanted-reward { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
#hud-right { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.score-box { font-size: 20px; font-weight: 800; color: var(--ink); }
.score-box #score { color: var(--pink-soft); }
.score-box.bump { animation: bump 0.28s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: var(--ok); } 100% { transform: scale(1); } }
#timer-wrap { width: 100%; height: 9px; background: #12121e; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
#timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--ok), #7be0b0); border-radius: 999px; transition: width 0.1s linear; }
#timer-bar.low { background: linear-gradient(90deg, var(--miss), #ffb0b0); }
/* Spielfeld */
#field {
position: relative; flex: 1; overflow: hidden;
background: radial-gradient(circle at 50% 40%, #1a1a2e, #0e0e18);
touch-action: none;
}
.item {
position: absolute; top: 0; left: 0; will-change: transform;
cursor: pointer; -webkit-user-drag: none; user-select: none;
filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.item.shake { animation: shake 0.3s ease; }
@keyframes shake { 0%,100% { } 25% { filter: drop-shadow(0 0 6px var(--miss)); } 50% { } 75% { filter: drop-shadow(0 0 6px var(--miss)); } }
#field.flash-ok { animation: flashOk 0.25s ease; }
#field.flash-miss { animation: flashMiss 0.25s ease; }
@keyframes flashOk { 0% { box-shadow: inset 0 0 0 rgba(52,211,153,0); } 40% { box-shadow: inset 0 0 120px rgba(52,211,153,0.35); } 100% { box-shadow: inset 0 0 0 rgba(52,211,153,0); } }
@keyframes flashMiss { 0% { box-shadow: inset 0 0 0 rgba(248,113,113,0); } 40% { box-shadow: inset 0 0 120px rgba(248,113,113,0.4); } 100% { box-shadow: inset 0 0 0 rgba(248,113,113,0); } }
#feedback {
position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(10px);
background: rgba(0,0,0,0.85); color: #fff; padding: 8px 18px; border-radius: 999px;
font-weight: 700; border: 1px solid var(--miss); opacity: 0; pointer-events: none;
transition: opacity 0.15s, transform 0.15s;
}
#feedback.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* ===== Game Over ===== */
#gameover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.7); z-index: 10; padding: 16px; overflow-y: auto; }
.go-card {
width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border);
border-radius: 22px; padding: 24px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
display: flex; flex-direction: column; gap: 14px; animation: pop 0.3s ease;
}
@keyframes pop { from { transform: scale(0.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.go-emoji { font-size: 44px; }
.go-card h2 { margin: 0; color: var(--pink-soft); }
.go-score { margin: 0; font-size: 22px; font-weight: 800; }
.go-score span { color: var(--gold); }
#name-ask { display: flex; flex-direction: column; gap: 8px; }
#name-ask label { font-size: 14px; color: var(--muted); }
.name-row { display: flex; gap: 8px; }
#name-input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--ink); font-size: 16px; }
#name-input:focus { outline: 2px solid var(--pink); }
.go-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; }
/* ===== Mobile ===== */
@media (max-width: 560px) {
.brand { font-size: 34px; }
.wanted-poster { width: 120px; }
.wanted-title { font-size: 17px; }
.wanted-foot { height: 68px; } .wanted-foot img { width: 58px; height: 58px; }
.score-box { font-size: 18px; }
}