<?php
$cfg = cfg();
?>
<!doctype html>
<html lang="pl">
<head>
    <meta charset="utf-8">
    <title><?=htmlspecialchars($cfg['site_name'])?></title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css" />
    <script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>
    <link rel="stylesheet" href="assets/style.css?v=2">
    <script src="assets/script.js?v=2" defer></script>
    <style>
        /* NAPRAWA WYSTAJĄCEJ WYSZUKIWARKI */
        .search-container, .search-container input {
            box-sizing: border-box !important;
        }
        .search-container {
            width: 100%;
        }
        #searchInput {
            width: 100% !important;
        }
    </style>
</head>
<body>
    <div class="top-bar">
        <a href="index.php" class="logo">☁️ <?=htmlspecialchars($cfg['site_name'])?></a>
        <div class="top-controls">
            <button id="btnToggleTheme" class="btn btn-gray">🌙 Motyw</button>
            <button id="btnToggleView" class="btn btn-gray">🔲 Widok</button>
            <a href="index.php?logout=1" class="btn btn-gray" style="margin-left: 10px;">🚪 Wyloguj</a>
        </div>
    </div>

    <div class="search-container">
        <div style="position: relative;">
            <input type="text" id="searchInput" placeholder="&#128269; Szukaj plików (min. 3 znaki)..." autocomplete="off">
            <div id="searchResults" class="search-dropdown" style="display: none;"></div>
        </div>
    </div>
    
    <div class="content-box">
