<!DOCTYPE html>
<html lang="en" class="h-full dark">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo e(pagetitle()->get()); ?></title>
    <meta name="description" content="">
    <meta name="author" content="">
    
    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    
    <!-- Styles -->
    <link href="<?php echo e(asset('build/app.css')); ?>" rel="stylesheet">
    
    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <!-- Favicon -->
    <link rel="shortcut icon" href="<?php echo e(asset('favicon.ico')); ?>">
    
    <?php echo $__env->yieldContent('styles'); ?>
</head>
<body class="h-full bg-gradient-dark text-dark-800 antialiased">
    <div class="min-h-full">
        <!-- Navigation -->
        <nav class="navbar">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-2">
                <div class="flex justify-between h-20 items-center">
                    <!-- Logo -->
                    <div class="flex items-center">
                        <a href="<?php echo e(url('/')); ?>" class="text-xl font-bold text-dark-800 hover:text-primary-400 transition-colors">
                            <?php echo e(settings('server_name', 'Perfect World Panel')); ?>

                        </a>
                    </div>

                    <!-- Desktop Navigation -->
                    <div class="hidden md:flex md:items-center md:space-x-8">
                        <!-- News -->
                        <a href="<?php echo e(url('/')); ?>" 
                           class="px-3 py-2 text-sm font-medium rounded-lg transition-colors <?php echo e(Request::is('/') ? 'bg-primary-500/20 text-primary-400' : 'text-dark-600 hover:text-primary-400 hover:bg-dark-200/50'); ?>">
                            <i class="fas fa-newspaper mr-2"></i><?php echo e(trans('main.apps.news')); ?>

                        </a>

                        <!-- Community Dropdown -->
                        <div class="relative" x-data="{ open: false }">
                            <button @click="open = !open" 
                                    class="flex items-center px-3 py-2 text-sm font-medium rounded-lg transition-colors <?php echo e(Request::is('ranking*') || Request::is('daily-spin*') ? 'bg-primary-500/20 text-primary-400' : 'text-dark-600 hover:text-primary-400 hover:bg-dark-200/50'); ?>">
                                <i class="fas fa-users mr-2"></i><?php echo e(trans('main.community')); ?>

                                <svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                </svg>
                            </button>
                            
                            <div x-show="open" @click.away="open = false" 
                                 x-transition:enter="transition ease-out duration-100"
                                 x-transition:enter-start="transform opacity-0 scale-95"
                                 x-transition:enter-end="transform opacity-100 scale-100"
                                 x-transition:leave="transition ease-in duration-75"
                                 x-transition:leave-start="transform opacity-100 scale-100"
                                 x-transition:leave-end="transform opacity-0 scale-95"
                                 class="absolute right-0 mt-2 w-48 rounded-lg shadow-xl border border-gray-600 py-1 z-50"
                                 style="background-color: #1f2937 !important; backdrop-filter: blur(10px);">
                                <a href="<?php echo e(url('/ranking')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-trophy mr-2"></i><?php echo e(trans('main.apps.ranking')); ?>

                                </a>
                                <a href="<?php echo e(url('/daily-spin')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-sync-alt mr-2"></i><?php echo e(trans('main.apps.daily-spin')); ?>

                                </a>
                                <a href="<?php echo e(url('/vote')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-thumbs-up mr-2"></i><?php echo e(trans('main.apps.vote')); ?>

                                </a>
                                <a href="<?php echo e(url('/wiki')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-book mr-2"></i><?php echo e(trans('main.apps.wiki')); ?>

                                </a>
                            </div>
                        </div>

                        <!-- Services Dropdown -->
                        <div class="relative" x-data="{ open: false }">
                            <button @click="open = !open" 
                                    class="flex items-center px-3 py-2 text-sm font-medium rounded-lg transition-colors <?php echo e(Request::is('services*') || Request::is('voucher*') || Request::is('donate*') || Request::is('shop*') ? 'bg-primary-500/20 text-primary-400' : 'text-dark-600 hover:text-primary-400 hover:bg-dark-200/50'); ?>">
                                <i class="fas fa-cogs mr-2"></i><?php echo e(trans('main.services')); ?>

                                <svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                </svg>
                            </button>
                            
                            <div x-show="open" @click.away="open = false" 
                                 x-transition:enter="transition ease-out duration-100"
                                 x-transition:enter-start="transform opacity-0 scale-95"
                                 x-transition:enter-end="transform opacity-100 scale-100"
                                 x-transition:leave="transition ease-in duration-75"
                                 x-transition:leave-start="transform opacity-100 scale-100"
                                 x-transition:leave-end="transform opacity-0 scale-95"
                                 class="absolute right-0 mt-2 w-48 rounded-lg shadow-xl border border-gray-600 py-1 z-50"
                                 style="background-color: #1f2937 !important; backdrop-filter: blur(10px);">
                                <a href="<?php echo e(url('/shop')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-shopping-cart mr-2"></i><?php echo e(trans('main.apps.shop')); ?>

                                </a>
                                <a href="<?php echo e(url('/donate')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-credit-card mr-2"></i><?php echo e(trans('main.apps.donate')); ?>

                                </a>
                                <a href="<?php echo e(url('/services')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-tools mr-2"></i><?php echo e(trans('main.apps.services')); ?>

                                </a>
                                <a href="<?php echo e(url('/voucher')); ?>" class="block px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors" style="background-color: transparent;" onmouseover="this.style.backgroundColor='#374151'" onmouseout="this.style.backgroundColor='transparent'">
                                    <i class="fas fa-tag mr-2"></i><?php echo e(trans('main.apps.voucher')); ?>

                                </a>
                            </div>
                        </div>
                    </div>

                    <!-- Language Selector -->
                    <div class="relative" x-data="{ open: false }">
                        <button @click="open = !open" 
                                class="flex items-center px-3 py-2 text-sm font-medium rounded-lg transition-colors text-dark-600 hover:text-primary-400 hover:bg-dark-200/50">
                            <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"></path>
                            </svg>
                            <?php echo e(strtoupper(App::getLocale())); ?>

                            <svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                            </svg>
                        </button>
                        
                        <div x-show="open" @click.away="open = false" 
                             x-transition:enter="transition ease-out duration-100"
                             x-transition:enter-start="transform opacity-0 scale-95"
                             x-transition:enter-end="transform opacity-100 scale-100"
                             x-transition:leave="transition ease-in duration-75"
                             x-transition:leave-start="transform opacity-100 scale-100"
                             x-transition:leave-end="transform opacity-0 scale-95"
                             class="absolute right-0 mt-2 w-48 rounded-lg shadow-xl border border-gray-600 py-1 z-50"
                             style="background-color: #1f2937 !important; backdrop-filter: blur(10px);">
                            <?php foreach($languages as $language): ?>
                                <a href="?language=<?php echo e($language); ?>" 
                                   class="flex items-center px-4 py-2 text-sm text-gray-200 hover:text-primary-400 transition-colors <?php echo e(App::getLocale() == $language ? 'bg-primary-500/20 text-primary-400' : ''); ?>" 
                                   style="background-color: <?php echo e(App::getLocale() == $language ? 'rgba(59, 130, 246, 0.2)' : 'transparent'); ?>;" 
                                   onmouseover="if('<?php echo e(App::getLocale()); ?>' !== '<?php echo e($language); ?>') this.style.backgroundColor='#374151'" 
                                   onmouseout="if('<?php echo e(App::getLocale()); ?>' !== '<?php echo e($language); ?>') this.style.backgroundColor='transparent'">
                                    <?php if($language == 'en'): ?>
                                        <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjE1IiBmaWxsPSIjMDEyMTY5Ii8+CjxwYXRoIGQ9Ik0wIDBoMjB2MS4yNUgwVjB6bTAgMi41aDIwdjEuMjVIMFYyLjV6bTAgMi41aDIwdjEuMjVIMFY1em0wIDIuNWgyMHYxLjI1SDBWNy41em0wIDIuNWgyMHYxLjI1SDBWMTB6bTAgMi41aDIwVjE1SDBWMTIuNXoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0wIDBoOHY3LjVIMFYweiIgZmlsbD0iIzAxMjE2OSIvPgo8cGF0aCBkPSJNMSAxaDZ2MUgxVjF6bTAgMmg2djFIMVYzem0wIDJoNnYxSDFWNXoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0wIDcuNWgyMHYxLjI1SDBWNy41eiIgZmlsbD0iI0ZGMDAwMCIvPgo8cGF0aCBkPSJNOC41IDBoMS4yNXY3LjVIOC41VjB6IiBmaWxsPSIjRkYwMDAwIi8+CjxwYXRoIGQ9Ik0wIDBoMjBMMTAgNy41IDAgMHoiIGZpbGw9IiNGRjAwMDAiIG9wYWNpdHk9IjAuMyIvPgo8cGF0aCBkPSJNMjAgMEwwIDE1aDIwTDEwIDcuNSAyMCAweiIgZmlsbD0iI0ZGMDAwMCIgb3BhY2l0eT0iMC4zIi8+Cjwvc3ZnPgo=" alt="EN" class="w-5 h-4 mr-3 rounded">
                                        <?php echo e(trans('language.' . $language)); ?>

                                    <?php elseif($language == 'id'): ?>
                                        <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjcuNSIgZmlsbD0iI0ZGMDAwMCIvPgo8cmVjdCB5PSI3LjUiIHdpZHRoPSIyMCIgaGVpZ2h0PSI3LjUiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=" alt="ID" class="w-5 h-4 mr-3 rounded">
                                        <?php echo e(trans('language.' . $language)); ?>

                                    <?php elseif($language == 'pt'): ?>
                                        <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjE1IiBmaWxsPSIjRkYwMDAwIi8+CjxyZWN0IHdpZHRoPSI4IiBoZWlnaHQ9IjE1IiBmaWxsPSIjMDA2NjAwIi8+CjxjaXJjbGUgY3g9IjgiIGN5PSI3LjUiIHI9IjMiIGZpbGw9IiNGRkRGMDAiLz4KPGNpcmNsZSBjeD0iOCIgY3k9IjcuNSIgcj0iMi41IiBmaWxsPSIjMDA1MkZGIi8+CjxyZWN0IHg9IjYuNSIgeT0iNiIgd2lkdGg9IjMiIGhlaWdodD0iMyIgZmlsbD0iI0ZGMDAwMCIvPgo8L3N2Zz4K" alt="PT" class="w-5 h-4 mr-3 rounded">
                                        <?php echo e(trans('language.' . $language)); ?>

                                    <?php elseif($language == 'ru'): ?>
                                        <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjUiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHk9IjUiIHdpZHRoPSIyMCIgaGVpZ2h0PSI1IiBmaWxsPSIjMDA1MkZGIi8+CjxyZWN0IHk9IjEwIiB3aWR0aD0iMjAiIGhlaWdodD0iNSIgZmlsbD0iI0ZGMDAwMCIvPgo8L3N2Zz4K" alt="RU" class="w-5 h-4 mr-3 rounded">
                                        <?php echo e(trans('language.' . $language)); ?>

                                    <?php else: ?>
                                        <div class="w-5 h-4 mr-3 bg-gray-300 rounded flex items-center justify-center text-xs font-bold text-gray-600">
                                            <?php echo e(strtoupper($language)); ?>

                                        </div>
                                        <?php echo e(trans('language.' . $language)); ?>

                                    <?php endif; ?>
                                </a>
                            <?php endforeach; ?>
                        </div>
                    </div>

                    <!-- User Menu -->
                    <div class="flex items-center space-x-4">
                        <?php if(Auth::guest()): ?>
                            <a href="<?php echo e(url('auth/login')); ?>" class="btn btn-primary">
                                <?php echo e(trans('main.login_link')); ?>

                            </a>
                        <?php else: ?>
                            <!-- Balance (Desktop) -->
                            <div class="hidden md:block text-sm text-dark-500">
                                <a href="<?php echo e(url('donate')); ?>" class="hover:text-primary-400 transition-colors px-3 py-1 rounded-lg hover:bg-dark-200/50 flex items-center">
                                    <i class="fas fa-wallet mr-2"></i><?php echo e(Auth::user() ? Auth::user()->balance() : '0.00'); ?> <?php echo e(settings('currency_name', 'coins')); ?>

                                </a>
                            </div>

                            <?php /* $roles is provided by the ViewServiceProvider composer */ ?>

                            <!-- Character Selector -->
                            <div class="relative" x-data="{ open: false }">
                                <button @click="open = !open" 
                                        class="flex items-center space-x-2 text-sm text-gray-700 hover:text-primary-600 transition-colors">
                                    <span><?php echo e((Auth::user() && Auth::user()->characterId()) ? Auth::user()->characterName() : trans('main.select_character')); ?></span>
                                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                    </svg>
                                </button>
                                
                                <div x-show="open" @click.away="open = false" 
                                     x-transition:enter="transition ease-out duration-100"
                                     x-transition:enter-start="transform opacity-0 scale-95"
                                     x-transition:enter-end="transform opacity-100 scale-100"
                                     x-transition:leave="transition ease-in duration-75"
                                     x-transition:leave-start="transform opacity-100 scale-100"
                                     x-transition:leave-end="transform opacity-0 scale-95"
                                     class="dropdown-menu">
                                    <?php if($api->online): ?>
                                        <?php /* roles are provided by the view composer; avoid inline API calls here */ ?>
                                        <?php if(count($roles) > 0): ?>
                                            <?php foreach($roles as $role): ?>
                                                <a href="<?php echo e(url('character/select/' . $role['id'])); ?>" class="dropdown-item">
                                                    <?php echo e($role['name']); ?>

                                                </a>
                                            <?php endforeach; ?>
                                        <?php else: ?>
                                            <span class="dropdown-item text-gray-500">
                                                <?php echo e(trans('main.char_list_error')); ?>

                                            </span>
                                        <?php endif; ?>
                                    <?php else: ?>
                                        <span class="dropdown-item text-gray-500">
                                            <?php echo e(trans('main.server_not_online')); ?>

                                        </span>
                                    <?php endif; ?>
                                </div>
                            </div>

                            <!-- User Menu -->
                            <div class="relative" x-data="{ open: false }">
                                <button @click="open = !open" 
                                        class="flex items-center space-x-2 text-sm text-gray-700 hover:text-primary-600 transition-colors">
                                    <?php if(!$agent->isMobile() && Auth::user()): ?>
                                        <img class="w-8 h-8 rounded-full" src="<?php echo e(Avatar::create(strtoupper(Auth::user()->name))->toBase64()); ?>" alt="<?php echo e(Auth::user()->name); ?>">
                                    <?php endif; ?>
                                    <span><?php echo e(Auth::user() ? Auth::user()->name : 'Guest'); ?></span>
                                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
                                    </svg>
                                </button>
                                
                                <div x-show="open" @click.away="open = false" 
                                     x-transition:enter="transition ease-out duration-100"
                                     x-transition:enter-start="transform opacity-0 scale-95"
                                     x-transition:enter-end="transform opacity-100 scale-100"
                                     x-transition:leave="transition ease-in duration-75"
                                     x-transition:leave-start="transform opacity-100 scale-100"
                                     x-transition:leave-end="transform opacity-0 scale-95"
                                     class="dropdown-menu">
                                    <?php if(Auth::user() && Auth::user()->isAdmin()): ?>
                                        <a href="<?php echo e(url('admin')); ?>" target="_blank" class="dropdown-item">
                                            <svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
                                            </svg>
                                            <?php echo e(trans('main.acp_link')); ?>

                                        </a>
                                    <?php endif; ?>
                                    <a href="<?php echo e(url('account/settings')); ?>" class="dropdown-item">
                                        <svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
                                        </svg>
                                        <?php echo e(trans('main.acc_settings')); ?>

                                    </a>
                                    <div class="border-t border-gray-100 my-1"></div>
                                    <a href="<?php echo e(url('auth/logout')); ?>" class="dropdown-item text-red-600 hover:bg-red-50">
                                        <svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path>
                                        </svg>
                                        <?php echo e(trans('main.logout')); ?>

                                    </a>
                                </div>
                            </div>
                        <?php endif; ?>



                        <!-- Mobile menu button -->
                        <button id="mobile-menu-button" class="md:hidden p-2 rounded-md text-gray-700 hover:text-primary-600 hover:bg-gray-100 transition-colors">
                            <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
                            </svg>
                        </button>
                    </div>
                </div>

                <!-- Mobile Navigation -->
                <div id="mobile-menu" class="hidden md:hidden border-t border-gray-200 pt-4 pb-3">
                    <!-- News -->
                    <a href="<?php echo e(url('/')); ?>" 
                       class="block px-3 py-2 text-base font-medium rounded-md transition-colors <?php echo e(Request::is('/') ? 'bg-primary-100 text-primary-700' : 'text-gray-700 hover:text-primary-600 hover:bg-gray-100'); ?>">
                        <?php echo e(trans('main.apps.news')); ?>

                    </a>

                    <!-- Community Section -->
                    <div class="mt-3">
                        <div class="px-3 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider"><?php echo e(trans('main.community')); ?></div>
                        <a href="<?php echo e(url('/ranking')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.ranking')); ?>

                        </a>
                        <a href="<?php echo e(url('/daily-spin')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.daily-spin')); ?>

                        </a>
                        <a href="<?php echo e(url('/vote')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.vote')); ?>

                        </a>
                        <a href="<?php echo e(url('/wiki')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('wiki.wiki')); ?>

                        </a>
                    </div>

                    <!-- Services Section -->
                    <div class="mt-3">
                        <div class="px-3 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider"><?php echo e(trans('main.services')); ?></div>
                        <a href="<?php echo e(url('/shop')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.shop')); ?>

                        </a>
                        <a href="<?php echo e(url('/donate')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.donate')); ?>

                        </a>
                        <a href="<?php echo e(url('/services')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.services')); ?>

                        </a>
                        <a href="<?php echo e(url('/voucher')); ?>" class="block px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors">
                            <?php echo e(trans('main.apps.voucher')); ?>

                        </a>
                    </div>

                    <!-- Language Section -->
                    <div class="mt-3">
                        <div class="px-3 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider"><?php echo e(trans('main.language')); ?></div>
                        <?php foreach($languages as $language): ?>
                            <a href="?language=<?php echo e($language); ?>" 
                               class="flex items-center px-6 py-2 text-sm text-gray-700 hover:text-primary-600 hover:bg-gray-100 rounded-md transition-colors <?php echo e(App::getLocale() == $language ? 'bg-primary-100 text-primary-700' : ''); ?>">
                                <?php if($language == 'en'): ?>
                                    <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjE1IiBmaWxsPSIjMDEyMTY5Ii8+CjxwYXRoIGQ9Ik0wIDBoMjB2MS4yNUgwVjB6bTAgMi41aDIwdjEuMjVIMFYyLjV6bTAgMi41aDIwdjEuMjVIMFY1em0wIDIuNWgyMHYxLjI1SDBWNy41em0wIDIuNWgyMHYxLjI1SDBWMTB6bTAgMi41aDIwVjE1SDBWMTIuNXoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0wIDBoOHY3LjVIMFYweiIgZmlsbD0iIzAxMjE2OSIvPgo8cGF0aCBkPSJNMSAxaDZ2MUgxVjF6bTAgMmg2djFIMVYzem0wIDJoNnYxSDFWNXoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0wIDcuNWgyMHYxLjI1SDBWNy41eiIgZmlsbD0iI0ZGMDAwMCIvPgo8cGF0aCBkPSJNOC41IDBoMS4yNXY3LjVIOC41VjB6IiBmaWxsPSIjRkYwMDAwIi8+CjxwYXRoIGQ9Ik0wIDBoMjBMMTAgNy41IDAgMHoiIGZpbGw9IiNGRjAwMDAiIG9wYWNpdHk9IjAuMyIvPgo8cGF0aCBkPSJNMjAgMEwwIDE1aDIwTDEwIDcuNSAyMCAweiIgZmlsbD0iI0ZGMDAwMCIgb3BhY2l0eT0iMC4zIi8+Cjwvc3ZnPgo=" alt="EN" class="w-5 h-4 mr-3 rounded">
                                    <?php echo e(trans('language.' . $language)); ?>

                                <?php elseif($language == 'id'): ?>
                                    <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjcuNSIgZmlsbD0iI0ZGMDAwMCIvPgo8cmVjdCB5PSI3LjUiIHdpZHRoPSIyMCIgaGVpZ2h0PSI3LjUiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=" alt="ID" class="w-5 h-4 mr-3 rounded">
                                    <?php echo e(trans('language.' . $language)); ?>

                                <?php elseif($language == 'pt'): ?>
                                    <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjE1IiBmaWxsPSIjMDA5NzM5Ii8+CjxyZWN0IHg9IjciIHdpZHRoPSIxMyIgaGVpZ2h0PSIxNSIgZmlsbD0iI0ZGREYwMCIvPgo8cmVjdCB4PSIxNCIgd2lkdGg9IjYiIGhlaWdodD0iMTUiIGZpbGw9IiNGRjAwMDAiLz4KPC9zdmc+Cg==" alt="PT" class="w-5 h-4 mr-3 rounded">
                                    <?php echo e(trans('language.' . $language)); ?>

                                <?php elseif($language == 'ru'): ?>
                                    <img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjUiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHk9IjUiIHdpZHRoPSIyMCIgaGVpZ2h0PSI1IiBmaWxsPSIjMDA1MkZGIi8+CjxyZWN0IHk9IjEwIiB3aWR0aD0iMjAiIGhlaWdodD0iNSIgZmlsbD0iI0ZGMDAwMCIvPgo8L3N2Zz4K" alt="RU" class="w-5 h-4 mr-3 rounded">
                                    <?php echo e(trans('language.' . $language)); ?>

                                <?php else: ?>
                                    <div class="w-5 h-4 mr-3 bg-gray-300 rounded flex items-center justify-center text-xs font-bold text-gray-600">
                                        <?php echo e(strtoupper($language)); ?>

                                    </div>
                                    <?php echo e(trans('language.' . $language)); ?>

                                <?php endif; ?>
                            </a>
                        <?php endforeach; ?>
                    </div>
                    
                    <?php if(Auth::check()): ?>
                        <div class="border-t border-gray-200 mt-3 pt-3">
                            <div class="px-3 py-2 text-sm text-gray-600 flex items-center">
                                <i class="fas fa-wallet mr-2"></i><?php echo e(Auth::user() ? Auth::user()->balance() : '0.00'); ?> <?php echo e(settings('currency_name', 'coins')); ?>

                            </div>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
        </nav>

        <!-- Breadcrumbs -->
        <?php if(class_exists('Breadcrumbs') && method_exists('Breadcrumbs', 'exists') && Breadcrumbs::exists()): ?>
            <div class="bg-white border-b border-gray-200">
                <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3">
                    <?php echo Breadcrumbs::render(); ?>

                </div>
            </div>
        <?php endif; ?>

        <?php if(Request::is('/')): ?>
            <!-- Full Width Main Content for Home Page Only -->
            <main>
                <!-- Flash Messages -->
                <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                    <?php echo $__env->make('errors.list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <?php echo $__env->make('flash::message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                </div>
                <?php echo $__env->yieldContent('content'); ?>
            </main>
        <?php else: ?>
            <!-- Constrained Main Content with Sidebar for All Other Pages -->
            <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
                <!-- Flash Messages -->
                <?php echo $__env->make('errors.list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php echo $__env->make('flash::message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                <div class="grid grid-cols-1 <?php echo e(Request::is('shop*') ? '' : 'lg:grid-cols-4'); ?> gap-8">
                    <!-- Main Content -->
                    <div class="<?php echo e(Request::is('shop*') ? 'col-span-1' : 'lg:col-span-3'); ?>">
                        <?php echo $__env->yieldContent('content'); ?>
                    </div>

                    <!-- Sidebar -->
                    <?php if ( ! (Request::is('shop*'))): ?>
                        <div class="lg:col-span-1">
                            <?php echo $__env->make('front.layouts.widgets', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </div>
                    <?php endif; ?>
                </div>
            </main>
        <?php endif; ?>

        <!-- Footer -->
        <?php echo $__env->make('front.layouts.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    </div>

    <!-- Scripts -->
    <script src="<?php echo e(asset('build/app.js')); ?>"></script>
    <?php echo $__env->yieldContent('scripts'); ?>
    <?php echo $__env->yieldContent('footer'); ?>
</body>
</html>