CMB HUNTER - سیگنال کیهانی
by RapidKnight54356 lines12.0 KB
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>CMB HUNTER - سیگنال کیهانی</title>
<style>
* {
user-select: none;
touch-action: manipulation;
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
background: radial-gradient(ellipse at 30% 40%, #0a0f2a, #010005);
display: flex;
justify-content: center;
align-items: center;
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
padding: 15px;
position: relative;
}
/* ستارههای کیهانی متحرک */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: radial-gradient(2px 2px at 15px 40px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 60px 120px, #aaffff, rgba(0,0,0,0)),
radial-gradient(3px 3px at 90px 200px, #ffaaff, rgba(0,0,0,0));
background-size: 250px 250px, 180px 180px, 300px 300px;
background-repeat: repeat;
opacity: 0.5;
pointer-events: none;
animation: starsMove 20s linear infinite;
}
@keyframes starsMove {
0% { background-position: 0 0, 0 0, 0 0; }
100% { background-position: 100px 100px, -80px 80px, 50px -50px; }
}
.game-container {
background: rgba(5, 15, 30, 0.7);
backdrop-filter: blur(12px);
border-radius: 48px;
padding: 20px;
max-width: 550px;
width: 100%;
border: 1px solid rgba(0, 255, 255, 0.5);
box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0, 255, 255, 0.2);
z-index: 1;
}
h1 {
text-align: center;
font-size: 1rem;
color: #00ffff;
text-shadow: 0 0 10px cyan, 0 0 5px #0066ff;
letter-spacing: 2px;
margin-bottom: 8px;
}
.sub {
text-align: center;
font-size: 0.55rem;
color: #bbddff;
margin-bottom: 20px;
}
.stats {
display: flex;
justify-content: space-between;
background: rgba(0,0,0,0.6);
border-radius: 30px;
padding: 12px 20px;
margin-bottom: 25px;
border: 1px solid #ff66aa;
}
.stat {
text-align: center;
}
.stat-label {
font-size: 0.5rem;
color: #aaccff;
margin-bottom: 6px;
}
.stat-value {
font-size: 1.8rem;
font-weight: bold;
color: #ffcc44;
text-shadow: 0 0 8px #ff9900;
}
/* جعبهها - به شکل کهکشانی */
.boxes {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 18px;
margin: 25px 0;
}
.card {
background: linear-gradient(135deg, #1e2a4a, #0a1025);
border-radius: 24px;
aspect-ratio: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
transition: all 0.12s ease;
border: 2px solid rgba(100, 100, 255, 0.4);
box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
.card:active {
transform: scale(0.94);
}
/* سیگنال پیدا شد */
.card-signal {
background: linear-gradient(135deg, #ff44aa, #aa00ff);
border: 3px solid gold;
box-shadow: 0 0 25px #ff66ff, 0 0 10px gold;
animation: signalPulse 0.7s infinite;
}
@keyframes signalPulse {
0% { box-shadow: 0 0 10px #ff66ff; transform: scale(1); }
50% { box-shadow: 0 0 35px #ff00cc, 0 0 20px gold; transform: scale(1.02); }
100% { box-shadow: 0 0 10px #ff66ff; transform: scale(1); }
}
.card-icon {
font-size: 3.2rem;
}
.card-label {
font-size: 0.55rem;
color: #aaddff;
background: rgba(0,0,0,0.5);
padding: 4px 10px;
border-radius: 30px;
}
button {
background: linear-gradient(90deg, #ff416c, #ff4b2b);
border: none;
width: 100%;
padding: 14px;
border-radius: 50px;
font-family: inherit;
font-size: 0.8rem;
font-weight: bold;
color: white;
cursor: pointer;
transition: 0.2s;
margin-top: 15px;
letter-spacing: 1px;
box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}
button:active {
transform: scale(0.97);
}
.message-area {
text-align: center;
margin-top: 15px;
font-size: 0.6rem;
min-height: 55px;
color: #ffdd88;
text-shadow: 0 0 3px #ff6600;
font-weight: bold;
}
footer {
text-align: center;
font-size: 0.45rem;
color: #6688aa;
margin-top: 18px;
}
@media (max-width: 450px) {
.card-icon { font-size: 2.5rem; }
.stat-value { font-size: 1.4rem; }
.game-container { padding: 15px; }
}
</style>
</head>
<body>
<div class="game-container">
<h1>📡 CMB SIGNAL HUNTER</h1>
<div class="sub">🌌 تابش زمینه کیهانی • سیگنال ناهمسانی رو پیدا کن 🌌</div>
<div class="stats">
<div class="stat">
<div class="stat-label">✨ امتیاز</div>
<div class="stat-value" id="scoreValue">0</div>
</div>
<div class="stat">
<div class="stat-label">⏱️ زمان</div>
<div class="stat-value" id="timerValue">25</div>
</div>
</div>
<div class="boxes" id="boxesContainer">
<div class="card" data-id="0">
<div class="card-icon">🌌</div>
<div class="card-label">جعبه CMB</div>
</div>
<div class="card" data-id="1">
<div class="card-icon">🌌</div>
<div class="card-label">جعبه CMB</div>
</div>
<div class="card" data-id="2">
<div class="card-icon">🌌</div>
<div class="card-label">جعبه CMB</div>
</div>
<div class="card" data-id="3">
<div class="card-icon">🌌</div>
<div class="card-label">جعبه CMB</div>
</div>
</div>
<button id="resetButton">🔄 ماموریت جدید کیهانی</button>
<div class="message-area" id="messageBox">🔭 منتظر سیگنال باش...</div>
<footer>🎯 سیگنال ناهمسانی CMB فقط ۱.۵ ثانیه میمونه! سریع بزن 🚀</footer>
</div>
<script>
const boxes = document.querySelectorAll('.card');
const scoreEl = document.getElementById('scoreValue');
const timerEl = document.getElementById('timerValue');
const msgEl = document.getElementById('messageBox');
const resetBtn = document.getElementById('resetButton');
let score = 0;
let timeLeft = 25;
let gameActive = true;
let activeSignalIndex = -1;
let timerInterval = null;
let hideTimeout = null;
function clearSignal() {
if (activeSignalIndex !== -1) {
boxes[activeSignalIndex].innerHTML = '<div class="card-icon">🌌</div><div class="card-label">جعبه CMB</div>';
boxes[activeSignalIndex].classList.remove('card-signal');
activeSignalIndex = -1;
}
if (hideTimeout) clearTimeout(hideTimeout);
}
function showSignal() {
clearSignal();
const newIndex = Math.floor(Math.random() * 4);
activeSignalIndex = newIndex;
boxes[activeSignalIndex].innerHTML = '<div class="card-icon">🌠✨🌠</div><div class="card-label">!!! سیگنال CMB !!!</div>';
boxes[activeSignalIndex].classList.add('card-signal');
msgEl.innerHTML = '✨✨ سیگنال ظاهر شد! سریع بزن ✨✨';
setTimeout(() => { if(gameActive && msgEl.innerHTML.includes('سیگنال ظاهر شد')) msgEl.innerHTML = '🔭 منتظر سیگنال باش...'; }, 800);
// سیگنال بعد از 1.5 ثانیه ناپدید میشه
hideTimeout = setTimeout(() => {
if (gameActive && activeSignalIndex !== -1) {
boxes[activeSignalIndex].innerHTML = '<div class="card-icon">🌌</div><div class="card-label">جعبه CMB</div>';
boxes[activeSignalIndex].classList.remove('card-signal');
activeSignalIndex = -1;
msgEl.innerHTML = '💨 سیگنال فرار کرد! سریعتر باش...';
setTimeout(() => { if(gameActive) msgEl.innerHTML = '🔭 منتظر سیگنال باش...'; }, 1000);
}
}, 1500);
}
function updateScoreUI() {
scoreEl.innerText = score;
}
function endGame() {
gameActive = false;
if (timerInterval) clearInterval(timerInterval);
clearSignal();
msgEl.innerHTML = `💀 GAME OVER 💀<br>🔥 امتیاز نهایی: ${score} 🔥<br>🌌 برای رکوردشکنی دوباره تلاش کن!`;
}
function startTimer() {
if (timerInterval) clearInterval(timerInterval);
timerInterval = setInterval(() => {
if (!gameActive) return;
if (timeLeft <= 1) {
timeLeft = 0;
timerEl.innerText = "0";
endGame();
} else {
timeLeft--;
timerEl.innerText = timeLeft;
if (timeLeft <= 5) {
msgEl.innerHTML = '⚠️ آخرین ثانیهها! سریع! ⚠️';
}
}
}, 1000);
}
function resetGame() {
gameActive = true;
score = 0;
timeLeft = 25;
updateScoreUI();
timerEl.innerText = "25";
msgEl.innerHTML = '🔭 منتظر سیگنال باش...';
if (timerInterval) clearInterval(timerInterval);
clearSignal();
startTimer();
showSignal();
}
// رویداد کلیک روی جعبهها
boxes.forEach((box, idx) => {
box.addEventListener('click', () => {
if (!gameActive) return;
if (idx === activeSignalIndex && boxes[idx].classList.contains('card-signal')) {
// درست زدی!
score++;
updateScoreUI();
msgEl.innerHTML = '🎉 درست زدی! +1 امتیاز 🎉';
setTimeout(() => { if(gameActive && msgEl.innerHTML.includes('درست زدی')) msgEl.innerHTML = '🔭 منتظر سیگنال باش...'; }, 600);
// سیگنال جدید بذار
showSignal();
} else if (idx !== activeSignalIndex) {
// اشتباه زدی
msgEl.innerHTML = '❌ اشتباه! اینجا سیگنال نیست... ❌';
setTimeout(() => { if(gameActive && msgEl.innerHTML.includes('اشتباه')) msgEl.innerHTML = '🔭 منتظر سیگنال باش...'; }, 600);
}
});
});
resetBtn.addEventListener('click', resetGame);
resetGame();
</script>
</body>
</html>Game Source: CMB HUNTER - سیگنال کیهانی
Creator: RapidKnight54
Libraries: none
Complexity: complex (356 lines, 12.0 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: cmb-hunter-rapidknight54" to link back to the original. Then publish at arcadelab.ai/publish.