<!DOCTYPE html>
<html lang="pt-BR">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scanner - Login</title>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <style>
        body {
            margin: 0;
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #0a0a0a 0%, #2a1052 50%, #0a0a0a 100%);
            color: #ffffff;
            position: relative;
            overflow: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 50% 50%,
                    rgba(138, 43, 226, 0.15) 0%,
                    rgba(25, 8, 43, 0.2) 50%,
                    rgba(10, 10, 10, 0.3) 100%);
            z-index: -1;
            filter: blur(20px);
        }

        :root {
            --primary-color: #8A2BE2;
            --dark-bg: #0a0a0a;
            --text-color: #ffffff;
        }

        .navbar {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0.7rem 4rem;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;
        }

        .nav-center {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 50px;
            padding: 0.5rem 2rem;
            backdrop-filter: blur(10px);
            width: 100%;
            max-width: 1200px;
        }

        .logo {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: bold;
            font-size: 1.2rem;
        }

        .nav-links {
            display: flex;
            gap: 1.8rem;
            justify-content: center;
            flex-grow: 1;
        }

        .nav-links a {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #888;
            text-decoration: none;
            font-size: 0.8rem;
            transition: 0.3s;
            padding: 0.3rem 0.8rem;
        }

        .nav-links a:hover {
            color: white;
        }

        .dashboard-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 1.2rem;
            border-radius: 50px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-color);
            text-decoration: none;
            transition: 0.3s;
            font-size: 0.9rem;
        }

        .dashboard-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .dashboard-btn .material-icons {
            font-size: 20px;
        }

        .login-section {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
            box-sizing: border-box;
        }

        .login-card {
            background: rgba(20, 20, 20, 0.8);
            backdrop-filter: none;
            padding: 40px;
            border-radius: 16px;
            text-align: center;
            width: 100%;
            max-width: 400px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
            position: relative;
            z-index: 5;
        }

        .login-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 200%;
            height: 100%;
            animation: shimmer 3s infinite;
        }

        .login-card h2 {
            color: white;
            margin-bottom: 20px;
        }

        .login-card p {
            color: #888;
            margin-bottom: 30px;
        }

        .login-btn {
            background: #8A2BE2;
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            z-index: 10;
        }

        .login-btn:hover {
            background: #9d3ff7;
            transform: translateY(-2px);
        }

        .login-btn:active {
            transform: translateY(0);
            background: #7928c9;
        }

        .login-btn:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
        }

        .login-btn .material-icons {
            font-size: 20px;
        }

        @keyframes glow {
            from {
                box-shadow: 0 0 10px rgba(138, 43, 226, 0.3), 0 0 20px rgba(138, 43, 226, 0.3);
            }

            to {
                box-shadow: 0 0 20px rgba(138, 43, 226, 0.5), 0 0 40px rgba(138, 43, 226, 0.4);
            }
        }

        #particles-js {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            opacity: 0.5;
        }

        .login-section {
            position: relative;
            z-index: 1;
        }

        .already-logged {
            background: rgba(20, 20, 20, 0.8);
            padding: 40px;
            border-radius: 16px;
            text-align: center;
            width: 100%;
            max-width: 400px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
            position: relative;
            z-index: 5;
            color: white;
        }
    </style>
</head>

<body>
    <div id="particles-js"></div>
    <nav class="navbar">
        <div class="nav-center">
            <a href="index.html" class="logo">Scanner</a>
            <div class="nav-links">
                <a href="index.html#home">Home</a>
                <a href="index.html#features">Features</a>
                <a href="index.html#stats">Stats</a>
                <a href="index.html#faq">FAQ</a>
                <a href="privacy.html">Privacy</a>
                <a href="changeLogs.html">Changelog</a>
                <a href="download.html">Download</a>
            </div>
            <a href="#" class="dashboard-btn">
                <span class="material-icons">widgets</span>
                Dashboard
            </a>
        </div>
    </nav>

    <div class="login-section">
        <div class="login-card" id="login-card">
            <h2>Bem-vindo ao Scanner!</h2>
            <p>Faça login na sua conta</p>
            <div class="login-btn" onclick="loginWithDiscord()" style="cursor: pointer;">
                <span class="material-icons">login</span>
                Entrar com Discord
            </div>
        </div>
        <div class="already-logged" id="already-logged" style="display: none;">
            <h2>Você já está logado!</h2>
            <p>Redirecionando para o dashboard...</p>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
    <script>
        particlesJS('particles-js', {
            particles: {
                number: {
                    value: 80,
                    density: {
                        enable: true,
                        value_area: 800
                    }
                },
                color: {
                    value: '#ffffff'
                },
                shape: {
                    type: 'circle'
                },
                opacity: {
                    value: 0.5,
                    random: true
                },
                size: {
                    value: 3,
                    random: true
                },
                line_linked: {
                    enable: true,
                    distance: 150,
                    color: '#ffffff',
                    opacity: 0.2,
                    width: 1
                },
                move: {
                    enable: true,
                    speed: 2,
                    direction: 'none',
                    random: true,
                    straight: false,
                    out_mode: 'out',
                    bounce: false
                }
            },
            interactivity: {
                detect_on: 'canvas',
                events: {
                    onhover: {
                        enable: true,
                        mode: 'grab'
                    },
                    resize: true
                },
                modes: {
                    grab: {
                        distance: 140,
                        line_linked: {
                            opacity: 0.5
                        }
                    }
                }
            }
        });
    </script>
    <script src="auth.js"></script>
    <script>
        if (localStorage.getItem('discord_token')) {
            document.getElementById('login-card').style.display = 'none';
            document.getElementById('already-logged').style.display = 'block';
            setTimeout(() => {
                window.location.href = '/index.html';
            }, 3000);
        }
    </script>
</body>

</html>