<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Computero master</title>
  <script src="https://www.gstatic.com/firebasejs/9.19.1/firebase-app-compat.js"></script>
  <script src="https://www.gstatic.com/firebasejs/9.19.1/firebase-auth-compat.js"></script>
        <script src="https://www.google.com/recaptcha/api.js?render=6LfLdioqAAAAAO2xmG0xTEpKETZVWa6vNzOrbR8T"></script>
  <link rel='stylesheet' href='https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css'>
  <link rel="icon" href="splash.png" sizes="32x32" />
  <link rel="icon" href="splash.png" sizes="192x192" />
  <link rel="apple-touch-icon" href="splash.png" />
  <meta name="msapplication-TileImage" content="splash.png" />
  <style>
        @import "https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap";
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
   
    #preloader {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #ffffff;
      z-index: 9999;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    #preloader.fade-out {
      animation: fadeOut 1s forwards;
    }

    @keyframes fadeOut {
      to {
        opacity: 0;
        visibility: hidden;
      }
    }
    .job {
      color: #888;
      font-size: 14px;
      margin-top: 4px;
    }
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 78px;
  background: #11101D;
  padding: 6px 14px;
  z-index: 99;
  transition: all 0.5s ease;
}
.sidebar .logo-details {
  height: 60px;
  display: flex;
  align-items: center;
  position: relative;
}
.sidebar .logo-details .icon {
  opacity: 0;
  transition: all 0.5s ease;
}
.sidebar .logo-details .logo_name {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.5s ease;
}
.sidebar .logo-details #btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 22px;
  transition: all 0.4s ease;
  font-size: 23px;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s ease;
}
.sidebar i {
  color: #fff;
  height: 60px;
  min-width: 50px;
  font-size: 28px;
  text-align: center;
  line-height: 60px;
}
.sidebar .nav-list {
  height: calc(100% - 140px);
}

.sidebar li {
  position: relative;
  margin: 8px 8px 8px 0;
  list-style: none;
}
.sidebar li .tooltip {
  position: absolute;
  top: -20px;
  left: calc(100% + 15px);
  z-index: 3;
  background: #fff;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transition: 0s;
}
.sidebar li:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
  transition: all 0.4s ease;
  top: 50%;
  transform: translateY(-50%);
}
.sidebar li a {
  display: flex;
  height: 100%;
  width: 100%;
  border-radius: 12px;
  align-items: center;
  text-decoration: none;
  transition: all 0.4s ease;
  background: #11101D;
}
.sidebar li a:hover {
  background: #1d1b31;
}
.sidebar li a:hover .links_name {
  transition: all 0.5s ease;
}
.sidebar li a:hover i {
  transition: all 0.5s ease;
}
.sidebar li a .links_name {
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
}
.sidebar li i {
  height: 50px;
  line-height: 50px;
  font-size: 18px;
  border-radius: 12px;
}
.sidebar li .profile-details {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}
.sidebar li img {
  height: 45px;
  width: 45px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
}
.sidebar input {
  font-size: 15px;
  color: #FFF;
  font-weight: 400;
  outline: none;
  height: 50px;
  width: 100%;
  width: 50px;
  border: none;
  border-radius: 12px;
  transition: all 0.5s ease;
  background: #1d1b31;
}
.sidebar li.profile {
  position: fixed;
  height: 60px;
  width: 78px;
  left: 0;
  bottom: -8px;
  padding: 10px 14px;
  background: #1d1b31;
  transition: all 0.5s ease;
  overflow: hidden;
}
.sidebar li.profile .name {
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
}
.sidebar li.profile .job {
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  font-size: 12px;
}
.sidebar .profile #log_out {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: #1d1b31;
  width: 100%;
  height: 60px;
  line-height: 60px;
  border-radius: 0px;
  transition: all 0.5s ease;
  cursor: pointer;
}

.sidebar.open {
  width: 250px;
}
.sidebar.open .logo-details .icon {
  opacity: 1;
}
.sidebar.open .logo-details .logo_name {
  opacity: 1;
}
.sidebar.open .logo-details #btn {
  text-align: right;
}
.sidebar.open li .tooltip {
  display: none;
}
.sidebar.open li a .links_name {
  opacity: 1;
  pointer-events: auto;
}
.sidebar.open input {
  padding: 0 20px 0 50px;
  width: 100%;
}
.sidebar.open .bx-search:hover {
  background: #1d1b31;
  color: #FFF;
}
.sidebar.open li.profile {
  width: 250px;
}
.sidebar.open .profile #log_out {
  width: 50px;
  background: none;
  cursor: pointer;
}
.sidebar.open ~ .home-section {
  left: 250px;
  width: calc(100% - 250px);
}

.home-section {
  position: relative;
  background: #E4E9F7;
  min-height: 100vh;
  top: 0;
  left: 78px;
  width: calc(100% - 78px);
  transition: all 0.5s ease;
  z-index: 2;
}
.home-section .text {
  display: inline-block;
  color: #11101d;
  font-size: 25px;
  font-weight: 500;
  margin: 18px;
}
.interactive-box {
  position: relative;
  width: 300px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
  left: 40px;
  bottom: -10px;
}

.interactive-box:hover {
  transform: translateY(-4px);
}

.interactive-box:active {
  transform: translateY(2px);
}

.interactive-box:active::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  animation: fillScreen 0.3s forwards;
}

.box-image {
  width: 100%;
  height: 60%;
  object-fit: cover;
  pointer-events: none;
}

.box-text {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  pointer-events: none;
}
.interactivei-box {
  position: relative;
  width: 300px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
  left: 380px;
  bottom: 190px;
}

.interactivei-box:hover {
  transform: translateY(-4px);
}

.interactivei-box:active {
  transform: translateY(2px);
}

.interactivei-box:active::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  animation: fillScreen 0.3s forwards;
}

.boxi-image {
  width: 100%;
  height: 60%;
  object-fit: cover;
  pointer-events: none;
}

.boxi-text {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  pointer-events: none;
}
</style>
</head>
<body>
<div id="preloader">
  <div>
    <img src="https://www.computeromaster.rf.gd/logo.png" alt="Loading..." width="150" height="150">
  </div>
</div>
<div class="sidebar">
    <div class="logo-details">
        <div class="logo_name">Computero</div>
        <i class='bx bx-menu' id="btn"></i>
    </div>
    <ul class="nav-list">
      <li>
        <a href="https://www.computeromaster.rf.gd/Home">
          <i class='bx bx-grid-alt'></i>
          <span class="links_name">Apps</span>
        </a>
         <span class="tooltip">Apps</span>
      </li>
      <li id="user-page" style="display: none;">
       <a href="https://www.computeromaster.rf.gd/Sec/mainLoginfo/coDe">
         <i class='bx bx-user'></i>
         <span class="links_name">Accounts settings</span>
       </a>
       <span class="tooltip">Accounts settings</span>
     </li>
     <li>
<li class="profile">
  <div class="profile-details">
    <div class="name_job">
      <div class="name" id="profile-name">Name</div>
      <div class="job" id="profile-role">Role</div>
    </div>
  </div>
  <i class='bx bx-log-out' id="log_out"></i>
</li>
    </ul>
  </div>
  <section class="home-section">
      <div class="text">Apps</div>
        <div class="interactive-box">
  <img src="websitero.png" class="box-image">
  <p class="box-text">Websitero</p>
</div>
        <div class="interactivei-box">
  <img src="filecloud.png" class="boxi-image">
  <p class="boxi-text">File Cloud</p>
</div>
  </section>

  <script>
// Firebase Configuration
const firebaseConfig = {
  apiKey: "AIzaSyC2jdXkwJGqHHmJDWzm1aVZL75OujQvUvI",
  authDomain: "computero-213b5.firebaseapp.com",
  databaseURL: "https://computero-213b5-default-rtdb.firebaseio.com",
  projectId: "computero-213b5",
  storageBucket: "computero-213b5.appspot.com",
  messagingSenderId: "300084057509",
  appId: "1:300084057509:web:cc9d92f5f70a92b7b4044c"
};

// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth();

// Handle Preloader
window.addEventListener('load', () => {
  const preloader = document.getElementById('preloader');
  preloader.classList.add('fade-out');
  setTimeout(() => {
    preloader.style.display = 'none';
  }, 1000);
});

// Check Authentication State
auth.onAuthStateChanged((user) => {
  if (user) {
    const email = user.email;
    let userName = email.substring(0, email.indexOf("@"));

    // Special checks for specific emails
    if (email.toLowerCase() === "dr.rayan1243@gmail.com") {
      userName = "Rayan";
    } else if (email.toLowerCase() === "sz294989@gmail.com") {
      userName = "Zain";
    } else {
      userName = userName.charAt(0).toUpperCase() + userName.slice(1);
    }

    document.getElementById("profile-name").textContent = userName;

    if (userName.toLowerCase() === "zain") {
      document.getElementById("user-page").style.display = "block";
      document.getElementById("profile-role").textContent = "Computero admin";
    } else {
      document.getElementById("profile-role").textContent = "Computero user";
    }
  } else {
    window.location.replace("/Login"); // Use replace to prevent back navigation
  }
});



// Logout Functionality
document.getElementById("log_out").addEventListener("click", () => {
  auth.signOut()
    .then(() => {
      window.location.replace("/Login"); // Redirect after logout
    })
    .catch((error) => {
      console.error("Sign out error:", error);
    });
});

// Handle Browser Back Button
window.addEventListener('popstate', () => {
  auth.onAuthStateChanged((user) => {
    if (!user) {
      window.location.replace("/Login"); // Redirect if not authenticated
    }
  });
});

// Sidebar Toggle
let sidebar = document.querySelector(".sidebar");
let closeBtn = document.querySelector("#btn");
let navList = document.querySelector(".nav-list");

closeBtn.addEventListener("click", () => {
  sidebar.classList.toggle("open");
  navList.classList.toggle("scroll");
  menuBtnChange();
});

// Update Menu Button Icon
function menuBtnChange() {
  if (sidebar.classList.contains("open")) {
    closeBtn.classList.replace("bx-menu", "bx-menu-alt-right");
  } else {
    closeBtn.classList.replace("bx-menu-alt-right", "bx-menu");
  }
}

// Clear browser history to prevent navigating back to the login page
window.history.replaceState(null, null, window.location.href);

  </script>
  <script>
          document.addEventListener('contextmenu', function(e) {
      e.preventDefault();
    });

    document.addEventListener('keydown', function(e) {
      if (e.keyCode === 123 || // F12
          (e.ctrlKey && e.shiftKey && e.keyCode === 73) || // Ctrl+Shift+I
          (e.ctrlKey && e.shiftKey && e.keyCode === 74) || // Ctrl+Shift+J
          (e.ctrlKey && e.keyCode === 85) || // Ctrl+U
          (e.ctrlKey && e.shiftKey && e.keyCode === 67) || // Ctrl+Shift+C
          (e.ctrlKey && e.keyCode === 83) || // Ctrl+S
          (e.ctrlKey && e.keyCode === 79)) { // Ctrl+O
        e.preventDefault();
      }
    });
            if (window.innerWidth <= 1024) {
      window.location.href = "https://www.computeromaster.rf.gd/NAMC";
}
(function() {
    const redirectURL = 'https://www.computeromaster.rf.gd/DT';

    const devToolsOpened = function() {
        window.location.href = redirectURL;
    };

    const threshold = 160;
    const checkDevTools = function() {
        const widthThreshold = window.outerWidth - window.innerWidth > threshold;
        const heightThreshold = window.outerHeight - window.innerHeight > threshold;
        if (widthThreshold || heightThreshold) {
            devToolsOpened();
        }
    };

    window.addEventListener('resize', checkDevTools);
    checkDevTools();
})();


    const detectDebugger = function() {
        const element = new Image();
        Object.defineProperty(element, 'id', {
            get: function() {
                devToolsOpened();
                throw new Error('DevTools detected');
            }
        });
        console.log('%c', element);
    };


    const overrideConsole = function() {
        const originalConsoleLog = console.log;
        console.log = function(...args) {
            devToolsOpened();
            originalConsoleLog.apply(console, args);
        };
    };


    setInterval(() => {
        checkDevToolsSize();
        detectDebugger();
    }, 1000);

 
    overrideConsole();
const rateLimit = require('express-rate-limit');

const limiter = rateLimit({
    windowMs: 15 * 60 * 1000, 
    max: 100, 
    message: 'Too many requests from this IP, please try again later.'
});


      </script>
      <script>
document.querySelector('.interactive-box').addEventListener('click', function() {
  setTimeout(() => {
    // Reset body and html styles to ensure full-screen rendering
    document.documentElement.style.margin = '0';
    document.documentElement.style.padding = '0';
    document.documentElement.style.height = '100%';
    document.documentElement.style.overflow = 'hidden';

    document.body.style.margin = '0';
    document.body.style.padding = '0';
    document.body.style.height = '100%';

    // Create an iframe element dynamically
    const iframe = document.createElement('iframe');
    iframe.src = 'https://www.computeromaster.rf.gd/Websitero';
    iframe.style.width = '100vw'; // Full viewport width
    iframe.style.height = '100vh'; // Full viewport height
    iframe.style.border = 'none';
    iframe.style.position = 'fixed'; // Ensure it covers the whole screen
    iframe.style.top = '0';
    iframe.style.left = '0';

    // Clear existing content and add the iframe
    document.body.innerHTML = ''; // Clear existing content (optional)
    document.body.appendChild(iframe); // Add the iframe to the page
  }, 300); // Wait for the animation to complete
});

document.querySelector('.interactivei-box').addEventListener('click', function() {
  setTimeout(() => {
    // Reset body and html styles to ensure full-screen rendering
    document.documentElement.style.margin = '0';
    document.documentElement.style.padding = '0';
    document.documentElement.style.height = '100%';
    document.documentElement.style.overflow = 'hidden';

    document.body.style.margin = '0';
    document.body.style.padding = '0';
    document.body.style.height = '100%';

    // Create an iframe element dynamically
    const iframe = document.createElement('iframe');
    iframe.src = 'https://www.computeromaster.rf.gd/FilCd';
    iframe.style.width = '100vw'; // Full viewport width
    iframe.style.height = '100vh'; // Full viewport height
    iframe.style.border = 'none';
    iframe.style.position = 'fixed'; // Ensure it covers the whole screen
    iframe.style.top = '0';
    iframe.style.left = '0';

    // Clear existing content and add the iframe
    document.body.innerHTML = ''; // Clear existing content (optional)
    document.body.appendChild(iframe); // Add the iframe to the page
  }, 300); // Wait for the animation to complete
});

      </script>
      
</body>
</html>