@@ -11,6 +11,7 @@ import { NexusPrime } from '@/components/layout/NexusPrime';
1111import XboxStyleConsole from '@/components/ui/XboxStyleConsole' ;
1212import RetroArcadeSidebar from '@/components/ui/RetroArcadeSidebar' ;
1313import { useGlobalWallet } from '@/contexts/wallet/WalletContext' ;
14+ import InfiniteRunner from '@/components/games/InfiniteRunner' ;
1415import Image from 'next/image' ;
1516
1617// Game data with detailed information - synced with MiniGameStore
@@ -349,155 +350,19 @@ export default function GamePage() {
349350 { /* Game Ready Screen */ }
350351 { loadingState === 'ready' && (
351352 < >
352- { /* Beta Games - Start Screen */ }
353- { game . status === 'beta' && (
354- < div className = 'space-y-8 mt-10' >
355- { /* Epic Game Start Screen */ }
356- < div className = 'relative' >
357- { /* Animated Background Effect */ }
358- < div className = 'absolute inset-0 bg-gradient-to-br from-cyan-500/10 via-purple-500/10 to-pink-500/10 rounded-3xl blur-3xl animate-pulse' > </ div >
359-
360- { /* Main Game Screen Container */ }
361- < div className = 'relative bg-gradient-to-br from-slate-900/95 via-purple-900/95 to-slate-900/95 backdrop-blur-xl border-4 border-cyan-400/30 rounded-3xl p-8 md:p-12 shadow-2xl overflow-hidden' >
362- { /* Animated Corner Accents */ }
363- < div className = 'absolute top-0 left-0 w-32 h-32 bg-gradient-to-br from-cyan-400/20 to-transparent rounded-br-full' > </ div >
364- < div className = 'absolute bottom-0 right-0 w-32 h-32 bg-gradient-to-tl from-purple-400/20 to-transparent rounded-tl-full' > </ div >
365-
366- { /* Game Title Section */ }
367- < div className = 'relative text-center mb-12' >
368- < div className = 'flex justify-center mb-6' >
369- < div className = 'text-9xl animate-bounce drop-shadow-2xl' >
370- { game . icon }
371- </ div >
372- </ div >
373-
374- < h1 className = 'text-6xl md:text-8xl font-black text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 via-purple-400 to-pink-400 mb-4 animate-pulse tracking-tight' >
375- { game . title }
376- </ h1 >
377-
378- < div className = 'inline-block px-6 py-2 bg-blue-500/30 border-2 border-blue-400 rounded-full mb-6' >
379- < span className = 'text-blue-300 font-bold text-lg uppercase tracking-wider' >
380- 🎮 Beta Access Available
381- </ span >
382- </ div >
383-
384- < p className = 'text-2xl text-white/90 font-semibold max-w-2xl mx-auto leading-relaxed' >
385- { game . subtitle }
386- </ p >
387- </ div >
388-
389- { /* Stats Grid */ }
390- < div className = 'grid grid-cols-1 md:grid-cols-3 gap-6 mb-12' >
391- { /* XP Reward */ }
392- < div className = 'bg-gradient-to-br from-yellow-500/20 to-orange-500/20 border-2 border-yellow-400/50 rounded-2xl p-6 text-center transform hover:scale-105 transition-all duration-300' >
393- < div className = 'text-5xl mb-3' > ⭐</ div >
394- < div className = 'text-yellow-300 text-sm font-semibold uppercase tracking-wider mb-2' >
395- Earn XP
396- </ div >
397- < div className = 'text-white text-3xl font-black' >
398- { game . rewards . split ( '+' ) [ 0 ] . trim ( ) }
399- </ div >
400- </ div >
401-
402- { /* NFT Badge */ }
403- < div className = 'bg-gradient-to-br from-purple-500/20 to-pink-500/20 border-2 border-purple-400/50 rounded-2xl p-6 text-center transform hover:scale-105 transition-all duration-300' >
404- < div className = 'text-5xl mb-3' > 🏆</ div >
405- < div className = 'text-purple-300 text-sm font-semibold uppercase tracking-wider mb-2' >
406- Unlock Badge
407- </ div >
408- < div className = 'text-white text-xl font-black' >
409- { game . rewards . includes ( '+' ) ? game . rewards . split ( '+' ) [ 1 ] . trim ( ) : 'Exclusive NFT' }
410- </ div >
411- </ div >
412-
413- { /* Difficulty */ }
414- < div className = 'bg-gradient-to-br from-cyan-500/20 to-blue-500/20 border-2 border-cyan-400/50 rounded-2xl p-6 text-center transform hover:scale-105 transition-all duration-300' >
415- < div className = 'text-5xl mb-3' > 🎯</ div >
416- < div className = 'text-cyan-300 text-sm font-semibold uppercase tracking-wider mb-2' >
417- Difficulty
418- </ div >
419- < div className = 'text-white text-2xl font-black' >
420- { game . difficulty }
421- </ div >
422- </ div >
423- </ div >
424-
425- { /* Additional Info Row */ }
426- < div className = 'flex flex-wrap justify-center gap-4 mb-12' >
427- < div className = 'flex items-center gap-2 px-4 py-2 bg-white/10 rounded-full border border-white/20' >
428- < span className = 'text-2xl' > ⏱️</ span >
429- < span className = 'text-white font-semibold' > { game . estimatedTime } </ span >
430- </ div >
431- < div className = 'flex items-center gap-2 px-4 py-2 bg-white/10 rounded-full border border-white/20' >
432- < span className = 'text-2xl' > 👥</ span >
433- < span className = 'text-white font-semibold' > { game . currentPlayers . toLocaleString ( ) } Players</ span >
434- </ div >
435- < div className = 'flex items-center gap-2 px-4 py-2 bg-white/10 rounded-full border border-white/20' >
436- < span className = 'text-2xl' > ⭐</ span >
437- < span className = 'text-white font-semibold' > { game . rating } /5.0</ span >
438- </ div >
439- </ div >
440-
441- { /* Start Button */ }
442- < div className = 'text-center' >
443- < button
444- disabled = { ! isConnected }
445- className = { `group relative px-16 py-6 text-3xl font-black uppercase tracking-wider rounded-2xl transform transition-all duration-300 ${
446- isConnected
447- ? 'bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 hover:from-cyan-400 hover:via-purple-400 hover:to-pink-400 text-white shadow-2xl hover:scale-110 hover:shadow-cyan-500/50 animate-pulse'
448- : 'bg-gray-600 text-gray-400 cursor-not-allowed'
449- } `}
450- >
451- < span className = 'relative z-10 flex items-center justify-center gap-3' >
452- { isConnected ? (
453- < >
454- < span > 🎮</ span >
455- < span > Start Game</ span >
456- < span > 🚀</ span >
457- </ >
458- ) : (
459- < >
460- < span > 🔒</ span >
461- < span > Connect Wallet to Play</ span >
462- </ >
463- ) }
464- </ span >
465- { isConnected && (
466- < div className = 'absolute inset-0 bg-gradient-to-r from-cyan-400 via-purple-400 to-pink-400 rounded-2xl blur-xl opacity-50 group-hover:opacity-75 transition-opacity' > </ div >
467- ) }
468- </ button >
469-
470- { ! isConnected && (
471- < p className = 'text-white/70 text-sm mt-4' >
472- Connect your wallet to start playing and earning rewards
473- </ p >
474- ) }
475- </ div >
476-
477- { /* Feature Pills */ }
478- < div className = 'mt-12 pt-8 border-t border-white/20' >
479- < h4 className = 'text-center text-white/80 font-semibold mb-4 text-lg' >
480- What You'll Master:
481- </ h4 >
482- < div className = 'flex flex-wrap justify-center gap-3' >
483- { game . features . map ( ( feature , index ) => (
484- < span
485- key = { index }
486- className = 'px-4 py-2 bg-gradient-to-r from-purple-500/30 to-pink-500/30 border border-purple-400/50 text-purple-200 text-sm font-semibold rounded-full'
487- >
488- ✨ { feature }
489- </ span >
490- ) ) }
491- </ div >
492- </ div >
493- </ div >
353+ { /* Beta/Available Games - Show Actual Game */ }
354+ { ( game . status === 'beta' || game . status === 'available' ) && (
355+ < div className = 'mt-10' >
356+ { /* Game Container */ }
357+ < div className = 'relative' style = { { height : 'calc(100vh - 200px)' , minHeight : '600px' } } >
358+ < InfiniteRunner gameId = { gameId } gameTitle = { game . title } embedded = { true } />
494359 </ div >
495360 </ div >
496361 ) }
497362
498- { /* Development Games - Info Screen (Keep Current Design ) */ }
363+ { /* Development Games - Show Info Screen (old behavior ) */ }
499364 { game . status === 'development' && (
500- < div className = 'space-y-12 mt-10' >
365+ < div className = 'space-y-8 mt-10 mb-20 ' >
501366 { /* Game Header */ }
502367 < div className = 'text-center' >
503368 < h1 className = 'text-5xl md:text-7xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 via-purple-400 to-pink-400 mb-4' >
@@ -618,7 +483,8 @@ export default function GamePage() {
618483 autoOpen = { false }
619484 />
620485
621- < Footer />
486+ { /* Hide footer for beta games (where game is shown) */ }
487+ { game . status !== 'beta' && game . status !== 'available' && < Footer /> }
622488 </ div >
623489 ) ;
624490}
0 commit comments