Download index.html from halil339/cash-up: direct link, hf CLI and curl.
- Browser
- Download file 36.9 kB
-
https://huggingface.co/spaces/halil339/cash-up/resolve/main/index.html
- Command line
-
hf download hf://spaces/halil339/cash-up/index.html
-
curl -L -o index.html https://huggingface.co/spaces/halil339/cash-up/resolve/main/index.html
36.9 kB
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<title>Cash UP | المحفظة الذكية</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#EF4444',
'primary-dark': '#DC2626',
'primary-light': '#F87171',
accent: '#F59E0B',
'accent-light': '#FCD34D',
success: '#10B981',
danger: '#EF4444',
background: '#F8FAFC',
'card-bg': '#FFFFFF',
'text-primary': '#1E293B',
'text-secondary': '#64748B',
'text-light': '#94A3B8',
border: '#E2E8F0'
}
}
}
}
</script>
<style>
:root {
--primary-dark: #DC2626;
--primary: #EF4444;
--primary-light: #F87171;
--accent: #F59E0B;
--accent-light: #FCD34D;
--success: #10B981;
--danger: #EF4444;
--background: #F8FAFC;
--card-bg: #FFFFFF;
--text-primary: #1E293B;
--text-secondary: #64748B;
--text-light: #94A3B8;
--border: #E2E8F0;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--gradient-primary: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
--gradient-accent: linear-gradient(135deg, #F59E0B 0%, #F59E0B 100%);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Tajawal', sans-serif;
}
body {
background-color: var(--background);
color: var(--text-primary);
min-height: 100vh;
user-select: none;
overflow-y: auto;
padding-bottom: 100px;
}
.container {
max-width: 480px;
margin: 0 auto;
padding: 15px;
}
/* Header جديد */
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
background: var(--gradient-primary);
border-radius: 0 0 20px 20px;
padding: 20px 15px;
margin: -15px -15px 20px -15px;
color: white;
box-shadow: var(--shadow);
}
.logo {
display: flex;
align-items: center;
gap: 10px;
font-weight: 700;
font-size: 22px;
}
.logo-icon {
width: 32px;
height: 32px;
filter: brightness(0) invert(1);
}
.header-actions {
display: flex;
gap: 15px;
}
.header-icon {
width: 28px;
height: 28px;
opacity: 0.9;
transition: all 0.2s;
}
.header-icon:hover {
opacity: 1;
transform: scale(1.1);
}
/* بطاقة النقاط الجديدة */
.balance-card {
background: var(--gradient-primary);
border-radius: 20px;
padding: 25px;
color: white;
margin: 20px 0;
box-shadow: var(--shadow-lg);
position: relative;
overflow: hidden;
animation: waxFlow 3s ease-in-out infinite;
}
@keyframes waxFlow {
0% {
transform: translateY(0px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
50% {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
100% {
transform: translateY(0px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
}
.balance-card::before {
content: "";
position: absolute;
top: -50px;
right: -50px;
width: 150px;
height: 150px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}
.balance-card::after {
content: "";
position: absolute;
bottom: -60px;
left: -60px;
width: 180px;
height: 180px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}
.balance-title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
font-size: 16px;
opacity: 0.9;
}
.balance-amount {
font-size: 36px;
font-weight: 700;
display: flex;
justify-content: space-between;
align-items: center;
}
.dollar-balance {
font-size: 20px;
font-weight: 500;
margin-top: 10px;
opacity: 0.9;
}
.currency {
font-size: 22px;
margin-left: 5px;
opacity: 0.9;
}
/* بطاقة المعرف */
.user-id-card {
background: var(--card-bg);
border-radius: 16px;
padding: 16px;
display: flex;
justify-content: space-between;
align-items: center;
margin: 20px 0;
box-shadow: var(--shadow);
border: 1px solid var(--border);
animation: waxFlow 6s ease-in-out infinite;
}
.user-id-info {
display: flex;
align-items: center;
gap: 10px;
}
.user-id-label {
font-weight: 600;
color: var(--text-secondary);
font-size: 15px;
}
.user-id {
font-weight: 700;
color: var(--primary);
font-size: 15px;
}
.copy-btn {
background: var(--primary-light);
color: white;
border: none;
border-radius: 10px;
padding: 8px 12px;
font-size: 14px;
display: flex;
align-items: center;
gap: 5px;
cursor: pointer;
transition: all 0.2s;
}
.copy-btn:hover {
background: var(--primary);
}
/* الإجراءات السريعة */
.section-title {
font-size: 18px;
font-weight: 700;
margin: 25px 0 20px 0;
color: var(--text-primary);
display: flex;
justify-content: space-between;
align-items: center;
}
.view-all {
color: var(--primary);
font-size: 14px;
font-weight: 500;
text-decoration: none;
}
.quick-actions {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin: 15px 0;
}
.action-btn {
background: var(--card-bg);
border-radius: 16px;
padding: 15px 10px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
box-shadow: var(--shadow);
transition: all 0.2s;
cursor: pointer;
border: 1px solid var(--border);
animation: waxFlow 7s ease-in-out infinite;
}
.action-btn:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.action-icon {
width: 28px;
height: 28px;
background: var(--primary-light);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.action-label {
font-size: 13px;
font-weight: 500;
color: var(--text-primary);
}
/* قسم البانر */
.banner {
background: var(--gradient-accent);
border-radius: 16px;
padding: 20px;
margin: 25px 0;
color: white;
position: relative;
overflow: hidden;
box-shadow: var(--shadow);
animation: waxFlow 5s ease-in-out infinite;
}
.banner-content {
position: relative;
z-index: 2;
}
.banner-title {
font-size: 18px;
font-weight: 700;
margin-bottom: 5px;
}
.banner-desc {
font-size: 14px;
opacity: 0.9;
margin-bottom: 15px;
}
.banner-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
border-radius: 10px;
padding: 8px 15px;
font-size: 14px;
display: inline-flex;
align-items: center;
gap: 5px;
cursor: pointer;
transition: all 0.2s;
}
.banner-btn:hover {
background: rgba(255, 255, 255, 0.3);
}
.banner::before {
content: "";
position: absolute;
top: -20px;
left: -20px;
width: 100px;
height: 100px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}
/* البوب أب */
.popup {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.7);
z-index: 2000;
justify-content: center;
align-items: center;
padding: 20px;
}
.popup-content {
background-color: var(--card-bg);
border-radius: 20px;
padding: 25px;
width: 100%;
max-width: 350px;
text-align: center;
box-shadow: var(--shadow-lg);
animation: popIn 0.3s ease-out, waxFlow 3s ease-in-out infinite;
}
@keyframes popIn {
0% { transform: scale(0.8); opacity: 0; }
100% { transform: scale(1); opacity: 1; }
}
.popup-message {
margin-bottom: 20px;
line-height: 1.5;
font-size: 16px;
}
.popup-btn {
background: var(--primary);
color: #FFFFFF;
border: none;
border-radius: 12px;
padding: 12px 20px;
font-weight: 600;
width: 100%;
cursor: pointer;
transition: all 0.2s;
}
.popup-btn:hover {
background: var(--primary-dark);
}
/* Welcome Bonus Popup */
.welcome-popup {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.7);
z-index: 2000;
justify-content: center;
align-items: center;
padding: 20px;
}
.welcome-popup-content {
background: var(--gradient-primary);
border-radius: 20px;
padding: 30px;
width: 100%;
max-width: 350px;
text-align: center;
box-shadow: var(--shadow-lg);
animation: popIn 0.3s ease-out, waxFlow 3s ease-in-out infinite;
color: white;
position: relative;
overflow: hidden;
}
.welcome-popup-content::before {
content: '';
position: absolute;
top: -50px;
right: -50px;
width: 150px;
height: 150px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}
.welcome-popup-content::after {
content: '';
position: absolute;
bottom: -60px;
left: -60px;
width: 180px;
height: 180px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}
.welcome-popup-title {
font-size: 22px;
font-weight: 700;
margin-bottom: 15px;
}
.welcome-popup-message {
font-size: 16px;
line-height: 1.5;
margin-bottom: 20px;
opacity: 0.9;
}
.welcome-popup-btn {
background: var(--success);
color: #FFFFFF;
border: none;
border-radius: 12px;
padding: 12px 20px;
font-weight: 600;
width: 100%;
cursor: pointer;
transition: all 0.2s;
}
.welcome-popup-btn:hover {
background: #059669;
}
/* لعبة تجميع النقاط */
.game-section {
background: var(--card-bg);
border-radius: 20px;
padding: 20px;
margin: 25px 0;
box-shadow: var(--shadow);
border: 1px solid var(--border);
animation: waxFlow 4s ease-in-out infinite;
}
.game-container {
height: 300px;
background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
border-radius: 16px;
position: relative;
overflow: hidden;
margin: 15px 0;
cursor: crosshair;
}
.game-target {
position: absolute;
width: 60px;
height: 60px;
background: var(--gradient-primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
color: white;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: var(--shadow);
}
.game-target:hover {
transform: scale(1.1);
}
.game-target:active {
transform: scale(0.9);
}
.game-instruction {
text-align: center;
color: var(--text-secondary);
font-size: 14px;
margin: 10px 0;
}
.game-start-btn {
background: var(--gradient-accent);
color: white;
border: none;
border-radius: 12px;
padding: 12px 24px;
font-weight: 600;
font-size: 16px;
cursor: pointer;
transition: all 0.2s;
width: 100%;
}
.game-start-btn:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.game-score {
color: var(--primary);
font-weight: 700;
font-size: 16px;
}
@keyframes targetMove {
0% { transform: translate(0, 0); }
25% { transform: translate(200px, 100px); }
50% { transform: translate(100px, 200px); }
75% { transform: translate(50px, 50px); }
100% { transform: translate(0, 0); }
}
.target-moving {
animation: targetMove 3s infinite ease-in-out;
}
/* لعبة القفز على الجبل */
.game-section {
background: var(--card-bg);
border-radius: 20px;
padding: 20px;
margin: 25px 0;
box-shadow: var(--shadow);
border: 1px solid var(--border);
animation: waxFlow 4s ease-in-out infinite;
}
.game-container {
height: 300px;
background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
border-radius: 16px;
position: relative;
overflow: hidden;
margin: 15px 0;
cursor: pointer;
}
.mountain {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background: linear-gradient(45deg, #8B4513 0%, #A0522D 100%);
border-radius: 10px 10px 0 0;
}
.character {
position: absolute;
bottom: 60px;
left: 50px;
font-size: 32px;
transition: transform 0.3s ease;
z-index: 10;
}
.character.jumping {
animation: jump 0.8s ease;
}
.obstacle {
position: absolute;
bottom: 60px;
right: -50px;
font-size: 28px;
z-index: 5;
}
.coin {
position: absolute;
bottom: 120px;
right: -50px;
font-size: 24px;
z-index: 5;
animation: coinSpin 2s infinite linear;
}
.game-instruction {
text-align: center;
color: var(--text-secondary);
font-size: 14px;
margin: 10px 0;
position: absolute;
bottom: 10px;
width: 100%;
}
.game-start-btn {
background: var(--gradient-accent);
color: white;
border: none;
border-radius: 12px;
padding: 12px 24px;
font-weight: 600;
font-size: 16px;
cursor: pointer;
transition: all 0.2s;
width: 100%;
}
.game-start-btn:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.game-score {
color: var(--primary);
font-weight: 700;
font-size: 16px;
}
@keyframes jump {
0% { transform: translateY(0); }
50% { transform: translateY(-100px); }
100% { transform: translateY(0); }
}
@keyframes coinSpin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes obstacleMove {
0% { right: -50px; }
100% { right: 480px; }
}
@keyframes coinMove {
0% { right: -50px; }
100% { right: 480px; }
}
/* شريط التنقل السفلي */
.nav-container {
position: fixed;
bottom: 20px;
left: 5%;
right: 5%;
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
border-radius: 30px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
padding: 10px 0;
transition: all 0.3s ease;
z-index: 1000;
}
.nav-container:hover {
transform: translateY(-5px);
}
.nav {
display: flex;
justify-content: space-around;
align-items: center;
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
background: transparent;
border: none;
transition: all 0.3s ease;
position: relative;
padding: 8px 12px;
border-radius: 15px;
cursor: pointer;
}
.nav-item.active {
background: var(--primary-light);
}
.nav-item i {
font-size: 20px;
color: var(--text-secondary);
transition: all 0.3s ease;
}
.nav-item.active i {
color: white;
}
.nav-label {
font-size: 12px;
color: var(--text-secondary);
margin-top: 5px;
transition: all 0.3s ease;
}
.nav-item.active .nav-label {
color: white;
}
.nav-item:hover {
transform: scale(1.1);
}
</style>
</head>
<body>
<div class="container">
<!-- Header جديد -->
<div class="header">
<div class="logo">
<i class="fas fa-wallet logo-icon"></i>
<span>Cash UP</span>
</div>
<div class="header-actions">
<i class="fas fa-bell header-icon" onclick="showNotification()"></i>
<i class="fas fa-user-circle header-icon" onclick="navigateTo('profile')"></i>
</div>
</div>
<!-- بطاقة النقاط الجديدة -->
<div class="balance-card">
<div class="balance-title">
<span>إجمالي النقاط</span>
<i class="fas fa-coins"></i>
</div>
<div class="balance-amount">
<span id="balance">0</span>
<span class="currency">نقاط</span>
</div>
<div class="dollar-balance" id="dollarBalance">0.00 USDT</div>
</div>
<!-- بطاقة المعرف -->
<div class="user-id-card">
<div class="user-id-info">
<span class="user-id-label">المعرف:</span>
<span class="user-id" id="userId">USER123456</span>
</div>
<button class="copy-btn" onclick="copyUserId()">
<i class="fas fa-copy"></i>
نسخ
</button>
</div>
<!-- الإجراءات السريعة -->
<div class="section-title">
<span>الإجراءات السريعة</span>
<a href="#" class="view-all">عرض الكل</a>
</div>
<div class="quick-actions">
<div class="action-btn" onclick="navigateTo('deposit')">
<div class="action-icon">
<i class="fas fa-arrow-down"></i>
</div>
<span class="action-label">استقبال</span>
</div>
<div class="action-btn" onclick="navigateTo('send')">
<div class="action-icon">
<i class="fas fa-exchange-alt"></i>
</div>
<span class="action-label">إرسال</span>
</div>
<div class="action-btn" onclick="navigateTo('earn')">
<div class="action-icon">
<i class="fas fa-gift"></i>
</div>
<span class="action-label">كسب النقاط</span>
</div>
<div class="action-btn" onclick="navigateTo('history')">
<div class="action-icon">
<i class="fas fa-history"></i>
</div>
<span class="action-label">السجل</span>
</div>
</div>
<!-- لعبة القفز على الجبل -->
<div class="game-section">
<div class="section-title">
<span>لعبة القفز على الجبل</span>
<span class="game-score">النقاط: <span id="gameScore">0</span></span>
</div>
<div class="game-container" id="gameContainer">
<div class="mountain"></div>
<div class="character" id="character">🧗</div>
<div class="obstacle" id="obstacle">🪨</div>
<div class="coin" id="coin">💰</div>
<div class="game-instruction">اضغط للقفز وتجنب الصخور وجمع النقاط!</div>
</div>
<button class="game-start-btn" id="gameStartBtn" onclick="startMountainGame()">ابدأ اللعبة</button>
</div>
<!-- البانر -->
<div class="banner" onclick="navigateTo('invite')">
<div class="banner-content">
<div class="banner-title">اربح مكافآت!</div>
<div class="banner-desc">احصل على 50 نقطة لكل صديق تدعوه</div>
<div class="banner-btn">
<span>ابدأ الآن</span>
<i class="fas fa-arrow-left"></i>
</div>
</div>
</div>
<!-- البوب أب العام -->
<div class="popup" id="popup">
<div class="popup-content">
<div class="popup-message" id="popupMessage">تم نسخ المعرف بنجاح</div>
<button class="popup-btn" onclick="closePopup()">موافق</button>
</div>
</div>
<!-- واجهة منبثقة هدية المستخدم الجديد -->
<div class="welcome-popup" id="welcomePopup">
<div class="welcome-popup-content">
<div class="welcome-popup-title">🎉 هدية ترحيبية!</div>
<div class="welcome-popup-message">مرحبًا بك في Cash UP! احصل على <strong>50 نقطة</strong> كهدية ترحيبية لتبدأ مغامرتك!</div>
<button class="welcome-popup-btn" onclick="claimWelcomeBonus()">الحصول عليها</button>
</div>
</div>
</div>
<!-- شريط التنقل السفلي -->
<div class="nav-container">
<div class="nav">
<div class="nav-item active" onclick="navigateTo('home')">
<i class="fas fa-home"></i>
<span class="nav-label">الرئيسية</span>
</div>
<div class="nav-item" onclick="navigateTo('earn')">
<i class="fas fa-coins"></i>
<span class="nav-label">كسب النقاط</span>
</div>
<div class="nav-item" onclick="navigateTo('transfer')">
<i class="fas fa-exchange-alt"></i>
<span class="nav-label">تحويل</span>
</div>
<div class="nav-item" onclick="navigateTo('profile')">
<i class="fas fa-user"></i>
<span class="nav-label">حسابي</span>
</div>
</div>
</div>
<script>
// بيانات المستخدم المحاكاة
let userData = {
balance: 1250,
userId: "USER123456",
claimedWelcomeBonus: false
};
// تهيئة الصفحة عند التحميل
document.addEventListener('DOMContentLoaded', function() {
updateBalance();
updateUserId();
// عرض نافذة الترحيب إذا لم يكن قد تم المطالبة بالمكافأة
if (!userData.claimedWelcomeBonus) {
setTimeout(() => {
document.getElementById('welcomePopup').style.display = 'flex';
}, 1000);
}
});
// تحديث الرصيد
function updateBalance() {
const balanceElement = document.getElementById('balance');
const dollarBalanceElement = document.getElementById('dollarBalance');
balanceElement.textContent = userData.balance.toLocaleString();
dollarBalanceElement.textContent = (userData.balance / 1000).toFixed(2) + ' USDT';
}
// تحديث معرف المستخدم
function updateUserId() {
document.getElementById('userId').textContent = userData.userId;
}
// نسخ معرف المستخدم
function copyUserId() {
navigator.clipboard.writeText(userData.userId).then(() => {
showPopup('تم نسخ المعرف بنجاح');
}).catch(err => {
showPopup('فشل في نسخ المعرف');
});
}
// المطالبة بمكافأة الترحيب
function claimWelcomeBonus() {
userData.balance += 50;
userData.claimedWelcomeBonus = true;
updateBalance();
document.getElementById('welcomePopup').style.display = 'none';
showPopup('تمت إضافة 50 نقطة إلى رصيدك!');
}
// إظهار نافذة منبثقة
function showPopup(message) {
document.getElementById('popupMessage').textContent = message;
document.getElementById('popup').style.display = 'flex';
setTimeout(closePopup, 3000);
}
// إغلاق النافذة المنبثقة
function closePopup() {
document.getElementById('popup').style.display = 'none';
}
// التنقل بين الصفحات
function navigateTo(page) {
showPopup(`سيتم الانتقال إلى ${page} قريبًا`);
// في التطبيق الحقيقي، هنا سيتم توجيه المستخدم إلى الصفحة المطلوبة
}
// إظهار الإشعارات
function showNotification() {
showPopup('لا توجد إشعارات جديدة');
}
// إضافة تأثيرات تفاعلية للعناصر
document.querySelectorAll('.action-btn, .nav-item').forEach(item => {
item.addEventListener('click', function() {
this.style.transform = 'scale(0.95)';
setTimeout(() => {
this.style.transform = '';
}, 150);
});
});
// تحديث نشاط عناصر التنقل
document.querySelectorAll('.nav-item').forEach(item => {
item.addEventListener('click', function() {
document.querySelectorAll('.nav-item').forEach(nav => {
nav.classList.remove('active');
});
this.classList.add('active');
});
});
// لعبة القفز على الجبل
let gameScore = 0;
let gameActive = false;
let gameInterval;
let obstacleInterval;
let coinInterval;
function startMountainGame() {
gameScore = 0;
gameActive = true;
document.getElementById('gameScore').textContent = gameScore;
document.getElementById('gameStartBtn').textContent = 'اللعبة جارية...';
document.getElementById('gameStartBtn').disabled = true;
const character = document.getElementById('character');
const obstacle = document.getElementById('obstacle');
const coin = document.getElementById('coin');
// إعادة تعيين المواقع
character.style.bottom = '60px';
obstacle.style.right = '-50px';
coin.style.right = '-50px';
// بدء حركة العوائق
obstacleInterval = setInterval(() => {
if (gameActive) {
createObstacle();
}
}, 2000);
// بدء حركة العملات
coinInterval = setInterval(() => {
if (gameActive) {
createCoin();
}
}, 3000);
// التحقق من التصادمات
gameInterval = setInterval(checkCollisions, 100);
// إنهاء اللعبة بعد 30 ثانية
setTimeout(endMountainGame, 30000);
}
function createObstacle() {
const obstacle = document.getElementById('obstacle');
obstacle.style.animation = 'obstacleMove 2s linear';
obstacle.style.right = '-50px';
setTimeout(() => {
if (gameActive) {
obstacle.style.animation = 'none';
}
}, 2000);
}
function createCoin() {
const coin = document.getElementById('coin');
const randomHeight = Math.random() * 150 + 80;
coin.style.bottom = randomHeight + 'px';
coin.style.animation = 'coinMove 3s linear, coinSpin 2s infinite linear';
coin.style.right = '-50px';
setTimeout(() => {
if (gameActive) {
coin.style.animation = 'none';
}
}, 3000);
}
function jump() {
if (!gameActive) return;
const character = document.getElementById('character');
character.classList.add('jumping');
setTimeout(() => {
character.classList.remove('jumping');
}, 800);
}
function checkCollisions() {
if (!gameActive) return;
const character = document.getElementById('character');
const obstacle = document.getElementById('obstacle');
const coin = document.getElementById('coin');
const charRect = character.getBoundingClientRect();
const obstacleRect = obstacle.getBoundingClientRect();
const coinRect = coin.getBoundingClientRect();
// التحقق من اصطدام بالعقبة
if (charRect.left < obstacleRect.right &&
charRect.right > obstacleRect.left &&
charRect.top < obstacleRect.bottom &&
charRect.bottom > obstacleRect.top) {
endMountainGame();
showPopup('اصطدمت بصخرة! حاول مرة أخرى');
return;
}
// التحقق من جمع عملة
if (charRect.left < coinRect.right &&
charRect.right > coinRect.left &&
charRect.top < coinRect.bottom &&
charRect.bottom > coinRect.top) {
gameScore += 5;
document.getElementById('gameScore').textContent = gameScore;
coin.style.right = '-100px';
// تأثير بصري للعملة
coin.style.transform = 'scale(1.5)';
setTimeout(() => {
coin.style.transform = 'scale(1)';
}, 300);
}
}
function endMountainGame() {
gameActive = false;
clearInterval(gameInterval);
clearInterval(obstacleInterval);
clearInterval(coinInterval);
document.getElementById('gameStartBtn').textContent = 'ابدأ اللعبة';
document.getElementById('gameStartBtn').disabled = false;
// إضافة النقاط إلى رصيد المستخدم
if (gameScore > 0) {
userData.balance += gameScore;
updateBalance();
showPopup(`مبروك! لقد جمعت ${gameScore} نقطة`);
}
}
// إضافة مستمع النقر للعبة
document.getElementById('gameContainer').addEventListener('click', function() {
if (gameActive) {
jump();
}
});
</script>
</body>
</html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<title>Cash UP | المحفظة الذكية</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#EF4444',
'primary-dark': '#DC2626',
'primary-light': '#F87171',
accent: '#F59E0B',
'accent-light': '#FCD34D',
success: '#10B981',
danger: '#EF4444',
background: '#F8FAFC',
'card-bg': '#FFFFFF',
'text-primary': '#1E293B',
'text-secondary': '#64748B',
'text-light': '#94A3B8',
border: '#E2E8F0'
}
}
}
}
</script>
<style>
:root {
--primary-dark: #DC2626;
--primary: #EF4444;
--primary-light: #F87171;
--accent: #F59E0B;
--accent-light: #FCD34D;
--success: #10B981;
--danger: #EF4444;
--background: #F8FAFC;
--card-bg: #FFFFFF;
--text-primary: #1E293B;
--text-secondary: #64748B;
--text-light: #94A3B8;
--border: #E2E8F0;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--gradient-primary: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
--gradient-accent: linear-gradient(135deg, #F59E0B 0%, #F59E0B 100%);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Tajawal', sans-serif;
}
body {
background-color: var(--background);
color: var(--text-primary);
min-height: 100vh;
user-select: none;
overflow-y: auto;
padding-bottom: 100px;
}
.container {
max-width: 480px;
margin: 0 auto;
padding: 15px;
}
/* Header جديد */
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
background: var(--gradient-primary);
border-radius: 0 0 20px 20px;
padding: 20px 15px;
margin: -15px -15px 20px -15px;
color: white;
box-shadow: var(--shadow);
}
.logo {
display: flex;
align-items: center;
gap: 10px;
font-weight: 700;
font-size: 22px;
}
.logo-icon {
width: 32px;