<!DOCTYPE html>
<html>
<head>
    <link href="loginstyles.css" rel="stylesheet" type="text/css">
    <style>
        body {
            margin: 0;
            padding: 0;
            background: linear-gradient(to bottom, #001f3f, #003366);
            overflow: hidden;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        /* Snowflake styles */
        .snowflake {
            position: absolute;
            color: white;
            font-size: 10px;
            pointer-events: none;
            animation: fall linear infinite;
        }

        @keyframes fall {
            0% {
                transform: translateY(-100vh) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotate(360deg);
                opacity: 0.3;
            }
        }

        /* Bells animation */
        .bell {
            position: absolute;
            width: 40px;
            animation: swing 2s ease-in-out infinite;
        }

        .bell.top-left {
            top: -20px;
            left: -20px;
        }

        .bell.top-right {
            top: -20px;
            right: -20px;
        }

        .bell.bottom-left {
            bottom: -20px;
            left: -20px;
        }

        .bell.bottom-right {
            bottom: -20px;
            right: -20px;
        }

        @keyframes swing {
            0%, 100% {
                transform: rotate(0deg);
            }
            50% {
                transform: rotate(15deg);
            }
        }

        /* Login table */
        .vpb_main_wrapper {
            width: 400px;
            padding: 20px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            position: relative;
        }

        .vpb_main_wrapper img {
            position: absolute;
        }

        /* Adjust Bells */
        .bell {
            width: 50px;
            height: 50px;
        }

        .bell.top-left {
            top: -30px;
            left: -30px;
        }

        .bell.top-right {
            top: -30px;
            right: -30px;
        }

        .bell.bottom-left {
            bottom: -30px;
            left: -30px;
        }

        .bell.bottom-right {
            bottom: -30px;
            right: -30px;
        }

        /* Aligning form elements using Flexbox */
        .vpb_main_wrapper form {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }

        .vpb_main_wrapper label {
            font-family: Verdana, Geneva, sans-serif;
            font-size: 12px;
            margin-bottom: 5px;
        }

        .vpb_main_wrapper input[type="text"],
        .vpb_main_wrapper input[type="password"] {
            width: 100%;
            padding: 8px;
            margin-bottom: 15px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }

        .vpb_main_wrapper input[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #003366;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .vpb_main_wrapper input[type="submit"]:hover {
            background-color: #002244;
        }

        .vpb_main_wrapper a {
            text-align: center;
            display: block;
            margin-top: 10px;
            text-decoration: none;
            padding: 10px;
            background-color: #f1f1f1;
            border-radius: 5px;
            color: #003366;
            text-align: center;
        }

        .vpb_main_wrapper a:hover {
            background-color: #e0e0e0;
        }
        
               @keyframes pulse {
    0% {
        transform: scale(1);
        color: #ffffff;
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, 0 0 15px #ff4500, 0 0 20px #ff4500;
    }
    50% {
        transform: scale(1.2);
        color: #ffd700;
        text-shadow: 0 0 10px #ffa500, 0 0 20px #ffa500, 0 0 30px #ff8c00, 0 0 40px #ff8c00;
    }
    100% {
        transform: scale(1);
        color: #ffffff;
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, 0 0 15px #ff4500, 0 0 20px #ff4500;
    }
}

.login-box-msg {
    font-size: 1.5rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}
    </style>
</head>
<body>
     <div class="login-box-msg" style="font-family:Verdana, Geneva, sans-serif; font-size:24px;color:white;">SalesSight</div>
     <br><BR>
    <div class="vpb_main_wrapper">
     <!--<img src="/diana/img/bell.png" class="bell top-left" alt="Bell"
        <img src="/diana/img/bell.png" class="bell top-right" alt="Bell">
        <!--<img src="/diana/img/bell.png" class="bell bottom-left" alt="Bell">
        <img src="/diana/img/bell.png" class="bell bottom-right" alt="Bell">-->
        <form method="get" action="acsp.php">
            <div align="left" style="font-family:Verdana, Geneva, sans-serif; font-size:11px; margin-bottom:10px;">
                Please enter your username and password to log into your account.
            </div>
<br>
            <label for="username">Your Username:</label>
            <input type="text" name="username" autocomplete="on" id="username" value="" class="vpb_textAreaBoxInputs">
            <label for="password">Your Password:</label>
            <input type="password" name="password" id="password" value="" class="vpb_textAreaBoxInputs">
            <input type='submit' value="Log in" name="login" id="login" class="vpb_general_button">
                        <div>
                <?php
                echo $_REQUEST['errors'] ?? '';
                ?>
            </div>
        </form>
    </div>
    <!-- Snowflake Animation -->
    <script>
    const snowflakeChars = ['1', '1+1', '3', '4'];
        const body = document.body;

        function createSnowflake() {
            const snowflake = document.createElement('div');
            snowflake.textContent = snowflakeChars[Math.floor(Math.random() * snowflakeChars.length)];
            snowflake.classList.add('snowflake');

            const size = Math.random() * 10 + 10;
            snowflake.style.fontSize = `${size}px`;

            snowflake.style.left = `${Math.random() * window.innerWidth}px`;
            snowflake.style.animationDuration = `${Math.random() * 5 + 5}s`;
            snowflake.style.animationDelay = `${Math.random() * 3}s`;

            body.appendChild(snowflake);

            snowflake.addEventListener('animationend', () => {
                snowflake.remove();
            });
        }

        setInterval(createSnowflake, 200);
    </script>
</body>
</html>
