<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI Image of the day</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            background: black;
        }
        img {
            width: 100vw;
            height: 100vh;
            object-fit: contain;
        }
    </style>
    <script>
        setInterval(() => {
            location.reload();
        }, {{ reload_interval }});  // Refresh every 5 seconds
    </script>
</head>
<body>
    {% if image %}
        <img src="{{ url_for('images', filename=image) }}" alt="Latest Image">
    {% else %}
        <p style="color: white;">No images found</p>
    {% endif %}
</body>
</html>