quantumcode-ai-architect / gamequest-airport.html
muboboev's picture
Подэтап 5.3 — GameQuest
be3690e verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>At the Airport | QuantumCode</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="components/voice-track.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Space Grotesk', sans-serif;
background-color: #0f172a;
color: #e2e8f0;
}
.gradient-text {
background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.glass-card {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 1rem;
}
.scene {
transition: all 0.3s ease;
}
.progress-bar {
height: 8px;
border-radius: 4px;
background: rgba(124, 58, 237, 0.2);
}
.progress-fill {
height: 100%;
border-radius: 4px;
background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
}
</style>
</head>
<body class="min-h-screen">
<nav class="px-6 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="cpu" class="text-indigo-500"></i>
<span class="text-xl font-bold gradient-text">QuantumCode</span>
</div>
<div class="flex items-center space-x-2">
<a href="i18n-setup.html" class="flex items-center text-sm hover:text-indigo-400 transition-colors">
<i data-feather="globe" class="w-4 h-4 mr-1"></i>
<span id="currentLang">EN</span>
</a>
</div>
</nav>
<main class="container mx-auto px-4 py-16">
<section class="max-w-4xl mx-auto">
<div class="flex justify-between items-center mb-8">
<h1 class="text-3xl md:text-4xl font-bold gradient-text">At the Airport</h1>
<div class="text-xl font-medium">
Score: <span id="currentScore" class="text-indigo-400">0</span>/100
</div>
</div>
<div class="glass-card p-8 mb-8">
<div class="scene" id="scene1">
<h3 class="text-xl font-bold mb-4">Check-in Counter</h3>
<p class="text-slate-300 mb-6">You're checking in for your flight. The agent asks for your passport and boarding details.</p>
<div class="glass-card p-6 mb-6">
<p class="mb-4">Agent: "Good morning. May I see your passport and boarding pass, please?"</p>
<voice-track></voice-track>
<p class="mt-4 text-sm text-slate-400">Try saying: "Here's my passport and boarding pass."</p>
</div>
<button id="nextScene1" class="px-6 py-2 bg-indigo-600 hover:bg-indigo-700 rounded-lg font-medium transition-colors">
Continue to Security
</button>
</div>
<div class="scene hidden" id="scene2">
<h3 class="text-xl font-bold mb-4">Security Checkpoint</h3>
<p class="text-slate-300 mb-6">The security officer needs to check your belongings before you proceed.</p>
<div class="glass-card p-6 mb-6">
<p class="mb-4">Officer: "Please remove your shoes, belt, and any metal objects. Do you have any liquids?"</p>
<voice-track></voice-track>
<p class="mt-4 text-sm text-slate-400">Try saying: "No liquids, just these items."</p>
</div>
<button id="nextScene2" class="px-6 py-2 bg-indigo-600 hover:bg-indigo-700 rounded-lg font-medium transition-colors">
Continue to Gate
</button>
</div>
<div class="scene hidden" id="scene3">
<h3 class="text-xl font-bold mb-4">Boarding Gate</h3>
<p class="text-slate-300 mb-6">You've reached the boarding gate and need to confirm your seat.</p>
<div class="glass-card p-6 mb-6">
<p class="mb-4">Agent: "Welcome aboard. May I see your boarding pass? Your seat number is 24B."</p>
<voice-track></voice-track>
<p class="mt-4 text-sm text-slate-400">Try saying: "Thank you. Which way to seat 24B?"</p>
</div>
<button id="completeGame" class="px-6 py-2 bg-indigo-600 hover:bg-indigo-700 rounded-lg font-medium transition-colors">
Complete Game
</button>
</div>
<div class="progress-bar w-full mb-2 mt-6">
<div class="progress-fill" id="progressBar" style="width: 0%"></div>
</div>
<div class="text-right text-sm text-slate-400">
Progress: <span id="progressText">0</span>%
</div>
</div>
<div class="text-center">
<a href="gamequest.html" class="inline-flex items-center px-6 py-3 border border-indigo-500 text-indigo-400 hover:bg-indigo-900/50 rounded-full font-medium transition-colors">
<i data-feather="arrow-left" class="mr-2"></i>
Back to GameQuest
</a>
</div>
</section>
</main>
<script>
let currentScore = 0;
let currentScene = 1;
let progress = 0;
// Scene navigation
document.getElementById('nextScene1').addEventListener('click', () => {
document.getElementById('scene1').classList.add('hidden');
document.getElementById('scene2').classList.remove('hidden');
currentScene = 2;
updateScore(30);
});
document.getElementById('nextScene2').addEventListener('click', () => {
document.getElementById('scene2').classList.add('hidden');
document.getElementById('scene3').classList.remove('hidden');
currentScene = 3;
updateScore(30);
});
document.getElementById('completeGame').addEventListener('click', () => {
updateScore(40);
completeGame();
});
// Update score and progress
function updateScore(points) {
currentScore += points;
document.getElementById('currentScore').textContent = currentScore;
progress = Math.min(currentScore / 100 * 100, 100);
document.getElementById('progressBar').style.width = `${progress}%`;
document.getElementById('progressText').textContent = Math.floor(progress);
}
function completeGame() {
// Save game stats
const stats = JSON.parse(localStorage.getItem('gamequestStats')) || {
gamesPlayed: 0,
totalScore: 0,
highScore: 0
};
stats.gamesPlayed += 1;
stats.totalScore += currentScore;
if (currentScore > stats.highScore) {
stats.highScore = currentScore;
}
localStorage.setItem('gamequestStats', JSON.stringify(stats));
alert(`Congratulations! You scored ${currentScore}/100 points.`);
}
// Set initial language
document.getElementById('currentLang').textContent =
document.cookie.match('(^|;)\\s*NEXT_LOCALE\\s*=\\s*([^;]+)')?.pop() || 'EN';
feather.replace();
</script>
</body>
</html>