diff --git a/index.php b/index.php index 11e2b6c..9188e5f 100644 --- a/index.php +++ b/index.php @@ -61,7 +61,6 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; } .background::after { - content: ''; position: absolute; top: 0; left: 0; @@ -70,6 +69,19 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; background: var(--bg-overlay); } + .flash-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #fff; + opacity: var(--bass-flash-opacity, 0); + z-index: -1; + pointer-events: none; + transition: opacity 0.05s ease; + } + /* Animated Mic Background Elements */ .bg-elements { position: fixed; @@ -359,11 +371,11 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; @keyframes card-pulse { 0%, 100% { - transform: scale(1); + transform: translate(var(--shake-offset-x, 0), var(--shake-offset-y, 0)) scale(1); box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), 0 0 20px var(--dynamic-glow-dim, rgba(0,0,0,0)); } 50% { - transform: scale(1.01); + transform: translate(var(--shake-offset-x, 0), var(--shake-offset-y, 0)) scale(1.01); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px var(--dynamic-glow, rgba(56, 189, 248, 0.4)); } } @@ -632,6 +644,7 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
+
@@ -775,6 +788,9 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; if (audio.paused) { document.documentElement.style.setProperty('--dynamic-glow', 'rgba(56, 189, 248, 0.7)'); document.documentElement.style.setProperty('--dynamic-glow-dim', 'rgba(56, 189, 248, 0.4)'); + document.documentElement.style.setProperty('--shake-offset-x', '0px'); + document.documentElement.style.setProperty('--shake-offset-y', '0px'); + document.documentElement.style.setProperty('--bass-flash-opacity', '0'); return; } animationId = requestAnimationFrame(draw); @@ -790,6 +806,25 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; let sum = 0; for(let i=0; i 210) { + const intensity = (bassAverage - 210) / 45; + const shakeX = (Math.random() - 0.5) * 12 * intensity; + const shakeY = (Math.random() - 0.5) * 12 * intensity; + document.documentElement.style.setProperty('--shake-offset-x', `${shakeX}px`); + document.documentElement.style.setProperty('--shake-offset-y', `${shakeY}px`); + document.documentElement.style.setProperty('--bass-flash-opacity', (intensity * 0.25).toString()); + } else { + document.documentElement.style.setProperty('--shake-offset-x', '0px'); + document.documentElement.style.setProperty('--shake-offset-y', '0px'); + document.documentElement.style.setProperty('--bass-flash-opacity', '0'); + } // Rotar el color base segĂșn el tiempo y la intensidad hue = (hue + 0.5 + (average / 50)) % 360;