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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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>برنامه سلام و احوالپرسی</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --primary-color: #4f46e5;
            --secondary-color: #7c73e6;
            --accent-color: #f59e0b;
            --text-color: #1f2937;
            --bg-color: #f8fafc;
            --card-bg: #ffffff;
            --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            --gradient: linear-gradient(135deg, #4f46e5, #7c73e6);
        }

        body {
            background: var(--bg-color);
            color: var(--text-color);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            transition: all 0.3s ease;
        }

        .header {
            position: absolute;
            top: 20px;
            left: 20px;
        }

        .anycoder-link {
            color: var(--primary-color);
            text-decoration: none;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s ease;
        }

        .anycoder-link:hover {
            color: var(--secondary-color);
            transform: translateY(-2px);
        }

        .container {
            max-width: 800px;
            width: 100%;
            background: var(--card-bg);
            border-radius: 20px;
            box-shadow: var(--shadow);
            overflow: hidden;
            animation: fadeIn 1s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .hero {
            background: var(--gradient);
            color: white;
            padding: 40px 30px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
            animation: rotate 20s linear infinite;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .hero h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            position: relative;
            z-index: 1;
        }

        .hero p {
            font-size: 1.2rem;
            opacity: 0.9;
            position: relative;
            z-index: 1;
        }

        .content {
            padding: 40px 30px;
        }

        .greeting-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            margin-bottom: 40px;
        }

        .greeting-box {
            background: var(--gradient);
            color: white;
            padding: 20px 30px;
            border-radius: 15px;
            text-align: center;
            font-size: 1.8rem;
            box-shadow: var(--shadow);
            transition: transform 0.3s ease;
        }

        .greeting-box:hover {
            transform: scale(1.05);
        }

        .response-box {
            background: var(--card-bg);
            border: 2px dashed var(--secondary-color);
            padding: 20px 30px;
            border-radius: 15px;
            text-align: center;
            font-size: 1.8rem;
            color: var(--primary-color);
            min-height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .response-box:hover {
            border-style: solid;
            background: rgba(79, 70, 229, 0.05);
        }

        .interaction-section {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .interaction-card {
            background: var(--card-bg);
            border-radius: 15px;
            padding: 25px;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .interaction-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        }

        .interaction-card i {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 15px;
        }

        .interaction-card h3 {
            margin-bottom: 10px;
            color: var(--text-color);
        }

        .interaction-card p {
            color: #6b7280;
            font-size: 0.9rem;
        }

        .emoji-section {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        .emoji-btn {
            background: var(--card-bg);
            border: none;
            border-radius: 50%;
            width: 60px;
            height: 60px;
            font-size: 1.8rem;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
        }

        .emoji-btn:hover {
            transform: scale(1.2) rotate(10deg);
            background: var(--gradient);
            color: white;
        }

        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: var(--card-bg);
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow);
            font-size: 1.2rem;
            color: var(--primary-color);
            transition: all 0.3s ease;
        }

        .theme-toggle:hover {
            transform: rotate(180deg);
        }

        .footer {
            margin-top: 40px;
            text-align: center;
            color: #6b7280;
            font-size: 0.9rem;
        }

        /* Dark theme */
        body.dark-theme {
            --text-color: #f9fafb;
            --bg-color: #111827;
            --card-bg: #1f2937;
            --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        }

        /* Responsive styles */
        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2rem;
            }
            
            .hero p {
                font-size: 1rem;
            }
            
            .greeting-box, .response-box {
                font-size: 1.5rem;
                padding: 15px 20px;
            }
            
            .content {
                padding: 30px 20px;
            }
        }

        @media (max-width: 480px) {
            .hero {
                padding: 30px 20px;
            }
            
            .hero h1 {
                font-size: 1.7rem;
            }
            
            .interaction-section {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <div class="header">
        <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link">
            <i class="fas fa-code"></i>
            Built with anycoder
        </a>
    </div>

    <button class="theme-toggle" id="themeToggle">
        <i class="fas fa-moon"></i>
    </button>

    <div class="container">
        <div class="hero">
            <h1>سلام! خوبی؟</h1>
            <p>برنامه تعاملی سلام و احوالپرسی به زبان فارسی</p>
        </div>
        
        <div class="content">
            <div class="greeting-section">
                <div class="greeting-box" id="greeting">
                    سلام! خوبی؟
                </div>
                <div class="response-box" id="response">
                    من خوبم، ممنون! شما چطورید؟
                </div>
            </div>
            
            <div class="interaction-section">
                <div class="interaction-card" onclick="changeGreeting('سلام! چطوری؟')">
                    <i class="fas fa-handshake"></i>
                    <h3>سلام دوستانه</h3>
                    <p>یک سلام صمیمانه و گرم</p>
                </div>
                
                <div class="interaction-card" onclick="changeGreeting('درود! حالتون چطوره؟')">
                    <i class="fas fa-user-friends"></i>
                    <h3>درود رسمی</h3>
                    <p>سلام و احوالپرسی رسمی</p>
                </div>
                
                <div class="interaction-card" onclick="changeGreeting('سلام عزیزم! چطوری؟')">
                    <i class="fas fa-heart"></i>
                    <h3>سلام عاشقانه</h3>
                    <p>سلامی پر از محبت و عشق</p>
                </div>
            </div>
            
            <div class="emoji-section">
                <button class="emoji-btn" onclick="showResponse('😊 خیلی خوبم! ممنون')">😊</button>
                <button class="emoji-btn" onclick="showResponse('😐 بدک نیستم')">😐</button>
                <button class="emoji-btn" onclick="showResponse('😔 حالم خوب نیست')">😔</button>
                <button class="emoji-btn" onclick="showResponse('🤩 عالیم!')">🤩</button>
                <button class="emoji-btn" onclick="showResponse('👍 خوبم، مرسی')">👍</button>
            </div>
        </div>
    </div>
    
    <div class="footer">
        طراحی شده با HTML, CSS و JavaScript
    </div>

    <script>
        // Theme toggle functionality
        const themeToggle = document.getElementById('themeToggle');
        const body = document.body;
        
        themeToggle.addEventListener('click', () => {
            body.classList.toggle('dark-theme');
            
            if (body.classList.contains('dark-theme')) {
                themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
            } else {
                themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
            }
        });
        
        // Greeting change functionality
        function changeGreeting(newGreeting) {
            const greetingElement = document.getElementById('greeting');
            greetingElement.textContent = newGreeting;
            
            // Add animation
            greetingElement.style.transform = 'scale(1.1)';
            setTimeout(() => {
                greetingElement.style.transform = 'scale(1)';
            }, 300);
            
            // Reset response
            document.getElementById('response').textContent = 'من خوبم، ممنون! شما چطورید؟';
        }
        
        // Response change functionality
        function showResponse(newResponse) {
            const responseElement = document.getElementById('response');
            responseElement.textContent = newResponse;
            
            // Add animation
            responseElement.style.transform = 'scale(1.1)';
            setTimeout(() => {
                responseElement.style.transform = 'scale(1)';
            }, 300);
        }
        
        // Add some random animations to emojis
        const emojiButtons = document.querySelectorAll('.emoji-btn');
        emojiButtons.forEach(btn => {
            btn.addEventListener('mouseover', () => {
                const randomRotation = Math.floor(Math.random() * 20) - 10;
                btn.style.transform = `scale(1.2) rotate(${randomRotation}deg)`;
            });
            
            btn.addEventListener('mouseout', () => {
                btn.style.transform = 'scale(1) rotate(0deg)';
            });
        });
    </script>
</body>
</html>