File size: 6,563 Bytes
72fdfb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a05b638
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ceramic Voice | AI Assistant</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Manrope', sans-serif;
            background: linear-gradient(135deg, #f8f5f2 0%, #f0ece8 100%);
            color: #333333;
        }
        .ceramic-bg {
            background: linear-gradient(135deg, #f8f5f2 0%, #f0ece8 100%);
        }
        .purple-accent {
            color: #6a0dad;
        }
        .purple-bg {
            background-color: #6a0dad;
        }
        .walnut-bg {
            background-color: #3a2c1a;
        }
        .orb {
            width: 180px;
            height: 180px;
            border-radius: 50%;
            background: radial-gradient(circle at 40% 40%, #6a0dad, #9b59b6);
            box-shadow: 0 10px 30px rgba(106, 13, 173, 0.3);
            animation: pulse 3s infinite ease-in-out;
        }
        @keyframes pulse {
            0% { transform: scale(1); opacity: 0.9; }
            50% { transform: scale(1.05); opacity: 1; }
            100% { transform: scale(1); opacity: 0.9; }
        }
        .conversation-card {
            background-color: #f8f5f2;
            border-left: 3px solid #b87333;
        }
        .info-card {
            background-color: #3a2c1a;
            color: #f8f5f2;
        }
        .btn-press:active {
            transform: scale(0.98);
            opacity: 0.9;
        }
    </style>
</head>
<body class="h-screen overflow-hidden ceramic-bg">
    <div class="container mx-auto h-full flex flex-col">
        <!-- Header -->
        <header class="pt-8 px-6 flex justify-between items-center">
            <h1 class="text-xl font-light text-gray-700">Ceramic Voice</h1>
            <button class="copper-accent">
                <i data-feather="settings"></i>
            </button>
        </header>

        <!-- Main Content -->
        <main class="flex-1 flex flex-col items-center justify-center px-6 pb-20">
            <!-- Orb Animation -->
            <div class="orb mb-8" id="voiceOrb"></div>

            <!-- Prompt Text -->
            <p class="text-lg text-gray-600 mb-12" id="promptText">How can I help?</p>

            <!-- Conversation Area -->
            <div class="w-full max-w-md space-y-4 overflow-y-auto max-h-64" id="conversationArea">
                <!-- Conversation items will be added here dynamically -->
            </div>

            <!-- Results Cards -->
            <div class="w-full max-w-md mt-4 space-y-3 hidden" id="resultsArea">
                <div class="rounded-lg p-4 info-card">
                    <h3 class="font-medium mb-2">Weather</h3>
                    <p>Currently 72°F • Sunny</p>
                </div>
            </div>
        </main>

        <!-- Footer -->
        <footer class="pb-8 px-6 flex justify-center">
            <button class="purple-bg text-white rounded-full p-4 shadow-lg btn-press transition-all duration-200" id="voiceButton">
                <i data-feather="mic" class="w-6 h-6"></i>
            </button>
        </footer>
    </div>

    <script>
        feather.replace();
        
        // Voice interaction simulation
        const voiceButton = document.getElementById('voiceButton');
        const voiceOrb = document.getElementById('voiceOrb');
        const promptText = document.getElementById('promptText');
        const conversationArea = document.getElementById('conversationArea');
        const resultsArea = document.getElementById('resultsArea');

        let isListening = false;

        voiceButton.addEventListener('click', () => {
            isListening = !isListening;
            
            if (isListening) {
                // Start listening state
                voiceOrb.style.animation = 'none';
                voiceOrb.style.transform = 'scale(1.1)';
                voiceOrb.style.boxShadow = '0 10px 40px rgba(106, 13, 173, 0.5)';
                promptText.textContent = "Listening...";
                voiceButton.classList.add('animate-pulse');
                
                // Simulate user speaking after 2 seconds
                setTimeout(() => {
                    stopListening();
                    simulateResponse();
                }, 2000);
            }
        });

        function stopListening() {
            isListening = false;
            voiceOrb.style.animation = 'pulse 3s infinite ease-in-out';
            voiceOrb.style.boxShadow = '0 10px 30px rgba(184, 115, 51, 0.3)';
            promptText.textContent = "How can I help?";
            voiceButton.classList.remove('animate-pulse');
        }

        function simulateResponse() {
            // Add user message
            const userMessage = document.createElement('div');
            userMessage.className = 'conversation-card rounded-lg p-4';
            userMessage.textContent = "What's the weather today?";
            conversationArea.appendChild(userMessage);
            
            // Show thinking state
            promptText.textContent = "Thinking...";
            voiceOrb.style.animation = 'none';
            voiceOrb.innerHTML = '<div class="w-full h-full rounded-full border-4 border-transparent border-t-purple-500 animate-spin"></div>';
            
            // Simulate AI response after 3 seconds
            setTimeout(() => {
                promptText.textContent = "How can I help?";
                voiceOrb.style.animation = 'pulse 3s infinite ease-in-out';
                voiceOrb.innerHTML = '';
                
                // Add AI response
                const aiMessage = document.createElement('div');
                aiMessage.className = 'conversation-card rounded-lg p-4';
                aiMessage.textContent = "It's currently sunny and 72°F in your area.";
                conversationArea.appendChild(aiMessage);
                
                // Show results cards
                resultsArea.classList.remove('hidden');
                
                // Scroll to bottom
                conversationArea.scrollTop = conversationArea.scrollHeight;
            }, 3000);
        }
    </script>
</body>
</html>