File size: 24,066 Bytes
8a60ec5
8fd9b21
4a074c0
8fd9b21
 
 
4a074c0
8fd9b21
2313537
4a074c0
 
 
 
8fd9b21
4a074c0
 
 
 
8a60ec5
 
4a074c0
 
8a60ec5
 
4a074c0
 
 
8a60ec5
4a074c0
8fd9b21
2313537
 
8a60ec5
 
 
8fd9b21
4a074c0
 
8fd9b21
4a074c0
 
 
 
8a60ec5
8fd9b21
 
4a074c0
45d6002
4a074c0
 
 
 
45d6002
2313537
 
4a074c0
 
2313537
e471046
 
2313537
45d6002
 
 
2313537
 
4a074c0
2313537
45d6002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a074c0
45d6002
 
 
 
 
e471046
45d6002
 
 
e471046
45d6002
 
 
 
 
 
 
4a074c0
2313537
45d6002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2313537
8fd9b21
 
 
4a074c0
8fd9b21
45d6002
 
 
 
 
 
 
 
2634fcd
 
 
45d6002
4a074c0
2634fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a074c0
45d6002
4a074c0
2634fcd
 
 
 
 
 
 
 
 
 
45d6002
2634fcd
4a074c0
45d6002
 
 
2634fcd
45d6002
 
 
 
2634fcd
45d6002
 
 
 
2634fcd
45d6002
 
 
 
2634fcd
45d6002
 
 
 
2634fcd
4a074c0
 
 
2634fcd
 
 
 
 
 
 
4a074c0
2634fcd
 
4a074c0
 
2634fcd
45d6002
2634fcd
 
 
45d6002
2634fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45d6002
2634fcd
45d6002
2634fcd
 
45d6002
 
2634fcd
45d6002
 
2634fcd
45d6002
 
 
2634fcd
 
 
 
 
45d6002
2634fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45d6002
2634fcd
45d6002
 
2634fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45d6002
 
 
 
 
 
2634fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
45d6002
 
8a60ec5
4a074c0
45d6002
2634fcd
 
 
 
 
 
 
e471046
 
 
 
 
 
 
 
 
2634fcd
 
 
 
 
 
e471046
 
 
 
 
 
2634fcd
 
 
 
e471046
 
 
 
 
 
 
 
 
 
2634fcd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8fd9b21
 
2634fcd
0bb0d21
2634fcd
 
 
 
0bb0d21
2634fcd
 
 
0bb0d21
2634fcd
 
 
0bb0d21
2634fcd
 
 
0bb0d21
2634fcd
 
 
 
0bb0d21
 
 
 
 
 
 
 
 
 
 
 
2634fcd
0bb0d21
 
 
2634fcd
 
8fd9b21
8a60ec5
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
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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524

<!DOCTYPE html>
<html lang="es" x-data="{ filtersOpen: false }">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mapa Interactivo - Paws & Paths</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" />
    <script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"></script>
    <style>
        body, html {
            height: 100%;
            margin: 0;
            padding: 0;
        }
        #map { 
            height: 100vh; 
            width: 100%; 
            z-index: 0;
        }
        .leaflet-div-icon {
            background: transparent;
            border: none;
        }
        .custom-icon {
            background: white;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            border: 3px solid white;
            box-shadow: 0 0 10px rgba(0,0,0,0.2);
        }
        .custom-icon i {
            width: 24px;
            height: 24px;
            stroke-width: 2;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Header with improved controls -->
    <div class="bg-white shadow-md">
        <div class="max-w-7xl mx-auto px-4 py-4 flex items-center justify-between">
            <a href="index.html" class="flex items-center text-gray-800 hover:text-green-600">
                <i data-feather="arrow-left" class="mr-2"></i>
                <span class="font-medium">Mapa Comunitario</span>
            </a>
            <div class="flex items-center space-x-4">
                <button @click="filtersOpen = !filtersOpen" class="bg-gray-100 p-2 rounded-full hover:bg-gray-200 transition">
                    <i data-feather="filter"></i>
                </button>
                <button @click="openReport()" class="bg-green-600 text-white p-2 rounded-full hover:bg-green-700 transition">
<i data-feather="plus"></i>
                </button>
                <button @click="locateUser()" class="bg-blue-100 text-blue-600 p-2 rounded-full hover:bg-blue-200 transition">
                    <i data-feather="crosshair"></i>
                </button>
            </div>
        </div>
    </div>

    <!-- Map Container with Sidebar -->
    <div class="flex flex-col md:flex-row h-[calc(100vh-64px)]">
        <!-- Sidebar -->
        <div x-show="sidebarOpen" @click.away="sidebarOpen = false"
             class="w-full md:w-80 bg-white shadow-lg z-10 overflow-y-auto">
            <div class="p-4">
                <h3 class="text-lg font-semibold mb-4 flex items-center">
                    <i data-feather="map-pin" class="mr-2 text-green-600"></i>
                    Puntos cercanos
                </h3>
                <div class="space-y-4">
                    <div class="bg-gray-50 p-3 rounded-lg border border-gray-200 hover:border-green-300 cursor-pointer">
                        <div class="flex items-start">
                            <div class="bg-green-100 p-2 rounded-full mr-3">
                                <i data-feather="users" class="text-green-600"></i>
                            </div>
                            <div>
                                <h4 class="font-medium">Grupo de paseo</h4>
                                <p class="text-sm text-gray-500">10-12am en Plaza Mayor</p>
                                <div class="flex items-center mt-1 text-xs text-gray-400">
                                    <i data-feather="user" class="w-3 h-3 mr-1"></i>
                                    <span>5 personas confirmadas</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-gray-50 p-3 rounded-lg border border-gray-200 hover:border-green-300 cursor-pointer">
                        <div class="flex items-start">
                            <div class="bg-yellow-100 p-2 rounded-full mr-3">
                                <i data-feather="alert-triangle" class="text-yellow-600"></i>
                            </div>
                            <div>
                                <h4 class="font-medium">脕rea con obras</h4>
                                <p class="text-sm text-gray-500">Calle Alcal谩 100-120</p>
                                <div class="flex items-center mt-1 text-xs text-gray-400">
                                    <i data-feather="clock" class="w-3 h-3 mr-1"></i>
                                    <span>Reportado hoy</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Main Map -->
        <div id="map" class="flex-1"></div>
    </div>
    <!-- Bottom Controls -->
    <div class="fixed bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-4 z-10">
        <button @click="toggleSidebar()" class="bg-white p-3 rounded-full shadow-lg hover:bg-gray-50">
            <i data-feather="list"></i>
        </button>
    </div>
<!-- Report Modal -->
    <div x-show="reportOpen" @click.away="reportOpen = false" 
         class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4">
        <div class="bg-white rounded-xl p-6 w-full max-w-md">
            <div class="flex justify-between items-center mb-4">
                <h3 class="text-lg font-semibold text-green-700">Reportar en el mapa</h3>
                <button @click="reportOpen = false" class="text-gray-500 hover:text-gray-700">
                    <i data-feather="x"></i>
                </button>
            </div>
            <div class="space-y-4">
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Tipo de reporte</label>
                    <select x-model="reportType" class="w-full border border-gray-300 rounded-md p-2">
                        <option value="meetup">Quedada para pasear</option>
                        <option value="warning">Advertencia (obras, peligros)</option>
                        <option value="lost">Mascota perdida</option>
                        <option value="other">Otro</option>
                    </select>
                </div>
                <div x-show="reportType === 'meetup'">
                    <label class="block text-sm font-medium text-gray-700 mb-1">Fecha y hora</label>
                    <input type="datetime-local" class="w-full border border-gray-300 rounded-md p-2">
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Descripci贸n</label>
                    <textarea class="w-full border border-gray-300 rounded-md p-2" rows="3" placeholder="Proporciona detalles..."></textarea>
                </div>
                <div class="flex justify-end space-x-3">
                    <button @click="reportOpen = false" class="px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50">
                        Cancelar
                    </button>
                    <button @click="submitReport()" class="px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 flex items-center">
                        <i data-feather="send" class="w-4 h-4 mr-1"></i> Enviar
                    </button>
                </div>
            </div>
        </div>
    </div>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            feather.replace();
            
            // Alpine.js data
            const app = {
                sidebarOpen: true,
                reportOpen: false,
                reportType: 'meetup',
                userLocation: null,
                userMarker: null,
                markers: [],
                map: null,
                loading: false,
                error: null
            };

            // Friendly messages
            const messages = {
                locationError: 'No pudimos obtener tu ubicaci贸n. Por favor activa los permisos de ubicaci贸n o intenta nuevamente.',
                reportSuccess: '隆Reporte enviado con 茅xito! Se ha agregado al mapa.',
                genericError: 'Algo sali贸 mal. Por favor intenta nuevamente.'
            };

            // Initialize map with better defaults
            app.map = L.map('map', {
                center: [40.4168, -3.7038],
                zoom: 14,
                zoomControl: false, // We'll add our own
                touchZoom: true,
                scrollWheelZoom: true,
                doubleClickZoom: true,
                boxZoom: true,
                dragging: true
            });

            // Add tile layer with better contrast
            L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png', {
                attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',
                subdomains: 'abcd',
                maxZoom: 19
            }).addTo(app.map);

            // Better controls
            L.control.zoom({
                position: 'topright'
            }).addTo(app.map);

            L.control.scale({
                position: 'bottomleft',
                imperial: false
            }).addTo(app.map);
            // Improved custom icons with tooltips
            function createIcon(type) {
                let iconClass, color, tooltip;
                switch(type) {
                    case 'user': 
                        iconClass = 'user'; 
                        color = '#3b82f6';
                        tooltip = 'Tu ubicaci贸n';
                        break;
                    case 'meetup': 
                        iconClass = 'users'; 
                        color = '#10b981';
                        tooltip = 'Grupo de paseo';
                        break;
                    case 'warning': 
                        iconClass = 'alert-triangle'; 
                        color = '#f59e0b';
                        tooltip = 'Advertencia';
                        break;
                    case 'lost': 
                        iconClass = 'heart'; 
                        color = '#ef4444';
                        tooltip = 'Mascota perdida';
                        break;
                    default: 
                        iconClass = 'map-pin';
                        color = '#6b7280';
                        tooltip = 'Punto de inter茅s';
                }
                
                return L.divIcon({
                    className: 'custom-icon-container',
                    html: `
                        <div class="custom-icon" style="border-color: ${color}" 
                             title="${tooltip}" data-toggle="tooltip">
                            <i data-feather="${iconClass}" style="color: ${color}"></i>
                        </div>
                    `,
                    iconSize: [40, 40],
                    iconAnchor: [20, 40],
                    popupAnchor: [0, -40]
                });
            }
            // Improved locate user function with feedback
            app.locateUser = function() {
                app.loading = true;
                app.error = null;
                
                if (navigator.geolocation) {
                    navigator.geolocation.getCurrentPosition(
                        position => {
                            const { latitude, longitude } = position.coords;
                            app.userLocation = [latitude, longitude];
                            
                            // Remove previous user marker if exists
                            if (app.userMarker) {
                                app.map.removeLayer(app.userMarker);
                            }
                            
                            // Add new marker with better popup
                            app.userMarker = L.marker([latitude, longitude], {
                                icon: createIcon('user')
                            }).addTo(app.map)
                            .bindPopup(`
                                <div class="p-2">
                                    <h3 class="font-bold text-blue-600">Est谩s aqu铆</h3>
                                    <p class="text-sm text-gray-600">Precisi贸n: ${position.coords.accuracy.toFixed(0)} metros</p>
                                </div>
                            `).openPopup();
                            
                            // Center map on user with smooth transition
                            app.map.flyTo([latitude, longitude], 16, {
                                duration: 1,
                                easeLinearity: 0.25
                            });
                            
                            app.loading = false;
                        },
                        error => {
                            console.error('Geolocation error:', error);
                            app.error = messages.locationError;
                            app.loading = false;
                            // Show error in UI
                            const errorElement = document.getElementById('locationError');
                            if (errorElement) {
                                errorElement.textContent = app.error;
                                errorElement.classList.remove('hidden');
                                setTimeout(() => errorElement.classList.add('hidden'), 5000);
                            }
                        },
                        {
                            enableHighAccuracy: true,
                            timeout: 15000,
                            maximumAge: 30000
                        }
                    );
                } else {
                    app.error = 'Tu navegador no soporta geolocalizaci贸n';
                    app.loading = false;
                }
            };
            // Enhanced report submission with validation
            app.submitReport = function() {
                if (!app.userLocation) {
                    app.error = messages.locationError;
                    return;
                }
                
                const description = document.getElementById('reportDescription').value;
                if (!description || description.length < 10) {
                    app.error = 'Por favor ingresa una descripci贸n detallada (m铆nimo 10 caracteres)';
                    return;
                }
                
                app.loading = true;
                
                try {
                    // Simulate API call
                    setTimeout(() => {
                        const marker = L.marker(app.userLocation, {
                            icon: createIcon(app.reportType)
                        }).addTo(app.map)
                        .bindPopup(`
                            <div class="p-2">
                                <h3 class="font-bold mb-1 ${app.reportType === 'meetup' ? 'text-green-600' : 
                                  app.reportType === 'warning' ? 'text-yellow-600' : 'text-red-600'}">
                                    ${app.reportType === 'meetup' ? 'Quedada' : 
                                      app.reportType === 'warning' ? 'Advertencia' : 'Mascota perdida'}
                                </h3>
                                <p class="text-sm text-gray-600">${new Date().toLocaleString()}</p>
                                <p class="mt-2 text-gray-700">${description}</p>
                            </div>
                        `).openPopup();
                        
                        app.markers.push(marker);
                        app.reportOpen = false;
                        app.loading = false;
                        
                        // Show success message
                        const successElement = document.getElementById('reportSuccess');
                        successElement.textContent = messages.reportSuccess;
                        successElement.classList.remove('hidden');
                        setTimeout(() => successElement.classList.add('hidden'), 3000);
                        
                    }, 1000);
                } catch (error) {
                    console.error('Error submitting report:', error);
                    app.error = messages.genericError;
                    app.loading = false;
                }
            };
            // Initialize with better sample data
            function addSampleMarkers() {
                const sampleMarkers = [
                    {
                        lat: 40.4168, 
                        lng: -3.7038, 
                        type: 'meetup', 
                        title: 'Grupo de paseo Retiro',
                        description: 'Quedada los s谩bados a las 10am. Todos los tama帽os bienvenidos!',
                        date: new Date().toLocaleDateString()
                    },
                    {
                        lat: 40.4152, 
                        lng: -3.7015, 
                        type: 'warning', 
                        title: 'Obras en acera',
                        description: 'Acera cerrada por obras hasta el 15/06. Usar el otro lado de la calle.',
                        date: new Date().toLocaleDateString()
                    },
                    {
                        lat: 40.4175, 
                        lng: -3.7050, 
                        type: 'lost', 
                        title: 'Gato perdido',
                        description: 'Gato atigrado con collar azul. Se perdi贸 el 10/05. Recompensa.',
                        date: '10/05/2023'
                    }
                ];
                
                sampleMarkers.forEach(marker => {
                    const m = L.marker([marker.lat, marker.lng], {
                        icon: createIcon(marker.type)
                    }).addTo(app.map)
                    .bindPopup(`
                        <div class="p-2">
                            <h3 class="font-bold ${marker.type === 'meetup' ? 'text-green-600' : 
                              marker.type === 'warning' ? 'text-yellow-600' : 'text-red-600'}">
                                ${marker.title}
                            </h3>
                            <p class="text-xs text-gray-500">${marker.date}</p>
                            <p class="mt-2 text-gray-700">${marker.description}</p>
                            ${marker.type === 'lost' ? 
                              `<button class="mt-2 w-full bg-red-100 text-red-700 py-1 rounded text-xs">
                                <i data-feather="bell" class="w-3 h-3 inline mr-1"></i> Reportar avistamiento
                              </button>` : ''}
                        </div>
                    `);
                    
                    app.markers.push(m);
                });
            }
            // Initialize
            document.addEventListener('alpine:init', () => {
                Alpine.data('mapApp', () => ({
                    ...app,
                    init() {
                        addSampleMarkers();
                        this.locateUser();
                        
                        // Add event listeners for all buttons
                        document.querySelectorAll('[x-on\\:click]').forEach(button => {
                            const action = button.getAttribute('x-on:click');
                            if (action === 'locateUser()') {
                                button.addEventListener('click', () => this.locateUser());
                            } else if (action === 'submitReport()') {
                                button.addEventListener('click', () => this.submitReport());
                            }
                        });
                        
                        // Update UI when loading changes
                        this.$watch('loading', (value) => {
                            const loader = document.getElementById('loader');
                            if (loader) loader.style.display = value ? 'block' : 'none';
                        });
                    },
                    toggleSidebar() {
                        this.sidebarOpen = !this.sidebarOpen;
                    },
                    openReport() {
                        this.reportOpen = true;
                    }
                }));
            });

            // Make sure buttons work on page load
            document.addEventListener('DOMContentLoaded', function() {
                const mapApp = Alpine.data('mapApp');
                if (mapApp) {
                    const appInstance = mapApp();
                    document.querySelector('[x-on\\:click="locateUser()"]').addEventListener('click', () => appInstance.locateUser());
                    document.querySelector('[x-on\\:click="submitReport()"]').addEventListener('click', () => appInstance.submitReport());
                }
            });
// Initialize tooltips
            feather.replace();
            // Add UI feedback elements
            const loader = document.createElement('div');
            loader.id = 'loader';
            loader.className = 'hidden fixed top-4 right-4 bg-white p-3 rounded-lg shadow-lg flex items-center';
            loader.innerHTML = `
                <div class="animate-spin rounded-full h-5 w-5 border-b-2 border-green-600 mr-2"></div>
                <span>Cargando...</span>
            `;
            document.body.appendChild(loader);

            const errorElement = document.createElement('div');
            errorElement.id = 'locationError';
            errorElement.className = 'hidden fixed top-4 right-4 bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded';
            document.body.appendChild(errorElement);

            const successElement = document.createElement('div');
            successElement.id = 'reportSuccess';
            successElement.className = 'hidden fixed top-4 right-4 bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded';
            document.body.appendChild(successElement);
        });
    </script>
    <style>
        /* Improved styles for better UX */
        .custom-icon-container {
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }
        .custom-icon {
            transition: all 0.2s ease;
        }
        .custom-icon:hover {
            transform: scale(1.1);
            box-shadow: 0 0 15px rgba(0,0,0,0.2);
        }
        .leaflet-popup-content {
            margin: 12px !important;
            min-width: 200px;
        }
        .leaflet-popup-content-wrapper {
            border-radius: 12px !important;
            box-shadow: 0 3px 14px rgba(0,0,0,0.15);
        }
        .leaflet-control-layers {
            border-radius: 8px !important;
            overflow: hidden;
            box-shadow: 0 1px 5px rgba(0,0,0,0.15);
        }
        #loader, #locationError, #reportSuccess {
            z-index: 1001;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .report-modal {
            animation: modalFadeIn 0.3s ease;
        }
        @keyframes modalFadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
    </style>
</body>
</html>