File size: 15,075 Bytes
0263988
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fruit Spin - Fun Gambling Game</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @keyframes spin {
            0% { transform: translateY(0); }
            100% { transform: translateY(-100%); }
        }
        
        .slot-wheel {
            height: 100px;
            overflow: hidden;
            position: relative;
        }
        
        .slot-items {
            position: absolute;
            width: 100%;
            transition: transform 3s cubic-bezier(0.17, 0.85, 0.45, 1);
        }
        
        .slot-item {
            height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
        }
        
        .win-animation {
            animation: pulse 0.5s infinite alternate;
        }
        
        @keyframes pulse {
            from { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
            to { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
        }
        
        .coin {
            transition: all 0.3s ease;
        }
        
        .coin:hover {
            transform: scale(1.1);
        }
        
        .coin:active {
            transform: scale(0.9);
        }
    </style>
</head>
<body class="bg-gradient-to-b from-blue-900 to-purple-900 min-h-screen text-white">
    <div class="container mx-auto px-4 py-8">
        <header class="text-center mb-8">
            <h1 class="text-4xl md:text-6xl font-bold mb-2 bg-clip-text text-transparent bg-gradient-to-r from-yellow-400 to-red-500">
                 πŸ’ Fruit Spin 
            </h1>
            <p class="text-lg text-gray-300">A fun gambling game with no real money involved</p>
        </header>

        <div class="max-w-3xl mx-auto bg-gray-800 bg-opacity-50 rounded-xl shadow-2xl overflow-hidden backdrop-blur-sm">
            <div class="p-6">
                <!-- Balance Display -->
                <div class="flex justify-between items-center mb-8 p-4 bg-gray-900 rounded-lg">
                    <div>
                        <h2 class="text-xl font-semibold">Your Balance</h2>
                        <p class="text-3xl font-bold text-yellow-400" id="balance">200000</p>
                    </div>
                    <div class="flex space-x-2">
                        <button id="reset-btn" class="px-4 py-2 bg-red-600 hover:bg-red-700 rounded-lg font-medium transition">
                            <i class="fas fa-sync-alt mr-2"></i>Reset
                        </button>
                    </div>
                </div>

                <!-- Bet Controls -->
                <div class="mb-8 p-4 bg-gray-900 rounded-lg">
                    <h2 class="text-xl font-semibold mb-4">Place Your Bet</h2>
                    <div class="flex flex-wrap items-center justify-between">
                        <div class="flex space-x-2 mb-4 md:mb-0">
                            <button class="coin px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition" data-bet="10">
                                <i class="fas fa-coins mr-2"></i>10
                            </button>
                            <button class="coin px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition" data-bet="50">
                                <i class="fas fa-coins mr-2"></i>50
                            </button>
                            <button class="coin px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium transition" data-bet="100">
                                <i class="fas fa-coins mr-2"></i>100
                            </button>
                        </div>
                        <div class="flex items-center">
                            <span class="mr-2">Bet Amount:</span>
                            <input type="number" id="bet-amount" value="10" min="10" max="1000000" class="w-24 px-3 py-2 bg-gray-800 rounded-lg text-white border border-gray-700">
                        </div>
                    </div>
                </div>

                <!-- Slot Machine -->
                <div class="mb-8">
                    <div class="flex justify-center space-x-2 md:space-x-4 mb-6">
                        <div class="slot-wheel w-24 md:w-32 bg-gray-900 rounded-lg overflow-hidden border-2 border-yellow-500" id="wheel1">
                            <div class="slot-items" id="items1"></div>
                        </div>
                        <div class="slot-wheel w-24 md:w-32 bg-gray-900 rounded-lg overflow-hidden border-2 border-yellow-500" id="wheel2">
                            <div class="slot-items" id="items2"></div>
                        </div>
                        <div class="slot-wheel w-24 md:w-32 bg-gray-900 rounded-lg overflow-hidden border-2 border-yellow-500" id="wheel3">
                            <div class="slot-items" id="items3"></div>
                        </div>
                    </div>
                    <div class="text-center">
                        <button id="spin-btn" class="px-8 py-4 bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-full text-xl font-bold uppercase tracking-wider shadow-lg transition transform hover:scale-105">
                            <i class="fas fa-play mr-2"></i> Spin
                        </button>
                    </div>
                </div>

                <!-- Results -->
                <div id="result" class="hidden p-4 bg-gray-900 rounded-lg mb-4 text-center">
                    <h2 class="text-2xl font-bold mb-2" id="result-text"></h2>
                    <p class="text-xl" id="win-amount"></p>
                </div>

                <!-- Game Info -->
                <div class="bg-gray-900 bg-opacity-70 rounded-lg p-4">
                    <h2 class="text-xl font-semibold mb-2">How to Play</h2>
                    <ul class="list-disc pl-5 space-y-1 text-gray-300">
                        <li>Set your bet amount using the buttons or input field</li>
                        <li>Click SPIN to start the game</li>
                        <li>Match 3 symbols to win!</li>
                        <li>πŸ’πŸ’πŸ’ = 5x | 🍊🍊 = 10x | πŸ‹πŸ‹ = 15x | πŸ‰πŸ‰ = 20x | 7️⃣7️⃣7️⃣ = 50x</li>
                    </ul>
                </div>
            </div>
        </div>

        <footer class="text-center mt-8 text-gray-400 text-sm">
            <p>This is a fake gambling game for entertainment purposes only. No real money is used or won.</p>
        </footer>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Game variables
            let balance = 200000;
            let currentBet = 10;
            let isSpinning = false;
            
            // Fruit symbols
            const symbols = ['πŸ’', '🍊', 'πŸ‹', 'πŸ‰', '7️⃣'];
            const payouts = {
                'πŸ’πŸ’πŸ’': 5,
                '🍊🍊🍊': 10,
                'πŸ‹πŸ‹πŸ‹': 15,
                'πŸ‰πŸ‰πŸ‰': 20,
                '7️⃣7️⃣7️⃣': 50
            };
            
            // DOM elements
            const balanceEl = document.getElementById('balance');
            const betAmountInput = document.getElementById('bet-amount');
            const spinBtn = document.getElementById('spin-btn');
            const resetBtn = document.getElementById('reset-btn');
            const resultEl = document.getElementById('result');
            const resultTextEl = document.getElementById('result-text');
            const winAmountEl = document.getElementById('win-amount');
            const wheels = [
                document.getElementById('wheel1'),
                document.getElementById('wheel2'),
                document.getElementById('wheel3')
            ];
            const itemsContainers = [
                document.getElementById('items1'),
                document.getElementById('items2'),
                document.getElementById('items3')
            ];
            
            // Initialize slot items
            function initSlots() {
                itemsContainers.forEach(container => {
                    container.innerHTML = '';
                    // Add extra items for smooth spinning
                    for (let i = 0; i < 20; i++) {
                        const randomSymbol = symbols[Math.floor(Math.random() * symbols.length)];
                        const item = document.createElement('div');
                        item.className = 'slot-item';
                        item.textContent = randomSymbol;
                        container.appendChild(item);
                    }
                });
            }
            
            // Update balance display
            function updateBalance() {
                balanceEl.textContent = balance;
            }
            
            // Handle bet buttons
            document.querySelectorAll('.coin').forEach(button => {
                button.addEventListener('click', function() {
                    currentBet = parseInt(this.dataset.bet);
                    betAmountInput.value = currentBet;
                });
            });
            
            // Handle bet amount input
            betAmountInput.addEventListener('change', function() {
                currentBet = parseInt(this.value);
                if (currentBet < 10) currentBet = 10;
                if (currentBet > 10000) currentBet = 10000;
                if (currentBet > balance) currentBet = balance;
                this.value = currentBet;
            });
            
            // Spin the wheels
            function spin() {
                if (isSpinning || currentBet > balance || currentBet < 10 || currentBet > 1000000) return;
                
                isSpinning = true;
                balance -= currentBet;
                updateBalance();
                resultEl.classList.add('hidden');
                
                // Reset wheels to top position
                itemsContainers.forEach(container => {
                    container.style.transform = 'translateY(0)';
                });
                
                // Generate random positions for each wheel
                const spins = [
                    Math.floor(Math.random() * symbols.length),
                    Math.floor(Math.random() * symbols.length),
                    Math.floor(Math.random() * symbols.length)
                ];
                
                // 10% chance for a winning combination (for demo purposes)
                if (Math.random() < 0.3) {
                    const winningSymbol = symbols[Math.floor(Math.random() * symbols.length)];
                    spins[0] = symbols.indexOf(winningSymbol);
                    spins[1] = symbols.indexOf(winningSymbol);
                    spins[2] = symbols.indexOf(winningSymbol);
                }
                
                // Calculate final positions
                const positions = spins.map(spin => {
                    return -((spin + 1) * 100 + Math.floor(Math.random() * 10) * 100);
                });
                
                // Animate wheels
                itemsContainers.forEach((container, index) => {
                    setTimeout(() => {
                        container.style.transform = `translateY(${positions[index]}px)`;
                    }, 100 * index);
                });
                
                // Check result after animation
                setTimeout(() => {
                    checkResult(spins);
                    isSpinning = false;
                }, 3500);
            }
            
            // Check the spin result
            function checkResult(spins) {
                const result = [
                    symbols[spins[0]],
                    symbols[spins[1]],
                    symbols[spins[2]]
                ].join('');
                
                resultEl.classList.remove('hidden');
                
                if (payouts[result]) {
                    const winAmount = currentBet * payouts[result];
                    balance += winAmount;
                    updateBalance();
                    
                    resultTextEl.textContent = 'YOU WIN!';
                    resultTextEl.className = 'text-2xl font-bold mb-2 text-green-400';
                    winAmountEl.textContent = `+${winAmount} coins!`;
                    winAmountEl.className = 'text-xl text-yellow-400';
                    
                    // Add win animation to wheels
                    wheels.forEach(wheel => {
                        wheel.classList.add('win-animation');
                        setTimeout(() => {
                            wheel.classList.remove('win-animation');
                        }, 2000);
                    });
                } else {
                    resultTextEl.textContent = 'TRY AGAIN!';
                    resultTextEl.className = 'text-2xl font-bold mb-2 text-red-400';
                    winAmountEl.textContent = `Better luck next time!`;
                    winAmountEl.className = 'text-xl text-gray-300';
                }
            }
            
            // Reset game
            function resetGame() {
                balance = 200000;
                currentBet = 10;
                betAmountInput.value = currentBet;
                updateBalance();
                resultEl.classList.add('hidden');
                initSlots();
            }
            
            // Event listeners
            spinBtn.addEventListener('click', spin);
            resetBtn.addEventListener('click', resetGame);
            
            // Initialize game
            initSlots();
            updateBalance();
            
            // Keyboard support
            document.addEventListener('keydown', function(e) {
                if (e.code === 'Space' && !isSpinning) {
                    e.preventDefault();
                    spin();
                }
            });
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=1developerintheworld/gamling" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>