<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>Cup Command | WYL</title>

    

    <link rel="manifest" href="manifest.json">

    <meta name="theme-color" content="#ffffff">

    <link rel="apple-touch-icon" href="icon.png">

    <meta name="apple-mobile-web-app-capable" content="yes">

    <meta name="apple-mobile-web-app-status-bar-style" content="default">


    <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&family=Teko:wght@300;600&display=swap" rel="stylesheet">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

    

    <style>

        :root { 

            --bg: #f4f4f4; --navy: #0c2461; --gold: #d4af37; --green: #2ecc71; --red: #e74c3c;

        }

        body { 

            margin: 0; background-color: var(--bg); color: #111; 

            font-family: 'Roboto Condensed', sans-serif; 

            -webkit-tap-highlight-color: transparent; padding-bottom: 120px;

        }


        /* HEADER */

        header {

            background: #fff; padding: 15px 20px;

            box-shadow: 0 2px 10px rgba(0,0,0,0.05);

            display: flex; justify-content: space-between; align-items: center;

            position: sticky; top: 0; z-index: 100;

        }

        .app-logo { font-family: 'Teko', sans-serif; font-size: 1.8rem; font-weight: 600; color: var(--navy); }

        .live-badge { background: var(--red); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; animation: pulse 2s infinite; }

        @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }


        /* WYL BANNER */

        .promo-banner {

            background: linear-gradient(90deg, var(--navy), #1e3799);

            color: white; padding: 15px; text-align: center; font-size: 0.9rem;

        }

        .promo-btn {

            background: var(--gold); color: #000; border: none; padding: 5px 15px; 

            font-weight: bold; border-radius: 20px; margin-left: 10px; text-decoration: none; font-size: 0.8rem;

        }


        /* NOTIFICATION TOGGLE */

        .notify-zone {

            margin: 15px; padding: 20px; background: #fff; border-radius: 12px;

            display: flex; justify-content: space-between; align-items: center; border: 1px solid #ddd;

        }

        .toggle-btn {

            background: #eee; width: 50px; height: 26px; border-radius: 20px; position: relative; cursor: pointer; transition: 0.3s;

        }

        .toggle-btn::after {

            content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: 0.3s;

        }

        .toggle-btn.active { background: var(--green); }

        .toggle-btn.active::after { left: 27px; }


        /* DEV PANEL (For You To Test) */

        .dev-panel {

            margin: 20px; padding: 20px; background: #eee; border: 2px dashed #999; border-radius: 10px; text-align: center;

        }

        .dev-btn {

            display: block; width: 100%; padding: 12px; margin-bottom: 10px;

            border: none; border-radius: 5px; font-weight: bold; cursor: pointer; color: white;

        }

        .btn-pre { background: #3498db; }

        .btn-goal { background: #2ecc71; }

        .btn-final { background: #000; }


        /* BOTTOM NAV */

        .bottom-nav {

            position: fixed; bottom: 0; width: 100%; background: white;

            border-top: 1px solid #eee; display: flex; justify-content: space-around;

            padding: 10px 0; z-index: 100;

        }

        .nav-item { text-align: center; color: #999; text-decoration: none; font-size: 0.7rem; }

        .nav-item i { display: block; font-size: 1.2rem; margin-bottom: 3px; }

        .nav-item.active { color: var(--navy); }


    </style>

</head>

<body>


    <header>

        <div class="app-logo">CUP COMMAND</div>

        <div class="live-badge">LIVE</div>

    </header>


    <div class="promo-banner">

        Dominating your Fantasy League? <a href="https://winyourleague.com" class="promo-btn">Get The Kit</a>

    </div>


    <div class="notify-zone">

        <div>

            <div style="font-weight:bold; font-size:1.1rem;">Enable Alerts</div>

            <div style="font-size:0.8rem; color:#666;">Kickoffs, Goals, and Highlights.</div>

        </div>

        <div class="toggle-btn" id="push-toggle" onclick="togglePush()"></div>

    </div>


    <div style="padding: 20px; text-align: center; color: #888;">

        <i class="fas fa-futbol" style="font-size: 3rem; margin-bottom: 10px; opacity: 0.2;"></i>

        <p>No live matches right now.</p>

    </div>


    <div class="dev-panel">

        <h4 style="margin-top:0;">⚠️ DEV: TEST ALERTS</h4>

        <button class="dev-btn btn-pre" onclick="testNotification('pregame')">TEST: "Game in 15"</button>

        <button class="dev-btn btn-goal" onclick="testNotification('goal')">TEST: "Goal!"</button>

        <button class="dev-btn btn-final" onclick="testNotification('final')">TEST: "Results/Video"</button>

    </div>


    <div class="bottom-nav">

        <a href="#" class="nav-item active"><i class="fas fa-futbol"></i>Matches</a>

        <a href="https://winyourleague.com" class="nav-item"><i class="fas fa-trophy"></i>Fantasy</a>

        <a href="#" class="nav-item"><i class="fas fa-newspaper"></i>News</a>

    </div>


    <script>(function(w,d, s, id) {if(typeof(w.webpushr)!=='undefined') return;w.webpushr=w.webpushr||function(){(w.webpushr.q=w.webpushr.q||[]).push(arguments)};var js, fjs = d.getElementsByTagName(s)[0];js = d.createElement(s); js.id = id;js.async=1;js.src = "https://cdn.webpushr.com/app.min.js";fjs.parentNode.appendChild(js);}(window,document, 'script', 'webpushr-jssdk'));webpushr('setup',{'key':'BEg7n3JI3-5ViBBaeIwfBXPPwZA307klL9tbKI4aXdxvZ4CwfnImiC2TO3kF7WBk_UfCUeUGJ2XdHxKAblDrqTU' });</script>


    <script>

        function togglePush() {

            var btn = document.getElementById('push-toggle');

            if(btn.classList.contains('active')) {

                alert("Alerts Muted.");

                btn.classList.remove('active');

            } else {

                webpushr('subscribe'); 

                btn.classList.add('active');

            }

        }


        // --- THE 3 ALERT TYPES ---

        function testNotification(type) {

            if (Notification.permission !== "granted") {

                alert("Please enable alerts using the toggle first!");

                return;

            }


            let title, body, icon;


            if (type === 'pregame') {

                title = "⏰ Kickoff in 15 Mins";

                body = "USA vs Italy is about to start! Set your lineups.";

                icon = "icon.png";

            } 

            else if (type === 'goal') {

                title = "⚽ GOAL! USA 1 - 0 ITA";

                body = "Pulisic scores (12') - Absolute screamer.";

                icon = "icon.png";

            } 

            else if (type === 'final') {

                title = "🏁 FINAL: USA 2 - 1 ITA";

                body = "Full Time. Tap to watch the highlights & analysis.";

                icon = "icon.png";

            }


            // Fire the Alert

            new Notification(title, {

                body: body,

                icon: icon,

                vibrate: [200, 100, 200]

            });

        }

    </script>


</body>

</html>