<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{ucwords(Lang::T($type))} - {$_c['CompanyName']}</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
    <link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
    <link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
    <meta http-equiv="refresh" content="{$time}; url={$url}">

    <!-- Custom Styles -->
    <style>
        /* Background image */
        body {
            background: url('https://therichpost.com/wp-content/uploads/2021/03/material-design-4k-2048x1152-1.jpg') no-repeat center center fixed;
            background-size: cover;
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .lockscreen-wrapper {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
        }

        .card {
            width: 350px;
            margin: 10px;
            background: rgba(255, 255, 255, 0.85); /* Slight transparency to see the background */
            border-radius: 15px;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            animation: floating 1s ease-in-out infinite alternate;
        }

        .card-heading {
            background: #007bff;
            color: #fff;
            text-align: center;
            padding: 15px;
            font-size: 18px;
            font-weight: bold;
        }

        .card-body {
            padding: 20px;
            font-size: 16px;
            color: #333;
            text-align: center;
        }

        .card-footer {
            padding: 15px;
            text-align: center;
            background: #f1f1f1;
        }

        .btn {
            padding: 10px 20px;
            border-radius: 5px;
            transition: background-color 0.3s;
        }

        .btn-{$type} {
            background-color: #007bff;
            border: none;
            color: #fff;
            width: 100%;
        }

        .btn-{$type}:hover {
            background-color: #0056b3;
        }

        .lockscreen-footer {
            font-size: 14px;
            text-align: center;
            padding-top: 15px;
            color: #777;
        }

        /* Floating animation */
        @keyframes floating {
            0% {
                transform: translateY(-10px);
            }

            100% {
                transform: translateY(10px);
            }
        }

        /* Responsive design */
        @media (max-width: 600px) {
            .card {
                width: 90%;
            }
        }
    </style>

</head>

<body class="hold-transition lockscreen">
    <div class="lockscreen-wrapper">
        <div class="card card-{$type}">
            <div class="card-heading">{ucwords(Lang::T($type))}</div>
            <div class="card-body">
                {$text}
            </div>
            <div class="card-footer">
                <a href="{$url}" id="button" class="btn btn-{$type} btn-block">{Lang::T('Click Here')} ({$time})</a>
            </div>
            <div class="lockscreen-footer text-center">
                {$_c['CompanyName']}
            </div>
        </div>
        
    </div>

    <script>
        var time = {$time};
        timer();

        function timer() {
            setTimeout(() => {
                time--;
                if (time > -1) {
                    document.getElementById("button").innerHTML = "{Lang::T('Click Here')} (" + time + ")";
                    timer();
                }
            }, 1000);
        }
    </script>
</body>

</html>
