Spaces:
Running

File size: 7,209 Bytes
09196f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Spin Wheel App</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>
        .wheel-container {
            position: relative;
            width: 300px;
            height: 300px;
            margin: 0 auto;
        }
        
        .wheel {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            position: relative;
            overflow: hidden;
            transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
            transform: rotate(0deg);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
            border: 8px solid #fff;
        }
        
        .wheel-section {
            position: absolute;
            width: 50%;
            height: 50%;
            transform-origin: bottom right;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        .wheel-pointer {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 20px solid transparent;
            border-right: 20px solid transparent;
            border-top: 40px solid #ef4444;
            z-index: 10;
        }
        
        .spin-btn {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            z-index: 20;
            border: none;
            outline: none;
        }
        
        .form-input {
            transition: all 0.3s;
        }
        
        .form-input:focus {
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .fade-in {
            animation: fadeIn 0.5s ease-out forwards;
        }
        
        @media (max-width: 640px) {
            .wheel-container {
                width: 250px;
                height: 250px;
            }
            
            .wheel-section {
                font-size: 0.8rem;
            }
        }
    </style>
</head>
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-4">
    <div class="max-w-md w-full bg-white rounded-xl shadow-lg p-6">
        <h1 class="text-3xl font-bold text-center mb-2">🎯 Spin to Win</h1>
        <p class="text-lg text-gray-600 text-center mb-6">Spin the wheel to get your prize!</p>
        
        <div class="wheel-container mb-8">
            <div class="wheel-pointer"></div>
            <div class="wheel" id="wheel">
                <!-- Wheel sections will be added by JavaScript -->
            </div>
            <button class="spin-btn" id="spinBtn">
                <i class="fas fa-sync-alt text-xl text-blue-500"></i>
            </button>
        </div>
        
        <div id="contentArea" class="hidden">
            <div class="fade-in mb-6">
                <h2 class="text-xl font-semibold mb-4">Claim Your Prize</h2>
                <form class="space-y-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Name</label>
                        <input type="text" class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
                        <input type="email" class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                    </div>
                    <button type="submit" class="w-full bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600 transition duration-200">Submit</button>
                </form>
            </div>
            
            <div class="fade-in bg-blue-50 p-4 rounded-lg">
                <h3 class="text-lg font-medium text-blue-800 mb-2">Today's Lesson</h3>
                <p class="text-blue-700">Congratulations! You've won a special discount. Remember that persistence is key to success. Keep spinning and keep winning!</p>
            </div>
        </div>
        
        <div class="flex justify-around mt-8">
            <button id="langEn" class="px-4 py-2 bg-gray-200 rounded-lg hover:bg-gray-300 transition duration-200 flex items-center">
                <span class="mr-2">🇺🇸</span> English
            </button>
            <button id="langEs" class="px-4 py-2 bg-gray-200 rounded-lg hover:bg-gray-300 transition duration-200 flex items-center">
                <span class="mr-2">🇪🇸</span> Español
            </button>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Wheel configuration
            const wheel = document.getElementById('wheel');
            const spinBtn = document.getElementById('spinBtn');
            const contentArea = document.getElementById('contentArea');
            const langEn = document.getElementById('langEn');
            const langEs = document.getElementById('langEs');
            
            // Wheel sections data
            const sections = [
                { color: '#ef4444', text: '10% Off' },
                { color: '#f59e0b', text: 'Free Item' },
                { color: '#10b981', text: '20% Off' },
                { color: '#3b82f6', text: 'Try Again' },
                { color: '#6366f1', text: '15% Off' },
                { color: '#8b5cf6', text: 'Free Shipping' },
                { color: '#ec4899', text: '5% Off' },
                { color: '#f43f5e', text: '
<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=99Odeshi/spin" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>