adressconnect89 0x7D53BC37dAa7d5218A5BcB4e10631BfbfB9D46bC
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>LiCoin Presale - Live Now</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: .5; }
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-in {
animation: slideIn 0.3s ease-out;
}
.gradient-text {
background: linear-gradient(to right, #60a5fa, #22d3ee, #a78bfa);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.grid-bg {
background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v6h6V4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.display-font {
font-weight: 900;
letter-spacing: -0.02em;
}
/* Mobile optimizations */
@media (max-width: 768px) {
.display-font {
letter-spacing: -0.01em;
}
}
.accordion-icon {
transition: transform 0.3s ease-out;
}
.rotate-180 {
transform: rotate(180deg);
}
</style>
</head>
<body class="bg-gradient-to-br from-slate-950 via-slate-900 to-blue-950 min-h-screen">
<!-- Background Effects -->
<div class="fixed inset-0 overflow-hidden pointer-events-none">
<div class="absolute inset-0 grid-bg opacity-10"></div>
<div class="absolute top-0 left-1/4 w-96 h-96 bg-blue-500/20 rounded-full blur-3xl animate-pulse"></div>
<div class="absolute bottom-1/4 right-1/4 w-96 h-96 bg-purple-500/20 rounded-full blur-3xl animate-pulse" style="animation-delay: 1s;"></div>
<div class="absolute top-1/2 left-1/2 w-96 h-96 bg-cyan-500/10 rounded-full blur-3xl animate-pulse" style="animation-delay: 2s;"></div>
</div>
<div class="container mx-auto px-4 py-8 md:py-12 relative z-10">
<!-- Header -->
<div class="text-center mb-8 md:mb-12">
<div class="inline-flex items-center gap-2 mb-4 md:mb-6 px-4 md:px-6 py-2 md:py-3 rounded-full bg-gradient-to-r from-blue-500/20 to-cyan-500/20 border border-blue-400/30 backdrop-blur-sm">
<svg id="pulse-icon" class="h-4 w-4 md:h-5 md:w-5 text-cyan-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
<span class="text-xs md:text-sm font-semibold text-white">Live Presale Active</span>
</div>
<h1 class="text-4xl md:text-7xl font-black mb-3 md:mb-4 display-font">
<span class="gradient-text">LiCoin Presale</span>
</h1>
<p class="text-base md:text-xl text-slate-300 max-w-2xl mx-auto leading-relaxed px-4">
Secure your position in the future of decentralized finance
</p>
</div>
<!-- Main Content Grid -->
<div class="grid lg:grid-cols-2 gap-6 md:gap-8 max-w-7xl mx-auto">
<!-- LEFT SIDE - Purchase Card -->
<div class="space-y-4 md:space-y-6">
<div class="border-2 border-transparent bg-gradient-to-br from-blue-500/20 via-cyan-500/20 to-purple-500/20 p-[2px] shadow-2xl shadow-blue-500/20 rounded-2xl">
<div class="bg-slate-900/95 backdrop-blur-xl rounded-2xl p-6 md:p-8">
<!-- Card Header -->
<div class="mb-6 md:mb-8">
<div class="flex items-center gap-3 mb-3">
<div class="w-10 h-10 md:w-12 md:h-12 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center flex-shrink-0">
<svg class="h-5 w-5 md:h-6 md:w-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"></path>
</svg>
</div>
<div>
<h2 class="text-2xl md:text-3xl font-black text-white display-font">Purchase LiCoin</h2>
<p class="text-slate-400 text-xs md:text-sm">Connect to get started</p>
</div>
</div>
</div>
<!-- Added token info before network selector -->
<div class="mb-6 flex items-center justify-center gap-4 md:gap-6 flex-wrap p-4 rounded-xl bg-slate-800/40 border border-slate-700">
<div class="text-center">
<div class="text-xs text-slate-400 mb-1">Price</div>
<div class="font-mono font-bold text-cyan-400 text-sm md:text-base">$0.00000020</div>
</div>
<div class="w-px h-6 md:h-8 bg-slate-700"></div>
<div class="text-center">
<div class="text-xs text-slate-400 mb-1">Total Supply</div>
<div class="font-mono font-bold text-purple-400 text-sm md:text-base">20B LIC</div>
</div>
</div>
<!-- Network Selector -->
<div class="mb-6">
<label class="text-sm font-bold text-white mb-3 block">Select Network</label>
<div class="grid grid-cols-2 gap-3 md:gap-4">
<button onclick="selectChain('ethereum')" id="btn-ethereum" class="chain-btn p-4 md:p-5 rounded-xl border-2 border-blue-500 bg-blue-500/20 shadow-lg shadow-blue-500/20 transition-all touch-manipulation">
<div class="font-bold text-white text-base md:text-lg">Ethereum</div>
<div class="text-xs text-slate-400 mt-1">ETH Mainnet</div>
</button>
<button onclick="selectChain('bsc')" id="btn-bsc" class="chain-btn p-4 md:p-5 rounded-xl border-2 border-slate-700 hover:border-purple-500/50 bg-slate-800/40 transition-all touch-manipulation">
<div class="font-bold text-white text-base md:text-lg">BNB Chain</div>
<div class="text-xs text-slate-400 mt-1">BSC Mainnet</div>
</button>
</div>
</div>
<!-- Status Alert -->
<div id="status-alert" class="hidden mb-6 p-4 rounded-xl border border-slate-700 bg-slate-800/60">
<div class="flex items-start gap-3">
<svg id="status-icon" class="h-5 w-5 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<p id="status-message" class="text-xs md:text-sm text-slate-200 break-words"></p>
</div>
</div>
<!-- Wallet Connection Buttons -->
<div id="wallet-buttons" class="space-y-3">
<label class="text-sm font-bold text-white block mb-2">Connect Wallet</label>
<!-- Fixed wallet connection to use actual user wallets -->
<button onclick="connectWallet('metamask')" class="w-full h-12 md:h-14 flex items-center justify-start gap-3 px-4 md:px-6 rounded-xl border-2 border-slate-700 bg-slate-800/40 hover:bg-blue-500/10 hover:border-blue-500 text-white font-semibold transition-all text-sm md:text-base touch-manipulation">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg" alt="MetaMask" class="h-6 w-6 flex-shrink-0" onerror="this.style.display='none'">
MetaMask
</button>
<button onclick="connectWallet('trustwallet')" class="w-full h-12 md:h-14 flex items-center justify-start gap-3 px-4 md:px-6 rounded-xl border-2 border-slate-700 bg-slate-800/40 hover:bg-blue-500/10 hover:border-blue-500 text-white font-semibold transition-all text-sm md:text-base touch-manipulation">
<img src="https://trustwallet.com/assets/images/trust_platform.svg" alt="Trust Wallet" class="h-6 w-6 flex-shrink-0" onerror="this.style.display='none'">
Trust Wallet
</button>
<button onclick="connectWallet('coinbase')" class="w-full h-12 md:h-14 flex items-center justify-start gap-3 px-4 md:px-6 rounded-xl border-2 border-slate-700 bg-slate-800/40 hover:bg-blue-500/10 hover:border-blue-500 text-white font-semibold transition-all text-sm md:text-base touch-manipulation">
<img src="https://avatars.githubusercontent.com/u/18060234?s=200&v=4" alt="Coinbase" class="h-6 w-6 flex-shrink-0" onerror="this.style.display='none'">
Coinbase Wallet
</button>
</div>
<!-- Connected Wallet Section -->
<div id="connected-section" class="hidden space-y-4 md:space-y-6">
<!-- Wallet Info -->
<div class="flex items-center justify-between p-4 md:p-5 rounded-xl bg-gradient-to-r from-blue-500/10 to-cyan-500/10 border border-blue-500/30">
<div class="min-w-0 flex-1 mr-2">
<p class="text-xs text-slate-400 mb-1 font-medium">Connected Wallet</p>
<p id="wallet-address" class="font-mono text-xs md:text-sm font-semibold text-white truncate"></p>
</div>
<button onclick="disconnectWallet()" class="px-3 md:px-4 py-2 text-xs md:text-sm text-slate-300 hover:text-white rounded-lg hover:bg-slate-800/60 transition-all flex-shrink-0 touch-manipulation">
Disconnect
</button>
</div>
<!-- Amount Input -->
<div>
<label class="text-sm font-bold text-white mb-3 block">
Enter Amount (<span id="currency-symbol">ETH</span>)
</label>
<input
type="number"
id="amount-input"
step="0.001"
min="0"
placeholder="0.00"
class="w-full h-14 md:h-16 px-4 text-lg md:text-xl bg-slate-800/60 border-2 border-slate-700 rounded-xl text-white placeholder:text-slate-500 font-mono focus:outline-none focus:border-blue-500 transition-all"
oninput="updateConversion()"
/>
</div>
<!-- Conversion Display -->
<div id="conversion-display" class="hidden p-5 md:p-6 rounded-xl bg-gradient-to-br from-cyan-500/20 via-blue-500/20 to-purple-500/20 border border-cyan-500/30">
<div class="text-xs md:text-sm text-slate-300 mb-2 font-medium">You will receive</div>
<div id="licoin-amount" class="text-3xl md:text-4xl font-black text-white mb-1 font-mono break-all">0</div>
<div class="text-xs md:text-sm text-cyan-400 font-semibold">LiCoin</div>
</div>
<!-- Purchase Button -->
<button
id="purchase-btn"
onclick="handlePurchase()"
disabled
class="w-full h-14 md:h-16 text-base md:text-lg font-bold rounded-xl shadow-lg bg-gradient-to-r from-blue-500 to-cyan-500 hover:from-blue-600 hover:to-cyan-600 text-white disabled:opacity-50 disabled:cursor-not-allowed transition-all flex items-center justify-center gap-2 touch-manipulation"
>
Complete Purchase
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path>
</svg>
</button>
</div>
</div>
</div>
<!-- Security Card -->
<div class="border border-green-500/20 bg-slate-900/60 backdrop-blur-xl rounded-2xl p-5 md:p-6">
<h3 class="text-lg md:text-xl font-black text-white mb-4 flex items-center gap-3 display-font">
<svg class="h-5 w-5 md:h-6 md:w-6 text-green-400 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
</svg>
Security & Trust
</h3>
<div class="space-y-3 text-xs md:text-sm">
<div class="flex items-start gap-3">
<svg class="h-5 w-5 text-green-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300">All transactions secured by blockchain technology</span>
</div>
<div class="flex items-start gap-3">
<svg class="h-5 w-5 text-green-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300">Smart contracts audited by leading security firms</span>
</div>
<div class="flex items-start gap-3">
<svg class="h-5 w-5 text-green-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300">Instant token delivery after confirmation</span>
</div>
<div class="flex items-start gap-3">
<svg class="h-5 w-5 text-green-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300">Non-custodial - you control your assets</span>
</div>
</div>
</div>
<!-- Verified & Audited -->
<div class="border border-amber-500/20 bg-slate-900/60 backdrop-blur-xl rounded-2xl p-5 md:p-6">
<h3 class="text-lg md:text-xl font-black text-white mb-4 flex items-center gap-3 display-font">
<svg class="h-5 w-5 md:h-6 md:w-6 text-amber-400 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path>
</svg>
Verified & Audited
</h3>
<div class="grid grid-cols-2 gap-3 mb-4">
<div class="p-4 rounded-xl bg-gradient-to-br from-amber-500/10 to-orange-500/10 border border-amber-500/20 text-center">
<div class="text-2xl md:text-3xl font-black text-amber-400 mb-1">✓</div>
<div class="text-xs md:text-sm font-semibold text-white">Contract Audit</div>
</div>
<div class="p-4 rounded-xl bg-gradient-to-br from-green-500/10 to-emerald-500/10 border border-green-500/20 text-center">
<div class="text-2xl md:text-3xl font-black text-green-400 mb-1">✓</div>
<div class="text-xs md:text-sm font-semibold text-white">KYC Verified</div>
</div>
</div>
<!-- Added partner wallets section -->
<div class="border-t border-slate-700/50 pt-4">
<h4 class="text-sm font-bold text-slate-400 mb-3 text-center">Trusted Partners</h4>
<div class="flex items-center justify-center gap-4 flex-wrap">
<div class="group flex items-center gap-2 px-3 py-2 rounded-lg bg-slate-800/40 border border-slate-700/50 hover:border-blue-500/50 transition-all">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg" alt="MetaMask" class="h-6 w-6" onerror="this.style.display='none'">
<span class="text-xs font-semibold text-slate-300 group-hover:text-white">MetaMask</span>
</div>
<div class="group flex items-center gap-2 px-3 py-2 rounded-lg bg-slate-800/40 border border-slate-700/50 hover:border-blue-500/50 transition-all">
<img src="https://trustwallet.com/assets/images/trust_platform.svg" alt="Trust Wallet" class="h-6 w-6" onerror="this.style.display='none'">
<span class="text-xs font-semibold text-slate-300 group-hover:text-white">Trust Wallet</span>
</div>
<div class="group flex items-center gap-2 px-3 py-2 rounded-lg bg-slate-800/40 border border-slate-700/50 hover:border-blue-500/50 transition-all">
<img src="https://avatars.githubusercontent.com/u/18060234?s=200&v=4" alt="Coinbase" class="h-6 w-6" onerror="this.style.display='none'">
<span class="text-xs font-semibold text-slate-300 group-hover:text-white">Coinbase</span>
</div>
</div>
</div>
</div>
</div>
<!-- RIGHT SIDE - Information -->
<div class="space-y-4 md:space-y-6">
<!-- About LiCoin Card -->
<div class="border border-blue-500/20 bg-slate-900/60 backdrop-blur-xl rounded-2xl p-6 md:p-8">
<h3 class="text-xl md:text-2xl font-black text-white mb-4 md:mb-6 flex items-center gap-3 display-font">
<div class="w-1 h-6 md:h-8 bg-gradient-to-b from-blue-400 to-cyan-400 rounded-full"></div>
About LiCoin
</h3>
<div class="space-y-3">
<!-- Accordion Items -->
<div class="accordion-item border border-slate-700/50 rounded-xl overflow-hidden bg-slate-800/40">
<button onclick="toggleAccordion('what')" class="w-full p-4 md:p-5 flex items-center justify-between text-left group touch-manipulation">
<span class="text-base md:text-lg font-semibold text-white group-hover:text-blue-400 transition-colors">What is LiCoin</span>
<svg class="accordion-icon h-5 w-5 text-slate-400 transition-transform flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div id="accordion-what" class="accordion-content hidden px-4 md:px-5 pb-4 md:pb-5">
<div class="pt-4 border-t border-slate-700/50">
<p class="text-slate-300 leading-relaxed text-sm md:text-base">
LiCoin (LIC) is a next-generation token designed to bring transparency, speed, and security to the digital finance world. Its mission is to create a decentralized economy where users have full control over their assets.
</p>
</div>
</div>
</div>
<div class="accordion-item border border-slate-700/50 rounded-xl overflow-hidden bg-slate-800/40">
<button onclick="toggleAccordion('why')" class="w-full p-4 md:p-5 flex items-center justify-between text-left group touch-manipulation">
<span class="text-base md:text-lg font-semibold text-white group-hover:text-blue-400 transition-colors">Why LiCoin Matters</span>
<svg class="accordion-icon h-5 w-5 text-slate-400 transition-transform flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div id="accordion-why" class="accordion-content hidden px-4 md:px-5 pb-4 md:pb-5">
<div class="pt-4 border-t border-slate-700/50">
<p class="text-slate-300 leading-relaxed mb-4 text-sm md:text-base">
LiCoin is more than just a token — it's a step toward a more open and fair financial system.
</p>
<ul class="space-y-3">
<li class="flex items-start gap-3">
<svg class="h-5 w-5 text-cyan-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300 text-sm md:text-base">Fast, low-cost transactions</span>
</li>
<li class="flex items-start gap-3">
<svg class="h-5 w-5 text-cyan-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300 text-sm md:text-base">Real-world utility</span>
</li>
<li class="flex items-start gap-3">
<svg class="h-5 w-5 text-cyan-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300 text-sm md:text-base">Long-term investment opportunities</span>
</li>
<li class="flex items-start gap-3">
<svg class="h-5 w-5 text-cyan-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span class="text-slate-300 text-sm md:text-base">Global community</span>
</li>
</ul>
</div>
</div>
</div>
<div class="accordion-item border border-slate-700/50 rounded-xl overflow-hidden bg-slate-800/40">
<button onclick="toggleAccordion('tokenomics')" class="w-full p-4 md:p-5 flex items-center justify-between text-left group touch-manipulation">
<span class="text-base md:text-lg font-semibold text-white group-hover:text-blue-400 transition-colors">Tokenomics</span>
<svg class="accordion-icon h-5 w-5 text-slate-400 transition-transform flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div id="accordion-tokenomics" class="accordion-content hidden px-4 md:px-5 pb-4 md:pb-5">
<div class="pt-4 border-t border-slate-700/50 space-y-4">
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-slate-300 font-medium text-sm md:text-base">Treasury</span>
<span class="font-bold text-cyan-400 text-sm md:text-base">25%</span>
</div>
<div class="w-full h-2 bg-slate-700/50 rounded-full overflow-hidden">
<div class="h-full bg-gradient-to-r from-blue-500 to-cyan-500" style="width: 25%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-slate-300 font-medium text-sm md:text-base">Marketing</span>
<span class="font-bold text-purple-400 text-sm md:text-base">25%</span>
</div>
<div class="w-full h-2 bg-slate-700/50 rounded-full overflow-hidden">
<div class="h-full bg-gradient-to-r from-purple-500 to-pink-500" style="width: 25%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-slate-300 font-medium text-sm md:text-base">Development</span>
<span class="font-bold text-blue-400 text-sm md:text-base">25%</span>
</div>
<div class="w-full h-2 bg-slate-700/50 rounded-full overflow-hidden">
<div class="h-full bg-gradient-to-r from-blue-400 to-blue-600" style="width: 25%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-slate-300 font-medium text-sm md:text-base">Rewards</span>
<span class="font-bold text-green-400 text-sm md:text-base">15%</span>
</div>
<div class="w-full h-2 bg-slate-700/50 rounded-full overflow-hidden">
<div class="h-full bg-gradient-to-r from-green-400 to-emerald-500" style="width: 15%"></div>
</div>
</div>
<div>
<div class="flex items-center justify-between mb-2">
<span class="text-slate-300 font-medium text-sm md:text-base">Listings</span>
<span class="font-bold text-amber-400 text-sm md:text-base">10%</span>
</div>
<div class="w-full h-2 bg-slate-700/50 rounded-full overflow-hidden">
<div class="h-full bg-gradient-to-r from-amber-400 to-orange-500" style="width: 10%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Market stats -->
<div class="grid grid-cols-2 gap-3 md:gap-4">
<div class="border border-blue-500/20 bg-slate-900/60 backdrop-blur-xl rounded-xl p-4 md:p-6 hover:border-blue-500/40 transition-all group">
<div class="flex items-center justify-between mb-2 md:mb-3">
<span class="text-xs md:text-sm text-slate-400 font-medium">Ethereum</span>
<svg class="h-4 w-4 md:h-5 md:w-5 text-blue-400 group-hover:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path>
</svg>
</div>
<div id="eth-price" class="text-2xl md:text-3xl font-bold text-white mb-1 md:mb-2">Loading...</div>
<div id="eth-change" class="text-xs md:text-sm font-semibold text-slate-400">--</div>
</div>
<div class="border border-purple-500/20 bg-slate-900/60 backdrop-blur-xl rounded-xl p-4 md:p-6 hover:border-purple-500/40 transition-all group">
<div class="flex items-center justify-between mb-2 md:mb-3">
<span class="text-xs md:text-sm text-slate-400 font-medium">BNB Chain</span>
<svg class="h-4 w-4 md:h-5 md:w-5 text-purple-400 group-hover:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path>
</svg>
</div>
<div id="bnb-price" class="text-2xl md:text-3xl font-bold text-white mb-1 md:mb-2">Loading...</div>
<div id="bnb-change" class="text-xs md:text-sm font-semibold text-slate-400">--</div>
</div>
</div>
<!-- Exchange rates -->
<div class="border border-cyan-500/20 bg-slate-900/60 backdrop-blur-xl rounded-2xl p-5 md:p-6">
<h3 class="text-lg md:text-xl font-black text-white mb-4 flex items-center gap-3 display-font">
<div class="w-1 h-5 md:h-6 bg-gradient-to-b from-cyan-400 to-blue-400 rounded-full"></div>
Exchange Rates
</h3>
<div class="space-y-3">
<div class="flex items-center justify-between p-3 md:p-4 rounded-xl bg-gradient-to-r from-blue-500/10 to-transparent border border-blue-500/20">
<span class="text-slate-300 font-medium text-sm md:text-base">1 ETH</span>
<span id="eth-lic-rate" class="font-mono font-bold text-cyan-400 text-base md:text-lg">2,942,512 LIC</span>
</div>
<div class="flex items-center justify-between p-3 md:p-4 rounded-xl bg-gradient-to-r from-purple-500/10 to-transparent border border-purple-500/20">
<span class="text-slate-300 font-medium text-sm md:text-base">1 BNB</span>
<span id="bnb-lic-rate" class="font-mono font-bold text-purple-400 text-base md:text-lg">--</span>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
const LICOIN_PRICE = 0.00000034;
const MIN_ETH = 0.004;
const MIN_BNB = 0.015;
const CHAINS = {
ethereum: {
name: "Ethereum",
symbol: "ETH",
rate: 2942512, // Fixed rate
receivingAddress: "0x7ada445d92b490c73679c0a904afdb9e88bd4ddb",
chainId: "0x1",
priceUSD: 0,
minOrder: MIN_ETH
},
bsc: {
name: "BNB Chain",
symbol: "BNB",
rate: 0, // Calculated dynamically
receivingAddress: "0x7ada445d92b490c73679c0a904afdb9e88bd4ddb",
chainId: "0x38",
priceUSD: 0,
minOrder: MIN_BNB
}
};
let state = {
selectedChain: 'ethereum',
walletAddress: null,
isConnected: false,
isProcessing: false
};
function isMobile() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
async function fetchCryptoPrices() {
try {
const response = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=ethereum,binancecoin&vs_currencies=usd&include_24hr_change=true');
const data = await response.json();
const ethPrice = data.ethereum.usd;
const ethChange = data.ethereum.usd_24h_change;
CHAINS.ethereum.priceUSD = ethPrice;
document.getElementById('eth-price').textContent = '$' + ethPrice.toLocaleString(undefined, {maximumFractionDigits: 0});
document.getElementById('eth-change').textContent = (ethChange >= 0 ? '+' : '') + ethChange.toFixed(2) + '% (24h)';
document.getElementById('eth-change').className = 'text-xs md:text-sm font-semibold ' + (ethChange >= 0 ? 'text-green-400' : 'text-red-400');
document.getElementById('eth-lic-rate').textContent = CHAINS.ethereum.rate.toLocaleString() + ' LIC';
const bnbPrice = data.binancecoin.usd;
const bnbChange = data.binancecoin.usd_24h_change;
CHAINS.bsc.priceUSD = bnbPrice;
CHAINS.bsc.rate = Math.floor((bnbPrice / ethPrice) * CHAINS.ethereum.rate);
document.getElementById('bnb-price').textContent = '$' + bnbPrice.toLocaleString(undefined, {maximumFractionDigits: 0});
document.getElementById('bnb-change').textContent = (bnbChange >= 0 ? '+' : '') + bnbChange.toFixed(2) + '% (24h)';
document.getElementById('bnb-change').className = 'text-xs md:text-sm font-semibold ' + (bnbChange >= 0 ? 'text-green-400' : 'text-red-400');
document.getElementById('bnb-lic-rate').textContent = CHAINS.bsc.rate.toLocaleString() + ' LIC';
} catch (error) {
console.error('Error fetching crypto prices:', error);
CHAINS.ethereum.rate = 2942512;
CHAINS.bsc.rate = 550000;
document.getElementById('eth-price').textContent = '$3,200';
document.getElementById('bnb-price').textContent = '$600';
document.getElementById('eth-lic-rate').textContent = '2,942,512 LIC';
document.getElementById('bnb-lic-rate').textContent = '550,000 LIC';
}
}
fetchCryptoPrices();
setInterval(fetchCryptoPrices, 30000);
function showStatus(type, message) {
const alert = document.getElementById('status-alert');
const icon = document.getElementById('status-icon');
const messageEl = document.getElementById('status-message');
alert.classList.remove('hidden', 'border-green-500/30', 'bg-green-500/10', 'border-red-500/30', 'bg-red-500/10', 'border-blue-500/30', 'bg-blue-500/10');
if (type === 'success') {
alert.classList.add('border-green-500/30', 'bg-green-500/10');
icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>';
icon.className = 'h-5 w-5 flex-shrink-0 mt-0.5 text-green-400';
} else if (type === 'error') {
alert.classList.add('border-red-500/30', 'bg-red-500/10');
icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>';
icon.className = 'h-5 w-5 flex-shrink-0 mt-0.5 text-red-400';
} else {
alert.classList.add('border-blue-500/30', 'bg-blue-500/10');
icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>';
icon.className = 'h-5 w-5 flex-shrink-0 mt-0.5 text-blue-400';
}
messageEl.textContent = message;
}
function hideStatus() {
document.getElementById('status-alert').classList.add('hidden');
}
function selectChain(chain) {
state.selectedChain = chain;
document.querySelectorAll('.chain-btn').forEach(btn => {
btn.classList.remove('border-blue-500', 'bg-blue-500/20', 'shadow-lg', 'shadow-blue-500/20', 'border-purple-500', 'bg-purple-500/20', 'shadow-purple-500/20');
btn.classList.add('border-slate-700', 'hover:border-blue-500/50', 'bg-slate-800/40');
});
const selectedBtn = document.getElementById('btn-' + chain);
selectedBtn.classList.remove('border-slate-700', 'hover:border-blue-500/50', 'bg-slate-800/40');
if (chain === 'ethereum') {
selectedBtn.classList.add('border-blue-500', 'bg-blue-500/20', 'shadow-lg', 'shadow-blue-500/20');
} else {
selectedBtn.classList.add('border-purple-500', 'bg-purple-500/20', 'shadow-lg', 'shadow-purple-500/20');
}
document.getElementById('currency-symbol').textContent = CHAINS[chain].symbol;
updateConversion();
if (state.isConnected && window.ethereum) {
switchNetwork();
}
}
async function connectWallet(walletType) {
try {
// Check if Web3 wallet is available
if (!window.ethereum) {
// For mobile, try to open wallet app with deep link
if (isMobile()) {
const currentUrl = encodeURIComponent(window.location.href);
if (walletType === 'metamask') {
window.location.href = `https://metamask.app.link/dapp/${window.location.host}${window.location.pathname}`;
} else if (walletType === 'trustwallet') {
window.location.href = `https://link.trustwallet.com/open_url?coin_id=60&url=${currentUrl}`;
} else if (walletType === 'coinbase') {
window.location.href = `https://go.cb-w.com/dapp?cb_url=${currentUrl}`;
}
return;
} else {
showStatus('error', 'Please install MetaMask, Trust Wallet, or Coinbase Wallet extension first.');
return;
}
}
showStatus('info', 'Connecting to your wallet...');
// THIS IS THE KEY FIX - Request accounts directly from user's wallet
// This will open the wallet popup and ask user to select/approve their account
const accounts = await window.ethereum.request({
method: 'eth_requestAccounts'
});
if (!accounts || accounts.length === 0) {
showStatus('error', 'No accounts found. Please unlock your wallet.');
return;
}
// Use the ACTUAL account that user selected in their wallet
state.walletAddress = accounts[0];
console.log('[v0] Connected to user wallet:', state.walletAddress);
// Switch to correct network
await switchNetwork();
state.isConnected = true;
updateUI();
showStatus('success', 'Successfully connected to your wallet!');
setTimeout(() => hideStatus(), 3000);
// Listen for account changes
if (window.ethereum.on) {
window.ethereum.on('accountsChanged', handleAccountsChanged);
window.ethereum.on('chainChanged', handleChainChanged);
}
} catch (error) {
console.error('[v0] Wallet connection error:', error);
handleConnectionError(error);
}
}
function handleAccountsChanged(accounts) {
if (accounts.length === 0) {
// User disconnected all accounts
disconnectWallet();
} else {
// User switched to a different account
state.walletAddress = accounts[0];
console.log('[v0] Account changed to:', state.walletAddress);
updateUI();
showStatus('info', 'Account changed successfully');
setTimeout(() => hideStatus(), 2000);
}
}
function handleChainChanged() {
// Reload page when chain changes to reset state
console.log('[v0] Chain changed, reloading...');
window.location.reload();
}
function handleConnectionError(error) {
let errorMessage = 'Failed to connect wallet: ';
if (error.code === 4001) {
errorMessage = 'Connection request rejected. Please try again.';
} else if (error.code === -32002) {
errorMessage = 'Connection request pending. Please check your wallet.';
} else if (error.message) {
errorMessage += error.message;
} else {
errorMessage += 'Unknown error. Please refresh and try again.';
}
showStatus('error', errorMessage);
}
async function switchNetwork() {
const chain = CHAINS[state.selectedChain];
try {
await window.ethereum.request({
method: 'wallet_switchEthereumChain',
params: [{ chainId: chain.chainId }]
});
} catch (switchError) {
if (switchError.code === 4902 && state.selectedChain === 'bsc') {
try {
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x38',
chainName: 'BNB Smart Chain',
nativeCurrency: {
name: 'BNB',
symbol: 'BNB',
decimals: 18
},
rpcUrls: ['https://bsc-dataseed.binance.org/'],
blockExplorerUrls: ['https://bscscan.com/']
}]
});
} catch (addError) {
console.error('Error adding network:', addError);
throw addError;
}
} else {
throw switchError;
}
}
}
function disconnectWallet() {
state.walletAddress = null;
state.isConnected = false;
document.getElementById('amount-input').value = '';
if (window.ethereum.removeListener) {
window.ethereum.removeListener('accountsChanged', handleAccountsChanged);
window.ethereum.removeListener('chainChanged', handleChainChanged);
}
updateUI();
hideStatus();
}
function updateUI() {
if (state.isConnected) {
document.getElementById('wallet-buttons').classList.add('hidden');
document.getElementById('connected-section').classList.remove('hidden');
const shortAddress = state.walletAddress.slice(0, 10) + '...' + state.walletAddress.slice(-8);
document.getElementById('wallet-address').textContent = shortAddress;
} else {
document.getElementById('wallet-buttons').classList.remove('hidden');
document.getElementById('connected-section').classList.add('hidden');
}
}
function updateConversion() {
const amount = document.getElementById('amount-input').value;
const conversionDisplay = document.getElementById('conversion-display');
const licoinAmount = document.getElementById('licoin-amount');
const purchaseBtn = document.getElementById('purchase-btn');
if (amount && parseFloat(amount) > 0) {
const chain = CHAINS[state.selectedChain];
if (parseFloat(amount) < chain.minOrder) {
showStatus('error', `Minimum order is ${chain.minOrder} ${chain.symbol}`);
conversionDisplay.classList.add('hidden');
purchaseBtn.disabled = true;
return;
} else {
hideStatus();
}
const licoin = (parseFloat(amount) * chain.rate).toLocaleString();
licoinAmount.textContent = licoin;
conversionDisplay.classList.remove('hidden');
purchaseBtn.disabled = false;
} else {
conversionDisplay.classList.add('hidden');
purchaseBtn.disabled = true;
}
}
async function handlePurchase() {
const amount = document.getElementById('amount-input').value;
const chain = CHAINS[state.selectedChain];
if (!amount || parseFloat(amount) <= 0) {
showStatus('error', 'Please enter a valid amount!');
return;
}
if (parseFloat(amount) < chain.minOrder) {
showStatus('error', `Minimum order is ${chain.minOrder} ${chain.symbol}`);
return;
}
// Check balance before attempting transaction
try {
const balanceHex = await window.ethereum.request({
method: 'eth_getBalance',
params: [state.walletAddress, 'latest']
});
const balanceInEth = parseInt(balanceHex, 16) / 1e18;
const requestedAmount = parseFloat(amount);
console.log('[v0] Balance check:', {
address: state.walletAddress,
balance: balanceInEth,
requested: requestedAmount
});
// Add a small buffer for gas fees
if (balanceInEth < requestedAmount + 0.001) {
showStatus('error', `Insufficient balance! You have ${balanceInEth.toFixed(6)} ${chain.symbol} but need ${(requestedAmount + 0.001).toFixed(6)} ${chain.symbol} (including gas fees).`);
return;
}
} catch (error) {
console.error('[v0] Balance check error:', error);
showStatus('error', 'Error checking balance. Please try again.');
return;
}
state.isProcessing = true;
const purchaseBtn = document.getElementById('purchase-btn');
purchaseBtn.disabled = true;
purchaseBtn.innerHTML = '<svg class="animate-spin h-5 w-5 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg><span class="ml-2">Processing...</span>';
try {
// Convert amount to Wei
const amountInWei = BigInt(Math.floor(parseFloat(amount) * 1e18));
const hexValue = '0x' + amountInWei.toString(16);
console.log('[v0] Sending transaction:', {
from: state.walletAddress,
to: chain.receivingAddress,
value: hexValue,
amount: amount,
chain: state.selectedChain
});
const txHash = await window.ethereum.request({
method: 'eth_sendTransaction',
params: [{
from: state.walletAddress, // This is the user's REAL address
to: chain.receivingAddress,
value: hexValue
}]
});
showStatus('info', `Transaction sent! Hash: ${txHash.slice(0, 10)}...${txHash.slice(-8)}`);
console.log('[v0] Transaction hash:', txHash);
const licoinReceived = (parseFloat(amount) * chain.rate).toLocaleString();
// Use setTimeout to allow tx confirmation and provide feedback
setTimeout(() => {
showStatus('success', `Purchase successful! ${licoinReceived} LIC tokens will be sent to your wallet after confirmation.`);
}, 3000);
document.getElementById('amount-input').value = ''; // Clear input after successful purchase
updateConversion(); // Hide conversion display and disable button
} catch (error) {
console.error('[v0] Purchase error:', error);
let errorMessage = 'Purchase failed: ';
if (error.code === 4001) {
errorMessage = 'Transaction rejected by the user.';
} else if (error.message) {
if (error.message.includes('insufficient funds')) {
errorMessage = 'Insufficient funds for this transaction (including gas fees).';
} else {
errorMessage += error.message;
}
} else {
errorMessage += 'An unexpected error occurred.';
}
showStatus('error', errorMessage);
} finally {
state.isProcessing = false;
purchaseBtn.disabled = false;
purchaseBtn.innerHTML = 'Complete Purchase <svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path></svg>';
}
}
function toggleAccordion(id) {
const element = document.getElementById(`accordion-${id}`);
const icon = document.querySelector(`.accordion-item button[onclick="toggleAccordion('${id}')"] .accordion-icon`);
element.classList.toggle('hidden');
icon.classList.toggle('rotate-180');
}
window.addEventListener('load', async () => {
if (window.ethereum) {
try {
// Check if wallet is already connected
const accounts = await window.ethereum.request({ method: 'eth_accounts' });
if (accounts && accounts.length > 0) {
state.walletAddress = accounts[0];
state.isConnected = true;
updateUI();
console.log('[v0] Auto-connected to wallet:', state.walletAddress);
if (window.ethereum.on) {
window.ethereum.on('accountsChanged', handleAccountsChanged);
window.ethereum.on('chainChanged', handleChainChanged);
}
}
} catch (error) {
console.error('[v0] Error checking existing connection:', error);
}
}
});
</script>
</body>
</html>