Spaces:
a
Running

a / index.html
zackfrank's picture
Add 2 files
c12d95e verified
Raw History Blame Contribute Delete
13.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mega Man X Interactive Level</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body {
font-family: 'Press Start 2P', cursive;
background-color: #111827;
color: white;
overflow-x: hidden;
}
.game-container {
position: relative;
width: 800px;
height: 500px;
margin: 0 auto;
background: linear-gradient(to bottom, #1e3a8a 0%, #14532d 50%, #7f1d1d 100%);
border: 8px solid #4b5563;
overflow: hidden;
}
.platform {
position: absolute;
background-color: #374151;
border: 4px solid #6b7280;
}
.character {
position: absolute;
width: 50px;
height: 70px;
background-color: #3b82f6;
border: 3px solid #1d4ed8;
border-radius: 10px;
transition: left 0.1s, bottom 0.1s;
}
.enemy {
position: absolute;
width: 40px;
height: 40px;
border-radius: 50%;
animation: float 2s infinite ease-in-out;
}
.bullet {
position: absolute;
width: 10px;
height: 5px;
background-color: #f59e0b;
border-radius: 5px;
}
.health-bar {
height: 20px;
background-color: #ef4444;
transition: width 0.3s;
}
.energy-bar {
height: 20px;
background-color: #3b82f6;
transition: width 0.3s;
}
.boss {
position: absolute;
width: 100px;
height: 120px;
background-color: #dc2626;
border: 5px solid #b91c1c;
border-radius: 15px;
}
.power-up {
position: absolute;
width: 30px;
height: 30px;
background-color: #10b981;
border: 3px solid #059669;
border-radius: 50%;
animation: pulse 1s infinite;
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.2); }
}
.infographic-card {
border-left: 5px solid;
transition: transform 0.3s;
}
.infographic-card:hover {
transform: translateY(-5px);
}
</style>
</head>
<body>
<div class="container mx-auto px-4 py-8">
<header class="text-center mb-8">
<h1 class="text-4xl md:text-5xl font-bold mb-4 text-blue-400">MEGA MAN X</h1>
<p class="text-green-300 mb-6">THE FUTURE OF ROBOTIC COMBAT</p>
<div class="flex justify-center space-x-4">
<button id="start-btn" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-bold transition">START GAME</button>
<button id="info-btn" class="bg-green-600 hover:bg-green-700 text-white px-6 py-3 rounded-lg font-bold transition">GAME INFO</button>
</div>
</header>
<div id="game-section" class="hidden">
<div class="game-container mb-4" id="gameCanvas">
<!-- Game elements will be added by JavaScript -->
</div>
<div class="flex justify-between mb-4">
<div class="w-1/2 pr-2">
<div class="flex items-center mb-2">
<span class="text-red-400 mr-2">HEALTH:</span>
<div class="flex-1 bg-gray-700 rounded-full h-6">
<div id="health-bar" class="health-bar rounded-full h-full" style="width: 100%"></div>
</div>
</div>
</div>
<div class="w-1/2 pl-2">
<div class="flex items-center mb-2">
<span class="text-blue-400 mr-2">ENERGY:</span>
<div class="flex-1 bg-gray-700 rounded-full h-6">
<div id="energy-bar" class="energy-bar rounded-full h-full" style="width: 100%"></div>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-3 gap-4 mb-6">
<div class="bg-gray-800 p-4 rounded-lg border-l-4 border-blue-500">
<h3 class="text-blue-400 mb-2">WEAPONS</h3>
<p class="text-sm text-gray-300">X-Buster (Standard)</p>
<p class="text-sm text-gray-300">Fire Wave (Acquired)</p>
<p class="text-sm text-gray-300">Ice Shot (Locked)</p>
</div>
<div class="bg-gray-800 p-4 rounded-lg border-l-4 border-green-500">
<h3 class="text-green-400 mb-2">UPGRADES</h3>
<p class="text-sm text-gray-300">Leg Boosters</p>
<p class="text-sm text-gray-300">Armor Plating</p>
<p class="text-sm text-gray-300">Energy Tank</p>
</div>
<div class="bg-gray-800 p-4 rounded-lg border-l-4 border-red-500">
<h3 class="text-red-400 mb-2">ENEMIES</h3>
<p class="text-sm text-gray-300">Mettool ×3</p>
<p class="text-sm text-gray-300">Sniper Joe ×2</p>
<p class="text-sm text-gray-300">Boss: Storm Eagle</p>
</div>
</div>
<div class="bg-gray-800 p-4 rounded-lg mb-6">
<h3 class="text-yellow-400 mb-2">CONTROLS</h3>
<div class="grid grid-cols-2 gap-4">
<div>
<p class="text-sm text-gray-300"><span class="text-white">← →</span> Move Left/Right</p>
<p class="text-sm text-gray-300"><span class="text-white">↑</span> Jump</p>
</div>
<div>
<p class="text-sm text-gray-300"><span class="text-white">Z</span> Shoot</p>
<p class="text-sm text-gray-300"><span class="text-white">X</span> Special Weapon</p>
</div>
</div>
</div>
</div>
<div id="info-section" class="hidden">
<h2 class="text-3xl font-bold mb-6 text-center text-blue-400">MEGA MAN X INFOGRAPHIC</h2>
<div class="grid md:grid-cols-3 gap-6 mb-8">
<div class="infographic-card bg-gray-800 p-6 rounded-lg border-l-blue-500">
<h3 class="text-xl font-bold mb-3 text-blue-400">CHARACTERS</h3>
<div class="flex items-center mb-4">
<div class="w-12 h-12 bg-blue-600 rounded-full mr-3"></div>
<div>
<h4 class="text-white">Mega Man X</h4>
<p class="text-xs text-gray-400">Advanced combat reploid</p>
</div>
</div>
<div class="flex items-center mb-4">
<div class="w-12 h-12 bg-red-600 rounded-full mr-3"></div>
<div>
<h4 class="text-white">Storm Eagle</h4>
<p class="text-xs text-gray-400">Aerial assault specialist</p>
</div>
</div>
<div class="flex items-center">
<div class="w-12 h-12 bg-green-600 rounded-full mr-3"></div>
<div>
<h4 class="text-white">Dr. Light</h4>
<p class="text-xs text-gray-400">X's creator</p>
</div>
</div>
</div>
<div class="infographic-card bg-gray-800 p-6 rounded-lg border-l-green-500">
<h3 class="text-xl font-bold mb-3 text-green-400">WEAPON SYSTEM</h3>
<div class="mb-4">
<div class="flex justify-between mb-1">
<span class="text-sm text-white">X-Buster</span>
<span class="text-sm text-gray-400">Standard</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 100%"></div>
</div>
</div>
<div class="mb-4">
<div class="flex justify-between mb-1">
<span class="text-sm text-white">Fire Wave</span>
<span class="text-sm text-gray-400">Acquired</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-red-600 h-2 rounded-full" style="width: 65%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm text-white">Ice Shot</span>
<span class="text-sm text-gray-400">Locked</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-blue-400 h-2 rounded-full" style="width: 0%"></div>
</div>
</div>
</div>
<div class="infographic-card bg-gray-800 p-6 rounded-lg border-l-red-500">
<h3 class="text-xl font-bold mb-3 text-red-400">LEVEL STATS</h3>
<div class="space-y-4">
<div>
<div class="flex justify-between mb-1">
<span class="text-sm text-white">Completion</span>
<span class="text-sm text-gray-400">25%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-yellow-500 h-2 rounded-full" style="width: 25%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm text-white">Enemies Defeated</span>
<span class="text-sm text-gray-400">3/8</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-green-500 h-2 rounded-full" style="width: 37%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm text-white">Secrets Found</span>
<span class="text-sm text-gray-400">1/3</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2">
<div class="bg-purple-500 h-2 rounded-full" style="width: 33%"></div>
</div>
</div>
</div>
</div>
</div>
<div class="bg-gray-800 rounded-lg overflow-hidden mb-8">
<div class="grid md:grid-cols-2">
<div class="p-6">
<h3 class="text-xl font-bold mb-4 text-blue-400">STORYLINE</h3>
<p class="text-gray-300 mb-4">In the year 21XX, Mega Man X, an advanced robotic unit capable of human-like thought and decision making, battles against rogue reploids who threaten humanity.</p>
<p class="text-gray-300">This level takes place in the Sky Lagoon, a massive floating fortress commanded by Storm Eagle and his aerial forces.</p>
</div>
<div class="bg-gray-900 p-6 flex items-center justify-center">
<div class="relative w-64 h-64">
<div class="absolute inset-0 bg-blue-900 rounded-full opacity-30"></div>
<div class="absolute inset-4 bg-green-900 rounded-full opacity-30"></div>
<div class="absolute inset-8 bg
</html>