File size: 9,272 Bytes
cf9ada6 1ead186 c8d5835 1ead186 c8d5835 1ead186 c8d5835 1ead186 c8d5835 1ead186 c8d5835 cf9ada6 c8d5835 a167661 1ead186 c8d5835 cf9ada6 c8d5835 1ead186 cf9ada6 |
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 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
<!DOCTYPE html>
<html lang="en" class="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#0078d4">
<title>AI Chat - The Colorless Wonder</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="windows11.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
:root {
--win11-bg: rgba(243, 243, 243, 0.85);
--win11-bg-dark: rgba(32, 32, 32, 0.85);
--win11-acrylic: rgba(243, 243, 243, 0.75);
--win11-acrylic-dark: rgba(32, 32, 32, 0.75);
--win11-border: rgba(0, 0, 0, 0.08);
--win11-border-dark: rgba(255, 255, 255, 0.08);
--win11-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
--win11-shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
--win11-radius: 8px;
--win11-radius-lg: 12px;
--win11-text: #1b1b1b;
--win11-text-secondary: #6b6b6b;
--win11-primary: #0078d4;
--win11-primary-hover: #1a86d9;
--win11-primary-dark: #60cdff;
}
.dark {
--win11-bg: rgba(32, 32, 32, 0.85);
--win11-acrylic: rgba(32, 32, 32, 0.75);
--win11-border: rgba(255, 255, 255, 0.08);
--win11-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
--win11-text: #ffffff;
--win11-text-secondary: #a0a0a0;
--win11-primary: #60cdff;
--win11-primary-hover: #8ad4ff;
}
body {
font-family: 'Segoe UI', 'Segoe UI Variable', -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg,
rgba(0, 120, 212, 0.08) 0%,
rgba(0, 120, 212, 0.04) 50%,
rgba(0, 120, 212, 0.08) 100%);
min-height: 100vh;
backdrop-filter: blur(30px) saturate(125%);
-webkit-backdrop-filter: blur(30px) saturate(125%);
}
.dark body {
background: linear-gradient(135deg,
rgba(0, 120, 212, 0.12) 0%,
rgba(0, 120, 212, 0.06) 50%,
rgba(0, 120, 212, 0.12) 100%);
}
.win11-window {
background: var(--win11-acrylic);
backdrop-filter: blur(40px) saturate(150%);
-webkit-backdrop-filter: blur(40px) saturate(150%);
border: 1px solid var(--win11-border);
box-shadow: var(--win11-shadow);
border-radius: var(--win11-radius-lg);
}
.win11-button {
background: rgba(0, 0, 0, 0.04);
border: 1px solid var(--win11-border);
border-radius: var(--win11-radius);
transition: all 0.15s ease;
}
.win11-button:hover {
background: rgba(0, 0, 0, 0.08);
}
.dark .win11-button {
background: rgba(255, 255, 255, 0.04);
}
.dark .win11-button:hover {
background: rgba(255, 255, 255, 0.08);
}
.win11-input {
background: rgba(0, 0, 0, 0.04);
border: 1px solid var(--win11-border);
border-radius: var(--win11-radius);
transition: all 0.2s ease;
}
.win11-input:focus {
background: rgba(0, 0, 0, 0.06);
border-color: var(--win11-primary);
box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
outline: none;
}
.dark .win11-input {
background: rgba(255, 255, 255, 0.04);
}
.dark .win11-input:focus {
background: rgba(255, 255, 255, 0.06);
}
.win11-link {
color: var(--win11-primary);
text-decoration: none;
border-radius: 4px;
padding: 2px 4px;
margin: -2px -4px;
transition: background 0.15s ease;
}
.win11-link:hover {
background: rgba(0, 120, 212, 0.1);
text-decoration: underline;
}
.win11-card {
background: var(--win11-acrylic);
backdrop-filter: blur(30px) saturate(125%);
-webkit-backdrop-filter: blur(30px) saturate(125%);
border: 1px solid var(--win11-border);
border-radius: var(--win11-radius-lg);
}
/* Windows 11 Title Bar */
.win11-titlebar {
height: 32px;
display: flex;
align-items: center;
padding: 0 12px;
border-bottom: 1px solid var(--win11-border);
user-select: none;
}
.win11-titlebar-drag {
flex: 1;
height: 100%;
-webkit-app-region: drag;
}
/* Smooth animations */
* {
transition-property: background-color, border-color, color, fill, stroke;
transition-timing-function: ease;
transition-duration: 150ms;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.3);
}
.dark ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
}
.dark ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
/* Theme toggle button */
.theme-toggle {
position: fixed;
top: 16px;
right: 16px;
z-index: 1000;
}
@media (max-width: 640px) {
.theme-toggle {
top: 8px;
right: 8px;
}
}
</style>
</head>
<body class="light">
<!-- Theme Toggle Button -->
<button class="theme-toggle win11-button p-2" onclick="toggleTheme()" title="Toggle Theme">
<i data-feather="sun" class="w-5 h-5 text-yellow-500 dark:hidden"></i>
<i data-feather="moon" class="w-5 h-5 text-yellow-300 hidden dark:block"></i>
</button>
<ai-chat></ai-chat>
<div class="win11-card mx-auto mt-6 p-4 text-center max-w-md" style="margin-left: auto; margin-right: auto; margin-top: 24px;">
<a href="tools.html" class="win11-link">Explore Development Tools & SDKs</a>
<div class="mt-3">
<a href="index.html" class="win11-link">
<i data-feather="arrow-left" class="w-4 h-4 inline mr-1"></i>
Back to Home
</a>
</div>
</div>
<script src="components/ai-chat.js"></script>
<script>
// Initialize Feather icons
document.addEventListener('DOMContentLoaded', function() {
if (typeof feather !== 'undefined') {
feather.replace();
}
});
// Theme toggle functionality
function toggleTheme() {
const html = document.documentElement;
const isDark = html.classList.contains('dark');
if (isDark) {
html.classList.remove('dark');
html.classList.add('light');
localStorage.setItem('theme', 'light');
} else {
html.classList.remove('light');
html.classList.add('dark');
localStorage.setItem('theme', 'dark');
}
// Re-initialize feather icons for theme change
if (typeof feather !== 'undefined') {
feather.replace();
}
// Dispatch custom event for components
window.dispatchEvent(new CustomEvent('themechange', {
detail: { theme: isDark ? 'light' : 'dark' }
}));
}
// Check system preference
function initTheme() {
const saved = localStorage.getItem('theme');
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (saved) {
document.documentElement.classList.remove('light', 'dark');
document.documentElement.classList.add(saved);
} else if (prefersDark) {
document.documentElement.classList.remove('light', 'dark');
document.documentElement.classList.add('dark');
}
if (typeof feather !== 'undefined') {
feather.replace();
}
}
// Initialize theme on load
initTheme();
// Listen for system theme changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function(e) {
if (!localStorage.getItem('theme')) {
document.documentElement.classList.remove('light', 'dark');
document.documentElement.classList.add(e.matches ? 'dark' : 'light');
}
});
</script>
</body>
</html>
|