From b3bf4c0acd2f391271c5b95e4d3ef79ee2da080c Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Mon, 6 Apr 2026 20:37:54 +0000 Subject: [PATCH] feat(escape): sunete game over/victorie + cirese in loc de stelute Co-Authored-By: Claude Opus 4.6 (1M context) --- paula-escape/escape_room.html | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/paula-escape/escape_room.html b/paula-escape/escape_room.html index 33f17a5..91f96a1 100644 --- a/paula-escape/escape_room.html +++ b/paula-escape/escape_room.html @@ -202,12 +202,11 @@ html, body { .stars { display: flex; gap: 0.8vmin; } .star { font-size: clamp(22px, 3vmin, 36px); - color: var(--star-locked); - transition: color 0.5s, transform 0.5s, filter 0.5s; + filter: grayscale(1) opacity(0.4); + transition: filter 0.5s, transform 0.5s; } .star.solved { - color: var(--star-gold); - filter: drop-shadow(0 0 6px rgba(241,196,15,0.6)); + filter: grayscale(0) opacity(1) drop-shadow(0 0 6px rgba(220,50,50,0.5)); animation: starPop 0.8s ease-out; } @keyframes starPop { @@ -782,7 +781,7 @@ html, body { for (let i = 0; i < PROBLEMS.length; i++) { const s = document.createElement("span"); s.className = "star"; - s.textContent = "★"; + s.textContent = "🍒"; s.dataset.idx = i; starsEl.appendChild(s); } @@ -994,7 +993,15 @@ html, body { // ============================================================ // GAME OVER // ============================================================ + function sfxGameOver() { + const notes = [440, 370, 311, 261]; + notes.forEach((f, i) => { + setTimeout(() => playTone(f, "sine", 0.3, 0.25), i * 200); + }); + } + function showGameOver() { + sfxGameOver(); gameOver.classList.add("visible"); } @@ -1020,8 +1027,16 @@ html, body { // ============================================================ // VICTORY // ============================================================ + function sfxVictory() { + const notes = [523, 659, 784, 1047, 784, 1047]; + notes.forEach((f, i) => { + setTimeout(() => playTone(f, "sine", 0.3, 0.3), i * 150); + }); + } + function showVictory() { - vicStars.textContent = "⭐".repeat(PROBLEMS.length); + sfxVictory(); + vicStars.textContent = "🍒".repeat(PROBLEMS.length); vicBonus.textContent = state.hearts > 0 ? "Bonus: " + state.hearts + " ❤️ rămase!" : ""; victoryEl.classList.add("visible"); startConfetti();