<!DOCTYPE html>
<html lang="bn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Earn Money Online - Ultra Premium</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
<style>
:root { --primary: #00c853; --secondary: #00e5ff; --accent: #ffab00; --dark: #0f172a; --glass: rgba(30, 41, 59, 0.7); }
body {
font-family: 'Poppins', sans-serif;
background: radial-gradient(circle at top right, #1e293b, #0f172a);
color: white; margin: 0; min-height: 100vh;
display: flex; justify-content: center; align-items: center;
padding-bottom: 80px;
}
.container {
background: var(--glass); width: 90%; max-width: 420px;
padding: 25px; border-radius: 28px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1);
text-align: center; position: relative; animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
/* Notification Bar */
.notice-board { background: rgba(255, 171, 0, 0.1); border: 1px dashed var(--accent); color: var(--accent); padding: 10px; border-radius: 12px; font-size: 12px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
/* Profile & Stats Card */
.profile-header { display: flex; align-items: center; gap: 15px; text-align: left; margin-bottom: 20px; }
.avatar { width: 55px; height: 55px; border-radius: 18px; background: linear-gradient(45deg, var(--primary), var(--secondary)); display: flex; justify-content: center; align-items: center; font-size: 22px; font-weight: bold; box-shadow: 0 10px 15px -3px rgba(0, 200, 83, 0.3); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.stat-item { background: rgba(255,255,255,0.03); padding: 15px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.stat-item:hover { background: rgba(255,255,255,0.08); transform: translateY(-5px); }
/* Referral Box */
.refer-box { background: rgba(0, 229, 255, 0.1); border-radius: 15px; padding: 15px; margin: 15px 0; border: 1px solid rgba(0, 229, 255, 0.2); }
.refer-box small { color: var(--secondary); display: block; margin-bottom: 5px; }
.refer-code { font-weight: bold; letter-spacing: 2px; color: white; background: rgba(0,0,0,0.3); padding: 5px 15px; border-radius: 8px; cursor: pointer; }
/* Modern Buttons */
button {
width: 100%; padding: 14px; border-radius: 15px; border: none;
font-weight: 600; cursor: pointer; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary { background: linear-gradient(135deg, #00c853 0%, #00e676 100%); color: white; box-shadow: 0 4px 14px 0 rgba(0, 200, 83, 0.39); }
.btn-outline { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: var(--secondary); }
/* Floating Menu */
.floating-nav { position: fixed; bottom: 15px; left: 50%; transform: translateX(-50%); background: rgba(15, 23, 42, 0.9); display: flex; gap: 25px; padding: 12px 25px; border-radius: 24px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); z-index: 1000; backdrop-filter: blur(10px); }
.floating-nav div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #64748b; cursor: pointer; transition: 0.3s; }
.floating-nav div.active { color: var(--primary); }
.floating-nav i { font-size: 18px; }
.floating-nav span { font-size: 10px; font-weight: 600; }
/* Task & Leaderboard Cards */
.card-list { background: rgba(255,255,255,0.02); border-radius: 18px; padding: 12px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,0.05); }
.hidden { display: none; }
input, select { width: 100%; padding: 14px; margin: 10px 0; border-radius: 12px; border: 1px solid #334155; background: #0f172a; color: white; outline: none; transition: 0.3s; }
input:focus { border-color: var(--secondary); box-shadow: 0 0 10px rgba(0, 229, 255, 0.2); }
</style>
</head>
<body>
<div id="auth-page" class="container">
<div style="font-size: 40px; margin-bottom: 10px;">đ</div>
<h2 id="auth-title">Welcome Guest</h2>
<div id="signup-fields">
<input type="text" id="fname" placeholder="First Name">
<input type="text" id="lname" placeholder="Last Name">
</div>
<input type="text" id="username" placeholder="Username">
<input type="password" id="password" placeholder="Password">
<button class="btn-primary" onclick="handleAuth()" id="auth-btn">Join Now</button>
<p onclick="toggleAuth()" style="cursor:pointer; font-size:13px; margin-top:15px; color:#94a3b8;">Already a member? <b style="color:var(--secondary)">Login</b></p>
</div>
<div id="dashboard-page" class="container hidden">
<div class="notice-board">
<i class="fas fa-bullhorn"></i>
<marquee id="marquee-text">āύāϤā§āύ āĻāĻĒāĻĄā§āĻ: āĻāĻāύ āĻĨā§āĻā§ āϰā§āĻĢāĻžāϰ āĻāϰāϞ⧠āĻĒāĻžāĻŦā§āύ ā§Ģ āĻā§ā§āύ āĻŦā§āύāĻžāϏ!</marquee>
</div>
<div class="profile-header">
<div class="avatar" id="user-avatar">U</div>
<div>
<h4 id="display-user" style="margin:0">User Name</h4>
<span id="user-status" style="font-size:11px; color:var(--primary); background:rgba(0,200,83,0.1); padding:2px 8px; border-radius:10px;">Verified VIP</span>
</div>
</div>
<div class="stats-grid">
<div class="stat-item">
<i class="fas fa-coins"></i>
<div id="user-coins" style="font-size:22px; font-weight:800; color:var(--accent);">0</div>
<div style="font-size:10px; color:#94a3b8; text-transform:uppercase;">My Balance</div>
</div>
<div class="stat-item">
<i class="fas fa-rocket"></i>
<div id="task-count" style="font-size:22px; font-weight:800;">0</div>
<div style="font-size:10px; color:#94a3b8; text-transform:uppercase;">Task Done</div>
</div>
</div>
<div class="refer-box">
<small>Invite Friends & Earn 5 Coins</small>
<div class="refer-code" id="ref-code-display" onclick="copyRef()">REF123</div>
</div>
<button class="btn-primary" onclick="claimDaily()"><i class="fas fa-calendar-check"></i> Claim Daily Gift</button>
<button class="btn-outline" onclick="showPage('leaderboard-page')"><i class="fas fa-trophy" style="color:gold"></i> Top Earners</button>
</div>
<div id="leaderboard-page" class="container hidden">
<div style="display:flex; align-items:center; gap:10px; margin-bottom:20px;">
<i class="fas fa-arrow-left" onclick="showPage('dashboard-page')"></i>
<h3 style="margin:0">Top 10 Earners</h3>
</div>
<div id="leaderboard-container"></div>
</div>
<div id="task-list-page" class="container hidden">
<h3 style="margin-bottom:20px;">Active Tasks</h3>
<div id="tasks-container"></div>
</div>
<div id="withdraw-page" class="container hidden">
<h3>Cashout</h3>
<input type="number" id="w-amt" placeholder="Amount (Min 500)">
<select id="w-method"><option>Bkash</option><option>Nagad</option><option>Recharge</option></select>
<input type="number" id="w-num" placeholder="Account Number">
<button class="btn-primary" onclick="handleWithdraw()">Withdraw Now</button>
<div id="w-history" style="margin-top:20px; text-align:left; font-size:12px;"></div>
</div>
<div class="floating-nav hidden" id="main-nav">
<div onclick="showPage('dashboard-page')" id="nav-home" class="active"><i class="fas fa-home"></i><span>Home</span></div>
<div onclick="showPage('task-list-page')" id="nav-task"><i class="fas fa-layer-group"></i><span>Tasks</span></div>
<div onclick="showPage('withdraw-page')" id="nav-wallet"><i class="fas fa-wallet"></i><span>Wallet</span></div>
<div onclick="location.reload()"><i class="fas fa-power-off"></i><span>Logout</span></div>
</div>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-database.js"></script>
<script>
const firebaseConfig = { apiKey: "AIzaSyCDIUuZIt0ZXe0Zn7EqeNeZpbgzXl8O_F8", databaseURL: "https://right-6d80e-default-rtdb.firebaseio.com" };
firebase.initializeApp(firebaseConfig);
const db = firebase.database();
let isSignup = true;
let currentUser = "";
function toggleAuth() {
isSignup = !isSignup;
document.getElementById('signup-fields').classList.toggle('hidden');
document.getElementById('auth-title').innerText = isSignup ? "Create Account" : "Welcome Back";
document.getElementById('auth-btn').innerText = isSignup ? "Join Now" : "Login Now";
}
function showPage(id) {
document.querySelectorAll('.container').forEach(c => c.classList.add('hidden'));
document.querySelectorAll('.floating-nav div').forEach(d => d.classList.remove('active'));
document.getElementById(id).classList.remove('hidden');
if(id !== 'auth-page') document.getElementById('main-nav').classList.remove('hidden');
if(id === 'dashboard-page') document.getElementById('nav-home').classList.add('active');
if(id === 'task-list-page') { loadTasks(); document.getElementById('nav-task').classList.add('active'); }
if(id === 'withdraw-page') { loadWithdrawHistory(); document.getElementById('nav-wallet').classList.add('active'); }
if(id === 'leaderboard-page') loadLeaderboard();
}
function handleAuth() {
const u = document.getElementById('username').value.trim();
const p = document.getElementById('password').value;
if(!u || !p) return alert("Fill all fields!");
if(isSignup) {
db.ref('users/'+u).set({
firstName: document.getElementById('fname').value,
lastName: document.getElementById('lname').value,
password: p, coins: 0, tasksDone: 0, lastDaily: "",
refCode: u.toUpperCase() // Username as Ref Code
}).then(() => { alert("Registration Complete!"); toggleAuth(); });
} else {
db.ref('users/'+u).once('value', s => {
if(s.exists() && s.val().password === p) {
currentUser = u;
document.getElementById('user-avatar').innerText = s.val().firstName.charAt(0);
document.getElementById('ref-code-display').innerText = s.val().refCode;
syncData();
showPage('dashboard-page');
} else alert("Invalid Login!");
});
}
}
function syncData() {
db.ref('users/'+currentUser).on('value', s => {
const data = s.val();
document.getElementById('display-user').innerText = data.firstName + " " + data.lastName;
animateValue("user-coins", parseInt(document.getElementById('user-coins').innerText), data.coins, 1000);
document.getElementById('task-count').innerText = data.tasksDone;
});
}
function animateValue(id, start, end, duration) {
const obj = document.getElementById(id);
let startTimestamp = null;
const step = (timestamp) => {
if (!startTimestamp) startTimestamp = timestamp;
const progress = Math.min((timestamp - startTimestamp) / duration, 1);
obj.innerText = Math.floor(progress * (end - start) + start);
if (progress < 1) window.requestAnimationFrame(step);
};
window.requestAnimationFrame(step);
}
function loadLeaderboard() {
db.ref('users').orderByChild('coins').limitToLast(10).once('value', s => {
const container = document.getElementById('leaderboard-container');
container.innerHTML = "";
let users = [];
s.forEach(child => { users.push(child.val()); });
users.reverse().forEach((u, index) => {
container.innerHTML += `
<div class="card-list">
<div style="display:flex; align-items:center; gap:10px;">
<span style="font-weight:bold; color:var(--secondary)">#${index+1}</span>
<span>${u.firstName}</span>
</div>
<b style="color:var(--accent)">${u.coins} CP</b>
</div>`;
});
});
}
function copyRef() {
const code = document.getElementById('ref-code-display').innerText;
navigator.clipboard.writeText(code);
alert("Referral code copied!");
}
// Previous functions like loadTasks, claimDaily, handleWithdraw remain similar
// Just ensure they use the 'currentUser' and 'db' correctly.
</script>
</body>
</html>

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home