diff --git a/src/lib/components/WinScreen.svelte b/src/lib/components/WinScreen.svelte
index c980833..a19ae29 100644
--- a/src/lib/components/WinScreen.svelte
+++ b/src/lib/components/WinScreen.svelte
@@ -53,6 +53,7 @@
typeof navigator !== "undefined" && "share" in navigator,
);
let copySuccess = $state(false);
+ let bubbleCopied = $state(false);
// List of congratulations messages with weights
const congratulationsMessages: WeightedMessage[] = [
@@ -109,19 +110,24 @@
{#if streak > 1}
-
- 🔥 {streak} days in a row!
-
- {#if streak >= 7}
-
- Thank you for making Bibdle part of your daily routine!
+
+
+ 🔥 {streak} days in a row!
- {/if}
- {#if streakPercentile !== null}
-
- {streakPercentile <= 50 ? "Only " : ""}{streakPercentile}% of players have a streak of {streak} or greater.
-
- {/if}
+ {#if streak >= 7}
+
+ Thank you for making Bibdle part of your daily routine!
+
+ {/if}
+ {#if streakPercentile !== null}
+
+ {streakPercentile <= 50
+ ? "Only "
+ : ""}{streakPercentile}% of players have a streak of {streak}
+ or greater.
+
+ {/if}
+
{/if}
@@ -205,34 +211,63 @@
Share your result
-
- {#if hasWebShare}
-
- {:else}
-
- {/if}
-
-
{shareText}
+
+
+
+
+
+
+
+
+ {#if hasWebShare}
+ {bubbleCopied ? "copied!" : "(tap to copy)"}
+ {:else}
+ {bubbleCopied ? "copied!" : ""}
+ {/if}
+
@@ -249,14 +284,13 @@
}
}
- .fade-in {
+ :global(.fade-in) {
animation: fadeIn 0.5s ease-out;
}
/* ── Share card ── */
.share-card {
- background: rgba(255, 255, 255, 0.5);
- backdrop-filter: blur(8px);
+ background: oklch(94% 0.028 298.626);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 1.25rem;
padding: 1.25rem;
@@ -278,115 +312,156 @@
pointer-events: none;
}
- .share-card-label {
- font-size: 0.75rem;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.08em;
- color: #8e8e93;
- margin: 0;
- }
-
/* ── Chat window ── */
.chat-window {
--sent-color: #0b93f6;
- --bg: oklch(93.996% 0.03041 300.209);
+ --received-color: #3a3a3c;
+ --bg: oklch(94% 0.028 298.626);
display: flex;
- justify-content: center;
- padding: 0 1.5rem 0;
+ flex-direction: column;
+ padding: 0 0.5rem 0;
+ gap: 0.6rem;
}
- /* ── Bubble (from article technique) ── */
+ /* ── Bubble wrappers ── */
+ .bubble-wrapper {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-end;
+ gap: 2px;
+ }
+
+ .received-wrapper {
+ align-items: flex-start;
+ }
+
+ /* ── Shared bubble base ── */
.bubble {
position: relative;
max-width: 255px;
- margin-bottom: 8px;
+ margin-bottom: 0;
padding: 10px 20px;
line-height: 1.3;
word-wrap: break-word;
border-radius: 25px;
text-align: left;
white-space: pre-wrap;
- font-size: 0.9rem;
- transform: rotate(-2deg);
-
- color: white;
- background: var(--sent-color);
+ font-size: 1rem;
+ cursor: pointer;
+ transition:
+ filter 80ms ease,
+ transform 80ms ease;
+ user-select: none;
}
- .bubble::before,
- .bubble::after {
+ /* ── Sent bubble (share text preview) ── */
+ .bubble-sent {
+ color: white;
+ background: var(--sent-color);
+ transform: rotate(-2deg);
+ }
+
+ .bubble-sent:hover {
+ filter: brightness(1.08);
+ transform: rotate(-2deg) translateY(-2px);
+ }
+
+ .bubble-sent:active {
+ transform: rotate(-2deg) scale(0.97);
+ filter: brightness(0.95);
+ }
+
+ /* Sent tail: bottom-right */
+ .bubble-sent::before,
+ .bubble-sent::after {
position: absolute;
bottom: 0;
height: 25px;
content: "";
}
- .bubble::before {
+ .bubble-sent::before {
width: 20px;
right: -7px;
background-color: var(--sent-color);
border-bottom-left-radius: 16px 14px;
}
- .bubble::after {
+ .bubble-sent::after {
width: 26px;
right: -26px;
border-bottom-left-radius: 10px;
background-color: var(--bg);
}
- /* ── Share buttons ── */
- .share-buttons {
- display: flex;
- flex-direction: column;
- gap: 0.5rem;
- width: 100%;
- }
-
- .share-btn {
- width: 100%;
- padding: 1rem 1.5rem;
+ /* ── Received bubble (action button) ── */
+ .bubble-received {
+ color: #f5f5f7;
+ background: var(--received-color);
+ transform: rotate(2deg);
+ padding: 14px 24px;
font-size: 1.1rem;
font-weight: 700;
- border: 3px solid rgba(0, 0, 0, 0.25);
- border-radius: 1rem;
- cursor: pointer;
- transition:
- transform 80ms ease,
- box-shadow 80ms ease,
- opacity 80ms ease;
+ min-width: 14rem;
+ }
+
+ .bubble-received:hover {
+ filter: brightness(0.96);
+ transform: rotate(2deg) translateY(-2px);
+ }
+
+ .bubble-received:active {
+ transform: rotate(2deg) scale(0.97);
+ filter: brightness(0.92);
+ }
+
+ .bubble-received.success {
+ background: #c7f7d4;
+ color: #155724;
+ }
+
+ /* Received tail: bottom-left (mirror of sent) */
+ .bubble-received::before,
+ .bubble-received::after {
+ position: absolute;
+ bottom: 0;
+ height: 25px;
+ content: "";
+ }
+
+ .bubble-received::before {
+ width: 20px;
+ left: -7px;
+ background-color: var(--received-color);
+ border-bottom-right-radius: 16px 14px;
+ }
+
+ .bubble-received::after {
+ width: 26px;
+ left: -26px;
+ border-bottom-right-radius: 10px;
+ background-color: var(--bg);
+ }
+
+ .bubble-received.success::before {
+ background-color: #c7f7d4;
+ }
+
+ /* ── Copy hints ── */
+ .copy-hint {
+ font-size: 0.68rem;
+ color: #444;
+ font-weight: 400;
letter-spacing: 0.01em;
+ padding-right: 32px;
+ transform: rotate(-2deg);
+ transform-origin: right center;
}
- .share-btn:active {
- transform: scale(0.97);
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
- }
-
- .share-btn.primary {
- background: #7c3aed;
- color: white;
- box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
- }
-
- .share-btn.primary:hover {
- opacity: 0.92;
- }
-
- .share-btn.primary.success {
- background: #636363;
- color: white;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
- }
-
- .share-btn.secondary {
- background: #f2f2f7;
- color: #1c1c1e;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
- }
-
- .share-btn.secondary:hover {
- background: #e5e5ea;
+ .received-hint {
+ padding-right: 0;
+ padding-left: 32px;
+ transform: rotate(2deg);
+ transform-origin: left center;
}