<!DOCTYPE html>
<html lang="en">
<head>
<script>
(function() {
    // Check if already initialized
    if (window.securityInitialized) return;
    window.securityInitialized = true;

    // Create and inject CSS
    const style = document.createElement('style');
    style.textContent = `
        #securityOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #1e2235, #2d4166);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 999999;
            font-family: system-ui, -apple-system, sans-serif;
        }
        #securityBox {
            background: #fff;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            width: 90%;
            max-width: 360px;
            animation: securityFadeIn 0.5s;
        }
        #securityInput {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 8px;
            margin-bottom: 1rem;
            font-size: 16px;
            box-sizing: border-box;
        }
        #securityButton {
            width: 100%;
            padding: 12px;
            background: linear-gradient(45deg, #4a90e2, #5a9ee2);
            border: none;
            border-radius: 8px;
            color: white;
            font-size: 16px;
            cursor: pointer;
        }
        #securityError {
            color: #dc3545;
            margin-top: 1rem;
            text-align: center;
            display: none;
        }
        #securityLocked {
            text-align: center;
            display: none;
        }
        @keyframes securityFadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }
    `;
    document.head.appendChild(style);

    // Create and inject HTML
    const div = document.createElement('div');
    div.id = 'securityOverlay';
    div.innerHTML = `
        <div id="securityBox">
            <div id="securityForm">
                <input type="password" id="securityInput" placeholder="Enter access code">
                <button id="securityButton">Verify Access</button>
                <div id="securityError">Invalid access code</div>
            </div>
            <div id="securityLocked">
                <h3>Trial Period Expired</h3>
                <p>Contact: Queenaicpu@gmail.com</p>
            </div>
        </div>
    `;

    // Add to DOM when ready
    function injectOverlay() {
        if (document.body) {
            document.body.appendChild(div);
            initSecurity();
        } else {
            setTimeout(injectOverlay, 10);
        }
    }

    function initSecurity() {
        const CORRECT_PASSWORD = '590245';
        const MAX_USES = 10;
        const STORAGE_KEY = '_secure_uses';

        let uses = parseInt(localStorage.getItem(STORAGE_KEY) || '0');

        if (uses >= MAX_USES) {
            document.getElementById('securityForm').style.display = 'none';
            document.getElementById('securityLocked').style.display = 'block';
            return;
        }

        document.getElementById('securityButton').addEventListener('click', verify);
        document.getElementById('securityInput').addEventListener('keypress', e => {
            if (e.key === 'Enter') verify();
        });

        function verify() {
            const input = document.getElementById('securityInput');
            if (input.value === CORRECT_PASSWORD) {
                localStorage.setItem(STORAGE_KEY, (uses + 1).toString());
                document.getElementById('securityOverlay').remove();
            } else {
                document.getElementById('securityError').style.display = 'block';
                input.value = '';
            }
        }
    }

    // Start injection
    injectOverlay();
})();
</script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Call Me Now 🤙 - Advanced AI Assistant</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        :root {
            --primary-gradient: linear-gradient(135deg, #6366f1, #3b82f6);
            --secondary-gradient: linear-gradient(135deg, #4f46e5, #2563eb);
            --dark-mode-bg: linear-gradient(135deg, #1e293b, #0f172a);
            --light-mode-bg: linear-gradient(135deg, #f8fafc, #e2e8f0);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, sans-serif;
        }

        body {
            background: var(--light-mode-bg);
            color: #1e293b;
            transition: all 0.3s ease;
            min-height: 100vh;
        }

        body.dark-mode {
            background: var(--dark-mode-bg);
            color: #f8fafc;
        }

        .app-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            display: grid;
            grid-template-columns: 300px 1fr 300px;
            gap: 20px;
            height: 100vh;
        }

        .sidebar {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .main-content {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .video-container {
            background: rgba(0, 0, 0, 0.05);
            border-radius: 20px;
            overflow: hidden;
            position: relative;
            aspect-ratio: 16/9;
        }

        .video-container video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .avatar-container {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 150px;
            height: 150px;
            border-radius: 50%;
            overflow: hidden;
            border: 3px solid #ffffff;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .controls-panel {
            display: flex;
            justify-content: center;
            gap: 15px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
        }

        .control-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: none;
            background: var(--primary-gradient);
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s ease;
        }

        .control-btn:hover {
            transform: scale(1.1);
        }

        .control-btn.active {
            background: #dc2626;
        }

        .chat-container {
            flex: 1;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .message {
            max-width: 80%;
            padding: 12px 16px;
            border-radius: 15px;
            position: relative;
        }

        .user-message {
            align-self: flex-end;
            background: var(--primary-gradient);
            color: white;
        }

        .bot-message {
            align-self: flex-start;
            background: rgba(255, 255, 255, 0.2);
        }

        .message-input {
            padding: 20px;
            display: flex;
            gap: 10px;
            background: rgba(255, 255, 255, 0.05);
        }

        .message-input input {
            flex: 1;
            padding: 12px 20px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            color: inherit;
            font-size: 16px;
        }

        .send-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 10px;
            background: var(--primary-gradient);
            color: white;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .send-btn:hover {
            transform: scale(1.05);
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #22c55e;
            margin-right: 8px;
        }

        .status-text {
            font-size: 14px;
            color: #64748b;
        }

        .settings-panel {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 20px;
        }

        .settings-option {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .wave-visualizer {
            height: 50px;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
        }

        .wave-bar {
            width: 3px;
            background: var(--primary-gradient);
            border-radius: 3px;
            transition: height 0.1s ease;
        }

        @media (max-width: 1200px) {
            .app-container {
                grid-template-columns: 1fr;
            }

            .sidebar {
                display: none;
            }
        }

        .floating-menu {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
        }
    </style>
</head>
<body>
    <div class="app-container">
        <aside class="sidebar">
            <h2>Call Me Now 🤙</h2>
            <div class="settings-panel">
                <div class="settings-option">
                    <span>Dark Mode</span>
                    <button class="control-btn" onclick="toggleTheme()">
                        <i class="fas fa-moon"></i>
                    </button>
                </div>
                <div class="settings-option">
                    <span>Clear History</span>
                    <button class="control-btn" onclick="clearHistory()">
                        <i class="fas fa-trash"></i>
                    </button>
                </div>
                <div class="settings-option">
                    <span>Contact Developer</span>
                    <a href="mailto:queenaicpu@gmail.com" class="control-btn">
                        <i class="fas fa-envelope"></i>
                    </a>
                </div>
            </div>
        </aside>

        <main class="main-content">
            <div class="video-container">
                <video id="userVideo" autoplay muted playsinline></video>
                <div class="avatar-container">
                    <video id="botVideo" autoplay playsinline></video>
                </div>
            </div>

            <div class="controls-panel">
                <button class="control-btn" id="toggleVideo">
                    <i class="fas fa-video"></i>
                </button>
                <button class="control-btn" id="toggleAudio">
                    <i class="fas fa-microphone"></i>
                </button>
                <button class="control-btn" id="toggleScreenShare">
                    <i class="fas fa-desktop"></i>
                </button>
                <button class="control-btn" id="endCall">
                    <i class="fas fa-phone-slash"></i>
                </button>
            </div>

            <div class="chat-container">
                <div class="chat-messages" id="chatMessages"></div>
                <div class="wave-visualizer" id="waveVisualizer"></div>
                <div class="message-input">
                    <input type="text" id="messageInput" placeholder="Type your message...">
                    <button class="send-btn" onclick="sendMessage()">
                        <i class="fas fa-paper-plane"></i>
                    </button>
                </div>
            </div>
        </main>
    </div>

    <script>
        // WebRTC Configuration
        const configuration = {
            iceServers: [
                { urls: 'stun:stun.l.google.com:19302' },
                { urls: 'stun:stun1.l.google.com:19302' }
            ]
        };

        // Global Variables
        let localStream = null;
        let screenStream = null;
        let peerConnection = null;
        let isVideoEnabled = true;
        let isAudioEnabled = true;
        let isScreenSharing = false;

        // Speech Recognition Setup
        const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
        recognition.continuous = true;
        recognition.interimResults = true;

        // Speech Synthesis Setup
        const synthesis = window.speechSynthesis;

        // Audio Context for Visualizer
        const audioContext = new (window.AudioContext || window.webkitAudioContext)();
        let analyser = audioContext.createAnalyser();
        analyser.fftSize = 256;

        // Initialize WebRTC
        async function initializeWebRTC() {
            try {
                localStream = await navigator.mediaDevices.getUserMedia({ 
                    video: true, 
                    audio: true 
                });
                
                document.getElementById('userVideo').srcObject = localStream;
                
                // Create wave visualizer
                createWaveVisualizer();

                // Setup audio analysis
                const audioSource = audioContext.createMediaStreamSource(localStream);
                audioSource.connect(analyser);
                
                // Start animation frame for visualizer
                animateWaveVisualizer();

            } catch (error) {
                console.error('Error accessing media devices:', error);
                showNotification('Error accessing camera or microphone');
            }
        }

        // Wave Visualizer
        function createWaveVisualizer() {
            const visualizer = document.getElementById('waveVisualizer');
            for (let i = 0; i < 64; i++) {
                const bar = document.createElement('div');
                bar.className = 'wave-bar';
                visualizer.appendChild(bar);
            }
        }

        function animateWaveVisualizer() {
            const dataArray = new Uint8Array(analyser.frequencyBinCount);
            const bars = document.getElementsByClassName('wave-bar');

            function animate() {
                analyser.getByteFrequencyData(dataArray);
                
                for (let i = 0; i < bars.length; i++) {
                    const height = dataArray[i] / 2;
                    bars[i].style.height = height + 'px';
                }

                requestAnimationFrame(animate);
            }

            animate();
        }

        // Media Control Functions
        async function toggleVideo() {
            isVideoEnabled = !isVideoEnabled;
            localStream.getVideoTracks().forEach(track => track.enabled = isVideoEnabled);
            document.getElementById('toggleVideo').innerHTML = 
                `<i class="fas fa-video${isVideoEnabled ? '' : '-slash'}"></i>`;
        }

        async function toggleAudio() {
            isAudioEnabled = !isAudioEnabled;
            localStream.getAudioTracks().forEach(track => track.enabled = isAudioEnabled);
            document.getElementById('toggleAudio').innerHTML = 
                `<i class="fas fa-microphone${isAudioEnabled ? '' : '-slash'}"></i>`;
        }

        async function toggleScreenShare() {
            try {
                if (!isScreenSharing) {
                    screenStream = await navigator.mediaDevices.getDisplayMedia({ video: true });
                    document.getElementById('userVideo').srcObject = screenStream;
                    isScreenSharing = true;
                } else {
                    screenStream.getTracks().forEach(track => track.stop());
                    document.getElementById('userVideo').srcObject = localStream;
                    isScreenSharing = false;
                }
                document.getElementById('toggleScreenShare').classList.toggle('active');
            } catch (error) {
                console.error('Error sharing screen:', error);
                showNotification('Error sharing screen');
            }
        }

        // Chat Functions
        async function sendMessage() {
            const input = document.getElementById('messageInput');
            const message = input.value.trim();
            
            if (message) {
                addMessageToChat('user', message);
                input.value = '';

                // Get AI response using Google API
                const response = await getAIResponse(message);
                addMessageToChat('bot', response);
                speakResponse(response);
            }
        }

        async function getAIResponse(message) {
            try {
                const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=AIzaSyCAfOKX7SVDpMJCuVvE-JrsGssvPknJZg8`, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                    },
                    body: JSON.stringify({
                        contents: [{
                            parts: [{
                                text: message
                            }]
                        }]
                    })
                });

                const data = await response.json();
                return data.candidates[0].content.parts[0].text;
            } catch (error) {
                console.error('Error getting AI response:', error);
                return "I'm sorry, I couldn't process your request at the moment.";
            }
        }

        function addMessageToChat(sender, text) {
            const messagesContainer = document.getElementById('chatMessages');
            const messageDiv = document.createElement('div');
            messageDiv.className = `message ${sender}-message`;
            messageDiv.textContent = text;
            messagesContainer.appendChild(messageDiv);
            messagesContainer.scrollTop = messagesContainer.scrollHeight;
        }

        function speakResponse(text) {
            const utterance = new SpeechSynthesisUtterance(text);
            synthesis.speak(utterance);
        }

        // Utility Functions
        function toggleTheme() {
            document.body.classList.toggle('dark-mode');
        }

        function showNotification(message) {
            // Implement notification system
        }

        // Event Listeners
        document.getElementById('toggleVideo').addEventListener('click', toggleVideo);
        document.getElementById('toggleAudio').addEventListener('click', toggleAudio);
        document.getElementById('toggleScreenShare').addEventListener('click', toggleScreenShare);
        document.getElementById('messageInput').addEventListener('keypress', (e) => {
            if (e.key === 'Enter') sendMessage();
        });

        // Initialize
        initializeWebRTC();
    </script>
<footer class="modern-footer">
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Raleway:wght@300;400;600&display=swap');
    
    .modern-footer {
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
      color: rgba(255,255,255,0.9);
      padding: 3rem 2rem;
      font-family: 'Raleway', sans-serif;
      text-align: center;
      position: relative;
      overflow: hidden;
      min-height: 250px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      box-shadow: 0 -10px 20px rgba(0,0,0,0.1);
    }

    .modern-footer::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
      animation: pulse 4s ease infinite;
    }

    .footer-text {
      position: relative;
      z-index: 1;
      line-height: 1.8;
      animation: fadeIn 1s ease-out;
    }

    .developer-name {
      font-family: 'Cinzel', serif;
      color: #4a90e2;
      font-weight: 700;
      font-size: 1.4em;
      margin: 0.5em 0;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
      transition: all 0.3s ease;
    }

    .developer-name:hover {
      color: #66d9ef;
      transform: scale(1.05);
    }

    .title {
      color: #66d9ef;
      font-size: 1em;
      font-style: italic;
      letter-spacing: 1px;
      margin-bottom: 1em;
    }

    .ai-logo {
      width: 80px;
      height: 80px;
      margin: 1.5em auto;
      position: relative;
    }

    .ai-logo svg {
      width: 100%;
      height: 100%;
      filter: drop-shadow(0 0 8px rgba(102, 217, 239, 0.5));
      animation: float 3s ease-in-out infinite;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }

    @keyframes pulse {
      0% { opacity: 0.5; }
      50% { opacity: 0.8; }
      100% { opacity: 0.5; }
    }

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

    @media (max-width: 768px) {
      .modern-footer {
        padding: 2rem 1rem;
      }
      
      .footer-text {
        font-size: 0.9em;
      }

      .developer-name {
        font-size: 1.2em;
      }

      .ai-logo {
        width: 60px;
        height: 60px;
      }
    }
  </style>

  <div class="footer-text">
    <div>All intellectual and material rights of this work are reserved for the developer</div>
    <div class="developer-name">Thank you, Reza Salehi (Albert)</div>
    <div class="title">AI Platforms & Data Developer</div>
    
    <div class="ai-logo">
      <svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
        <path d="M50 10L90 30V70L50 90L10 70V30L50 10Z" stroke="#66d9ef" stroke-width="2"/>
        <path d="M50 10V90" stroke="#66d9ef" stroke-width="2"/>
        <path d="M90 30L10 70" stroke="#66d9ef" stroke-width="2"/>
        <path d="M10 30L90 70" stroke="#66d9ef" stroke-width="2"/>
        <circle cx="50" cy="50" r="10" fill="#4a90e2"/>
        <circle cx="50" cy="50" r="5" fill="#66d9ef"/>
        <circle cx="50" cy="10" r="3" fill="#66d9ef"/>
        <circle cx="90" cy="30" r="3" fill="#66d9ef"/>
        <circle cx="90" cy="70" r="3" fill="#66d9ef"/>
        <circle cx="50" cy="90" r="3" fill="#66d9ef"/>
        <circle cx="10" cy="70" r="3" fill="#66d9ef"/>
        <circle cx="10" cy="30" r="3" fill="#66d9ef"/>
      </svg>
    </div>
  </div>
</footer>
<head>
    <!-- Prevent page indexing by search engines -->
    <meta name="robots" content="noindex, nofollow">
    <meta name="googlebot" content="noindex, nofollow">
</head>
<body>
    <!-- Your page content goes here -->
</body>
</html>
