<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Eagle</title>
    <link rel="icon" href="https://raw.githubusercontent.com/SillyBoy0216/Html/main/assets/Eagle.png" type="image/png" sizes="164x164">
    <style>
        @font-face {
            font-family: 'Proggy';
            src: url('fonts/proggy.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
        }

        body, html {
            height: 100%;
            margin: 0;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            flex-direction: column;
            background-color: black;
        }

        h1 {
            font-family: 'Proggy', monospace;
            font-size: 6em;
            font-weight: bold;
            background: linear-gradient(90deg, #d9d9d9, #c0c0c0, #ffffff, #c0c0c0, #d9d9d9);
            background-size: 200% auto;
            color: transparent;
            background-clip: text;
            -webkit-background-clip: text;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            margin-top: 20px;
            border-right: 0.1em solid;
            animation: blink 0.75s step-end infinite;
        }

        @keyframes blink {
            50% { border-color: transparent; }
        }

        .vouch {
            font-family: 'Proggy', monospace;
            color: #d9d9d9;
            background-color: #202020;
            margin: 10px 0;
            padding: 15px;
            border-radius: 8px;
            width: 80%;
            text-align: left;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
        }

        .vouch img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            vertical-align: middle;
            margin-right: 10px;
        }

        .vouch p {
            display: inline-block;
            vertical-align: middle;
            margin: 0;
            color: #ffffff;
        }
    </style>
</head>
<body>
    <h1>Vouches</h1>
    <div id="vouches"></div>

    <script>
        async function fetchVouches() {
            try {
                const response = await fetch('vouches.json');
                const vouches = await response.json();

                const vouchesContainer = document.getElementById('vouches');
                vouchesContainer.innerHTML = '';

                vouches.forEach((vouch) => {
                    const vouchElement = document.createElement('div');
                    vouchElement.classList.add('vouch');
                    vouchElement.innerHTML = `
                        <img src="${vouch.avatar}" alt="Avatar">
                        <p><strong>${vouch.username}</strong><br>${vouch.stars} - ${vouch.message}</p>
                    `;
                    vouchesContainer.appendChild(vouchElement);
                });
            } catch (error) {
                console.error('Error fetching vouches:', error);
            }
        }

        // Fetch vouches on page load
        fetchVouches();

        // Optional: Refresh vouches every 30 seconds
        setInterval(fetchVouches, 30000);
    </script>
</body>
</html>