File size: 11,168 Bytes
88ce971
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Préstamo Aprobado - FlashLoan</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>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        body {
            font-family: 'Inter', sans-serif;
        }
        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background-color: #f59e0b;
            opacity: 0.7;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Header -->
    <header class="bg-white shadow-sm">
        <div class="container mx-auto px-4 py-4 flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <div class="bg-amber-500 p-2 rounded-lg">
                    <i data-feather="zap" class="text-white"></i>
                </div>
                <h1 class="text-2xl font-bold text-gray-800">Flash<span class="text-amber-500">Loan</span></h1>
            </div>
            <div class="flex items-center space-x-4">
                <a href="index.html" class="hidden md:block px-4 py-2 text-gray-600 hover:text-amber-500">
                    <i data-feather="home"></i>
                </a>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <main class="container mx-auto px-4 py-8 md:py-12">
        <div class="max-w-2xl mx-auto bg-white rounded-xl shadow-md overflow-hidden">
            <div class="p-8 text-center relative overflow-hidden">
                <!-- Confetti animation container -->
                <div id="confetti-container" class="absolute inset-0 overflow-hidden"></div>
                
                <div class="relative z-10">
                    <div class="w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6">
                        <i data-feather="check" class="w-10 h-10 text-green-500"></i>
                    </div>
                    <h2 class="text-3xl font-bold text-gray-800 mb-4">¡Préstamo Aprobado!</h2>
                    <p class="text-lg text-gray-600 mb-6">Tu solicitud ha sido aprobada. Completa los datos para recibir el dinero.</p>
                    
                    <div class="bg-green-50 border-l-4 border-green-500 p-4 mb-8 text-left">
                        <div class="flex">
                            <i data-feather="info" class="text-green-500 mr-2"></i>
                            <div>
                                <p class="font-medium text-green-800">Monto aprobado: <span class="font-bold" id="approved-amount">$5.000.000</span></p>
                                <p class="text-sm text-green-600">Tasa de interés: 1.2% mensual | Plazo: 12 meses</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Payment Details -->
            <div class="px-8 pb-8">
                <h3 class="text-xl font-bold text-gray-800 mb-4">Detalles de la primera cuota</h3>
                <div class="bg-gray-50 rounded-lg p-6 mb-8">
                    <div class="grid grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-600">Monto:</p>
                            <p class="font-bold text-gray-800">$450.000</p>
                        </div>
                        <div>
                            <p class="text-gray-600">Fecha de vencimiento:</p>
                            <p class="font-bold text-gray-800" id="due-date">15 de Diciembre 2023</p>
                        </div>
                        <div>
                            <p class="text-gray-600">Número de cuota:</p>
                            <p class="font-bold text-gray-800">1/12</p>
                        </div>
                        <div>
                            <p class="text-gray-600">Estado:</p>
                            <p class="font-bold text-green-500">Pendiente</p>
                        </div>
                    </div>
                </div>

                <!-- Bank Account Form -->
                <h3 class="text-xl font-bold text-gray-800 mb-4">Datos de transferencia</h3>
                <p class="text-gray-600 mb-6">Por favor ingresa los datos de la cuenta bancaria donde recibirás el dinero.</p>
                
                <form id="bank-account-form">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                        <div>
                            <label for="bank-name" class="block text-gray-700 font-medium mb-2">Banco</label>
                            <select id="bank-name" name="bank-name" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500" required>
                                <option value="" disabled selected>Seleccione banco</option>
                                <option value="bci">BCI</option>
                                <option value="santander">Santander</option>
                                <option value="chile">Banco de Chile</option>
                                <option value="estado">Banco Estado</option>
                                <option value="scotiabank">Scotiabank</option>
                                <option value="bice">BICE</option>
                                <option value="security">Security</option>
                                <option value="falabella">Falabella</option>
                                <option value="ripley">Ripley</option>
                                <option value="itau">Itaú</option>
                                <option value="corpbanca">Corpbanca</option>
                                <option value="bbva">BBVA</option>
                            </select>
                        </div>
                        <div>
                            <label for="account-type" class="block text-gray-700 font-medium mb-2">Tipo de cuenta</label>
                            <select id="account-type" name="account-type" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500" required>
                                <option value="" disabled selected>Seleccione tipo</option>
                                <option value="cuenta-vista">Cuenta Vista</option>
                                <option value="cuenta-corriente">Cuenta Corriente</option>
                                <option value="cuenta-ahorro">Cuenta de Ahorro</option>
                            </select>
                        </div>
                        <div>
                            <label for="account-number" class="block text-gray-700 font-medium mb-2">Número de cuenta</label>
                            <input type="text" id="account-number" name="account-number" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500" placeholder="Ej: 12345678" required>
                        </div>
                        <div>
                            <label for="account-rut" class="block text-gray-700 font-medium mb-2">RUT del titular</label>
                            <input type="text" id="account-rut" name="account-rut" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500" placeholder="Ej: 11.111.111-1" required>
                        </div>
                    </div>

                    <div class="mt-8">
                        <button type="submit" class="w-full bg-amber-500 hover:bg-amber-600 text-white py-4 rounded-lg font-bold transition duration-300 shadow-md flex items-center justify-center">
                            <i data-feather="dollar-sign" class="mr-2"></i> Confirmar y recibir dinero
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-8">
        <div class="container mx-auto px-4">
            <div class="text-center">
                <p class="text-gray-400">© 2023 FlashLoan. Todos los derechos reservados.</p>
            </div>
        </div>
    </footer>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            feather.replace();

            // Set due date (30 days from now)
            const today = new Date();
            const dueDate = new Date();
            dueDate.setDate(today.getDate() + 30);
            const options = { day: 'numeric', month: 'long', year: 'numeric' };
            document.getElementById('due-date').textContent = dueDate.toLocaleDateString('es-ES', options);

            // Confetti animation
            function createConfetti() {
                const confetti = document.createElement('div');
                confetti.className = 'confetti';
                confetti.style.left = Math.random() * 100 + 'vw';
                confetti.style.top = -10 + 'px';
                confetti.style.transform = 'rotate(' + Math.random() * 360 + 'deg)';
                
                const size = Math.random() * 10 + 5;
                confetti.style.width = size + 'px';
                confetti.style.height = size + 'px';
                
                const color = `hsl(${Math.random() * 60 + 20}, 100%, 50%)`;
                confetti.style.backgroundColor = color;
                
                document.getElementById('confetti-container').appendChild(confetti);
                
                let animationDuration = Math.random() * 3 + 2;
                
                confetti.animate([
                    { top: -10 + 'px', opacity: 1 },
                    { top: '100vh', opacity: 0 }
                ], {
                    duration: animationDuration * 1000,
                    easing: 'cubic-bezier(0.1, 0.8, 0.5, 1)'
                });
                
                setTimeout(() => {
                    confetti.remove();
                }, animationDuration * 1000);
            }
            
            // Create initial confetti
            for (let i = 0; i < 50; i++) {
                setTimeout(createConfetti, i * 100);
            }
            
            // Continue creating confetti occasionally
            setInterval(() => {
                if (Math.random() > 0.7) {
                    createConfetti();
                }
            }, 500);

            // Form submission
            document.getElementById('bank-account-form').addEventListener('submit', function(e) {
                e.preventDefault();
                alert('¡Datos recibidos correctamente! El dinero será transferido en los próximos 10 minutos.');
                // Here you would typically send the form data to your backend
            });
        });
    </script>
</body>
</html>