<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Modded Management</title>
    <link rel="stylesheet" href="waves.css"> <!-- Link to the waves CSS -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:200,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900">
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            overflow: hidden;
            font-family: 'Poppins', sans-serif;
            background: url('pattern.png') repeat; /* Using the uploaded pattern */
            position: relative;
        }

        header {
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            box-sizing: border-box;
            z-index: 10;
        }

        header .logo {
            font-size: 24px;
            color: white;
            font-weight: 700;
            pointer-events: none; /* Makes it non-clickable */
        }

        header .contact {
            font-size: 18px;
            color: white;
            text-decoration: none;
            font-weight: 500;
        }

        header .contact:hover {
            text-decoration: underline;
        }

        canvas {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            position: absolute;
            left: 0;
            top: 0;
            z-index: 1;
        }

        .footer {
            position: absolute;
            bottom: 20px;
            left: 20px;
            font-size: 14px;
            color: white;
            font-weight: 500;
            z-index: 10;
        }

        .local-time {
            position: absolute;
            bottom: 20px;
            right: 20px;
            font-size: 14px;
            color: white;
            font-weight: 500;
            z-index: 10;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <header>
        <div class="logo">Modded</div>
        <a href="mailto:info@modded.gg" class="contact">Contact</a>
    </header>

    <div class="coming-soon-effects">
        <canvas id="waves"></canvas>
    </div>

    <div class="footer">©2025 Modded Management, LLC</div>
    <div class="local-time" id="local-time">Loading time...</div>

    <!-- Include the JavaScript file -->
    <script src="waves.js"></script>
    <script>
        const timeElement = document.getElementById('local-time');
        let isMilitaryTime = false; // Tracks the current format

        function updateTime() {
            const now = new Date();
            const optionsStandard = { hour: 'numeric', minute: 'numeric', timeZoneName: 'short' };
            const optionsMilitary = { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' };

            // Display time based on the current format
            if (isMilitaryTime) {
                timeElement.textContent = now.toLocaleTimeString(undefined, optionsMilitary);
            } else {
                timeElement.textContent = now.toLocaleTimeString(undefined, optionsStandard);
            }
        }

        // Toggle format when the time is clicked
        timeElement.addEventListener('click', () => {
            isMilitaryTime = !isMilitaryTime;
            updateTime();
        });

        // Update time every minute
        updateTime();
        setInterval(updateTime, 60000);
    </script>
</body>
</html>