<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>.gg/noturno</title>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #0c0c0c;
            color: #ffffff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 90vh;
            margin: 0;
            text-align: center;
        }
        h1 {
            margin-bottom: 5px;
            font-size: 32px;
            text-align: center;
        }
        .info-text {
            font-size: 14px;
            color: #777777;
            margin-top: 0;
            margin-bottom: 15px;
            text-align: center;
        }
        button {
            background-color: #1DB954;
            color: #ffffff;
            border: none;
            padding: 10px 20px;
            font-size: 16px;
            font-family: 'Poppins', sans-serif;
            border-radius: 25px;
            cursor: pointer;
            text-transform: uppercase;
            font-weight: 600;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }
        button.active {
            background-color: #FF0000;
        }
        button.active:hover {
            background-color: #FF0000;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
        }
        button:disabled {
            background-color: #333333;
            cursor: not-allowed;
        }
        #output-container {
            margin-top: 30px;
            width: 80%;
            max-width: 600px;
        }
        textarea {
            width: 100%;
            height: 50px;
            background-color: #1a1a1a;
            color: #ffffff;
            border: 1px solid #333333;
            border-radius: 5px;
            padding: 10px;
            font-size: 16px;
            font-family: 'Poppins', sans-serif;
            resize: none;
            text-align: center;
            line-height: 30px;
            overflow: hidden;
        }
        textarea:focus {
            outline: none;
        }
        footer {
            position: absolute;
            bottom: 20px;
            text-align: center;
            font-size: 14px;
            color: #ffffff;
        }
        footer a {
            color: #6c23ff;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.5s ease;
        }
        footer a:hover {
            animation: chromaEffect 1.5s infinite;
        }
        footer a:visited {
            color: #6c23ff;
        }
        @keyframes chromaEffect {
            0% {
                color: #6c23ff;
            }
            20% {
                color: #FF0000;
            }
            40% {
                color: #FFFF00;
            }
            60% {
                color: #00FF00;
            }
            80% {
                color: #0000FF;
            }
            100% {
                color: #6c23ff;
            }
        }
    </style>
</head>
<body>
    <h1>Gerador de Links Spotify</h1>
    <p class="info-text">Todos os links são verificados e com duração de 3 meses!</p>
    <button id="generateBtn">Iniciar</button>
    <div id="output-container">
        <textarea id="output" readonly></textarea>
    </div>
    <footer>
        Made by Niel<br>
        <a href="https://discord.gg/noturno" target="_blank">discord.gg/noturno</a>
    </footer>
    <script>
        const generateButton = document.getElementById('generateBtn');
        const output = document.getElementById('output');
        let generating = false;
        let intervalId;
        const lines = [];

        function generateCode() {
            const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
            let code = '';
            for (let i = 0; i < 10; i++) {
                code += characters.charAt(Math.floor(Math.random() * characters.length));
            }
            return `https://www.spotify.com/br-pt/ppt/microsoft/?code=${code}`;
        }

        function toggleGenerating() {
            if (generating) {
                clearInterval(intervalId);
                generateButton.textContent = 'Iniciar';
                generateButton.classList.remove('active');
            } else {
                intervalId = setInterval(() => {
                    const newCode = generateCode();
                    lines.push(newCode); // Add to the list of generated links
                    output.value = newCode; // Display only the last generated link
                }, 100);
                generateButton.textContent = 'Parar';
                generateButton.classList.add('active');
            }
            generating = !generating;
        }

        generateButton.addEventListener('click', toggleGenerating);

        output.addEventListener('click', () => {
            const allLinks = lines.join('\n'); // Join all generated links with a newline
            navigator.clipboard.writeText(allLinks).then(() => {
                alert('Todos os links foram copiados para a área de transferência!');
            });
        });
    </script>
</body>
</html>
