</main>

<!-- Mobile spacer for fixed footer -->
<div class="h-16 sm:hidden"></div>

<footer class="fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 py-4 z-40">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col sm:flex-row items-center justify-between gap-2 text-sm text-gray-500 dark:text-gray-400">
        <span>&copy; 2026 NotaphilyCatalogue. All Rights Reserved. Built by <a href="#" onclick="this.href='mailto:'+['ljubomirlukic','gmail.com'].join('@');return true;" class="text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 transition-colors" aria-label="Contact developer via email">LJ</a></span>
        <div class="flex items-center space-x-4">
            <a href="<?= APP_URL ?>/articles" class="hover:text-primary-600 dark:hover:text-primary-400 transition-colors"><?= Lang::get('articles') ?></a>
            <a href="<?= APP_URL ?>/support" class="hover:text-primary-600 dark:hover:text-primary-400 transition-colors"><?= Lang::get('support') ?></a>
            <a href="<?= APP_URL ?>/contact" class="hover:text-primary-600 dark:hover:text-primary-400 transition-colors"><?= Lang::get('contact') ?></a>
            <a href="<?= APP_URL ?>/privacy" class="hover:text-primary-600 dark:hover:text-primary-400 transition-colors"><?= Lang::get('privacy') ?></a>
            <a href="<?= APP_URL ?>/terms" class="hover:text-primary-600 dark:hover:text-primary-400 transition-colors"><?= Lang::get('terms') ?></a>
        </div>
    </div>
</footer>

<!-- Custom Confirmation Modal -->
<div id="confirmModal" class="fixed inset-0 bg-black/50 z-50 hidden flex items-center justify-center p-4" role="dialog" aria-modal="true" aria-labelledby="confirmModalHeading">
    <div class="bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6 max-w-sm w-full shadow-2xl">
        <div class="flex items-center mb-4">
            <div class="w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center mr-3">
                <svg class="w-5 h-5 text-red-600 dark:text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"/></svg>
            </div>
            <h3 id="confirmModalHeading" class="text-lg font-semibold text-gray-900 dark:text-gray-100"><?= Lang::get('confirm_delete') ?></h3>
        </div>
        <p id="confirmMessage" class="text-gray-600 dark:text-gray-400 mb-6"></p>
        <div class="flex gap-3 justify-end">
            <button id="cancelConfirmBtn" class="btn-gradient btn-gradient-gray btn-gradient-sm"><?= Lang::get('cancel') ?></button>
            <button id="confirmBtn" class="btn-gradient btn-gradient-red btn-gradient-sm"><?= Lang::get('delete') ?></button>
        </div>
    </div>
</div>

<script src="<?= APP_URL ?>/js/app.js"></script>
<script src="<?= APP_URL ?>/js/cookie-consent.js"></script>
<script src="<?= APP_URL ?>/js/cloudflare-fix.js"></script>
<script>
window.NUMISTA_I18N = {
    unknown: <?= json_encode(Lang::get('unknown')) ?>,
    reference: <?= json_encode(Lang::get('reference')) ?>,
    noResults: <?= json_encode(Lang::get('numista_no_results')) ?>,
    searchError: <?= json_encode(Lang::get('numista_search_error')) ?>,
    connectionError: <?= json_encode(Lang::get('numista_connection_error')) ?>,
    fillError: <?= json_encode(Lang::get('numista_fill_error')) ?>
};
</script>
<script src="<?= APP_URL ?>/js/numista.js"></script>
<?php if (isset($extraJs)): ?>
    <?php foreach ($extraJs as $js): ?>
        <script src="<?= APP_URL ?>/js/<?= $js ?>"></script>
    <?php endforeach; ?>
<?php endif; ?>
</body>
</html>
