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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Meu Robux</title>
    <link rel="icon" href="https://media.discordapp.net/attachments/1273007512148381707/1322362722439925822/Logo.png?ex=677099c1&is=676f4841&hm=be7c4f87699efd6204d9f5f39c962ccd38ef0580a551d2ddf2090581ac155058&=&format=webp&quality=lossless&width=479&height=479">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">

    <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght@400;500;700&display=swap"
        rel="stylesheet">

    <style>
        body {
            position: relative;
            overflow-x: hidden;
        }

        .material-symbols-outlined {
            font-family: 'Material Symbols Outlined';
            font-weight: normal;
            font-style: normal;
            font-size: 24px;
            line-height: 1;
            letter-spacing: normal;
            text-transform: none;
            white-space: nowrap;
            word-wrap: normal;
            direction: ltr;
            -webkit-font-smoothing: antialiased;
        }

        .Neve {
            position: absolute;
            top: -300px;
            width: 10px;
            height: 10px;
            background-color: #FFFFFF;
            border-radius: 50%;
            opacity: 0.7;
            pointer-events: none;
            animation: fall linear infinite, lados 0.5s linear infinite;
            transition: 1s ease-in
        }

        @keyframes fall {
            0% {
                margin-top: -100px;
                opacity: 0.5
            }

            /* 10% {
                margin-top: 10vh;
                opacity: 1
            } */

            100% {
                margin-top: 100vh;

            }

            /* 0% {
                transform: translateY(-10px);
            }

            100% {
                transform: translateY(100vh);
            } */
        }

        @keyframes sway {

            0%,
            100% {
                transform: translateX(0);
            }

            50% {
                transform: translateX(15px);
            }
        }



        :root {
            --cor-fundo: #000000;
            --cor-texto: #FFFFFF;
            --cor-header: #1A1A1A;
            --cor-header-borda: #333333;
            --cor-logo: #FFFFFF;
            --cor-link-hover: #666666;
            --cor-hero-gradiente-inicio: #0D0D0D;
            --cor-hero-gradiente-fim: #262626;
            --cor-botao: #1A1A1A;
            --cor-botao-hover: #333333;
            --cor-categoria: #1A1A1A;
            --cor-categoria-borda: #262626;
            --cor-footer: #0D0D0D;
            --cor-footer-texto: #666666;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Roboto', sans-serif;
            background-color: #000000;
            color: #FFFFFF;
            line-height: 1.6;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 30px;
            background-color: #1A1A1A;
            border-bottom: 3px solid #333333;
            box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
        }

        header .logo {
            font-size: 2.2rem;
            font-weight: bold;
            color: #FFFFFF;
        }

        header nav a {
            margin: 0 15px;
            color: #FFFFFF;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s;
        }

        header nav a:hover {
            color: #666666;
        }

        .hero {
            text-align: center;
            padding: 100px 20px;
            background: linear-gradient(to right, #0D0D0D, #262626);
            border-bottom-left-radius: 50px;
            border-bottom-right-radius: 50px;
            box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
        }

        .hero h1 {
            font-size: 4rem;
            font-weight: 700;
            margin-bottom: 20px;
        }

        .hero p {
            font-size: 1.4rem;
            margin-bottom: 30px;
            max-width: 750px;
            margin-left: auto;
            margin-right: auto;
        }

        .hero .buttons a {
            padding: 15px 40px;
            margin: 10px;
            background-color: #1A1A1A;
            color: #fff;
            text-decoration: none;
            border-radius: 10px;
            font-weight: 700;
            transition: background-color 0.3s, transform 0.3s;
            display: inline-block;
            box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
        }

        .hero .buttons a:hover {
            background-color: #333333;
            transform: translateY(-5px);
        }

        .categories {
            display: flex;
            justify-content: center;
            gap: 25px;
            padding: 70px 20px;
            flex-wrap: wrap;
        }

        .category {
            width: 250px;
            text-align: center;
            background-color: #1A1A1A;
            border-radius: 15px;
            overflow: hidden;
            transition: transform 0.3s, box-shadow 0.3s;
            box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
            cursor: pointer;
        }

        .categoryvenda {
            width: 300px;
            height: 55px;
            text-align: center;
            background-color: #262626;
            border-radius: 15px;
            overflow: hidden;
            transition: transform 0.3s, box-shadow 0.3s;
            box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
            cursor: pointer;
        }

        .category>img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            display: block;
        }

        .category:hover {
            transform: scale(1.1);
            box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.5);
        }

        .category h3 {
            padding: 15px 0;
            background-color: #262626;
            color: #FFFFFF;
            font-size: 1.2rem;
            font-weight: 600;
        }

        footer {
            text-align: center;
            padding: 30px;
            background-color: #0D0D0D;
            border-top: 3px solid #333333;
            box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.2);
        }

        footer p {
            font-size: 1rem;
            color: #666666;
        }

        @keyframes loading {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }



        .notificacao {
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%) translateY(-100%);
            background-color: #1A1A1A;
            color: #FFFFFF;
            padding: 15px 5px;
            border: 2px solid #262626;
            border-radius: 8px;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
            opacity: 0;
            transition: opacity 0.5s ease, transform 0.5s ease;
            z-index: 1000;
            display: flex;
            max-width: 95%;
            align-items: center;
            text-align: center;
            gap: 10px;
            height: 30px;
            text-wrap: nowrap
        }

        #userinfos {
            background-color: #1A1A1A;
            color: #FFFFFF;
            padding: 15px 20px;
            border: 2px solid #262626;
            border-radius: 8px;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
            transition: opacity 0.5s ease, transform 0.5s ease;
            display: flex;
            align-items: center;
            text-align: center;
            gap: 10px;

        }

        #userinfos.show {
            opacity: 1;
            transform: translateX(-50%) translateY(20px);
        }

        #userinfos3 {
            background-color: #1A1A1A;
            color: #FFFFFF;
            padding: 15px 20px;
            border: 2px solid #262626;
            border-radius: 8px;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
            transition: opacity 0.5s ease, transform 0.5s ease;
            display: flex;
            align-items: center;
            text-align: center;
            gap: 10px;
        }

        #userinfos3.show {
            opacity: 1;
            transform: translateX(-50%) translateY(20px);
        }

        @media (max-width: 768px) {
            header {
                flex-direction: column;
                justify-content: center;
            }

            .qrcode {
                width: 95%
            }

            .topola {
                width: 100vw;
                position: static;
                margin-left: 50%;
                transform: translate(-50%)
            }

            .topola img {
                margin-bottom: 15px;
            }

            body {
                font-size: 14px;
            }

            header {
                padding: 15px;
            }

            header .logo {
                font-size: 1.5rem;
            }

            header nav a {
                margin: 5px;
                font-size: 0.8rem;
            }

            .hero {
                padding: 40px 15px;
            }

            .hero h1 {
                font-size: 2rem;
            }

            .hero p {
                font-size: 0.9rem;
            }

            .hero .buttons a {
                padding: 8px 15px;
                font-size: 0.8rem;
            }

            .categories {
                gap: 15px;
            }

            .category {
                width: 95%;
            }



            .category img {
                height: 100px;
            }

            footer {
                font-size: 0.7rem;
            }

            .saldo-content {
                width: 90%;
                padding: 15px;
            }

            .saldo-content h2 {
                font-size: 1.5rem;
            }

            .saldo-content input,
            .saldo-content button {
                font-size: 0.9rem;
            }

            .payment-methods label {
                font-size: 0.9rem;
            }

            .close-saldo {
                font-size: 20px;
            }

            .notificacao {
                width: 80vh;
                text-wrap: nowrap;
                
            }






            #userinfos {
                flex-direction: column;
                max-width: 90%;
                padding: 10px 15px;
                gap: 5px;
            }

            #saldo-robux,
            #saldo-reais {
                font-size: 13px;
            }

            .mobiletopico {
                flex-direction: column;
            }

            .mobiletopico>.buttons {
                margin-bottom: 10px
            }

            .saldo-content {
                max-width: 90%;
                max-height: 90%
            }

            .discord-button {
                display: none
            }

            .menu {
                max-width: 90%
            }

            .modal-content {
                max-width: 90%
            }

        }

        @media (max-width: 768px) {
            /* Mobile Menu CSS */

            .buttons.topo {
                display: none;
            }


        }

        .notificacao.show {
            opacity: 1;
            transform: translateX(-50%) translateY(20px);
        }

        .notificacao .material-symbols-outlined {
            font-size: 24px;
            color: #666666;
        }

        .notificacao .fechar {
            margin-left: auto;
            background: none;
            border: none;
            color: #666666;
            font-size: 16px;
            cursor: pointer;
        }

        .tocourodou {
            transition: 500ms ease-in-out;
            cursor: pointer
        }

        .tocourodou:hover {
            transform: scale(1.05) rotate(180deg)
        }

        .notificacao .fechar:hover {
            color: #FFFFFF;
        }

        .loginbutton {
            cursor: pointer
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-content {
            position: relative;
            width: 400px;
            padding: 20px;
            background-color: #1A1A1A;
            border-radius: 12px;
            box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
            animation: fadeIn 0.5s ease;
        }

        .close-modal {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 24px;
            color: #fff;
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .close-modal:hover {
            color: #ff4c4c;
        }

        .container {
            perspective: 1000px;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
        }

        .card {
            width: 350px;
            height: 400px;
            background-color: #1A1A1A;
            border-radius: 12px;
            box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
            transform-style: preserve-3d;
            transition: transform 0.6s ease-in-out;
            position: relative;
        }

        .card.flipped {
            transform: rotateY(180deg);
        }

        .face {
            width: 100%;
            height: 100%;
            position: absolute;
            backface-visibility: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            border-radius: 12px;
        }

        .face.front {
            background: linear-gradient(to right, #333333, #1A1A1A);
        }

        .face.back {
            background: linear-gradient(to right, #1A1A1A, #333333);
            transform: rotateY(180deg);
        }

        h2 {
            font-size: 2rem;
            margin-bottom: 20px;
            color: #fff;
        }

        input {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border-radius: 8px;
            border: none;
            outline: none;
            background: #262626;
            color: #fff;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        input:focus {
            background: #333333;
        }

        button {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border-radius: 8px;
            border: none;
            background: #3693eb;
            color: #fff;
            font-size: 1rem;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        button:hover {
            background: #247ac9;
        }

        .switch {
            font-size: 0.9rem;
            color: #ccc;
            cursor: pointer;
            margin-top: 10px;
            text-align: center;
        }

        .switch strong {
            color: #3693eb;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        #addsaldo {
            transition: 350ms ease-in-out
        }

        #addsaldo:hover {
            transform: rotate(25deg) scale(1.05);
            color: #3ef035
        }

        .saldo-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .saldo-overlay.active {
            display: flex;
        }

        .saldo-content {
            background-color: #1A1A1A;
            color: #FFFFFF;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
            width: 450px;
            text-align: center;
            animation: fadeIn 0.5s ease;
            position: relative;
        }

        .saldo-content h2 {
            margin-bottom: 15px;
            font-size: 1.8rem;
        }

        .saldo-content input {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border-radius: 8px;
            border: 2px solid #262626;
            background-color: #1A1A1A;
            color: #FFFFFF;
            outline: none;
            font-size: 1rem;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        .saldo-content input:focus {
            background-color: #333333;
            border-color: #333333;
        }

        .saldo-content button {
            width: 100%;
            padding: 10px;
            border: none;
            border-radius: 8px;
            background-color: #3693eb;
            color: #FFFFFF;
            font-size: 1rem;
            cursor: pointer;
            margin-top: 10px;
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        .saldo-content button:hover {
            background-color: #247ac9;
            transform: translateY(-3px);
        }

        .close-saldo {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 24px;
            color: #FFFFFF;
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .close-saldo:hover {
            color: #ff4c4c;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        #logindiv {
            /* width: 45px; */
            height: 45px;
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
            border-radius: 70px;
            padding-left: 15px;
            padding-right: 15px;
            background-color: #262626;
            cursor: pointer;
            transition: 500ms ease-in-out
        }

        #logindiv p {
            padding-left: 7px
        }

        #logindiv:hover {
            color: #3693eb
        }

        .payment-methods {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px
        }

        #payment-method {
            background-color: #247ac9;
            width: 130px;
            height: 45px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            text-align: right;
            position: relative;
            justify-content: center;
            cursor: pointer;
            transition: 250ms;

        }

        #payment-method:disabled {
            background-color: rgb(77, 77, 79);
            color: #ffffff
        }

        #payment-method:not([disabled]):hover {
            transform: scale(1.05);
            background-color: #3693eb
        }

        #payment-method img {
            height: 25px;
            position: absolute;
            left: 10px;
        }






        @keyframes lados {
            0% {
                transform: none
            }

            25% {
                transform: rotate(-35deg)
            }

            75% {
                transform: rotate(35deg)
            }

            100% {
                transform: none
            }
        }

        #incremento {
            animation: incremento 3s ease-out forwards
        }

        @keyframes incremento {
            0% {
                transform: scale(0) translate(-50%, -50%)
            }

            25% {
                transform: scale(1) translate(-50%, -50%)
            }

            75% {
                transform: scale(1) translate(-50%, -50%)
            }

            100% {
                transform: scale(0) translate(-50%, -50%);
                right: 25px;
                top: 25px
            }
        }

        .recent-purchases {
            margin: 20px;
            padding: 10px;
            background-color: #1A1A1A;
            border-radius: 10px;
        }

        .recent-purchases-title {
            color: #FFFFFF;
            font-size: 1.5rem;
            margin-bottom: 10px;
            text-align: left;
        }

        .recent-purchases-list {
            display: flex;
            gap: 20px;
            overflow-x: auto;
            padding: 10px;
        }

        .recent-purchases-list::-webkit-scrollbar {
            height: 8px;
        }

        .recent-purchases-list::-webkit-scrollbar-thumb {
            background: #1A1A1A;
            border-radius: 4px;
        }

        .recent-purchases-list::-webkit-scrollbar-thumb:hover {
            background: #333333;
        }

        .yscroll::-webkit-scrollbar {
            height: 8px;
        }

        .yscroll::-webkit-scrollbar-thumb {
            background: #1A1A1A;
            border-radius: 4px;
        }

        .yscroll::-webkit-scrollbar-thumb:hover {
            background: #333333;
        }

        .recent-purchase-card {
            background: #1A1A1A;
            border-radius: 15px;
            padding: 15px;
            box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
            min-width: 220px;
            max-width: 220px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .recent-purchase-card:hover {
            transform: translateY(-5px);
            box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.7);
        }

        .recent-purchase-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: 2px solid #333333;
        }

        .recent-purchase-user {
            text-decoration: none;
            color: #FFFFFF;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .recent-purchase-username {
            font-size: 0.9rem;
            margin: 0;
        }

        .recent-purchase-info {
            font-size: 0.9rem;
            margin-top: 10px;
        }

        .recent-purchase-value {
            color: #42bf15;
        }

        .recent-purchase-date {
            color: #3693eb;
        }



        .background img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes aparecer {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .purchase-card.aparecer {
            animation: aparecer 0.8s ease-out forwards;
        }
    </style>
</head>

<body>
    <header>
        <div class="logo">Meu Robux</div>

        <div style="display:flex;align-items: center;justify-content: center;" class="mobiletopico">
            <div class="buttons topo" style="margin-right: 10px">
                <a href="https://discord.gg/easybux" class="discord-button"
                    style="display: inline-block; padding: 10px 10px; background-color: #7289da; color: #fff; border-radius: 20px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; width: 50px; height: 50px">
                    <img src="https://media.discordapp.net/attachments/1326122303074992140/1326303986839457833/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png?ex=677ef057&is=677d9ed7&hm=9b17073b17f3e9fa05a69339bbf19b0e54ba151626ba15e7f0d4a44defe6aebc&=&format=webp&quality=lossless&width=557&height=422"
                        width="30" alt="Discord"
                        style="vertical-align: middle; margin-right: 10px; filter: brightness(100)">
                </a>



                <style>
                    .discord-button {
                        transition: 250ms ease-in-out
                    }

                    .discord-button:hover {
                        transform: scale(1.05);
                    }
                </style>
            </div>

            <nav id="informacoes">

                <div id="logindiv" class="loginbutton">
                    <span class="material-symbols-outlined" style="font-size: 26px">
                        login
                    </span>
                    <p>Entrar</p>

                </div>
            </nav>
        </div>

    </header>

    <div class="hero"
        style="position:relative; background-image: url('none'); background-size: cover; background-position: center;">
        <h1 id="bemvindo">Bem-vindo à Meu Robux</h1>
        <p>Sua fonte confiável para Robux, BloxFruits e muito mais! Experimente a melhor qualidade e segurança do
            mercado.</p>
        <div class="buttons">
            <a onclick="buyRobux()" style="cursor:pointer; width:230px">Comprar Robux</a>
            <!-- <a href="https://discord.gg/easybux">Avaliações</a> -->
        </div>
    </div>

    <div class="categories">
        <!-- <div class="category" onclick="buyRobux()">
            <img src="https://media.cnn.com/api/v1/images/stellar/prod/231129151319-roblox-robux-07052023.jpg?c=16x9&q=h_833,w_1480,c_fill" alt="Robux">
            <h3>Robux</h3>
        </div> -->
        <!-- <div class="category">
            <img src="https://s2-techtudo.glbimg.com/vHWl2vldx8niOwPcIwqNcTMi12s=/0x0:956x545/984x0/smart/filters:strip_icc()/i.s3.glbimg.com/v1/AUTH_08fbf48bc0524877943fe86e43087e7a/internal_photos/bs/2023/0/t/4RR6MxTU2Un6Cj8Iu9UQ/screenshot-1.png" alt="BloxFruits">
            <h3>BloxFruits</h3>
        </div> -->
    </div>

    <div class="recent-purchases-container" style="margin-left: 30px">
        <h2 class="recent-purchases-title">Depósitos Recentes / Compras Recentes</h2>
        <div id="recentPurchases" class="recent-purchases-list">

        </div>
    </div>






    <div class="modal-overlay" id="modal">
        <div class="modal-content">
            <div class="container">
                <div class="card">
                    <div class="face front">
                        <h2>Login</h2>
                        <input type="text" id="login-username" placeholder="Usuário">
                        <input type="password" id="login-password" placeholder="Senha">
                        <button onclick="login()">Entrar</button>
                        <p class="switch" onclick="flipToRegister()">Ainda não tem uma conta?
                            <strong>Registre-se</strong>
                        </p>
                    </div>

                    <div class="face back">
                        <h2>Registro</h2>


                        <div style="position:relative">
                            <input type="text" id="register-username" style="padding-left:10px"
                                placeholder="Usuário [Nick do roblox]" oninput="getUserProfile(this)">
                            <img id="register-username-avatar" src=""
                                style="display: none; width: 30px; height: 30px; border-radius: 50%; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); transition: transform 0.3s ease;">
                            <style>
                                #register-username-avatar:hover {
                                    transform: translateY(-50%) scale(1.2);
                                }
                            </style>
                            <img id="register-username-avatar" src=""
                                style="display: none; width: 30px; height: 30px; border-radius: 50%; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);">
                        </div>



                        <script>
                            async function getUserProfile(input) {
                                const response = await fetch('https://meurobux.csync.com.br/api/getprofile', {
                                    method: 'POST',
                                    headers: { 'Content-Type': 'application/json' },
                                    body: JSON.stringify({ username: input.value })
                                })
                                const data = await response.text()
                                if (!data.includes('https://i.pinimg')) {
                                    input.style.paddingLeft = '50px';
                                    document.getElementById('register-username-avatar').src = data;
                                    document.getElementById('register-username-avatar').style.display = 'initial';
                                } else {
                                    input.style.paddingLeft = '10px';
                                    document.getElementById('register-username-avatar').style.display = 'none';
                                }
                            }
                        </script>



                        <input type="password" id="register-password" placeholder="Senha">
                        <input type="password" id="register-confirm" placeholder="Confirme sua senha">
                        <button onclick="register()">Registrar</button>
                        <p id="mensagemerro"></p>
                        <p class="switch" onclick="flipToLogin()">Já tem uma conta? <strong>Faça login</strong></p>
                    </div>
                </div>
            </div>
            <span class="close-modal" onclick="closeModal()">×</span>
        </div>
    </div>

    <div class="saldo-overlay" id="saldoPrompt">
        <div class="saldo-content">
            <h2>Adicionar Saldo</h2>
            <input type="number" id="saldo-valor" placeholder="Valor em R$">

            <h3>Método de Pagamento</h3>
            <div class="payment-methods">
                <button id="payment-method" alt="pix">
                    <img src="https://www.advocacianunes.com.br/wp-content/uploads/2022/04/logo-pix-icone-1024.png">
                    <p>Pix</p>
                </button>

                <button id="payment-method" alt="crypto" disabled style="cursor:not-allowed"
                    style="background-color: rgba(23,23,26,255);color: #5e6068">
                    <img src="https://www.bussoladoinvestidor.com.br/wp-content/uploads/2015/04/bitcoin20.png">
                    <p>Crypto</p>
                </button>

            </div>

            <button onclick="confirmarSaldo()">Confirmar</button>
            <span class="close-saldo" onclick="fecharSaldoPrompt()">×</span>
        </div>
    </div>


    <footer>
        <p>&copy; 2024 Meu Robux. Todos os direitos reservados. Desenvolvido com excelência para você!</p>
    </footer>
</body>


<script>
    let valorrobux = 45

    function calcular_preco(robux, k) {
        return (k / 1000) * robux
    }
    function calcular_reais(valor, k) {
        return (valor / k) * 1000;
    }
    function calcular_taxado(robux) {
        return Math.round(robux / 0.70)
    }

    function rolarParaTopo() {
        window.scrollTo({
            top: 0,
            behavior: 'smooth'
        });
    }

    let { username, password } = JSON.parse(localStorage.getItem('login') ? localStorage.getItem('login') : '{}')
    let neveDinheiro = false
    let neveFelicidade = false


    function enableDragScroll(container) {
        let isDragging = false;
        let startX, scrollLeft;
        container.addEventListener("mousedown", (e) => {
            isDragging = true;
            container.classList.add("dragging");
            startX = e.pageX - container.offsetLeft;
            scrollLeft = container.scrollLeft;
            document.body.style.userSelect = "none";
        });

        container.addEventListener("mouseleave", () => {
            isDragging = false;
            container.classList.remove("dragging");
            document.body.style.userSelect = "";
        });

        container.addEventListener("mouseup", () => {
            isDragging = false;
            container.classList.remove("dragging");
            document.body.style.userSelect = "";
        });

        container.addEventListener("mousemove", (e) => {
            if (!isDragging) return;
            e.preventDefault();
            const x = e.pageX - container.offsetLeft;
            const walk = (x - startX) * 1;
            container.scrollLeft = scrollLeft - walk;
        });

        // Suporte para dispositivos touch
        container.addEventListener("touchstart", (e) => {
            isDragging = true;
            startX = e.touches[0].pageX - container.offsetLeft;
            scrollLeft = container.scrollLeft;
            document.body.style.userSelect = "none";
        });

        container.addEventListener("touchend", () => {
            isDragging = false;
            document.body.style.userSelect = "";
        });

        container.addEventListener("touchmove", (e) => {
            if (!isDragging) return;
            const x = e.touches[0].pageX - container.offsetLeft;
            const walk = (x - startX) * 1;
            container.scrollLeft = scrollLeft - walk;
        });
    }

    enableDragScroll(document.getElementById("recentPurchases"));


    function notify(mensagem, icone = "info", audioPlay = true) {
        if (audioPlay) {
            const audio = new Audio('https://smoretti2.github.io/robux/notification.mp3')
            audio.play()
        }

        const notificacao = document.createElement("div");
        notificacao.classList.add("notificacao");

        const icon = document.createElement("span");
        icon.classList.add("material-symbols-outlined");

        if (icone == 1) {
            icone = 'check_circle'
            icon.style.color = '#0eff0a'
        } else if (icone == 2) {
            icone = 'info'
            icon.style.color = '#fff70a'

        } else if (icone == 3) {
            icone = 'cancel'
            icon.style.color = 'red'

        }
        icon.textContent = icone;
        const texto = document.createElement("span");
        texto.innerHTML = mensagem;

        const botaoFechar = document.createElement("button");
        botaoFechar.textContent = "X";
        botaoFechar.classList.add('fechartransacoes')
        botaoFechar.classList.add("fechar");
        botaoFechar.onclick = () => {
            notificacao.style.opacity = 0;
            notificacao.style.transform = "translateX(-50%) translateY(-100%)";
            setTimeout(() => notificacao.remove(), 500);
        };

        notificacao.appendChild(icon);
        notificacao.appendChild(texto);
        notificacao.appendChild(botaoFechar);

        document.body.appendChild(notificacao);

        setTimeout(() => notificacao.classList.add("show"), 10);

        setTimeout(() => {
            notificacao.style.opacity = 0;
            notificacao.style.transform = "translateX(-50%) translateY(-100%)";
            setTimeout(() => notificacao.remove(), 500);
        }, 5000);
    }


    function openlink(link) {
        window.open(link, '_blank');
    }

    async function openProfile() {
        const menu = document.createElement("div");
        menu.classList.add("menu");
        menu.style.position = "fixed";
        menu.style.top = "50%";
        menu.style.left = "50%";
        menu.style.transform = "translate(-50%, -50%) scale(0)";
        menu.style.background = "#1A1A1A";
        menu.style.padding = "20px";
        menu.style.borderRadius = "15px";
        menu.style.boxShadow = "0px 6px 15px rgba(0, 0, 0, 0.5)";
        menu.style.zIndex = "1000";
        menu.style.width = "400px";
        menu.style.color = "#FFF";
        menu.style.fontFamily = "Arial, sans-serif";
        menu.style.textAlign = "center";
        menu.style.transition = "transform 0.5s ease-out";
        document.body.appendChild(menu);

        setTimeout(() => menu.style.transform = "translate(-50%, -50%) scale(1)", 10);

        const loading = document.createElement("div");
        loading.style.border = "5px solid #333";
        loading.style.borderTop = "5px solid #3693eb";
        loading.style.borderRadius = "50%";
        loading.style.width = "50px";
        loading.style.height = "50px";
        loading.style.margin = "20px auto";
        loading.style.animation = "spin 1s linear infinite";
        menu.appendChild(loading);

        const loadingText = document.createElement("p");
        loadingText.textContent = "Carregando perfil...";
        loadingText.style.color = "#AAA";
        menu.appendChild(loadingText);

        const style = document.createElement("style");
        style.textContent = `
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .tab-buttons {
            display: flex;
            justify-content: space-around;
            border-bottom: 2px solid #333;
            margin-bottom: 15px;
            padding: 10px 0;
        }

        .tab-button {
            flex: 1;
            padding: 10px 15px;
            cursor: pointer;
            background: none;
            border: none;
            color: #FFF;  
            font-weight: bold;
            font-size: 16px;
            position: relative;
            transition: color 0.3s ease;
            overflow: hidden;
        }

        .tab-button div {
            position: absolute;
            bottom: 0;
            left: -100%;  
            width: 100%;
            height: 3px;
            background: #3693eb;
            transition: left 0.3s ease-in-out;  
        }

        .tab-button:hover div {
            left: 0;  
        }

        .tab-button.active div {
            left: 0;  
        }

        .tab-content {
            display: none;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .tab-content.active {
            display: block;
            opacity: 1;
        }
    `;
        document.head.appendChild(style);

        try {
            const profile = await fetch('https://meurobux.csync.com.br/api/getprofile', {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({ username: username })
            }).then(r => r.text());
            const transacoes = await fetch('https://meurobux.csync.com.br/api/transacoes', {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({ username, password })
            }).then(r => r.json());

            if (!transacoes.success) {
                return notify(transacoes.message, 3);
            }

            menu.innerHTML = "";

            const img = document.createElement("img");
            img.src = profile;
            img.alt = "Foto de Perfil";
            img.style.width = "100px";
            img.style.height = "100px";
            img.style.borderRadius = "50%";
            img.style.border = "3px solid #3693eb";
            img.style.marginBottom = "15px";
            menu.appendChild(img);

            const h3 = document.createElement("h3");
            h3.textContent = `Usuário: ${username}`;
            h3.style.color = "#3693eb";
            h3.style.marginBottom = "10px";
            menu.appendChild(h3);

            const tabContainer = document.createElement("div");
            tabContainer.classList.add("tab-buttons");
            menu.appendChild(tabContainer);

            const tabs = [
                { name: "Depósitos", id: "deposits-tab" },
                { name: "Compras", id: "purchases-tab" }
            ];

            const tabContent = {};

            tabs.forEach(tab => {
                const tabButton = document.createElement("button");
                tabButton.textContent = tab.name;
                tabButton.classList.add("tab-button");
                if (tab.id === "deposits-tab") tabButton.classList.add("active");

                const highlight = document.createElement("div");
                tabButton.appendChild(highlight);

                tabButton.addEventListener("click", () => {
                    document.querySelectorAll(".tab-button").forEach(button => {
                        button.classList.remove("active");
                    });
                    tabButton.classList.add("active");

                    Object.values(tabContent).forEach(content => {
                        content.classList.remove("active");
                    });
                    tabContent[tab.id].classList.add("active");
                });

                tabButton.addEventListener('mouseover', () => {
                    tabButton.style.background = 'none'
                })

                tabContainer.appendChild(tabButton);

                const content = document.createElement("div");
                content.id = tab.id;
                content.classList.add("tab-content");
                if (tab.id === "deposits-tab") content.classList.add("active");
                menu.appendChild(content);

                tabContent[tab.id] = content;
            });

            transacoes.transacoes.forEach(transacao => {
                const item = document.createElement("div");
                item.style.padding = "10px";
                item.style.marginBottom = "5px";
                item.style.background = "#333";
                item.style.borderRadius = "5px";

                if (transacao.valor) {
                    item.innerHTML = `<span class="material-symbols-outlined" style="position: absolute; transform:translateX(-25px) translateY(0px); color: #47e01d">check_circle</span> <strong style="color: #ffffff">[</strong> <strong style="color: #57e320">Depósito</strong> <strong style="color: #ffffff">]</strong> R$ ${transacao.valor.toFixed(2).replace('.', ',')} - ${new Date(transacao.timestamp).toLocaleDateString("pt-BR")}`;
                    tabContent["deposits-tab"].appendChild(item);
                } else if (transacao.robux) {
                    const status = transacao.status === 'success' ? "Entregue" : "Pendente";

                    item.style.position = 'relative'
                    if (transacao.status == 'pending') {
                        item.innerHTML = `<span class="material-symbols-outlined" style="position: absolute; transform:translateX(-25px) translateY(0px); color: #e0c514">timer</span> <strong style="color: #ffffff">[</strong> <strong style="color: #f5de0c">Pendente</strong> <strong style="color: #ffffff">]</strong> ${Math.floor(Math.round(transacao.robux * 0.70))} Robux - ${new Date(transacao.timestamp).toLocaleDateString("pt-BR")}`;
                    } else if (transacao.status == 'success') {
                        item.innerHTML = `<span class="material-symbols-outlined" style="position: absolute; transform:translateX(-25px) translateY(0px); color: #47e01d">check_circle</span> <strong style="color: #ffffff">[</strong> <strong style="color: #57e320">Entregue</strong> <strong style="color: #ffffff">]</strong> ${Math.floor(Math.round(transacao.robux * 0.70))} Robux - ${new Date(transacao.timestamp).toLocaleDateString("pt-BR")}`;
                    } else if (transacao.status == 'analysis') {
                        item.innerHTML = `<span class="material-symbols-outlined" style="position: absolute; transform:translateX(-25px) translateY(0px); color: #e8271a">trending_down</span> <strong style="color: #ffffff">[</strong> <strong style="color: #e8271a">Análise</strong> <strong style="color: #ffffff">]</strong> ${Math.floor(Math.round(transacao.robux * 0.70))} Robux - ${new Date(transacao.timestamp).toLocaleDateString("pt-BR")}`;
                        notify(
                            'Gamepass em análise!\nDetectamos um erro em sua gamepass! Verifique se a mesma continua com o valor combinado e se ela se encontra pública!',
                            3
                        );
                        setTimeout(() => {
                            notify('Não se preocupe, caso você arrume sua gamepass, logo ela será entregue!', 1)
                        }, 3000)
                    }


                    tabContent["purchases-tab"].insertBefore(item, tabContent["purchases-tab"].firstChild);
                    // tabContent["purchases-tab"].appendChild(item);
                }
            });

            const botaoFechar = document.createElement("button");
            botaoFechar.textContent = "Fechar";
            botaoFechar.style.marginTop = "20px";
            botaoFechar.style.background = "#FF4C4C";
            botaoFechar.style.border = "none";
            botaoFechar.style.color = "#FFF";
            botaoFechar.style.padding = "10px 20px";
            botaoFechar.style.borderRadius = "5px";
            botaoFechar.style.cursor = "pointer";
            botaoFechar.onclick = async () => {
                menu.style.transition = 'transform 0.5s ease-in-out';
                menu.style.transform = "translate(-50%, -50%) scale(0)";
                await wait(500);
                setTimeout(() => menu.remove(), 500);
            };
            menu.appendChild(botaoFechar);
        } catch (error) {
            menu.innerHTML = `<p style="color: #FF4C4C;">Erro ao carregar perfil. Tente novamente mais tarde.</p>`;
        }
    }


    async function wait(ms) {
        return new Promise(result => {
            setTimeout(result, ms)
        })
    }

    function logout() {
        notify('Deslogando...', 2);
        setTimeout(() => {
            localStorage.removeItem('login');
            location.reload();
        }, Math.random() * 2000)

    }

    const modal = document.getElementById("modal");

    function openModal() {
        modal.classList.add("active");
    }

    function closeModal() {
        modal.classList.remove("active");
    }

    function closeLoginPrompt() {
        const modal = document.getElementById("modal");

        if (modal == null) {
            return
        }
        modal.style.transition = "1s ease-in-out";

        setTimeout(() => {
            modal.style.opacity = 0
            setTimeout(() => {
                modal.style.display = "none";
            }, 1000)
        }, 1);
    }

    document.querySelector(".loginbutton").addEventListener("click", openModal);

    function flipToRegister() {
        document.querySelector(".card").classList.add("flipped");
    }

    function flipToLogin() {
        document.querySelector(".card").classList.remove("flipped");
    }

    async function buyRobux() {
        if (!username) {
            notify('Crie sua conta antes de comprar robux', 1)

            openModal()

            flipToLogin()
            await wait(300)
            flipToRegister()
            return
        }
        new Audio('https://smoretti2.github.io/robux/notification.mp3').play()
        const div = document.createElement("div");
        div.style.position = "fixed";
        div.style.top = "0";
        div.style.left = "0";
        div.style.width = "100vw";
        div.style.height = "100vh";
        div.style.background = "rgba(0, 0, 0, 0.8)";
        div.style.display = "flex";
        div.style.flexDirection = "column";
        div.style.justifyContent = "center";
        div.style.alignItems = "center";
        div.style.textAlign = "center"
        div.style.zIndex = "3";
        div.style.padding = "30px";
        div.style.transition = "opacity 0.3s ease-in-out";
        div.classList.add("comprarcartao");
        div.style.opacity = 0;






        document.body.appendChild(div);

        const content = document.createElement("div");
        content.style.background = "#1A1A1A";
        content.style.borderRadius = "15px";
        content.style.padding = "20px";
        content.style.boxShadow = "0px 8px 15px rgba(0,0,0,0.7)";
        content.style.display = "flex";
        content.style.justifyContent = "center";
        content.style.flexDirection = "column";
        content.style.alignItems = "center";
        content.style.textAlign = "center";
        content.style.maxWidth = "400px";
        content.style.width = "90%";
        content.style.position = 'relative'
        div.appendChild(content);


        const x = document.createElement('span');
        x.textContent = 'x';
        x.style.position = 'absolute'
        x.style.top = '15px'
        x.style.right = '20px'
        x.style.cursor = 'pointer';
        x.style.fontSize = '20px'

        Object.assign(x.style, {
            "transition": "transform 0.3s, color 0.3s; transform: scale(1)"
        })

        content.appendChild(x);
        x.addEventListener('click', () => {
            div.style.opacity = 0;
            setTimeout(() => {
                div.remove();
            }, 300)
        })


        const h2 = document.createElement("h2");
        h2.textContent = "Comprar robux";
        h2.style.color = "#FFFFFF";
        h2.style.marginBottom = "20px";



        const p = document.createElement("p");
        p.innerHTML = "Insira seu NickName do Roblox";
        p.style.color = "#FFFFFF";




        const inputContainer = document.createElement("div");
        inputContainer.style.width = "100%";

        // Container inicio
        inputContainer.appendChild(h2);
        inputContainer.appendChild(p);

        const input = document.createElement("input");
        input.type = "text";
        input.style.marginBottom = "20px";
        input.placeholder = 'ilxsxmu'
        input.style.position = 'relative'
        input.style.width = '50%'
        input.oninput = async () => {
            const response = await fetch('https://meurobux.csync.com.br/api/getprofile', {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({ username: input.value })
            })
            const data = await response.text()

            if (!data.includes('https://i.pinimg')) {
                input.style.paddingLeft = '15px';
                img.src = data;
                img.style.display = 'initial';
                divConfirm.style.display = 'flex'

            } else {
                input.style.paddingLeft = '10px';
                img.style.display = 'none';
                divConfirm.style.display = 'none'
            }
        }

        input.addEventListener('keyup', (e) => {
            if (e.key === 'Enter') {
                btnSim.click()
            }
        })

        const imgDiv = document.createElement('div')
        imgDiv.style.display = 'flex'
        imgDiv.style.width = '100%'
        imgDiv.style.justifyContent = 'center'

        const img = document.createElement("img");
        img.style.width = "100px";
        img.style.height = "100px";
        img.style.marginLeft = "10px";
        img.style.display = 'none'
        img.style.borderRadius = '100%'
        img.style.position = 'relative'
        img.style.border = '2px solid rgb(200, 200, 200)'

        imgDiv.appendChild(img)

        const divConfirm = document.createElement('div')
        divConfirm.style.display = 'none'
        divConfirm.style.gap = '10px'
        divConfirm.style.display = 'none';
        divConfirm.style.justifyContent = 'center';
        divConfirm.style.alignItems = 'center';
        divConfirm.style.marginTop = '20px';


        const btnSim = document.createElement('span')
        btnSim.classList.add('material-symbols-outlined')
        btnSim.textContent = 'check'
        btnSim.style.color = '#fff'
        btnSim.style.cursor = 'pointer'


        const btnNao = document.createElement('span')
        btnNao.classList.add('material-symbols-outlined')
        btnNao.textContent = 'close'
        btnNao.style.color = '#fff'
        btnNao.style.cursor = 'pointer'

        btnSim.style.transition = 'transform 0.3s, color 0.3s';
        btnSim.onmouseover = () => {
            btnSim.style.transform = 'scale(1.09)';
            btnSim.style.color = '#32d112';
        };
        btnSim.onmouseout = () => {
            btnSim.style.transform = 'scale(1)';
            btnSim.style.color = '#fff';
        };

        btnNao.style.transition = 'transform 0.3s, color 0.3s';
        btnNao.onmouseover = () => {
            btnNao.style.transform = 'scale(1.09)';
            btnNao.style.color = '#e61212';
        };
        btnNao.onmouseout = () => {
            btnNao.style.transform = 'scale(1)';
            btnNao.style.color = '#fff';
        };

        btnNao.addEventListener('click', () => {
            input.value = '';
            input.oninput();
            notify('Digite o nick certo:', 2)
        })

        btnSim.addEventListener('click', async () => {
            let paymentInfo = {
                nick: input.value,
                img: img.src,
            };

            inputContainer.style.transition = '500ms ease-in-out';
            new Audio('https://smoretti2.github.io/robux/notification.mp3').play();
            await wait(1);

            inputContainer.style.opacity = '0';
            await wait(500);
            inputContainer.innerHTML = '';
            inputContainer.style.opacity = '1';
            inputContainer.style.padding = '1px 30px';
            inputContainer.style.alignItems = null;

            const divTop = document.createElement('div');
            divTop.innerHTML = `
                <h4>${paymentInfo.nick}</h4>
                <img src="${paymentInfo.img}" style="height: 80px;border-radius: 100%">
            `;

            Object.assign(divTop.style, {
                display: 'flex',
                textAlign: 'center',
                alignItems: 'center',
                justifyContent: 'space-between',
                marginLeft: '30px',
                marginRight: '30px',
                marginBottom: '40px',
            });

            inputContainer.appendChild(divTop);

            const style = document.createElement('style');
            style.textContent = `
                .styled-input {
                    display: flex;
                    align-items: center;
                    background-color: #1A1A1A;
                    border: 1px solid #333333;
                    border-radius: 8px;
                    padding: 10px 15px;
                    width: 160px;
                    height: 50px;
                    gap: 8px;
                    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
                    transition: all 0.3s ease;
                }

                .styled-input:hover {
                    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
                }

                .styled-input:focus-within {
                    border-color: #333333;
                    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
                }

                .input-content {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    gap: 2px;
                    width: 100%;
                }

                .input-content p {
                    font-size: 0.8rem;
                    font-weight: bold;
                    margin: 0;
                    color: #FFFFFF;
                }

                .input-content input {
                    border: none;
                    outline: none;
                    font-size: 1rem;
                    background: transparent;
                    color: #FFFFFF;
                    width: 100%;
                    padding: 0;
                    transform: translateY(0px) translateX(16px);
                }

                .input-content p {
                    transform: translateY(6px) translateX(0px);

                }

                .material-symbols-outlined {
                    color: #FFFFFF;
                    font-size: 20px;
                }

                .tocourodou {
                    font-size: 24px;
                    cursor: pointer;
                    color: #FFFFFF;
                    margin: 0 10px;
                    transition: color 0.3s ease;
                }

                .tocourodou:hover {
                    color: #666666;
                }
            `;
            document.head.appendChild(style);

            const divMiddle = document.createElement('div');
            divMiddle.style.opacity = '0';
            divMiddle.style.transition = '500ms ease-out';
            divMiddle.style.display = 'flex';
            divMiddle.style.gap = '15px';
            divMiddle.style.justifyContent = 'center';
            divMiddle.style.marginTop = '20px';

            divMiddle.innerHTML = `
                <div class="styled-input">
                    <span class="material-symbols-outlined">account_balance_wallet</span>
                    <div class="input-content">
                        <p>Reais</p>
                        <input type="text" id="saldo-reais" placeholder="0,00 R$">
                    </div>
                </div>
                <span class="material-symbols-outlined tocourodou">sync_alt</span>
                <div class="styled-input">
                    <span style="position:relative;width:20px;height:20px"><img style="position: absolute; height: 22px; transform: translateX(-2px) translateY(0px); filter: brightness(999)" src="https://media.discordapp.net/attachments/1326122303074992140/1326289774985871465/Robloxi_valuuta__Robux__Ikoon.png?ex=677ee31b&is=677d919b&hm=ca79d5412d8dee5bcde9919dc943c0d45a8f68d73495660ecec4efb24d6e160a&=&format=webp&quality=lossless&width=460&height=499"></span>
                    <div class="input-content">
                        <p>Robux</p>
                        <input type="text" id="saldo-robux" placeholder="0 Robux">
                    </div>
                </div>
            `;

            inputContainer.appendChild(divMiddle);

            await wait(500);
            divMiddle.style.opacity = '1';

            const InputReal = document.querySelector('#saldo-reais');
            const InputRobux = document.querySelector('#saldo-robux');

            InputReal.addEventListener('keyup', (e) => {
                if (e.key === 'Enter') {
                    btnConfirmar.click()
                }
            })
            InputRobux.addEventListener('keyup', (e) => {
                if (e.key === 'Enter') {
                    btnConfirmar.click()
                }
            })

            InputReal.addEventListener('input', () => {
                if (isNaN(InputReal.value.replace(',', '.'))) {
                    InputReal.value = '1000';
                }
                InputRobux.value = calcular_reais(Number(InputReal.value.replace(',', '.')), valorrobux).toFixed(0);
                paymentInfo.robux = Number(InputRobux.value.replace(',', '.'));

            });



            InputRobux.addEventListener('input', () => {
                if (isNaN(InputRobux.value)) {
                    InputRobux.value = valorrobux;
                }
                paymentInfo.robux = Number(InputRobux.value.replace(',', '.'));

                InputReal.value = calcular_preco(Number(InputRobux.value), valorrobux).toFixed(2).replace('.', ',');
            });

            InputRobux.value = '1000';
            InputRobux.dispatchEvent(new Event('input'));

            const btnConfirmar = document.createElement('button');
            btnConfirmar.textContent = 'Confirmar';
            btnConfirmar.style.background = '#3693eb';
            btnConfirmar.style.color = '#FFF';
            btnConfirmar.style.borderRadius = '10px';
            btnConfirmar.style.padding = '10px 20px';
            btnConfirmar.style.cursor = 'pointer';
            btnConfirmar.style.transition = 'background 0.3s, color 0.3s';
            btnConfirmar.onmouseover = () => {
                btnConfirmar.style.background = '#247ac9';
            };
            btnConfirmar.onmouseout = () => {
                btnConfirmar.style.background = '#3693eb';
            };


            btnConfirmar.addEventListener('click', async () => {
                if (paymentInfo.nick && paymentInfo.robux) {
                    if (paymentInfo.robux < 5) {
                        return notify('Mínimo de 5 robux por carrinho', 3)
                    }
                    btnConfirmar.disabled = true;
                    const data = await fetch('https://meurobux.csync.com.br/api/saldo', {
                        method: "POST",
                        headers: { "Content-Type": "application/json" },
                        body: JSON.stringify({ username, password })
                    }).then(r => r.json())

                    if (!data.success) {
                        notify(data.message, 3)
                        btnConfirmar.disabled = null
                        return
                    }

                    if (data.saldo < calcular_preco(paymentInfo.robux, valorrobux)) {
                        btnConfirmar.disabled = null
                        AdicionarSaldo()
                        return notify('Saldo insuficiente!', 3)
                    }


                    const r = new Audio('https://smoretti2.github.io/robux/approved.mp3')
                    r.currentTime = 0.7
                    r.play()


                    inputContainer.style.opacity = '0'
                    await wait(500)
                    inputContainer.style.opacity = '1'

                    inputContainer.removeChild(inputContainer.lastChild)
                    inputContainer.removeChild(inputContainer.lastChild)

                    const titulo = document.createElement('p');
                    titulo.textContent = `Você precisa criar uma gamepass no valor de ${calcular_taxado(paymentInfo.robux)} Robux!`;
                    titulo.style.color = '#FFF';
                    titulo.style.marginBottom = '20px';
                    inputContainer.appendChild(titulo);

                    const tutorialContainer = document.createElement('div');
                    tutorialContainer.style.marginTop = '20px';
                    tutorialContainer.style.display = 'flex';
                    tutorialContainer.style.justifyContent = 'center';
                    tutorialContainer.style.alignItems = 'center';
                    tutorialContainer.style.width = '100%';
                    tutorialContainer.style.height = 'auto';
                    tutorialContainer.style.maxWidth = '800px';
                    tutorialContainer.style.margin = '20px auto';
                    tutorialContainer.style.overflow = 'hidden';
                    tutorialContainer.style.border = '1px solid #ccc';

                    tutorialContainer.innerHTML = `<iframe style="width: 100%; max-width: 100%; height: auto;" src="https://www.youtube.com/embed/OXaC_difedc?si=BAJP6X684G1q5L23" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>`;

                    document.body.appendChild(tutorialContainer);



                    inputContainer.appendChild(tutorialContainer);



                    const btnJaCriei = document.createElement('button');
                    btnJaCriei.textContent = 'Já criei!';
                    btnJaCriei.style.color = '#FFF';
                    btnJaCriei.style.backgroundColor = '#3693eb';
                    btnJaCriei.style.border = 'none';
                    btnJaCriei.style.padding = '10px 20px';
                    btnJaCriei.style.marginTop = '20px';
                    btnJaCriei.style.cursor = 'pointer';
                    btnJaCriei.style.borderRadius = '5px';
                    btnJaCriei.addEventListener('click', async () => {
                        btnJaCriei.disabled = true
                        const loadingAnimation = document.createElement('div');
                        loadingAnimation.textContent = 'Carregando...';
                        loadingAnimation.style.color = '#FFF';
                        inputContainer.appendChild(loadingAnimation);


                        const data = await fetch('https://meurobux.csync.com.br/api/gamepasses/get', {
                            method: 'POST',
                            headers: { "Content-Type": "application/json" },
                            body: JSON.stringify({ username, password, nick: paymentInfo.nick })
                        }).then(r => r.json());

                        inputContainer.removeChild(loadingAnimation);

                        if (!data.success) {
                            btnJaCriei.disabled = null
                            return notify(data.message, 3);
                        }

                        const encontrei = data.gamepasses.find(v => v.Valor == calcular_taxado(paymentInfo.robux))

                        if (!encontrei) {
                            tutorialContainer.style.display = 'block'
                            notify('Não encontramos nenhuma gamepass nesse valor em sua conta!\nVerifique se seu mapa não está privado!', 3)
                            btnJaCriei.disabled = null
                            return
                        }

                        const data2 = await fetch('https://meurobux.csync.com.br/api/addpendente', {
                            method: 'POST',
                            headers: { "Content-Type": "application/json" },
                            body: JSON.stringify({
                                username,
                                username2: paymentInfo.nick,
                                password,
                                gamepassId: encontrei.Id,
                                totalRobux: encontrei.Valor
                            })
                        }).then(r => r.json())
                        let saldoAtual = await fetch('https://meurobux.csync.com.br/api/saldo', {
                            method: 'POST',
                            headers: {
                                'Content-Type': 'application/json',
                            },
                            body: JSON.stringify({ username })
                        }).then(r => r.json().then(r => r.saldo))

                        if (!data2.success) {
                            return notify(data2.message, 3)
                        }

                        div.style.opacity = '0'
                        setTimeout(() => {
                            div.remove()
                        }, 500)
                        await wait(500)
                        rolarParaTopo()

                        neveDinheiro = true
                        await wait(1400)
                        setTimeout(() => {
                            setTimeout(() => {
                                const fadeOverlay = document.createElement('div');
                                fadeOverlay.style.position = 'fixed';
                                fadeOverlay.style.top = '0';
                                fadeOverlay.style.left = '0';
                                fadeOverlay.style.width = '100%';
                                fadeOverlay.style.height = '100%';
                                fadeOverlay.style.backgroundColor = 'black';
                                fadeOverlay.style.opacity = '0';
                                fadeOverlay.style.transition = 'opacity 1s';
                                fadeOverlay.style.zIndex = '99999999';
                                document.body.appendChild(fadeOverlay);

                                setTimeout(() => {
                                    fadeOverlay.style.opacity = '1';
                                    setTimeout(() => {
                                        window.location.href = 'https://meurobux.csync.com.br/aprovado';
                                    }, 1000);
                                }, 100);

                            }, 500)
                        }, 1500)

                        focusAumentar(saldoAtual, true)
                    });


                    inputContainer.appendChild(btnJaCriei);


                } else {
                    notify('Preencha todos os campos!', 3)
                }
            });


            inputContainer.appendChild(btnConfirmar);
        });

        divConfirm.appendChild(btnNao)
        divConfirm.appendChild(btnSim)



        inputContainer.appendChild(input);
        inputContainer.appendChild(imgDiv);
        inputContainer.appendChild(divConfirm)


        // Container fim 
        content.appendChild(inputContainer);



        setTimeout(() => {
            div.style.opacity = 1
        }, 500)

    }

    async function login() {
        const user = document.getElementById("login-username").value;
        const pass = document.getElementById("login-password").value;

        const data = await fetch('https://meurobux.csync.com.br/api/login', {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ username: user, password: pass })
        }).then(r => r.json())

        if (data?.success == true) {
            username = user
            password = pass
            localStorage.setItem('login', JSON.stringify({ username, password }))
            index(true)
        } else {
            notify(data.message, 3)
        }
    }

    async function register() {
        const user = document.getElementById("register-username").value;
        const pass = document.getElementById("register-password").value;
        const confirm = document.getElementById("register-confirm").value;

        if (pass === confirm) {
            const data = await fetch('https://meurobux.csync.com.br/api/register', {
                method: "POST",
                headers: { "Content-Type": "application/json" },
                body: JSON.stringify({ username: user, password: pass })
            }).then(r => r.json())

            if (data?.success == true) {
                notify(data.message, 1)
                await wait(1000)

                document.querySelector('#login-username').value = user

                flipToLogin()
                await wait(800)

                const passLogin = document.querySelector('#login-password')

                passLogin.style.transition = '500ms ease-in-out'
                await wait(1)
                passLogin.style.transform = 'scale(1.3)'
                passLogin.focus()
                await wait(700)
                passLogin.style.transform = 'scale(1)'
            } else {
                notify(data.message, 3)
            }
        } else {
            notify('As senhas precisam ser iguais!', 3)
        }
    }

    async function focusAumentar(valorNovo = 0, bool = false) {
        const saldoReal = document.getElementById("saldoreal");

        if (!saldoReal) {
            console.error("Elemento com ID 'saldoreal' não encontrado.");
            return;
        }

        const valorAtual = parseFloat(saldoReal.textContent.replace("R$ ", "").replace(",", ".")) || 0;
        const incremento = (valorNovo - valorAtual) / 100;
        const duracao = 1000;
        const interval = duracao / 100;
        let contador = 0;

        saldoReal.style.transition = '500ms ease-in-out'
        await wait(1)
        saldoReal.style.color = "#00ff1e";
        saldoReal.style.transform = 'rotate(30deg)'

        if (bool) {
            const audio = new Audio('https://smoretti2.github.io/robux/money.mp3');
            audio.play();
        }


        let i = 0
        const animacao = setInterval(() => {
            contador++;





            const valorAtualizado = valorAtual + incremento * contador;
            saldoReal.textContent = `R$ ${valorAtualizado.toFixed(2).replace(".", ",")}`;

            if (contador >= 100) {
                clearInterval(animacao);
                saldoReal.textContent = `R$ ${valorNovo.toFixed(2).replace(".", ",")}`;
                saldoReal.style.color = "#42bf15";
            }
        }, interval);
    }


    let paymentMethod = 'pix'

    for (v of document.querySelectorAll('#payment-method')) {
        const btn = v

        btn.addEventListener('click', () => {
            // for (v of document.querySelectorAll('#payment-method')) {
            //     if (v == btn) {
            //         v.style.backgroundColor = '#3693eb'

            //     } else {
            //         v.style.backgroundColor = '#247ac9'

            //     }
            // }
            paymentMethod = btn.getAttribute('alt')
        })
    }

    async function AdicionarSaldo() {
        while (true) {
            if (document.querySelector('.fechartransacoes')) {
                document.querySelector('.fechartransacoes').click()
            } else {
                break
            }
            await wait(1)
        }
        const saldoPrompt = document.getElementById("saldoPrompt");
        saldoPrompt.style.opacity = '1'
        saldoPrompt.classList.add("active");
    }

    async function fecharSaldoPrompt() {
        const saldoPrompt = document.getElementById("saldoPrompt");
        saldoPrompt.style.transition = '1s ease-in-out';
        await wait(1)
        saldoPrompt.style.opacity = '0'
        await wait(1000)
        saldoPrompt.classList.remove("active");

    }

    async function abrirPromptPagamento(valor, copia_cola, qrcode, username = "ilxsxmu") {

        const div = document.createElement("div");
        div.style.position = "fixed";
        div.style.top = "0";
        div.style.left = "0";
        div.style.width = "100vw";
        div.style.height = "100vh";
        div.style.background = "rgba(0, 0, 0, 0.8)";
        div.style.display = "flex";
        div.style.flexDirection = "column";
        div.style.justifyContent = "center";
        div.style.alignItems = "center";
        div.style.zIndex = "3";
        div.style.padding = "30px";
        div.style.transition = "opacity 0.3s ease-in-out";
        div.classList.add("pagamentoprompt");
        div.style.opacity = 0;

        const content = document.createElement("div");
        content.style.background = "#1A1A1A";
        content.style.borderRadius = "15px";
        content.style.padding = "20px";
        content.style.boxShadow = "0px 8px 15px rgba(0,0,0,0.7)";
        content.style.display = "flex";
        content.style.flexDirection = "column";
        content.style.alignItems = "center";
        content.style.maxWidth = "500px";
        content.style.width = "90%";




        const h2 = document.createElement("h2");
        h2.textContent = `R$ ${parseFloat(valor).toFixed(2).replace(".", ",")} Saldo`;
        h2.style.color = "#FFFFFF";
        h2.style.marginBottom = "20px";

        let segundos = 600;
        const timer = setInterval(() => {
            const minutos = Math.floor(segundos / 60);
            const segundosRestantes = segundos % 60;
            content.querySelector("p").textContent = `Pagamento expira em ${minutos.toString().padStart(2, "0")}:${segundosRestantes.toString().padStart(2, "0")}`;
            segundos--;
            if (segundos <= 0) {
                clearInterval(timer);
                content.querySelector("p").textContent = "Pagamento expirou!";
                setTimeout(() => fecharPagamentoPrompt(), 1000);
            }
        }, 1000);

        const p = document.createElement("p");
        p.style.color = "#FFFFFF";
        p.style.marginBottom = "15px";
        content.appendChild(p);

        const qrcodeElement = document.createElement("img");
        qrcodeElement.src = `data:image/png;base64,${qrcode}`;
        // qrcodeElement.style.width = "200px";
        // qrcodeElement.style.height = "350px";
        qrcodeElement.style.borderRadius = "10px";
        qrcodeElement.style.marginBottom = "15px";
        qrcodeElement.classList.add('qrcode')

        const copyContainer = document.createElement("div");
        copyContainer.style.display = "flex";
        copyContainer.style.alignItems = "center";
        copyContainer.style.borderRadius = "8px";
        copyContainer.style.padding = "10px";
        copyContainer.style.width = "100%";
        copyContainer.style.position = 'relative'

        const copyText = document.createElement("input");
        copyText.value = `${copia_cola}`;
        copyText.readOnly = true;
        copyText.style.flex = "1";
        copyText.id = 'userinfos3'
        copyText.style.border = "none";
        copyText.style.background = "transparent";
        copyText.style.color = "#FFFFFF";
        copyText.type = 'text'
        copyText.style.transition = '250ms ease-in-out'





        copyContainer.appendChild(copyText);

        const span = document.createElement('span')
        span.classList.add('material-symbols-outlined')
        span.textContent = 'content_copy'
        span.style.position = 'absolute'
        span.style.right = '10px'
        span.style.cursor = 'pointer'

        copyContainer.appendChild(span);


        const button = document.createElement("button");
        button.innerHTML = `Fechar`;
        button.style.marginTop = "15px";
        button.style.padding = "10px 20px";
        button.style.borderRadius = "8px";
        button.style.background = "#3693eb";
        button.style.color = "#fff";
        button.style.border = "none";
        button.style.cursor = "pointer";
        button.style.transition = "background-color 0.3s";

        copyText.onmouseenter = () => {
            copyText.style.boxShadow = `#3693eb 0px 0px 5px`
        }
        copyText.onmouseleave = () => {
            copyText.style.boxShadow = `#000 1px 1px 5px`
        }
        span.onmouseenter = () => {
            copyText.style.boxShadow = `#3693eb 0px 0px 5px`
        }
        span.onmouseleave = () => {
            copyText.style.boxShadow = `#000 1px 1px 5px`
        }
        /*************  ✨ Codeium Command ⭐  *************/
        span.onclick = () => {
            navigator.clipboard.writeText(copia_cola).then(() => {
                notify('Copia & Cola copiado com sucesso!', 1);
            }).catch(err => {
                console.error('Erro ao copiar texto: ', err);
            });
        };

        /******  990fb092-532d-4f6e-9d56-b2a2de7a888f  *******/

        button.onclick = () => {
            div.style.opacity = "0";
            setTimeout(() => div.remove(), 300);
        };

        ; (async () => {
            let oldSaldo = await fetch('https://meurobux.csync.com.br/api/saldo', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify({ username })
            }).then(r => r.json().then(r => r.saldo))

            let tempoAqui = 0
            while (true) {
                tempoAqui += 1

                let saldoAtual = await fetch('https://meurobux.csync.com.br/api/saldo', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                    },
                    body: JSON.stringify({ username })
                }).then(r => r.json().then(r => r.saldo))


                if (oldSaldo !== saldoAtual) {
                    rolarParaTopo()
                    button.click()

                    neveDinheiro = true
                    await wait(1400)
                    setTimeout(() => {
                        neveDinheiro = false
                        neveFelicidade = true
                        notify('Obrigado por comprar conosco!!', 1)
                        setTimeout(() => {
                            neveFelicidade = false
                        }, 3000)
                    }, 6000)
                    notify('Seu pagamento foi aprovado!', 1, false)

                    focusAumentar(saldoAtual, true)
                    await wait(1000)

                    break
                }

                if (tempoAqui >= (60 * 10)) {
                    break
                }
                await wait(1000)
            }
        })();

        content.appendChild(h2);
        content.appendChild(qrcodeElement);
        content.appendChild(copyContainer);
        content.appendChild(button);

        div.appendChild(content);
        document.body.appendChild(div);

        setTimeout(() => {
            div.style.opacity = "1";
        }, 10);
    }



    // abrirPromptPagamento(10, 'test', `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`)

    async function confirmarSaldo() {
        const valor = document.getElementById("saldo-valor").value;
        if (valor && valor > 0) {
            notify('Gerando pagamento...', 2)
            const data = await fetch('https://meurobux.csync.com.br/api/addsaldo', {
                method: "POST",
                headers: { "Content-Type": "application/json" },
                body: JSON.stringify({
                    username,
                    valor: valor,
                    metodo: paymentMethod
                })
            }).then(r => r.json())

            if (data?.success == true) {
                const copia_cola = data.copia_cola
                const qrcode = data.base64

                fecharSaldoPrompt()
                await wait(800)

                const r = new Audio('https://smoretti2.github.io/robux/approved.mp3')
                r.currentTime = 0.7
                r.play()
                abrirPromptPagamento(valor, copia_cola, qrcode, username)
            } else {
                notify(data.message, 3)
            }
        } else {
            notify('Insira um valor válido!', 3)
        }
    }

    let i = 0
    async function index(b = false) {
        i++
        if (username) {
            if (b) {
                notify('Logando...', 2);

            }

            const data = await fetch('https://meurobux.csync.com.br/api/login', {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({ username, password })
            }).then(response => response.json())

            if (data.success) {
                closeLoginPrompt()
                if (b) {
                    notify(data.message, 1)

                }


                document.querySelector('#informacoes').innerHTML = ``

                const saldo = await fetch('https://meurobux.csync.com.br/api/saldo', {
                    method: 'POST',
                    headers: { 'Content-Type': 'application/json' },
                    body: JSON.stringify({ username })
                }).then(r => r.json())

                document.querySelector("#bemvindo").textContent = `${document.querySelector("#bemvindo").textContent}, ${username}`

                document.querySelector('#informacoes').innerHTML = `
                    <div style="display: flex; align-items: center; gap: 10px; justify-content: column" id="userinfos" class="topola">
                        <div onclick="openProfile()" alt="${data.profileUrl}" style="cursor: pointer; display:flex;align-items:center;text-align:center; height: 50px" id="userinfos">
                            <img src="${data.avatarUrl}" width="40" height="40" style="border-radius: 50%">
                            <p>${username}</p>
                        </div>
                        <p>Saldo: <strong id="saldoreal" style="color: #42bf15">R$ 00,00</strong></p>
                        
                        <div class="botoeslogin">
                            <span class="material-symbols-outlined" style="cursor: pointer" id="addsaldo" onclick="AdicionarSaldo()">
                                add
                            </span>

                            <span class="material-symbols-outlined" style="cursor: pointer" onclick="logout()">
                                logout
                            </span>
                        </div>

                    </div>

                    
                `

                focusAumentar(saldo.saldo)
            } else {
                localStorage.removeItem('login')
                notify(data.message, 3)
            }
        }

        ; (async () => {
            let lastVendas = await fetch('https://meurobux.csync.com.br/api/lastpayments', {
                method: 'POST',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({})
            }).then(r => r.json());

            let jaAdicionados = [];
            let profilesSalvos = {};

            while (true) {
                lastVendas = await fetch('https://meurobux.csync.com.br/api/lastpayments', {
                    method: 'POST',
                    headers: { 'Content-Type': 'application/json' },
                    body: JSON.stringify({ username, password })
                }).then(r => r.json());

                for (const v of lastVendas.lastPayments) {
                    if (jaAdicionados.findIndex(jaAdicionado => jaAdicionado.timestamp == v.timestamp) == -1) {
                        jaAdicionados.push(v);

                        const profileUrl = profilesSalvos[v.username]
                            ? profilesSalvos[v.username]
                            : await fetch('https://meurobux.csync.com.br/api/getprofile', {
                                method: 'POST',
                                headers: { 'Content-Type': 'application/json' },
                                body: JSON.stringify({ username: v.username })
                            }).then(r => r.text());

                        if (!profilesSalvos[v.username]) {
                            profilesSalvos[v.username] = profileUrl;
                        }

                        const div = document.createElement('div');
                        div.classList.add('recent-purchase-card');

                        const data = new Date(v.timestamp);

                        if (v?.valor) {
                            div.innerHTML = `
                                <div class="recent-purchase-content">
                                    <div target="_blank" class="recent-purchase-user">
                                        <img src="${profileUrl}" alt="Avatar" class="recent-purchase-avatar">
                                        <p class="recent-purchase-username">${v.username.substring(0, 4)}${v.username.length > 4 ? '...' : ''}</p>
                                    </div>
                                    <p class="recent-purchase-info">
                                        Valor: <strong class="recent-purchase-value">R$ ${v.valor.toFixed(2).replace('.', ',')}</strong><br>
                                        <strong class="recent-purchase-date">${data.getHours().toString().padStart(2, '0')}:${data.getMinutes().toString().padStart(2, '0')} - ${data.getDate().toString().padStart(2, '0')}/${(data.getMonth() + 1).toString().padStart(2, '0')}/${data.getFullYear()}</strong>
                                    </p>
                                </div>
                            `;
                        } else if (v?.robux) {
                            div.innerHTML = `
                                <div class="recent-purchase-content">
                                    <div target="_blank" class="recent-purchase-user">
                                        <img src="${profileUrl}" alt="Avatar" class="recent-purchase-avatar">
                                        <p class="recent-purchase-username">${v.username.substring(0, 4)}${v.username.length > 4 ? '...' : ''}</p>
                                    </div>
                                    <p class="recent-purchase-info">
                                        Compra: <strong class="recent-purchase-value">${Math.floor(v.robux * 0.70)} Robux</strong><br>
                                        <strong class="recent-purchase-date">${data.getHours().toString().padStart(2, '0')}:${data.getMinutes().toString().padStart(2, '0')} - ${data.getDate().toString().padStart(2, '0')}/${(data.getMonth() + 1).toString().padStart(2, '0')}/${data.getFullYear()}</strong>
                                    </p>
                                </div>
                            `;
                        }


                        div.style.animation = 'fadeIn 1s ease-out forwards';

                        document.querySelector('.recent-purchases-list').insertBefore(div, document.querySelector('.recent-purchases-list').firstChild);
                    }
                }
                await wait(3000);
            }
        })();


        if (!username) {
            return
        }




    }

    index();
</script>


<!-- Neve -->
<script>
    function criarNeve() {
        const Neve = document.createElement("nav");
        Neve.classList.add("Neve");
        Neve.style.zIndex = '999'
        Neve.classList.add('material-symbols-outlined')


        Neve.style.left = Math.random() * 100 + "vw";
        Neve.style.animationDuration = Math.random() * 3 + 3 + "s";
        // Neve.style.animationDelay = Math.random() * 2 + "s";  
        Neve.style.width = Neve.style.height = Math.random() * 8 + 5 + "px";
        document.body.appendChild(Neve);
        Neve.style.width = '0px'


        if (neveDinheiro) {
            const r = Math.floor(Math.random() * 2)

            // Neve.style.animation = 'lados 1s infinite linear'

            if (r == 0) {
                Neve.textContent = 'attach_money'
                Neve.style.color = '#40e617'
            } else {
                Neve.textContent = 'diamond'
                Neve.style.color = '#2276e3'
            }

        } else if (neveFelicidade) {
            const r = Math.floor(Math.random() * 3)
            Neve.textContent = 'sentiment_very_satisfied'
            Neve.style.color = '#ffffff'
            Neve.style.width = '0px'
        } else {
            Neve.textContent = '';
            Neve.style.backgroundImage = 'url(https://media.discordapp.net/attachments/1326122303074992140/1326437981296525342/latest.png?ex=677f6d22&is=677e1ba2&hm=c278b3b88cbabf1d528e5c8ad227f1d51f777a1a9156c2fb72ff6b39757bc147&=&format=webp&quality=lossless&width=377&height=377)';
            Neve.style.backgroundSize = 'cover';
            Neve.style.width = '15px';
            Neve.style.height = '15px';
            Neve.style.backgroundColor = 'transparent'
        }

        setTimeout(() => {
            Neve.style.opacity = 0
            setTimeout(() => {
                Neve.remove();

            }, 1000)
        }, 5000);
    }
    setInterval(criarNeve, 150);  
</script>

</html>