<!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; /* Deixa o conteúdo mais centralizado */
            align-items: center;
            height: 90vh;
            margin: 0;
            text-align: center; /* Garante a centralização do texto */
        }
        h1 {
            margin-bottom: 5px;
            font-size: 32px; /* Tamanho maior para o título */
            text-align: center; /* Centraliza o título */
        }
        .info-text {
            font-size: 14px;
            color: #777777; /* Cinza escuro */
            margin-top: 0;
            margin-bottom: 15px; /* Menos espaço entre título e texto */
            text-align: center; /* Centraliza a descrição */
        }
        button {
            background-color: #FF8C00; /* Cor laranja mais intensa quando passar o mouse */
            color: #ffffff; /* Cor do texto branca */
            border: none;
            padding: 10px 20px;
            font-size: 16px;
            font-family: 'Poppins', sans-serif;
            border-radius: 25px; /* Bordas arredondadas */
            cursor: pointer;
            text-transform: uppercase;
            font-weight: 600;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Sombra suave */
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }
        button:hover {
            background-color: #FFA500; /* Cor laranja mais clara no hover */
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Sombra mais intensa no hover */
        }
        button:disabled {
            background-color: #333333; /* Cinza bem escuro durante o cooldown */
            cursor: not-allowed;
        }
        #output-container {
            margin-top: 30px; /* Ajustado para mais distante do topo */
            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; /* Roxo utilizado para o link */
            text-decoration: none;
            font-weight: 600;
            transition: color 0.5s ease; /* Transição suave para a cor */
        }
        footer a:hover {
            animation: chromaEffect 1.5s infinite; /* Efeito de mudança de cor ao passar o mouse */
        }
        footer a:visited {
            color: #6c23ff; /* Roxo para o link visitado */
        }

        /* Definindo o efeito chroma RGB */
        @keyframes chromaEffect {
            0% {
                color: #6c23ff; /* Roxo */
            }
            33% {
                color: #1E90FF; /* Azul original do link */
            }
            66% {
                color: #FF0000; /* Vermelho */
            }
            100% {
                color: #6c23ff; /* Roxo novamente */
            }
        }
    </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;

            // Inicia o cooldown
            cooldown = true;
            button.disabled = true;
            output.value = ''; // Limpa qualquer resultado anterior

            fetch('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; // Exibe a conta gerada
                    } else {
                        output.value = 'Nenhuma conta disponível.'; // Exibe erro se não houver contas
                    }
                })
                .catch(() => {
                    output.value = 'Erro ao carregar as contas.'; // Exibe erro em caso de falha
                });

            // Finaliza o cooldown
            setTimeout(() => {
                cooldown = false;
                button.disabled = false; // Habilita o botão novamente
            }, 1500); // 1.5 segundos de cooldown
        });

        // Seleção automática do texto ao clicar na caixa
        output.addEventListener('click', () => {
            output.select(); // Seleciona todo o texto
            document.execCommand('copy'); // Copia o texto para a área de transferência
        });
    </script>
</body>
</html>
