<!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: #FF8C00;
            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:hover {
            background-color: #FFA500;
            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;
            cursor: pointer;
        }
        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 Contas Crunchyroll</h1>
    <p class="info-text">São contas não verificadas, ou seja, nem todas funcionam ou tem o Premium!</p>
    <button id="generateBtn">Gerar</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 button = document.getElementById('generateBtn');
        const output = document.getElementById('output');
        let cooldown = false;

        button.addEventListener('click', () => {
            if (cooldown) return;

            cooldown = true;
            button.disabled = true;
            output.value = '';

            fetch('crunchyroll_nfa.txt')
                .then(response => response.text())
                .then(data => {
                    const lines = data.split('\n').map(line => line.trim()).filter(line => line !== "");

                    if (lines.length > 0) {
                        const randomLine = lines[Math.floor(Math.random() * lines.length)];
                        output.value = randomLine;
                    } else {
                        output.value = 'Nenhuma conta disponível.';
                    }
                })
                .catch(() => {
                    output.value = 'Erro ao carregar as contas.';
                });

            setTimeout(() => {
                cooldown = false;
                button.disabled = false;
            }, 1500);
        });

        output.addEventListener('click', () => {
            output.select();
            document.execCommand('copy');
        });
    </script>
</body>
</html>
