From b3815f14158f514aee743eb2f0f47e9f1a6045bd Mon Sep 17 00:00:00 2001 From: piyushkomali Date: Sun, 12 Jul 2026 01:49:13 -0400 Subject: [PATCH] Explode every 20th train MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every 20th dispatched train now bursts into a ๐Ÿ’ฅ with radiating ๐Ÿ”ฅ/๐Ÿ’จ/โœจ particles at the click location instead of chugging across the screen. Regular trains 1โ€“19, 21โ€“39, etc. are unchanged. --- index.html | 109 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index ca20e5e..09a0eca 100644 --- a/index.html +++ b/index.html @@ -227,6 +227,59 @@ } } + .explosion { + position: fixed; + z-index: 2; + font-size: clamp(80px, 14vw, 140px); + line-height: 1; + pointer-events: none; + transform: translate(-50%, -50%) scale(0.2); + opacity: 1; + animation: explode 800ms ease-out forwards; + will-change: transform, opacity; + } + + .explosion-particle { + position: fixed; + z-index: 2; + font-size: clamp(24px, 3.5vw, 36px); + line-height: 1; + pointer-events: none; + transform: translate(-50%, -50%); + opacity: 1; + animation: particle-fly 900ms ease-out forwards; + will-change: transform, opacity; + } + + @keyframes explode { + 0% { + opacity: 1; + transform: translate(-50%, -50%) scale(0.2); + } + + 40% { + opacity: 1; + transform: translate(-50%, -50%) scale(2); + } + + 100% { + opacity: 0; + transform: translate(-50%, -50%) scale(2.5); + } + } + + @keyframes particle-fly { + 0% { + opacity: 1; + transform: translate(-50%, -50%) translate(0, 0) scale(0.6); + } + + 100% { + opacity: 0; + transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1.2); + } + } + @media (prefers-reduced-motion: reduce) { .hero, .train-emoji:hover { @@ -234,10 +287,15 @@ transition: none; } - .steam { + .steam, + .explosion-particle { display: none; } + .explosion { + animation-duration: 500ms; + } + .train.ltr, .train.rtl { left: 50%; @@ -289,6 +347,8 @@