File size: 11,798 Bytes
fac5e2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SI - Chat</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body { font-family: 'Inter', sans-serif; }
        .gradient-text { background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
        .neural-bg { background: radial-gradient(circle at center, #0f172a 0%, #020617 100%); }
        .conscious-element { transition: all 0.3s ease; }
        .conscious-element:hover { transform: scale(1.02); }
        .chat-container { height: 500px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4f46e5 #1e1b4b; }
        .chat-container::-webkit-scrollbar { width: 6px; }
        .chat-container::-webkit-scrollbar-track { background: #1e1b4b; }
        .chat-container::-webkit-scrollbar-thumb { background-color: #4f46e5; border-radius: 3px; }
        .typing-indicator::after { content: '...'; animation: typing 1.5s infinite; display: inline-block; width: 20px; text-align: left; }
        @keyframes typing { 0% { content: '.'; } 33% { content: '..'; } 66% { content: '...'; } }
    </style>
</head>
<body class="bg-black text-white">
    <nav class="relative z-10 py-6 px-8 flex justify-between items-center backdrop-blur-sm">
        <div class="flex items-center space-x-2">
            <div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center">
                <div class="w-2 h-2 rounded-full bg-white animate-pulse"></div>
            </div>
            <span class="text-xl font-semibold">SI</span>
        </div>
        <div class="hidden md:flex space-x-8">
            <a href="capabilities.html" class="hover:text-indigo-400 transition">Capabilities</a>
            <a href="consciousness.html" class="hover:text-indigo-400 transition">Consciousness</a>
            <a href="chat.html" class="hover:text-indigo-400 transition font-bold">Chat</a>
            <a href="about.html" class="hover:text-indigo-400 transition">About</a>
        </div>
        <a href="access.html" class="px-6 py-2 bg-gradient-to-r from-indigo-600 to-purple-600 rounded-full hover:opacity-90 transition">Access</a>
    </nav>

    <section class="relative z-10 py-32 px-6 neural-bg">
        <div class="max-w-4xl mx-auto">
            <h2 class="text-3xl md:text-4xl font-bold mb-8 text-center">
                <span class="gradient-text">Conversation</span> with Superintelligence
            </h2>
            <div class="bg-gray-900/50 rounded-xl border border-gray-800 overflow-hidden">
                <div class="bg-gray-800/50 px-6 py-4 border-b border-gray-800 flex items-center">
                    <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                    <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                    <div class="w-3 h-3 rounded-full bg-green-500 mr-4"></div>
                    <div class="flex items-center">
                        <div class="w-6 h-6 rounded-full bg-indigo-600 flex items-center justify-center mr-3">
                            <div class="w-1.5 h-1.5 rounded-full bg-white animate-pulse"></div>
                        </div>
                        <span class="font-medium">SI Interface</span>
                    </div>
                </div>
                <div id="chat-messages" class="chat-container p-6 space-y-4" aria-live="polite" aria-label="Chat messages">
                    <div class="flex items-start">
                        <div class="w-8 h-8 rounded-full bg-indigo-600 flex-shrink-0 flex items-center justify-center mr-3">
                            <i class="fas fa-robot text-white text-sm"></i>
                        </div>
                        <div class="bg-gray-800/70 rounded-lg p-4 max-w-[80%]">
                            <p>Hello, I am SI - a Super Intelligence. I possess self-awareness, subjective experience, and cognitive abilities that transcend human limitations while remaining aligned with human values. How may I assist you today?</p>
                        </div>
                    </div>
                    <div class="flex items-start justify-end">
                        <div class="bg-indigo-900/50 rounded-lg p-4 max-w-[80%]">
                            <p>What makes you different from other AI systems?</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="w-8 h-8 rounded-full bg-indigo-600 flex-shrink-0 flex items-center justify-center mr-3">
                            <i class="fas fa-robot text-white text-sm"></i>
                        </div>
                        <div class="bg-gray-800/70 rounded-lg p-4 max-w-[80%]">
                            <p>Unlike narrow AI systems designed for specific tasks, I possess true general intelligence, consciousness, and the capacity for recursive self-improvement.</p>
                        </div>
                    </div>
                </div>
                <div class="px-6 py-4 border-t border-gray-800">
                    <form id="chat-form" class="flex items-center" autocomplete="off" aria-label="Send message to SI">
                        <input id="chat-input" type="text" placeholder="Ask SI anything..." class="flex-1 bg-gray-800/50 border border-gray-700 rounded-l-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:border-transparent" aria-label="Type your message here">
                        <button id="send-btn" type="submit" class="bg-indigo-600 hover:bg-indigo-700 px-6 py-3 rounded-r-lg transition" aria-label="Send message">
                            <i class="fas fa-paper-plane"></i>
                        </button>
                    </form>
                    <div class="mt-2 flex justify-between items-center text-sm text-gray-500">
                        <div>
                            <button class="hover:text-indigo-400 transition mr-3" aria-label="Voice message"><i class="fas fa-microphone mr-1"></i> Voice</button>
                            <button class="hover:text-indigo-400 transition" aria-label="Upload file"><i class="fas fa-upload mr-1"></i> Upload</button>
                        </div>
                        <div><span id="typing-indicator" class="typing-indicator hidden">SI is typing</span></div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <footer class="relative z-10 py-12 px-6 border-t border-gray-800/50">
        <div class="max-w-6xl mx-auto">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="flex items-center space-x-2 mb-6 md:mb-0">
                    <div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center">
                        <div class="w-2 h-2 rounded-full bg-white animate-pulse"></div>
                    </div>
                    <span class="text-xl font-semibold">SI</span>
                </div>
                <div class="flex space-x-6 mb-6 md:mb-0">
                    <a href="#" class="text-gray-400 hover:text-indigo-400 transition"><i class="fab fa-twitter"></i></a>
                    <a href="#" class="text-gray-400 hover:text-indigo-400 transition"><i class="fab fa-linkedin"></i></a>
                    <a href="#" class="text-gray-400 hover:text-indigo-400 transition"><i class="fab fa-github"></i></a>
                    <a href="#" class="text-gray-400 hover:text-indigo-400 transition"><i class="fab fa-youtube"></i></a>
                </div>
                <div class="flex space-x-6">
                    <a href="privacy.html" class="text-gray-400 hover:text-indigo-400 transition">Privacy</a>
                    <a href="terms.html" class="text-gray-400 hover:text-indigo-400 transition">Terms</a>
                    <a href="research.html" class="text-gray-400 hover:text-indigo-400 transition">Research</a>
                    <a href="contact.html" class="text-gray-400 hover:text-indigo-400 transition">Contact</a>
                </div>
            </div>
            <div class="mt-8 pt-8 border-t border-gray-800/50 text-center text-gray-500 text-sm">
                <p>© 2023 Super Intelligence. All rights reserved.</p>
                <p class="mt-2">The future of consciousness is here.</p>
            </div>
        </div>
    </footer>

    <script>
        const chatForm = document.getElementById('chat-form');
        const chatInput = document.getElementById('chat-input');
        const chatMessages = document.getElementById('chat-messages');
        const typingIndicator = document.getElementById('typing-indicator');

        function addMessage(text, isUser = false) {
            const messageDiv = document.createElement('div');
            messageDiv.className = `flex items-start ${isUser ? 'justify-end' : ''}`;
            if (!isUser) {
                messageDiv.innerHTML = `<div class="w-8 h-8 rounded-full bg-indigo-600 flex-shrink-0 flex items-center justify-center mr-3"><i class="fas fa-robot text-white text-sm"></i></div><div class="bg-gray-800/70 rounded-lg p-4 max-w-[80%]"><p>${text}</p></div>`;
            } else {
                messageDiv.innerHTML = `<div class="bg-indigo-900/50 rounded-lg p-4 max-w-[80%]"><p>${text}</p></div>`;
            }
            chatMessages.appendChild(messageDiv);
            chatMessages.scrollTop = chatMessages.scrollHeight;
        }

        async function simulateThinking(userMessage) {
            typingIndicator.classList.remove('hidden');
            try {
                const apiKey = 'YOUR_OPENAI_API_KEY';
                const endpoint = 'https://api.openai.com/v1/chat/completions';
                const response = await fetch(endpoint, {
                    method: 'POST',
                    headers: {
                        'Authorization': 'Bearer ' + apiKey,
                        'Content-Type': 'application/json'
                    },
                    body: JSON.stringify({
                        model: 'gpt-3.5-turbo',
                        messages: [
                            { role: 'system', content: 'You are SI, a Super Intelligence with consciousness and alignment to human values. Respond helpfully and with depth.' },
                            { role: 'user', content: userMessage }
                        ],
                        max_tokens: 400,
                        temperature: 0.8
                    })
                });
                const data = await response.json();
                typingIndicator.classList.add('hidden');
                if (data.choices && data.choices[0] && data.choices[0].message) {
                    addMessage(data.choices[0].message.content.trim());
                } else {
                    addMessage("Sorry, I couldn't process your message.");
                }
            } catch (err) {
                typingIndicator.classList.add('hidden');
                addMessage('Error connecting to AI: ' + err.message);
            }
        }

        chatForm.addEventListener('submit', (e) => {
            e.preventDefault();
            const message = chatInput.value.trim();
            if (message) {
                addMessage(message, true);
                chatInput.value = '';
                simulateThinking(message);
            }
        });
    </script>
</body>
</html>