<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        body {
            width: 400px;
            padding: 20px;
            font-family: Arial, sans-serif;
            background: #1a1a1a;
            color: #fff;
        }

        h2 {
            text-align: center;
            margin-bottom: 20px;
            color: #fff;
            font-size: 20px;
        }

        textarea {
            width: calc(100% - 24px);
            height: 100px;
            margin-bottom: 15px;
            padding: 12px;
            border: none;
            border-radius: 8px;
            resize: none;
            background: #2d2d2d;
            color: #fff;
            font-family: monospace;
            font-size: 14px;
            transition: border-color 0.3s;
            display: block;
        }

        textarea:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
        }

        .input-container {
            background: #2d2d2d;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
        }

        .options {
            background: #2d2d2d;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
        }

        .options p {
            margin-bottom: 10px;
            color: #ccc;
        }

        label {
            margin-right: 15px;
            color: #fff;
            display: inline-flex;
            align-items: center;
            cursor: pointer;
        }

        input[type="checkbox"] {
            margin-right: 8px;
            cursor: pointer;
        }

        button {
            width: 100%;
            padding: 12px;
            background: #1877F2;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            margin-bottom: 15px;
            font-weight: bold;
            transition: background-color 0.3s;
        }

        button:hover {
            background: #1464d8;
        }

        .description {
            font-size: 12px;
            color: #ccc;
            background: #2d2d2d;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            line-height: 1.6;
            border: 1px solid #333;
        }

        .description strong {
            color: #fff;
        }

        .description span {
            color: #1877F2;
            background: #1a1a1a;
            padding: 2px 6px;
            border-radius: 4px;
            font-family: monospace;
        }

        .twofa-container {
            text-align: center;
            margin-top: 20px;
            padding: 20px;
            background: #2d2d2d;
            border-radius: 8px;
            border: 1px solid #333;
        }

        .twofa-container h3 {
            color: #fff;
            margin-top: 0;
        }

        .twofa-code {
            font-size: 28px;
            font-weight: bold;
            color: #28a745;
            padding: 15px;
            background: #1a1a1a;
            border: 2px solid #28a745;
            border-radius: 8px;
            margin: 15px 0;
            cursor: pointer;
            transition: all 0.3s;
            font-family: monospace;
        }

        .twofa-code:hover {
            background: #28a745;
            color: #fff;
        }

        .timer {
            color: #ccc;
            font-size: 14px;
        }

        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
        }

        .toast {
            background: #2d2d2d;
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            margin-bottom: 10px;
            min-width: 250px;
            max-width: 350px;
            display: flex;
            align-items: center;
            gap: 12px;
            animation: slideIn 0.5s ease-in-out;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            border: 1px solid #333;
        }

        .toast i {
            font-size: 18px;
        }

        .toast.success {
            background: #28a745;
            border-left: 4px solid #1e7e34;
        }

        .toast.success i {
            color: #fff;
        }

        .toast.error {
            background: #dc3545;
            border-left: 4px solid #bd2130;
        }

        .toast.error i {
            color: #fff;
        }

        .toast.warning {
            background: #ffc107;
            border-left: 4px solid #d39e00;
            color: #333;
        }

        .toast.info {
            background: #17a2b8;
            border-left: 4px solid #138496;
        }

        .logo {
            display: block;
            width: 150px;
            margin: 0 auto 20px;
            filter: brightness(0.9);
        }

        .footer {
            text-align: center;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #333;
            color: #ccc;
            font-size: 12px;
            line-height: 1.5;
        }

        .footer a {
            color: #1877F2;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer a:hover {
            color: #1464d8;
            text-decoration: underline;
        }

        @keyframes slideIn {
            from {
                transform: translateY(-100%);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes slideOut {
            from {
                transform: translateY(0);
                opacity: 1;
            }
            to {
                transform: translateY(-100%);
                opacity: 0;
            }
        }

        /* Scrollbar personalizado */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #1a1a1a;
        }

        ::-webkit-scrollbar-thumb {
            background: #333;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #444;
        }

        .cookie-container {
            text-align: center;
            margin-top: 15px;
            padding: 15px;
            background: #2d2d2d;
            border-radius: 8px;
            border: 1px solid #333;
        }

        .cookie-button {
            background: #1877F2;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin: 0 auto;
            transition: background-color 0.3s;
        }

        .cookie-button:hover {
            background: #1464d8;
        }

        .cookie-button i {
            font-size: 16px;
        }

        .fb-data-container {
            margin-top: 15px;
        }

        .data-section {
            background: #2d2d2d;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            border: 1px solid #333;
        }

        .data-section h3 {
            color: #fff;
            margin-top: 0;
            margin-bottom: 10px;
            font-size: 16px;
        }

        .data-text {
            font-family: monospace;
            font-size: 12px;
            background: #1a1a1a;
            padding: 10px;
            border-radius: 4px;
            color: #1877F2;
            word-break: break-all;
            margin-bottom: 10px;
            max-height: 60px;
            overflow-y: auto;
        }

        .data-text.clickable {
            cursor: pointer;
            transition: all 0.3s;
        }

        .data-text.clickable:hover {
            background: #28a745;
            color: #fff;
        }
    </style>
</head>
<body>
    <img src="https://scale.com.co/wp-content/uploads/2023/12/REDISENO-SCALE.11111COM.CO-1.png" alt="Scale Logo" class="logo" style="width: 300px; height: auto;">
    <h2>Inicio de sesión para Facebook y Hotmail</h2>
    
    <div class="input-container">
        <textarea id="viaInput" placeholder="Ingresa la información de VIA o Cookie"></textarea>
    </div>
    
    <div class="options">
        <p>Opciones de inicio de sesión</p>
        <label>
            <input type="checkbox" name="loginType" value="facebook"> Facebook
        </label>
        <label>
            <input type="checkbox" name="loginType" value="hotmail"> Hotmail
        </label>
    </div>
    
    <button id="loginButton">Iniciar sesión</button>

    <div class="description">
        <p style="margin: 0 0 8px 0;"><strong>¿Cómo funciona?</strong></p>
        Esta extensión permite iniciar sesión automáticamente en Facebook y/o Hotmail usando los siguientes formatos:<br>
        • Con 2FA: <span>UID|PASSWORD|2FA|EMAIL|EMAIL_PASSWORD</span><br>
        • Sin 2FA: <span>UID|PASSWORD|EMAIL|EMAIL_PASSWORD</span><br>
        • Con Cookie FB: <span>c_user=XXX;xs=XXX;|EMAIL|EMAIL_PASSWORD</span><br>
        • Solo Hotmail: <span>EMAIL|EMAIL_PASSWORD</span>
    </div>

    <div class="twofa-container" id="twofaContainer" style="display: none;">
        <h3>Código 2FA</h3>
        <div class="twofa-code" id="twofaCode">-</div>
        <div class="timer" id="timer">Tiempo restante: 30s</div>
    </div>

    <div class="fb-data-container">
        <div class="data-section">
            <h3>Cookie</h3>
            <div class="data-text clickable" id="cookieText" title="Haz clic para copiar">-</div>
        </div>
        
        <div class="data-section">
            <h3>Token de Acceso</h3>
            <div class="data-text clickable" id="tokenText" title="Haz clic para copiar">-</div>
        </div>
    </div>

    <div class="toast-container" id="toastContainer"></div>

    <div class="footer">
        Hecho con ❤️ por <a href="https://scale.com.co" target="_blank">Scalesoft</a> - scale.com.co | <span style="font-style: italic;">Faiders Altamar</span>
    </div>

    <script src="popup.js"></script>
</body>
</html> 