Add gradient backgrounds to all status messages, match final-turn badge size

- Default gradient on base .status-message (dark green)
- Add round-over/game-over (gold) and reveal (purple) gradient styles
- Tag action prompts (swap, flip, discard) as your-turn type
- Match final-turn badge font size and padding to status message on mobile
- Hide status message when empty

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken 2026-02-22 21:31:20 -05:00
parent cb311ec0da
commit cb49fd545b
2 changed files with 29 additions and 7 deletions

View File

@ -923,16 +923,16 @@ class GolfGame {
this.displayHeldCard(data.card, true); this.displayHeldCard(data.card, true);
this.renderGame(); this.renderGame();
} }
this.showToast('Swap with a card or discard', '', 3000); this.showToast('Swap with a card or discard', 'your-turn', 3000);
break; break;
case 'can_flip': case 'can_flip':
this.waitingForFlip = true; this.waitingForFlip = true;
this.flipIsOptional = data.optional || false; this.flipIsOptional = data.optional || false;
if (this.flipIsOptional) { if (this.flipIsOptional) {
this.showToast('Flip a card or skip', '', 3000); this.showToast('Flip a card or skip', 'your-turn', 3000);
} else { } else {
this.showToast('Flip a face-down card', '', 3000); this.showToast('Flip a face-down card', 'your-turn', 3000);
} }
this.renderGame(); this.renderGame();
break; break;
@ -2959,7 +2959,7 @@ class GolfGame {
this.hideToast(); this.hideToast();
} else { } else {
const remaining = requiredFlips - uniquePositions.length; const remaining = requiredFlips - uniquePositions.length;
this.showToast(`Select ${remaining} more card${remaining > 1 ? 's' : ''} to flip`, '', 5000); this.showToast(`Select ${remaining} more card${remaining > 1 ? 's' : ''} to flip`, 'your-turn', 5000);
} }
return; return;
} }

View File

@ -1665,6 +1665,12 @@ input::placeholder {
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
color: #fff; color: #fff;
background: linear-gradient(135deg, #4a6741 0%, #3d5a35 100%);
}
/* Empty status - hide completely */
.status-message:empty {
display: none;
} }
.status-message.your-turn { .status-message.your-turn {
@ -1684,6 +1690,19 @@ input::placeholder {
color: #fff; color: #fff;
} }
/* Round/game over status */
.status-message.round-over,
.status-message.game-over {
background: linear-gradient(135deg, #f0c040 0%, #d4a017 100%);
color: #2d3436;
}
/* Reveal status */
.status-message.reveal {
background: linear-gradient(135deg, #8b7eb8 0%, #6b5b95 100%);
color: #fff;
}
/* Final turn badge - enhanced V3 with countdown */ /* Final turn badge - enhanced V3 with countdown */
.final-turn-badge { .final-turn-badge {
display: flex; display: flex;
@ -1701,7 +1720,7 @@ input::placeholder {
} }
.final-turn-badge .final-turn-text { .final-turn-badge .final-turn-text {
font-size: 0.85rem; font-size: 0.9rem;
} }
.final-turn-badge.hidden { .final-turn-badge.hidden {
@ -5125,11 +5144,14 @@ body.mobile-portrait .mute-btn {
} }
body.mobile-portrait .final-turn-badge { body.mobile-portrait .final-turn-badge {
font-size: 0.6rem; padding: 6px 16px;
padding: 2px 6px;
white-space: nowrap; white-space: nowrap;
} }
body.mobile-portrait .final-turn-badge .final-turn-text {
font-size: 1.02rem;
}
/* --- Mobile: Game table — opponents pinned top, rest centered in remaining space --- */ /* --- Mobile: Game table — opponents pinned top, rest centered in remaining space --- */
body.mobile-portrait .game-table { body.mobile-portrait .game-table {
display: flex; display: flex;