<!-- Sidebar -->
<div :class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'" 
     class="fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-xl transform transition-transform duration-300 ease-in-out lg:translate-x-0 lg:static lg:inset-0">
    <div class="flex items-center justify-center h-16 bg-gradient-to-r from-blue-600 to-blue-700">
        <h1 class="text-xl font-bold text-white">Admin Panel</h1>
    </div>
    <nav class="mt-6">
        <div class="px-4 space-y-1">
<?php
$currentUri = $_SERVER['REQUEST_URI'];
$isIndex = (strpos($currentUri, '/admin/pages/') === false && strpos($currentUri, '/admin/slots/') === false && strpos($currentUri, '/admin/authors/') === false && strpos($currentUri, '/admin/') !== false);
$isPages = (strpos($currentUri, '/admin/pages/') !== false);
$isSlots = (strpos($currentUri, '/admin/slots/') !== false);
$isAuthors = (strpos($currentUri, '/admin/authors/') !== false);
?>
            <a href="/admin/" class="<?= $isIndex ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
                <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
                    <path d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"/>
                </svg>
                Site Settings
            </a>
            <a href="/admin/pages/" class="<?= $isPages ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
                <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
                    <path fill-rule="evenodd" d="M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z" clip-rule="evenodd"/>
                </svg>
                Dynamic Pages
            </a>
            <a href="/admin/slots/" class="<?= $isSlots ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
                <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
                    <path fill-rule="evenodd" d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" clip-rule="evenodd"/>
                </svg>
                Casino Slots
            </a>
            <a href="/admin/authors/" class="<?= $isAuthors ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
                <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
                    <path fill-rule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd"/>
                </svg>
                Authors
            </a>
        </div>
    </nav>
</div>