File size: 1,683 Bytes
e60640d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b32bc19
 
e60640d
 
 
 
 
 
 
 
 
 
 
 
 
b32bc19
 
e60640d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Smooth fade-in for panels
document.addEventListener("DOMContentLoaded", () => {
    const blocks = document.querySelectorAll(".gr-block");
    blocks.forEach((block, index) => {
        block.style.opacity = 0;
        block.style.transform = "translateY(20px)";
        setTimeout(() => {
            block.style.transition = "all 0.6s ease";
            block.style.opacity = 1;
            block.style.transform = "translateY(0)";
        }, index * 100); // Staggered load
    });
});

// Button glow pulse
function pulseButtons() {
    const buttons = document.querySelectorAll("button, .gr-button");
    buttons.forEach(btn => {
        btn.addEventListener("mouseenter", () => {
            btn.style.boxShadow = "0 0 20px rgba(255, 145, 0, 0.8)";
        });
        btn.addEventListener("mouseleave", () => {
            btn.style.boxShadow = "0 0 10px rgba(0, 255, 157, 0.4)";
        });
    });
}
pulseButtons();

// Graph animation on load
function animateGraphs() {
    const graphs = document.querySelectorAll(".graph-container");
    graphs.forEach(graph => {
        graph.style.opacity = 0;
        graph.style.transform = "scale(0.95)";
        setTimeout(() => {
            graph.style.transition = "all 0.5s ease";
            graph.style.opacity = 1;
            graph.style.transform = "scale(1)";
        }, 300);
    });
}
animateGraphs();

// Auto-refresh glow for updated sections
function glowOnUpdate(selector) {
    const element = document.querySelector(selector);
    if (element) {
        element.style.boxShadow = "0 0 25px rgba(0, 255, 157, 0.8)";
        setTimeout(() => {
            element.style.boxShadow = "";
        }, 1000);
    }
}