<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ethetic - Home</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: rgb(8, 8, 8); /* Background color */
            height: 100vh;
            width: 100vw;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
        }

        /* Header at the top */
        #header {
            width: 100%;
            background-color: rgb(19, 19, 19); /* Dark color */
            padding: 10px 0; /* Padding to make the header not stick out too far */
            color: white;
            text-align: left;
            font-family: Arial, sans-serif; /* Updated to Arial font */
            font-weight: 500; /* A small amount of bold */
            font-size: 1.2rem; /* Keep the header size the same */
            z-index: 2; /* Ensure it appears above the squares */
            position: absolute;
            top: 0;
            padding-left: 20px; /* Add some left padding */
        }

        /* Header text with smaller font size */
        #header-text {
            font-size: 1rem; /* Smaller text size */
            font-weight: 500; /* A small amount of boldness */
        }

        /* Small squares with transparent inside and a border */
        .square {
            position: absolute;
            width: 12px;
            height: 12px;
            background-color: transparent;
            border: 0.7px solid rgb(90, 90, 90);
            opacity: 1;
            transition: opacity 0.3s ease;
        }

        /* Square animation container */
        #squares-container {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }

        /* Text container for the main "Join Ethetic Today" text */
        #text-container {
            position: absolute;
            font-family: Arial, sans-serif; /* Default font */
            font-weight: bold;
            font-size: 2.5rem; /* Slightly smaller text size */
            color: white;
            z-index: 1; /* Ensure text is visible above the squares */
            top: 45%; /* Move the text up a little */
            left: 50%; /* Center horizontally */
            transform: translate(-50%, -50%); /* Adjust the positioning to ensure it's centered */
            user-select: none; /* Prevent text selection */
            -webkit-user-drag: none; /* Prevent dragging */
        }

        /* Text container for the smaller "Powered By Cxapi" */
        #powered-text {
            position: absolute;
            font-family: Arial, sans-serif; /* Default font */
            font-weight: normal;
            font-size: 1.2rem; /* Smaller text size */
            color: white;
            top: 49%; /* Bring even closer to the main text */
            left: 50%;
            transform: translateX(-50%);
            user-select: none;
            -webkit-user-drag: none;
        }

        /* White text color for Join and Today */
        .white-text {
            color: white;
        }

        /* Updated blue color for Cxapi and Ethetic */
        .blue-text {
            color: rgb(58, 115, 240); /* Updated blue color */
        }

        /* Box for "Best Web Executor Out" */
        #best-web-executor {
            position: absolute;
            top: 30%; /* Move the box even further up */
            left: 50%;
            transform: translateX(-50%);
            background-color: transparent;
            color: white;
            font-family: Arial, sans-serif;
            font-size: 1.2rem;
            font-weight: bold;
            padding: 10px 20px;
            border: 2px solid rgb(58, 115, 240); /* Blue border */
            border-radius: 12px;
            box-shadow: 0 0 8px rgba(58, 115, 240, 0.8); /* Blue glow effect */
            user-select: none;
            -webkit-user-drag: none;
        }

        /* Button container */
        .button-container {
            position: absolute;
            top: 59%; /* Move the buttons down a little more */
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 20px; /* Add space between the buttons */
        }

        /* Styles for the Enter Ethetic button */
        .enter-button {
            background-color: white;
            color: black;
            border: 2px solid black;
            padding: 10px 20px;
            font-family: Arial, sans-serif; /* Default font */
            font-weight: bold; /* Slightly bold text */
            font-size: 1rem; /* Standard size */
            border-radius: 12px;
            cursor: pointer;
            user-select: none;
        }

        /* Styles for the Join the Community button */
        .join-button {
            background-color: rgb(58, 115, 240); /* Light blue color */
            color: white;
            border: 2px solid rgb(58, 115, 240);
            padding: 10px 20px;
            font-family: Arial, sans-serif; /* Default font */
            font-weight: bold; /* Slightly bold text */
            font-size: 1rem; /* Standard size */
            border-radius: 12px;
            cursor: pointer;
            user-select: none;
        }

        /* Flexbox container for the 3 new boxes */
        .box-container {
            display: flex;
            justify-content: space-between;
            position: absolute;
            top: 70%; /* Position the box container just below the buttons */
            left: 50%;
            transform: translateX(-50%);
            width: 80%; /* Make the box container take up most of the width */
        }

        /* Style for the individual boxes */
        .box {
            width: 30%; /* Make the boxes fit within the container */
            background-color: transparent;
            border: 2px solid rgb(58, 115, 240); /* Blue border */
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 0 8px rgba(58, 115, 240, 0.8); /* Blue glow effect */
            color: white;
            text-align: center;
            font-family: Arial, sans-serif; /* Set font to Arial */
        }

        /* Box header style - Make title bold */
        .box-header {
            font-size: 1rem;
            font-weight: bold; /* Make the header text bold */
            margin-bottom: 10px;
        }

        /* Content inside the box - Non-bold */
        .box-content {
            font-weight: normal; /* Non-bold content */
        }
    </style>
</head>
<body>
    <!-- Header at the top of the page -->
    <div id="header">
        <div id="header-text">Ethetic.cc Loader</div>
    </div>

    <!-- Square animation container -->
    <div id="squares-container"></div>

    <!-- Box with "Best Web Executor Out" -->
    <div id="best-web-executor">
        Best Web Executor Out
    </div>

    <!-- Main text -->
    <div id="text-container">
        <span class="white-text">Join</span> <span class="blue-text">Ethetic</span> <span class="white-text">Today</span>
    </div>

    <!-- Powered by Cxapi text -->
    <div id="powered-text">
        <span class="white-text">Powered</span> <span class="white-text">By</span> <span class="blue-text">Cxapi</span>
    </div>

    <!-- Button container with two buttons -->
    <div class="button-container">
        <!-- Enter Ethetic Button with an ID -->
        <div id="enter-button" class="enter-button">Enter Ethetic</div>

        <!-- Join The Community Button -->
        <div class="join-button">Join The Community</div>
    </div>

    <!-- Box container with three boxes -->
    <div class="box-container">
        <!-- Credits box -->
        <div class="box">
            <div class="box-header">Credits</div>
            <div class="box-content">We Give Full Credits To Cxapi, As We're Still In Development Of Our Own Api.</div>
        </div>
        <!-- UNC box -->
        <div class="box">
            <div class="box-header">UNC</div>
            <div class="box-content">We're Currently Sitting At 90% UNC Rate.</div>
        </div>
        <!-- Security box -->
        <div class="box">
            <div class="box-header">Support</div>
            <div class="box-content">We Have 24/7 Support, All You Have To Do Is Join Our Community.</div>
        </div>
    </div>

    <script>
        // Define a function to create squares
        function createSquares() {
            const container = document.getElementById('squares-container');
            container.innerHTML = ''; // Clear the container before adding new squares

            const rows = 15;
            const columns = 15;
            const fadeFactor = 0.07;

            const screenWidth = window.innerWidth;
            const screenHeight = window.innerHeight;

            const spacing = Math.min(screenWidth, screenHeight) / 15; // Adjust the spacing dynamically

            // Create squares based on the updated screen dimensions
            for (let i = 0; i < rows; i++) {
                for (let j = 0; j < columns; j++) {
                    const square = document.createElement('div');
                    square.classList.add('square');
                    const topPosition = i * spacing;
                    const leftPosition = j * spacing;
                    square.style.top = `${topPosition}px`;
                    square.style.left = `${leftPosition}px`;

                    // Calculate opacity based on position to simulate fade-out effect
                    const opacity = Math.max(1 - (i + j) * fadeFactor, 0);
                    square.style.opacity = opacity;

                    container.appendChild(square);
                }
            }
        }

        // Call function to create squares when the page loads
        createSquares();

        // Recreate squares when window is resized
        window.addEventListener('resize', createSquares);

        // Add event listener to the "Enter Ethetic" button
        document.getElementById('enter-button').addEventListener('click', function() {
            window.location.href = 'dashboard';  // Redirect to dashboard.html
        });
    </script>
</body>
</html>
