File size: 3,380 Bytes
b06ef61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8b885b9
 
 
b06ef61
8b885b9
b06ef61
 
 
 
 
 
 
 
 
 
 
 
 
8b885b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b06ef61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2700051
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Google AI Mode Button Clone</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500&display=swap');
        .google-btn {
            font-family: 'Google Sans', Arial, sans-serif;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .google-btn:hover {
            box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
        }
        .google-btn:active {
            background-color: #f1f3f4;
        }
        .magic-sparkle {
            background: radial-gradient(circle at center, #4285F4, #34A853, #FBBC05, #EA4335);
            background-size: 200% 200%;
            transition: background-position 0.1s ease-out;
        }
</style>
</head>
<body class="bg-white min-h-screen flex items-center justify-center">
    <div class="relative">
        <button id="aiModeButton" class="google-btn flex items-center justify-center bg-white text-[#1a73e8] border border-[#dadce0] rounded-full py-2 px-4 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-[#1a73e8]/50">
            <div class="flex items-center space-x-2">
                <div class="w-5 h-5 rounded-full magic-sparkle flex items-center justify-center">
                    <div class="w-3 h-3 bg-white rounded-full"></div>
                </div>
                <span>AI mode</span>
            </div>
        </button>
    </div>
    <script>
        const aiButton = document.getElementById('aiModeButton');
        const magicSparkle = document.querySelector('.magic-sparkle');

        aiButton.addEventListener('mousemove', function(e) {
            const rect = this.getBoundingClientRect();
            const x = e.clientX - rect.left;
            const y = e.clientY - rect.top;
            const percentX = (x / rect.width) * 100;
            const percentY = (y / rect.height) * 100;
            
            magicSparkle.style.background = `radial-gradient(circle at ${percentX}% ${percentY}%, #4285F4, #34A853, #FBBC05, #EA4335)`;
            magicSparkle.style.backgroundSize = '200% 200%';
        });

        aiButton.addEventListener('mouseleave', function() {
            magicSparkle.style.background = 'radial-gradient(circle at center, #4285F4, #34A853, #FBBC05, #EA4335)';
        });

        aiButton.addEventListener('click', function() {
// Create ripple effect
            const ripple = document.createElement('span');
            ripple.classList.add('absolute', 'rounded-full', 'bg-[#1a73e8]/10', 'animate-ripple');
            ripple.style.width = '100%';
            ripple.style.height = '100%';
            ripple.style.top = '0';
            ripple.style.left = '0';
            this.appendChild(ripple);
            
            // Remove ripple after animation
            setTimeout(() => {
                ripple.remove();
            }, 600);
            
            // Simulate original behavior (you would replace this with actual functionality)
            console.log('AI Mode activated!');
            
            // Toggle active state
            this.classList.toggle('bg-[#f1f3f4]');
        });
    </script>
</body>
</html>