@extends('layouts.app') @section('title', 'Elite Gaming Challenge Platform') @section('content')

Welcome to Agamec

The Ultimate Competitive Gaming Platform

Challenge elite players worldwide, compete in high-stakes tournaments, and transform your gaming skills into real rewards on Africa's premier gaming battleground.

@guest @else @endguest

Platform Dominance

Real numbers from real competitions

{{ number_format($platformStats['total_players']) }}
Elite Players
{{ number_format($platformStats['total_challenges']) }}
Challenges Fought
{{ number_format($platformStats['total_tournaments']) }}
Tournaments Hosted
₦{{ number_format($platformStats['total_prize_pool'], 0) }}
Prize Pool Distributed
{{ number_format($platformStats['active_competitions']) }}
Live Competitions
@auth @if(($pendingTournamentInvites && $pendingTournamentInvites->count() > 0) || ($pendingChallengeInvites && $pendingChallengeInvites->count() > 0) || ($pendingFriendRequests && $pendingFriendRequests->count() > 0))
@if($pendingChallengeInvites && $pendingChallengeInvites->count() > 0)

⚔️ Challenge Invitations

@foreach($pendingChallengeInvites as $invite)

{{ $invite->challenge->game->name }} Challenge

Best of {{ $invite->challenge->best_of }}

Invited by {{ $invite->inviter->username }}

Wager: ₦{{ number_format($invite->challenge->wager_amount) }}
Total Prize: ₦{{ number_format($invite->challenge->wager_amount * 2) }}
Created: {{ $invite->challenge->created_at->diffForHumans() }}
Expires: {{ $invite->expires_at?->diffForHumans() ?? 'Soon' }}
@if($invite->message)

"{{ $invite->message }}"

@endif
@csrf
@csrf
@endforeach
@endif @if($pendingTournamentInvites && $pendingTournamentInvites->count() > 0)

🎮 Tournament Invitations

@foreach($pendingTournamentInvites as $invite)

{{ $invite->tournament->title }}

{{ $invite->tournament->game->name }}

Invited by {{ $invite->inviter->username }}

Entry Fee: ₦{{ number_format($invite->tournament->entry_fee) }}
Prize Pool: ₦{{ number_format($invite->tournament->prize_pool) }}
Starts: {{ $invite->tournament->starts_at?->format('M j, g:i A') ?? 'TBD' }}
Expires: {{ $invite->expires_at?->diffForHumans() ?? 'Soon' }}
@if($invite->message)

"{{ $invite->message }}"

@endif
@csrf
@csrf
@endforeach
@endif @if($pendingFriendRequests && $pendingFriendRequests->count() > 0)

👥 Friend Requests

@foreach($pendingFriendRequests as $request)
{{ substr($request->user->username, 0, 2) }}

{{ $request->user->username }}

Level {{ $request->user->level }}

@if($request->message)

"{{ $request->message }}"

@endif
@csrf
@csrf
@endforeach
@endif
@endif @endauth @if($featuredTournaments->count() > 0)

Featured Tournaments

@foreach($featuredTournaments as $tournament)

{{ $tournament->title }}

{{ strtoupper($tournament->type) }}

{{ $tournament->game->name }}

₦{{ number_format($tournament->prize_pool) }} Prize {{ $tournament->participants_count ?? 0 }} players
Entry: ₦{{ number_format($tournament->entry_fee) }} View
@endforeach
View All Tournaments
@endif @if($openChallenges->count() > 0)

Open Challenges

@foreach($openChallenges as $challenge)

{{ $challenge->game->name }}

₦{{ number_format($challenge->wager_amount) }}

by {{ $challenge->creator->username }}

Best of {{ $challenge->best_of }} Accept
@endforeach
@endif @if($recentActivity->count() > 0)

Recent Activity

@foreach($recentActivity as $activity)
{{ $activity->getWinner()?->username ?? 'Unknown' }} won against {{ $activity->result === 'creator_win' ? $activity->accepter->username : $activity->creator->username }} in {{ $activity->game->name }}
₦{{ number_format($activity->wager_amount * 2) }}
@endforeach
@endif @endsection