Genisi-2 / codes /windows12.html
AnesKAM's picture
Upload 14 files
8e05d8d verified
Raw History Blame Contribute Delete
167 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Windows 11/12 Concept OS — Ultimate Pixel-Perfect Edition</title> <!-- External Libraries --> <script src="https://cdn.tailwindcss.com"></script> <script src="https://unpkg.com/lucide@latest"></script> <script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script> <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet"> <style> * { user-select: none; box-sizing: border-box; font-family: 'Segoe UI Variable Display', 'Segoe UI', 'Plus Jakarta Sans', -apple-system, sans-serif; } body, html { margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; background-color: #c2e0ff; } /* Pixel-Perfect Surreal Blue Infrared Landscape Wallpaper */ #wallpaper { position: fixed; inset: 0; background-image: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=2200&q=95'); background-size: cover; background-position: center 42%; filter: hue-rotate(186deg) saturate(1.95) brightness(1.14) contrast(0.94); transition: filter 0.5s ease, background-image 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); z-index: 0; } #wallpaper::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(225, 242, 255, 0.48) 0%, rgba(185, 222, 255, 0.12) 52%, rgba(20, 105, 215, 0.28) 100%); pointer-events: none; } /* Mica & Acrylic Glassmorphism */ .mica-panel { background: linear-gradient(160deg, rgba(245, 250, 255, 0.82) 0%, rgba(230, 242, 255, 0.76) 100%); backdrop-filter: blur(32px) saturate(190%); -webkit-backdrop-filter: blur(32px) saturate(190%); border: 1px solid rgba(255, 255, 255, 0.72); box-shadow: 0 24px 60px rgba(0, 35, 90, 0.18), 0 2px 12px rgba(0, 0, 0, 0.05); } .mica-window { background: linear-gradient(135deg, rgba(228, 240, 255, 0.82) 0%, rgba(244, 249, 255, 0.88) 100%); backdrop-filter: blur(36px) saturate(200%); -webkit-backdrop-filter: blur(36px) saturate(200%); border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 28px 70px rgba(8, 38, 88, 0.24), 0 4px 16px rgba(0, 0, 0, 0.06); } .taskbar-glass { background: rgba(232, 242, 255, 0.68); backdrop-filter: blur(28px) saturate(190%); border-top: 1px solid rgba(255, 255, 255, 0.68); } .pill-glass { background: rgba(255, 255, 255, 0.76); border: 1px solid rgba(255, 255, 255, 0.88); box-shadow: 0 2px 10px rgba(0, 35, 90, 0.06); } /* Dark Mode Overrides */ body.dark-mode .mica-panel, body.dark-mode .mica-window { background: linear-gradient(135deg, rgba(20, 26, 40, 0.86) 0%, rgba(28, 36, 54, 0.90) 100%); border-color: rgba(255, 255, 255, 0.12); color: #f1f5f9; } body.dark-mode .window-inner-content { background: rgba(26, 34, 50, 0.95) !important; border-color: rgba(255, 255, 255, 0.08) !important; color: #f1f5f9 !important; } body.dark-mode .card-surface { background: rgba(38, 48, 70, 0.85) !important; border-color: rgba(255, 255, 255, 0.09) !important; color: #f1f5f9 !important; } body.dark-mode .taskbar-glass { background: rgba(15, 20, 32, 0.78); border-color: rgba(255, 255, 255, 0.1); } body.dark-mode .pill-glass { background: rgba(30, 38, 56, 0.88); border-color: rgba(255, 255, 255, 0.14); color: #f8fafc; } body.dark-mode .text-dark-adapt { color: #e2e8f0 !important; } body.dark-mode .subtext-dark-adapt { color: #94a3b8 !important; } /* Accessibility Mode (High Contrast / Larger Scale) */ body.a11y-mode { filter: contrast(1.12); } body.a11y-mode .app-window { border-width: 2px; border-color: #005fb8; } /* Window Animations */ .app-window { position: absolute; transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease, width 0.22s ease, height 0.22s ease, top 0.22s ease, left 0.22s ease; } .app-window.dragging { transition: none !important; } .app-window.hidden-win { opacity: 0; transform: scale(0.94) translateY(18px); pointer-events: none; } /* Scrollbars */ ::-webkit-scrollbar { width: 5px; height: 5px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(100, 130, 170, 0.3); border-radius: 99px; } ::-webkit-scrollbar-thumb:hover { background: rgba(100, 130, 170, 0.55); } /* Custom Sliders matching Image 5 */ input[type="range"] { -webkit-appearance: none; appearance: none; height: 3.5px; border-radius: 999px; background: #cbd5e1; outline: none; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #0067c0; border: 2.5px solid #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.35); cursor: pointer; transition: transform 0.1s; } input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.18); } /* Minesweeper cell bevels */ .mine-cell { background: linear-gradient(145deg, #e6f0ff, #bfd8ff); border: 1px solid #8ab4f8; box-shadow: inset 1px 1px 0px rgba(255,255,255,0.8); } .mine-cell.revealed { background: #f1f5f9; border: 1px solid #cbd5e1; box-shadow: none; } </style> </head> <body class="relative select-none" oncontextmenu="handleDesktopRightClick(event)"> <!-- Brightness & Night Light Overlay --> <div id="brightnessOverlay" class="fixed inset-0 bg-black pointer-events-none z-[9990] opacity-0 transition-opacity duration-150"></div> <!-- Surreal Blue Infrared Wallpaper --> <div id="wallpaper"></div> <!-- ========================================================= 1. LOCK SCREEN (IMAGE 1 PIXEL-PERFECT) ========================================================== --> <div id="lockScreen" onclick="unlockOS()" class="fixed inset-0 z-[2000] flex flex-col justify-between items-center py-11 px-8 cursor-pointer transition-all duration-700 ease-out"> <!-- Top Clock & Lock Icon --> <div class="flex flex-col items-center mt-3 text-slate-900"> <div class="mb-4 text-slate-700/85 bg-white/30 p-1.5 rounded-full backdrop-blur-xs"> <svg class="w-3.5 h-3.5" fill="currentColor" viewBox="0 0 20 20"> <path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd"/> </svg> </div> <h1 id="lockTime" class="text-[78px] leading-none font-bold tracking-tight text-slate-950 drop-shadow-2xs">10:12</h1> <p id="lockDate" class="text-[13px] font-semibold text-slate-800 mt-2.5 tracking-wide">Saturday, October 11</p> </div> <!-- Center Subtle Unlock Prompt --> <div class="text-[11px] font-medium text-slate-800/80 bg-white/45 backdrop-blur-md px-4 py-1.5 rounded-full shadow-xs border border-white/50 animate-pulse"> Click anywhere or press any widget to unlock </div> <!-- Bottom 3 Widgets Row (Pixel-Perfect to Image 1) --> <div class="w-full max-w-[780px] grid grid-cols-3 gap-3.5 mb-1"> <!-- Widget 1: Weather (Seoul, KR) --> <div onclick="event.stopPropagation(); unlockOS('weather');" class="rounded-xl p-3.5 text-white shadow-lg flex flex-col justify-between h-[126px] hover:scale-[1.02] transition cursor-pointer" style="background: linear-gradient(135deg, #0078ff 0%, #0051f5 100%);"> <div class="flex items-center gap-1 text-[10px] font-medium opacity-95"> <svg class="w-3 h-3" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd"/></svg> <span>Seoul, KR</span> <span class="opacity-75">↗</span> </div> <div class="flex items-center justify-between my-1"> <div class="flex items-center gap-2.5"> <div class="relative w-9 h-9 flex items-center justify-center"> <div class="w-5 h-5 rounded-full bg-amber-300 absolute -top-0.5 left-0.5 shadow"></div> <div class="w-7 h-4 bg-white/95 rounded-full absolute bottom-1 right-0 shadow-sm"></div> </div> <span class="text-3xl font-semibold tracking-tight">17°</span> </div> <div class="text-right text-[10px] leading-tight opacity-95"> <div class="font-medium">Mostly cloudy</div> <div class="opacity-80 mt-0.5">18° / 14°</div> </div> </div> <div class="flex justify-center"> <span class="text-[9px] bg-white/25 hover:bg-white/35 transition px-3 py-0.5 rounded-full font-medium backdrop-blur-sm">See full forecast</span> </div> </div> <!-- Widget 2: Markets --> <div onclick="event.stopPropagation(); unlockOS('excel');" class="rounded-xl p-3.5 bg-white/82 backdrop-blur-xl border border-white/75 shadow-lg flex flex-col justify-between h-[126px] text-slate-800 hover:scale-[1.02] transition cursor-pointer"> <div class="text-[10px] font-bold text-slate-800">Markets</div> <div class="grid grid-cols-3 gap-1.5 my-1 text-[10px]"> <div> <div class="font-bold text-slate-700">IDX</div> <div class="text-emerald-600 font-semibold text-[9px]">+0.44%</div> <div class="text-slate-900 font-semibold mt-0.5">10,203.01</div> </div> <div> <div class="font-bold text-slate-700">OK/FSD</div> <div class="text-emerald-600 font-semibold text-[9px]">+0.44%</div> <div class="text-slate-900 font-semibold mt-0.5">60,512.44</div> </div> <div> <div class="font-bold text-slate-700">ZKOJL</div> <div class="text-emerald-600 font-semibold text-[9px]">+0.44%</div> <div class="text-slate-900 font-semibold mt-0.5">1,590.05</div> </div> </div> <div class="text-center"> <span class="text-[9px] text-blue-600 font-medium hover:underline">See more in markets</span> </div> </div> <!-- Widget 3: Trending in Shape League --> <div onclick="event.stopPropagation(); unlockOS('games');" class="rounded-xl p-3.5 bg-white/82 backdrop-blur-xl border border-white/75 shadow-lg flex flex-col justify-between h-[126px] text-slate-800 hover:scale-[1.02] transition cursor-pointer"> <div class="text-[10px] font-bold text-slate-800">Trending in Shape League</div> <div class="grid grid-cols-2 gap-3 my-1 text-[10px]"> <div class="space-y-1"> <div class="text-[8px] text-slate-500 font-semibold">01:00 PM</div> <div class="flex items-center justify-between"> <span class="flex items-center gap-1"><span class="w-2 h-2 bg-rose-500 rounded-2xs inline-block"></span> Rectangle</span> <span class="font-bold">0</span> </div> <div class="flex items-center justify-between"> <span class="flex items-center gap-1"><span class="w-2 h-2 bg-emerald-500 rounded-full inline-block"></span> Circle</span> <span class="font-bold">0</span> </div> </div> <div class="space-y-1"> <div class="text-[8px] text-slate-500 font-semibold">04:00 PM</div> <div class="flex items-center justify-between"> <span class="flex items-center gap-1"><span class="w-2 h-2 bg-sky-500 rotate-45 inline-block"></span> Triangle</span> <span class="font-bold">0</span> </div> <div class="flex items-center justify-between"> <span class="flex items-center gap-1"><span class="w-2 h-2 bg-amber-400 inline-block"></span> Trapezium</span> <span class="font-bold">0</span> </div> </div> </div> <div class="text-center"> <span class="text-[9px] text-blue-600 font-medium hover:underline">See more in Shape League</span> </div> </div> </div> <!-- Bottom Right Lock Screen Status Icons --> <div class="fixed bottom-3 right-6 flex items-center gap-2.5 text-slate-800 opacity-85"> <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0"/></svg> <div class="w-4 h-2.5 border border-slate-800 rounded-xs p-[1px] flex items-center"><div class="w-2.5 h-full bg-slate-800"></div></div> </div> </div> <!-- ========================================================= 2. DESKTOP WORKSPACE & ALL WINDOWS ========================================================== --> <main id="desktopArea" onclick="closePopups()" class="relative w-full h-[calc(100vh-48px)] z-10 overflow-hidden"> <!-- Desktop Right-Click Context Menu --> <div id="contextMenu" onclick="event.stopPropagation()" class="hidden fixed w-52 mica-panel rounded-xl p-1.5 text-xs text-slate-800 text-dark-adapt z-[950] shadow-xl space-y-0.5"> <button onclick="openWindow('files'); hideContextMenu();" class="w-full flex items-center gap-2.5 px-3 py-1.5 rounded-lg hover:bg-blue-600 hover:text-white transition"><span>📁</span><span>Open File Explorer</span></button> <button onclick="createNewItemPrompt('folder'); hideContextMenu();" class="w-full flex items-center gap-2.5 px-3 py-1.5 rounded-lg hover:bg-blue-600 hover:text-white transition"><span>➕</span><span>New Folder</span></button> <button onclick="openWindow('office'); switchOfficeApp('word'); hideContextMenu();" class="w-full flex items-center gap-2.5 px-3 py-1.5 rounded-lg hover:bg-blue-600 hover:text-white transition"><span>📘</span><span>New Word Document</span></button> <button onclick="openWindow('games'); hideContextMenu();" class="w-full flex items-center gap-2.5 px-3 py-1.5 rounded-lg hover:bg-blue-600 hover:text-white transition"><span>🎮</span><span>Windows 7 Games Hub</span></button> <div class="h-[1px] bg-slate-200/70 my-1"></div> <button onclick="openWindow('settings'); switchSettingsSection('personalisation'); hideContextMenu();" class="w-full flex items-center gap-2.5 px-3 py-1.5 rounded-lg hover:bg-blue-600 hover:text-white transition"><span>🖌️</span><span>Personalise Desktop</span></button> <button onclick="openWindow('terminal'); hideContextMenu();" class="w-full flex items-center gap-2.5 px-3 py-1.5 rounded-lg hover:bg-blue-600 hover:text-white transition"><span>💻</span><span>Open in Terminal</span></button> </div> <!-- ======================================================= WINDOW 1: FILES / FILE EXPLORER (IMAGES 3 & 4 PIXEL-PERFECT) ======================================================== --> <section id="win-files" onmousedown="focusWindow('files')" class="app-window hidden-win mica-window rounded-2xl w-[870px] h-[545px] top-[6%] left-[17%] flex overflow-hidden z-30"> <!-- Left Sidebar --> <aside class="w-[188px] h-full p-3 flex flex-col justify-between text-[11.5px] text-slate-700 text-dark-adapt select-none"> <div class="overflow-y-auto pr-0.5"> <div class="flex items-center gap-2.5 px-2 py-1.5 mb-2 font-semibold text-slate-800 text-dark-adapt"> <svg class="w-3.5 h-3.5 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16"/></svg> <span>Files</span> </div> <!-- Home --> <button id="fnav-home" onclick="navigateFiles('home')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg bg-white/85 shadow-2xs font-medium text-slate-900 mb-3 transition"> <span class="fnav-bar w-1 h-3.5 bg-blue-600 rounded-full -ml-1"></span> <svg class="w-3.5 h-3.5 text-amber-500" fill="currentColor" viewBox="0 0 20 20"><path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"/></svg> <span>Home</span> </button> <!-- Pinned Section --> <div onclick="toggleSidebarGroup('pinnedList')" class="flex items-center justify-between px-2 py-1 text-[10px] font-semibold text-slate-500 cursor-pointer hover:text-slate-800"> <span>Pinned</span><span>⌄</span> </div> <div id="pinnedList" class="space-y-0.5 mt-0.5"> <button id="fnav-desktop" onclick="navigateFiles('desktop')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-3 rounded-2xs bg-sky-500 inline-block"></span><span>Desktop</span> </button> <button id="fnav-documents" onclick="navigateFiles('documents')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-3 rounded-2xs bg-slate-400 inline-block"></span><span>Documents</span> </button> <button id="fnav-downloads" onclick="navigateFiles('downloads')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-3 rounded-2xs bg-teal-500 inline-block"></span><span>Downloads</span> </button> <button id="fnav-gallery" onclick="navigateFiles('gallery')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-3 rounded-2xs bg-blue-600 inline-block"></span><span>Gallery</span> </button> <button id="fnav-music" onclick="navigateFiles('music')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-3 rounded-full bg-rose-400 inline-block"></span><span>Music</span> </button> <button id="fnav-videos" onclick="navigateFiles('videos')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-3 rounded-2xs bg-purple-500 inline-block"></span><span>Videos</span> </button> </div> <!-- Drives --> <div class="flex items-center justify-between px-2 py-1 mt-3 text-[10px] font-semibold text-slate-500"> <span>Drives</span><span>⌄</span> </div> <button id="fnav-system" onclick="navigateFiles('system')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="w-3.5 h-2.5 rounded-2xs bg-slate-600 inline-block"></span><span>System</span> </button> <!-- Cloud Drives --> <div class="flex items-center justify-between px-2 py-1 mt-2 text-[10px] font-semibold text-slate-500"> <span>Cloud Drives</span><span>⌄</span> </div> <button id="fnav-onedrive" onclick="navigateFiles('onedrive')" class="fnav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"> <span class="text-blue-500">☁</span><span>OneDrive</span> </button> </div> <!-- Bottom Collapsibles --> <div class="space-y-1 text-[10px] font-semibold text-slate-500 px-2 pb-1"> <div onclick="navigateFiles('favorites')" class="flex justify-between items-center py-1 hover:text-blue-600 cursor-pointer"><span>Favorites</span><span>⌄</span></div> <div onclick="navigateFiles('recent')" class="flex justify-between items-center py-1 hover:text-blue-600 cursor-pointer"><span>Recent Files</span><span>⌄</span></div> </div> </aside> <!-- Right Content Area --> <div class="flex-1 flex flex-col h-full pr-2.5 pb-2.5"> <!-- Multi-Tab Window Header --> <header onmousedown="startDrag(event, 'win-files')" class="h-10 flex items-center justify-between px-1 cursor-move"> <div class="flex items-center gap-1.5 pt-1 overflow-x-auto max-w-[600px]" id="filesTabBar" onmousedown="event.stopPropagation()"> <!-- Tabs rendered dynamically --> </div> <div class="flex items-center gap-1" onmousedown="event.stopPropagation()"> <button onclick="minimizeWindow('files')" class="w-7 h-7 rounded-lg hover:bg-white/50 flex items-center justify-center text-slate-700 text-xs">—</button> <button onclick="maximizeWindow('files')" class="w-7 h-7 rounded-lg hover:bg-white/50 flex items-center justify-center text-slate-700 text-[10px]">▢</button> <button onclick="closeWindow('files')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white flex items-center justify-center text-slate-700 text-xs transition">✕</button> </div> </header> <!-- Navigation & Search Bar --> <div class="flex items-center justify-between gap-3 px-2 py-1.5 mb-1.5 text-xs text-slate-600"> <div class="flex items-center gap-3"> <button onclick="filesHistoryBack()" class="hover:text-blue-600 font-bold" title="Back">←</button> <button onclick="navigateFiles(currentFilesFolder)" class="hover:text-blue-600 font-bold" title="Refresh">↻</button> <div id="filesBreadcrumb" class="flex items-center gap-2 text-[11px] font-medium text-slate-700 text-dark-adapt ml-1"> <span>Home</span><span class="text-slate-400">›</span> </div> </div> <div class="flex items-center gap-2"> <span class="text-slate-400 text-[10px]">⌄</span> <div class="flex items-center bg-white/85 border border-white/85 rounded-full px-3 py-1 w-52 shadow-2xs"> <input id="filesSearchInput" oninput="filterFilesView(this.value)" type="text" placeholder="Search Home" class="bg-transparent outline-none text-[11px] w-full text-slate-700 placeholder-slate-400" /> <svg class="w-3 h-3 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg> </div> </div> </div> <!-- Inner White Rounded Content Container --> <div class="window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 shadow-inner flex flex-col overflow-hidden relative"> <!-- Action Toolbar (Every single button works!) --> <div class="flex items-center justify-between px-4 py-2.5 border-b border-slate-100 text-[11px] text-slate-600"> <div class="flex items-center gap-3.5"> <div class="relative"> <button onclick="toggleNewMenu(event)" class="flex items-center gap-1.5 font-medium text-slate-700 text-dark-adapt hover:text-blue-600 px-1.5 py-0.5 rounded-md hover:bg-slate-100/70 transition"> <span class="w-4 h-4 rounded-full border border-slate-400 flex items-center justify-center text-[10px]">+</span> <span>New</span> <span class="text-[9px]">⌄</span> </button> <!-- Dropdown for + New --> <div id="filesNewMenu" class="hidden absolute left-0 top-7 w-40 bg-white rounded-xl shadow-xl border border-slate-100 p-1 z-50 text-[11px] text-slate-700"> <button onclick="createNewItemPrompt('folder')" class="w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 flex items-center gap-2"><span>📁</span><span>Folder</span></button> <button onclick="createNewItemPrompt('txt')" class="w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 flex items-center gap-2"><span>📄</span><span>Text Document</span></button> <button onclick="openWindow('office'); switchOfficeApp('word');" class="w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 flex items-center gap-2"><span>📘</span><span>Word Document</span></button> <button onclick="openWindow('office'); switchOfficeApp('excel');" class="w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 flex items-center gap-2"><span>📗</span><span>Excel Sheet</span></button> </div> </div> <span class="h-3.5 w-[1px] bg-slate-200"></span> <button onclick="fileClipboardAction('cut')" class="hover:text-blue-600 px-1" title="Cut selected item">✂</button> <button onclick="fileClipboardAction('copy')" class="hover:text-blue-600 px-1" title="Copy selected item">❐</button> <button onclick="fileClipboardAction('paste')" class="hover:text-blue-600 px-1" title="Paste item">📋</button> <button onclick="fileRenameAction()" class="hover:text-blue-600 px-1" title="Rename selected item">✎</button> <button onclick="fileDeleteAction()" class="hover:text-rose-600 px-1" title="Delete selected item">🗑</button> <button onclick="filePropertiesAction()" class="hover:text-blue-600 px-1" title="Properties">ⓘ</button> </div> <div class="flex items-center gap-3 text-slate-500"> <button onclick="toggleFilesGridCols()" class="flex items-center gap-1 text-blue-600 hover:bg-blue-50 px-1.5 py-0.5 rounded" title="Toggle Grid / Compact View"><span>▦</span><span class="text-[9px]">⌄</span></button> <button onclick="sortCurrentFolder()" class="flex items-center gap-1 hover:text-blue-600 px-1.5 py-0.5 rounded" title="Sort A-Z / Z-A"><span>⇅</span><span class="text-[9px]">⌄</span></button> <button onclick="navigateFiles('gallery')" class="flex items-center gap-1 hover:text-blue-600" title="Gallery Layout"><span>▤</span></button> <button onclick="filePropertiesAction()" title="More options">⋯</button> </div> </div> <!-- Dynamic Body Container for Files --> <div id="filesDynamicBody" class="flex-1 p-5 overflow-y-auto relative"> <!-- Rendered by JS based on active folder (Home, Gallery/Sample Photos, Desktop, Documents, System, etc.) --> </div> </div> </div> </section> <!-- ======================================================= WINDOW 2: SETTINGS APP (IMAGE 6 + ALL 12 TABS WORKING) ======================================================== --> <section id="win-settings" onmousedown="focusWindow('settings')" class="app-window hidden-win mica-window rounded-2xl w-[870px] h-[545px] top-[7%] left-[18%] flex overflow-hidden z-40"> <!-- Settings Left Sidebar --> <aside class="w-[192px] h-full p-3 flex flex-col text-[11px] text-slate-700 text-dark-adapt space-y-0.5 overflow-y-auto"> <div class="flex items-center gap-2.5 px-2 py-1.5 mb-2 font-semibold text-slate-800 text-dark-adapt text-xs"> <svg class="w-3.5 h-3.5 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16"/></svg> <span>Settings</span> </div> <button id="snav-home" onclick="switchSettingsSection('home')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg bg-white/85 shadow-2xs font-medium text-slate-900 mb-1"> <span class="w-1 h-3.5 bg-blue-600 rounded-full -ml-1"></span><span>🏠</span><span>Home</span> </button> <button id="snav-system" onclick="switchSettingsSection('system')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>💻</span><span>System</span></button> <button id="snav-bluetooth" onclick="switchSettingsSection('bluetooth')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🔹</span><span>Bluetooth & Devices</span></button> <button id="snav-network" onclick="switchSettingsSection('network')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🌐</span><span>Network & Internet</span></button> <button id="snav-personalisation" onclick="switchSettingsSection('personalisation')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🖌️</span><span>Personalisation</span></button> <button id="snav-apps" onclick="switchSettingsSection('apps')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>⊞</span><span>Apps</span></button> <button id="snav-account" onclick="switchSettingsSection('account')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>👤</span><span>Account</span></button> <button id="snav-time" onclick="switchSettingsSection('time')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🕒</span><span>Time & Language</span></button> <button id="snav-games" onclick="switchSettingsSection('games')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🎮</span><span>Games</span></button> <button id="snav-accessibility" onclick="switchSettingsSection('accessibility')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>♿</span><span>Accessibility</span></button> <button id="snav-privacy" onclick="switchSettingsSection('privacy')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🛡️</span><span>Privacy & Security</span></button> <button id="snav-update" onclick="switchSettingsSection('update')" class="snav-btn w-full flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg hover:bg-white/55 transition"><span>🔄</span><span>Windows Update</span></button> </aside> <!-- Settings Right Content --> <div class="flex-1 flex flex-col h-full pr-2.5 pb-2.5"> <header onmousedown="startDrag(event, 'win-settings')" class="h-10 flex items-center justify-between px-1 cursor-move"> <div class="flex items-center gap-1.5 pt-1"> <div class="flex items-center justify-between gap-6 bg-white/85 px-3 py-1.5 rounded-t-xl rounded-b-md text-[11px] font-medium text-slate-800 shadow-xs min-w-[140px]"> <div class="flex items-center gap-2"><span id="settingsTabIcon">🏠</span><span id="settingsTabTitle">Home</span></div> <span onclick="switchSettingsSection('home')" class="text-slate-400 hover:text-slate-700 text-[10px] cursor-pointer">✕</span> </div> <button onclick="switchSettingsSection('personalisation')" title="Open Personalisation" class="w-6 h-6 rounded-lg hover:bg-white/50 flex items-center justify-center text-slate-600 text-xs font-bold">+</button> </div> <div class="flex items-center gap-1" onmousedown="event.stopPropagation()"> <button onclick="minimizeWindow('settings')" class="w-7 h-7 rounded-lg hover:bg-white/50 flex items-center justify-center text-slate-700 text-xs">—</button> <button onclick="maximizeWindow('settings')" class="w-7 h-7 rounded-lg hover:bg-white/50 flex items-center justify-center text-slate-700 text-[10px]">▢</button> <button onclick="closeWindow('settings')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white flex items-center justify-center text-slate-700 text-xs transition">✕</button> </div> </header> <div class="flex items-center justify-between gap-3 px-2 py-1.5 mb-1.5 text-xs text-slate-600"> <div class="flex items-center gap-3"> <button onclick="switchSettingsSection('home')" class="hover:text-blue-600 font-bold">←</button> <button onclick="switchSettingsSection(currentSettingsSection)" class="hover:text-blue-600 font-bold">↻</button> <div id="settingsBreadcrumb" class="flex items-center gap-2 text-[11px] font-medium text-slate-700 text-dark-adapt ml-1"> <span>Home</span><span class="text-slate-400">›</span> </div> </div> <div class="flex items-center bg-white/85 border border-white/85 rounded-full px-3 py-1 w-48 shadow-2xs"> <input type="text" placeholder="Search Settings" onkeydown="if(event.key==='Enter') switchSettingsSection('system')" class="bg-transparent outline-none text-[11px] w-full text-slate-700 placeholder-slate-400" /> <svg class="w-3 h-3 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg> </div> </div> <!-- Settings Dynamic Inner Area --> <div id="settingsDynamicBody" class="window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 p-5 overflow-y-auto space-y-4"> <!-- Rendered by JS (Default is Image 6 Home view) --> </div> </div> </section> <!-- ======================================================= WINDOW 3: MICROSOFT OFFICE 365 SUITE (WORD, EXCEL, PPT, OUTLOOK) ======================================================== --> <section id="win-office" onmousedown="focusWindow('office')" class="app-window hidden-win mica-window rounded-2xl w-[900px] h-[560px] top-[5%] left-[15%] flex overflow-hidden z-40"> <!-- Office Left App Rail --> <aside class="w-14 h-full py-3 flex flex-col items-center justify-between border-r border-white/50 bg-white/40"> <div class="flex flex-col items-center gap-3"> <div class="w-8 h-8 rounded-xl bg-gradient-to-tr from-rose-500 via-purple-600 to-sky-500 text-white flex items-center justify-center font-bold text-xs shadow">365</div> <button id="obtn-word" onclick="switchOfficeApp('word')" title="Microsoft Word" class="w-9 h-9 rounded-xl bg-blue-700 text-white font-bold text-xs flex items-center justify-center shadow hover:scale-105 transition">W</button> <button id="obtn-excel" onclick="switchOfficeApp('excel')" title="Microsoft Excel" class="w-9 h-9 rounded-xl bg-emerald-600 text-white font-bold text-xs flex items-center justify-center shadow hover:scale-105 transition">X</button> <button id="obtn-ppt" onclick="switchOfficeApp('ppt')" title="Microsoft PowerPoint" class="w-9 h-9 rounded-xl bg-orange-600 text-white font-bold text-xs flex items-center justify-center shadow hover:scale-105 transition">P</button> <button id="obtn-outlook" onclick="switchOfficeApp('outlook')" title="Microsoft Outlook" class="w-9 h-9 rounded-xl bg-sky-600 text-white font-bold text-xs flex items-center justify-center shadow hover:scale-105 transition">✉</button> </div> <button onclick="openWindow('files'); navigateFiles('documents');" title="Saved Documents" class="w-8 h-8 rounded-lg hover:bg-white/60 flex items-center justify-center text-sm">📁</button> </aside> <!-- Office Main Area --> <div class="flex-1 flex flex-col h-full pr-2.5 pb-2.5 pl-2"> <header onmousedown="startDrag(event, 'win-office')" class="h-10 flex items-center justify-between px-2 cursor-move"> <div class="flex items-center gap-2"> <span id="officeAppBadge" class="px-2.5 py-0.5 rounded-md bg-blue-700 text-white text-[10px] font-bold">Word</span> <span id="officeDocTitle" class="text-xs font-semibold text-slate-800 text-dark-adapt">Project_Proposal.docx — Saved to OneDrive</span> </div> <div class="flex items-center gap-1" onmousedown="event.stopPropagation()"> <button onclick="minimizeWindow('office')" class="w-7 h-7 rounded-lg hover:bg-white/50 text-xs">—</button> <button onclick="maximizeWindow('office')" class="w-7 h-7 rounded-lg hover:bg-white/50 text-[10px]">▢</button> <button onclick="closeWindow('office')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </div> </header> <!-- 1. WORD VIEW --> <div id="office-view-word" class="window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 flex flex-col overflow-hidden"> <div class="px-4 py-2 bg-slate-50 border-b border-slate-200 flex items-center justify-between text-xs text-slate-700"> <div class="flex items-center gap-2"> <button onclick="execWordCmd('bold')" class="w-7 h-7 rounded hover:bg-slate-200 font-bold">B</button> <button onclick="execWordCmd('italic')" class="w-7 h-7 rounded hover:bg-slate-200 italic">I</button> <button onclick="execWordCmd('underline')" class="w-7 h-7 rounded hover:bg-slate-200 underline">U</button> <span class="h-4 w-[1px] bg-slate-300 mx-1"></span> <button onclick="execWordCmd('justifyLeft')" class="px-2 py-1 rounded hover:bg-slate-200">⇤</button> <button onclick="execWordCmd('justifyCenter')" class="px-2 py-1 rounded hover:bg-slate-200">⇔</button> <button onclick="execWordCmd('insertUnorderedList')" class="px-2 py-1 rounded hover:bg-slate-200">• List</button> <input type="color" onchange="execWordCmd('foreColor', this.value)" class="w-6 h-6 rounded cursor-pointer border-0" title="Text Color" /> </div> <div class="flex items-center gap-2"> <button onclick="saveWordToDocuments()" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-lg text-[11px] font-semibold">💾 Save to Documents</button> </div> </div> <div class="flex-1 bg-slate-100/80 overflow-y-auto p-6 flex justify-center select-text"> <div id="wordEditor" contenteditable="true" class="w-full max-w-[650px] min-h-[420px] bg-white shadow-md rounded-sm p-8 outline-none text-slate-800 text-sm leading-relaxed select-text"> <h1 class="text-2xl font-bold text-blue-900 mb-2">Windows 12 Concept Architecture</h1> <p class="text-slate-500 text-xs mb-4">Author: Abdi • Surface Pro X</p> <p class="mb-3">Welcome to <strong>Microsoft Word 365</strong> running natively inside your desktop environment. You can edit this document, format text, and click <em>Save to Documents</em> to store it directly inside your File Explorer!</p> <ul class="list-disc pl-5 space-y-1"> <li>100% Pixel-Perfect Mica & Acrylic glass design.</li> <li>Full Office Suite (Word, Excel, PowerPoint, Outlook).</li> <li>Playable Windows 7 Classic Games (Minesweeper & Purble Place).</li> </ul> </div> </div> </div> <!-- 2. EXCEL VIEW --> <div id="office-view-excel" class="hidden window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 flex flex-col overflow-hidden"> <div class="px-4 py-2 bg-emerald-50/70 border-b border-emerald-100 flex items-center justify-between gap-3 text-xs"> <div class="flex items-center gap-2 flex-1"> <span id="excelActiveCellLabel" class="font-bold bg-white border border-slate-200 px-2.5 py-1 rounded text-emerald-700">A1</span> <span class="font-bold text-slate-400 italic">fx</span> <input id="excelFormulaBar" type="text" placeholder="Enter value or formula like =SUM(B2:B4) or =150*12" onkeydown="if(event.key==='Enter') applyFormulaBar()" class="flex-1 bg-white border border-slate-200 rounded px-3 py-1 outline-none text-slate-700" /> </div> <div class="flex items-center gap-2"> <button onclick="calculateExcelSum()" class="bg-emerald-600 hover:bg-emerald-700 text-white px-3 py-1 rounded-lg text-[11px] font-semibold">∑ AutoSum</button> </div> </div> <div class="flex-1 overflow-auto p-2"> <table class="w-full border-collapse text-xs text-slate-700 select-text" id="excelTable"> <!-- Populated by JS --> </table> </div> </div> <!-- 3. POWERPOINT VIEW --> <div id="office-view-ppt" class="hidden window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 flex flex-col overflow-hidden"> <div class="px-4 py-2 bg-orange-50/70 border-b border-orange-100 flex items-center justify-between text-xs"> <div class="flex items-center gap-2"> <button onclick="addPptSlide()" class="bg-orange-600 hover:bg-orange-700 text-white px-3 py-1 rounded-lg font-semibold">+ New Slide</button> <button onclick="cyclePptTheme()" class="bg-white border border-slate-200 hover:bg-slate-50 px-3 py-1 rounded-lg font-medium">🎨 Change Slide Theme</button> </div> <button onclick="startPptSlideshow()" class="bg-slate-800 hover:bg-slate-900 text-white px-3.5 py-1 rounded-lg font-semibold">▶ Present Fullscreen</button> </div> <div class="flex-1 flex overflow-hidden"> <div id="pptThumbnails" class="w-40 bg-slate-50 border-r border-slate-200 p-3 space-y-2.5 overflow-y-auto"> <!-- Slide thumbs --> </div> <div class="flex-1 bg-slate-100 p-6 flex items-center justify-center"> <div id="pptCanvas" class="w-full h-full max-w-[600px] max-h-[340px] rounded-2xl shadow-xl p-10 flex flex-col justify-center bg-gradient-to-br from-blue-600 to-indigo-800 text-white"> <h2 id="pptTitleEdit" contenteditable="true" oninput="saveCurrentSlideEdit()" class="text-3xl font-extrabold outline-none mb-3">Next-Gen Windows Experience</h2> <p id="pptSubEdit" contenteditable="true" oninput="saveCurrentSlideEdit()" class="text-sm opacity-90 outline-none">Click to edit slide text directly. Designed for Abdi's Surface Pro X.</p> </div> </div> </div> </div> <!-- 4. OUTLOOK VIEW --> <div id="office-view-outlook" class="hidden window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 flex overflow-hidden"> <div class="w-60 border-r border-slate-100 p-3 flex flex-col gap-2"> <button onclick="composeOutlookMail()" class="w-full bg-sky-600 hover:bg-sky-700 text-white py-2 rounded-xl text-xs font-semibold shadow-xs">✉ New Mail</button> <div id="outlookMailList" class="flex-1 overflow-y-auto space-y-1.5 mt-1"> <!-- Populated by JS --> </div> </div> <div id="outlookReader" class="flex-1 p-5 overflow-y-auto"> <!-- Active email reader --> </div> </div> </div> </section> <!-- ======================================================= WINDOW 4: WINDOWS 7 GAMES HUB (MINESWEEPER & PURBLE PLACE!) ======================================================== --> <section id="win-games" onmousedown="focusWindow('games')" class="app-window hidden-win mica-window rounded-2xl w-[800px] h-[530px] top-[7%] left-[20%] flex flex-col overflow-hidden z-40 p-2.5"> <header onmousedown="startDrag(event, 'win-games')" class="h-10 flex items-center justify-between px-2 cursor-move"> <div class="flex items-center gap-3"> <span class="text-base">🎮</span> <span class="text-xs font-bold text-slate-800 text-dark-adapt">Windows 7 Games Explorer</span> <div class="flex items-center gap-1 ml-3" onmousedown="event.stopPropagation()"> <button id="gbtn-mine" onclick="switchGame('minesweeper')" class="px-3 py-1 rounded-lg bg-blue-600 text-white text-[11px] font-semibold transition">💣 Minesweeper</button> <button id="gbtn-purble" onclick="switchGame('purble')" class="px-3 py-1 rounded-lg bg-white/70 text-slate-700 text-[11px] font-semibold hover:bg-white transition">🎂 Purble Place (Comfy Cakes)</button> <button id="gbtn-pairs" onclick="switchGame('pairs')" class="px-3 py-1 rounded-lg bg-white/70 text-slate-700 text-[11px] font-semibold hover:bg-white transition">🍀 Purble Pairs</button> </div> </div> <div class="flex items-center gap-1" onmousedown="event.stopPropagation()"> <button onclick="minimizeWindow('games')" class="w-7 h-7 rounded-lg hover:bg-white/50 text-xs">—</button> <button onclick="closeWindow('games')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </div> </header> <div class="window-inner-content flex-1 bg-white/95 rounded-xl border border-white/80 p-5 overflow-y-auto flex flex-col items-center justify-center"> <!-- GAME 1: WINDOWS 7 MINESWEEPER --> <div id="game-view-minesweeper" class="flex flex-col items-center gap-3"> <div class="flex items-center justify-between w-full max-w-[340px] bg-gradient-to-r from-sky-700 to-blue-800 text-white px-4 py-2 rounded-xl shadow"> <div class="flex items-center gap-1.5 font-mono text-sm font-bold"><span>💣</span><span id="mineCountDisplay">10</span></div> <button onclick="initMinesweeper()" id="mineFaceBtn" class="text-xl hover:scale-110 transition">😊</button> <button id="mineFlagModeBtn" onclick="toggleMineFlagMode()" class="px-2.5 py-0.5 rounded bg-white/20 text-[11px] font-semibold">🚩 Flag: OFF</button> </div> <div id="minesweeperGrid" class="grid grid-cols-9 gap-1 p-3 bg-sky-100 rounded-2xl border-2 border-sky-300 shadow-inner"> <!-- 9x9 cells --> </div> <p class="text-[11px] text-slate-500">Left-click to reveal • Right-click (or toggle Flag button) to place a flag 🚩</p> </div> <!-- GAME 2: WINDOWS 7 PURBLE PLACE - COMFY CAKES --> <div id="game-view-purble" class="hidden w-full h-full flex flex-col justify-between items-center py-1"> <div class="w-full flex items-center justify-between bg-pink-50 border border-pink-200 rounded-xl px-4 py-2.5"> <div class="flex items-center gap-3"> <span class="text-2xl">🎂</span> <div> <h4 class="text-xs font-bold text-pink-900">Purble Place — Comfy Cakes Bakery</h4> <p class="text-[10.5px] text-pink-700">Match the Target Order on the left by applying the right Pan, Batter, Frosting, and Topping!</p> </div> </div> <div class="bg-white px-3 py-1 rounded-lg border border-pink-200 text-xs font-bold text-pink-700"> Score: <span id="purbleScore">0</span> </div> </div> <!-- Bakery Conveyor & Target Comparison --> <div class="grid grid-cols-2 gap-8 my-2 w-full max-w-[560px]"> <!-- Target Cake Order --> <div class="bg-amber-50/80 border-2 border-amber-200 rounded-2xl p-4 flex flex-col items-center justify-center"> <span class="text-[10px] font-bold uppercase tracking-wider text-amber-700 mb-2">📋 Customer Order</span> <div id="purbleTargetCake" class="w-32 h-28 flex flex-col items-center justify-end relative"></div> <div id="purbleTargetDesc" class="text-[10px] font-semibold text-slate-600 mt-2 text-center"></div> </div> <!-- Player Cake On Conveyor --> <div class="bg-sky-50/80 border-2 border-sky-200 rounded-2xl p-4 flex flex-col items-center justify-center"> <span class="text-[10px] font-bold uppercase tracking-wider text-sky-700 mb-2">⚙️ Your Conveyor Cake</span> <div id="purblePlayerCake" class="w-32 h-28 flex flex-col items-center justify-end relative"></div> <button onclick="servePurbleCake()" class="mt-2 bg-emerald-600 hover:bg-emerald-700 text-white text-[11px] font-bold px-4 py-1 rounded-full shadow transition">✅ Serve Cake!</button> </div> </div> <!-- Bakery Controls --> <div class="grid grid-cols-4 gap-3 w-full max-w-[660px] text-[11px]"> <div class="bg-slate-50 p-2.5 rounded-xl border border-slate-200 text-center space-y-1.5"> <div class="font-bold text-slate-700">1. Shape</div> <div class="flex justify-center gap-1.5"> <button onclick="setCakePart('shape','round')" class="px-2 py-1 bg-white border rounded hover:bg-blue-50">⭕ Round</button> <button onclick="setCakePart('shape','square')" class="px-2 py-1 bg-white border rounded hover:bg-blue-50">⬜ Square</button> </div> </div> <div class="bg-slate-50 p-2.5 rounded-xl border border-slate-200 text-center space-y-1.5"> <div class="font-bold text-slate-700">2. Batter Flavor</div> <div class="flex justify-center gap-1"> <button onclick="setCakePart('batter','#fde047')" class="w-6 h-6 rounded-full bg-yellow-300 border border-slate-300" title="Vanilla"></button> <button onclick="setCakePart('batter','#f472b6')" class="w-6 h-6 rounded-full bg-pink-400 border border-slate-300" title="Strawberry"></button> <button onclick="setCakePart('batter','#78350f')" class="w-6 h-6 rounded-full bg-amber-900 border border-slate-300" title="Chocolate"></button> </div> </div> <div class="bg-slate-50 p-2.5 rounded-xl border border-slate-200 text-center space-y-1.5"> <div class="font-bold text-slate-700">3. Frosting</div> <div class="flex justify-center gap-1"> <button onclick="setCakePart('frosting','#ffffff')" class="w-6 h-6 rounded-full bg-white border border-slate-300" title="White Cream"></button> <button onclick="setCakePart('frosting','#fb7185')" class="w-6 h-6 rounded-full bg-rose-400 border border-slate-300" title="Berry Pink"></button> <button onclick="setCakePart('frosting','#38bdf8')" class="w-6 h-6 rounded-full bg-sky-400 border border-slate-300" title="Blueberry"></button> </div> </div> <div class="bg-slate-50 p-2.5 rounded-xl border border-slate-200 text-center space-y-1.5"> <div class="font-bold text-slate-700">4. Topping</div> <div class="flex justify-center gap-1.5"> <button onclick="setCakePart('topping','🍒')" class="px-2 py-0.5 bg-white border rounded text-sm">🍒</button> <button onclick="setCakePart('topping','🍓')" class="px-2 py-0.5 bg-white border rounded text-sm">🍓</button> <button onclick="setCakePart('topping','🕯️')" class="px-2 py-0.5 bg-white border rounded text-sm">🕯️</button> </div> </div> </div> </div> <!-- GAME 3: PURBLE PAIRS MEMORY --> <div id="game-view-pairs" class="hidden flex flex-col items-center gap-3"> <div class="flex items-center justify-between w-72 bg-emerald-700 text-white px-4 py-2 rounded-xl text-xs font-bold"> <span>🍀 Purble Pairs</span> <button onclick="initPurblePairs()" class="bg-white/20 px-2.5 py-0.5 rounded hover:bg-white/30">Restart</button> </div> <div id="pairsGrid" class="grid grid-cols-4 gap-2.5 p-3 bg-emerald-50 rounded-2xl border border-emerald-200"></div> </div> </div> </section> <!-- ======================================================= WINDOW 5: PAINT STUDIO (SAVES DIRECTLY TO GALLERY!) ======================================================== --> <section id="win-paint" onmousedown="focusWindow('paint')" class="app-window hidden-win mica-window rounded-2xl w-[700px] h-[480px] top-[9%] left-[22%] flex flex-col overflow-hidden z-30 p-2.5"> <header onmousedown="startDrag(event, 'win-paint')" class="h-9 flex items-center justify-between px-2 cursor-move"> <div class="flex items-center gap-2 text-xs font-bold text-slate-800 text-dark-adapt"><span>🎨</span><span>Paint Studio</span></div> <button onclick="closeWindow('paint')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </header> <div class="window-inner-content flex-1 bg-white rounded-xl flex flex-col overflow-hidden"> <div class="px-3 py-2 bg-slate-50 border-b flex items-center justify-between text-xs"> <div class="flex items-center gap-2"> <input type="color" id="paintColor" value="#0067c0" class="w-7 h-7 rounded cursor-pointer border-0" /> <input type="range" id="paintSize" min="2" max="24" value="5" class="w-24" /> <button onclick="clearPaintCanvas()" class="px-2.5 py-1 bg-slate-200 rounded-lg hover:bg-slate-300 font-medium">Clear</button> </div> <button onclick="savePaintToGallery()" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-lg font-semibold">🖼️ Save to Sample Photos</button> </div> <canvas id="paintCanvas" width="675" height="380" class="flex-1 bg-white cursor-crosshair"></canvas> </div> </section> <!-- ======================================================= WINDOW 6: CALCULATOR, COPILOT AI, TERMINAL, STORE, EDGE, MEDIA ======================================================== --> <!-- Calculator --> <section id="win-calc" onmousedown="focusWindow('calc')" class="app-window hidden-win mica-window rounded-2xl w-[280px] h-[390px] top-[14%] left-[38%] flex flex-col overflow-hidden z-30 p-2.5"> <header onmousedown="startDrag(event, 'win-calc')" class="h-8 flex items-center justify-between px-2 cursor-move"> <span class="text-xs font-bold text-slate-800 text-dark-adapt">🧮 Calculator</span> <button onclick="closeWindow('calc')" class="w-6 h-6 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </header> <div class="flex-1 flex flex-col justify-between p-1"> <div id="calcScreen" class="bg-white/80 rounded-xl p-3 text-right text-2xl font-bold text-slate-800 overflow-x-auto">0</div> <div class="grid grid-cols-4 gap-1.5 mt-2 text-xs font-semibold"> <button onclick="calcInput('C')" class="h-11 rounded-lg bg-rose-100 text-rose-700 hover:bg-rose-200">C</button> <button onclick="calcInput('(')" class="h-11 rounded-lg bg-white/80 hover:bg-white">(</button> <button onclick="calcInput(')')" class="h-11 rounded-lg bg-white/80 hover:bg-white">)</button> <button onclick="calcInput('/')" class="h-11 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100">÷</button> <button onclick="calcInput('7')" class="h-11 rounded-lg bg-white hover:bg-slate-50">7</button> <button onclick="calcInput('8')" class="h-11 rounded-lg bg-white hover:bg-slate-50">8</button> <button onclick="calcInput('9')" class="h-11 rounded-lg bg-white hover:bg-slate-50">9</button> <button onclick="calcInput('*')" class="h-11 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100">×</button> <button onclick="calcInput('4')" class="h-11 rounded-lg bg-white hover:bg-slate-50">4</button> <button onclick="calcInput('5')" class="h-11 rounded-lg bg-white hover:bg-slate-50">5</button> <button onclick="calcInput('6')" class="h-11 rounded-lg bg-white hover:bg-slate-50">6</button> <button onclick="calcInput('-')" class="h-11 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100">−</button> <button onclick="calcInput('1')" class="h-11 rounded-lg bg-white hover:bg-slate-50">1</button> <button onclick="calcInput('2')" class="h-11 rounded-lg bg-white hover:bg-slate-50">2</button> <button onclick="calcInput('3')" class="h-11 rounded-lg bg-white hover:bg-slate-50">3</button> <button onclick="calcInput('+')" class="h-11 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100">+</button> <button onclick="calcInput('0')" class="col-span-2 h-11 rounded-lg bg-white hover:bg-slate-50">0</button> <button onclick="calcInput('.')" class="h-11 rounded-lg bg-white hover:bg-slate-50">.</button> <button onclick="calcInput('=')" class="h-11 rounded-lg bg-blue-600 text-white hover:bg-blue-700">=</button> </div> </div> </section> <!-- Copilot AI Assistant --> <section id="win-copilot" onmousedown="focusWindow('copilot')" class="app-window hidden-win mica-window rounded-2xl w-[380px] h-[490px] top-[9%] right-[4%] flex flex-col overflow-hidden z-40 p-2.5"> <header onmousedown="startDrag(event, 'win-copilot')" class="h-9 flex items-center justify-between px-2 cursor-move"> <div class="flex items-center gap-2 text-xs font-bold text-slate-800 text-dark-adapt"><span>🌀</span><span>Windows Copilot AI</span></div> <button onclick="closeWindow('copilot')" class="w-6 h-6 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </header> <div class="window-inner-content flex-1 bg-white/95 rounded-xl p-3 flex flex-col justify-between overflow-hidden"> <div id="copilotChat" class="flex-1 overflow-y-auto space-y-2.5 pr-1 text-xs"> <div class="bg-blue-50 text-slate-800 p-3 rounded-xl"> 👋 Hi <strong>Abdi</strong>! I'm Windows Copilot. Try clicking a command below or ask me to open any app, switch dark mode, or launch Windows 7 games! </div> <div class="flex flex-wrap gap-1.5"> <button onclick="runCopilotPrompt('Open Excel 365')" class="text-[10px] bg-slate-100 hover:bg-blue-100 px-2.5 py-1 rounded-full">📗 Open Excel 365</button> <button onclick="runCopilotPrompt('Play Purble Place')" class="text-[10px] bg-slate-100 hover:bg-blue-100 px-2.5 py-1 rounded-full">🎂 Play Purble Place</button> <button onclick="runCopilotPrompt('Toggle Dark Mode')" class="text-[10px] bg-slate-100 hover:bg-blue-100 px-2.5 py-1 rounded-full">🌙 Toggle Dark Mode</button> </div> </div> <div class="flex items-center gap-1.5 pt-2 border-t"> <input id="copilotInput" type="text" placeholder="Ask Copilot anything..." onkeydown="if(event.key==='Enter') sendCopilotMsg()" class="flex-1 bg-slate-100 rounded-full px-3 py-1.5 text-xs outline-none text-slate-800" /> <button onclick="sendCopilotMsg()" class="bg-blue-600 text-white w-7 h-7 rounded-full flex items-center justify-center text-xs">↑</button> </div> </div> </section> <!-- Windows Terminal --> <section id="win-terminal" onmousedown="focusWindow('terminal')" class="app-window hidden-win rounded-2xl w-[600px] h-[370px] top-[15%] left-[25%] flex flex-col overflow-hidden z-30 bg-slate-950/90 backdrop-blur-xl border border-slate-700 text-slate-100 shadow-2xl"> <header onmousedown="startDrag(event, 'win-terminal')" class="h-9 bg-slate-900 flex items-center justify-between px-3 cursor-move text-xs"> <span>⚡ Windows PowerShell — Abdi@SurfaceProX</span> <button onclick="closeWindow('terminal')" class="w-6 h-6 rounded hover:bg-rose-600 text-xs">✕</button> </header> <div id="terminalOutput" class="flex-1 p-3 font-mono text-xs overflow-y-auto space-y-1 text-emerald-400"> <div>Windows PowerShell Concept OS [Version 12.0.26100]</div> <div class="text-slate-400">Type "help", "apps", "games", "matrix", or "clear".</div> </div> <div class="px-3 pb-3 flex items-center gap-2 font-mono text-xs"> <span class="text-sky-400">PS C:\Users\Abdi&gt;</span> <input id="terminalInput" type="text" onkeydown="if(event.key==='Enter') execTerminal(this)" class="flex-1 bg-transparent outline-none text-white" /> </div> </section> <!-- Microsoft Edge Browser --> <section id="win-edge" onmousedown="focusWindow('edge')" class="app-window hidden-win mica-window rounded-2xl w-[820px] h-[510px] top-[8%] left-[19%] flex flex-col overflow-hidden z-20"> <header onmousedown="startDrag(event, 'win-edge')" class="h-10 flex items-center justify-between px-3 cursor-move"> <div class="flex items-center gap-2"> <span class="text-sm">🌐</span> <div class="bg-white/85 px-3 py-1 rounded-lg text-[11px] font-medium text-slate-800 shadow-2xs flex items-center gap-4"> <span>Microsoft Edge — Web</span><span class="text-slate-400 text-[10px]">✕</span> </div> </div> <div class="flex items-center gap-1" onmousedown="event.stopPropagation()"> <button onclick="minimizeWindow('edge')" class="w-7 h-7 rounded-lg hover:bg-white/50 text-xs">—</button> <button onclick="maximizeWindow('edge')" class="w-7 h-7 rounded-lg hover:bg-white/50 text-[10px]">▢</button> <button onclick="closeWindow('edge')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </div> </header> <div class="px-3 pb-2 flex items-center gap-2"> <input id="edgeUrlInput" type="text" value="https://en.wikipedia.org/wiki/Windows_11" onkeydown="if(event.key==='Enter') document.getElementById('edgeFrame').src=this.value" class="flex-1 bg-white/90 rounded-full px-4 py-1.5 text-xs outline-none border border-white text-slate-700" /> <button onclick="document.getElementById('edgeFrame').src=document.getElementById('edgeUrlInput').value" class="bg-blue-600 text-white text-xs px-3.5 py-1.5 rounded-full font-medium">Go</button> </div> <iframe id="edgeFrame" src="https://en.wikipedia.org/wiki/Windows_11" class="flex-1 w-full bg-white rounded-b-xl border-0"></iframe> </section> <!-- Microsoft Store --> <section id="win-store" onmousedown="focusWindow('store')" class="app-window hidden-win mica-window rounded-2xl w-[760px] h-[480px] top-[10%] left-[21%] flex flex-col overflow-hidden z-20 p-2.5"> <header onmousedown="startDrag(event, 'win-store')" class="h-9 flex items-center justify-between px-2 cursor-move"> <div class="flex items-center gap-2 text-xs font-semibold text-slate-800 text-dark-adapt"><span>🛍️</span><span>Microsoft Store</span></div> <button onclick="closeWindow('store')" class="w-7 h-7 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </header> <div class="window-inner-content flex-1 bg-white/95 rounded-xl p-5 overflow-y-auto space-y-4"> <div class="rounded-xl p-6 text-white bg-gradient-to-r from-blue-600 to-indigo-600 flex justify-between items-center shadow"> <div> <span class="text-[10px] uppercase tracking-wider bg-white/20 px-2 py-0.5 rounded-full">Featured Bundle</span> <h2 class="text-xl font-bold mt-1">Office 365 + Windows 7 Games Pack</h2> <p class="text-xs opacity-90 mt-1">Word, Excel, PowerPoint, Minesweeper & Purble Place ready to use.</p> </div> <button onclick="openWindow('games')" class="bg-white text-blue-600 font-semibold text-xs px-4 py-2 rounded-lg shadow">Play Now</button> </div> <h3 class="text-xs font-bold text-slate-700">Available Apps</h3> <div class="grid grid-cols-3 gap-3"> <div class="card-surface p-3 rounded-xl border border-slate-100 flex items-center justify-between"> <div class="flex items-center gap-2.5"><span class="text-2xl">🎨</span><div><div class="text-xs font-bold">Paint Studio</div><div class="text-[10px] text-slate-400">Creativity</div></div></div> <button onclick="openWindow('paint')" class="text-[10px] bg-blue-50 text-blue-600 px-2.5 py-1 rounded-md font-semibold">Open</button> </div> <div class="card-surface p-3 rounded-xl border border-slate-100 flex items-center justify-between"> <div class="flex items-center gap-2.5"><span class="text-2xl">🧮</span><div><div class="text-xs font-bold">Calculator</div><div class="text-[10px] text-slate-400">Tools</div></div></div> <button onclick="openWindow('calc')" class="text-[10px] bg-blue-50 text-blue-600 px-2.5 py-1 rounded-md font-semibold">Open</button> </div> <div class="card-surface p-3 rounded-xl border border-slate-100 flex items-center justify-between"> <div class="flex items-center gap-2.5"><span class="text-2xl">⚡</span><div><div class="text-xs font-bold">PowerShell</div><div class="text-[10px] text-slate-400">Developer</div></div></div> <button onclick="openWindow('terminal')" class="text-[10px] bg-blue-50 text-blue-600 px-2.5 py-1 rounded-md font-semibold">Open</button> </div> </div> </div> </section> <!-- Media Player (with Real Web Audio Synth Music!) --> <section id="win-mediaplayer" onmousedown="focusWindow('mediaplayer')" class="app-window hidden-win mica-window rounded-2xl w-[460px] h-[330px] top-[16%] left-[31%] flex flex-col overflow-hidden z-20 p-2.5"> <header onmousedown="startDrag(event, 'win-mediaplayer')" class="h-8 flex items-center justify-between px-2 cursor-move"> <span class="text-xs font-semibold text-slate-800 text-dark-adapt">🎵 Windows Media Player</span> <button onclick="closeWindow('mediaplayer')" class="w-6 h-6 rounded-lg hover:bg-rose-500 hover:text-white text-xs">✕</button> </header> <div class="window-inner-content flex-1 bg-white/95 rounded-xl p-5 flex flex-col items-center justify-center text-center gap-3"> <div id="mediaDisc" class="w-20 h-20 rounded-full bg-gradient-to-tr from-blue-600 to-sky-400 flex items-center justify-center text-white text-3xl shadow-lg">💿</div> <div> <h4 id="mediaTrackTitle" class="text-sm font-bold text-slate-800">Fluent Horizon (Ambient Synth)</h4> <p class="text-[11px] text-slate-500">Abdi Soundscape • Web Audio Synthesizer</p> </div> <div class="flex items-center gap-4 mt-1"> <button onclick="switchMediaTrack(-1)" class="text-slate-600 hover:text-blue-600 text-base">⏮</button> <button id="mediaPlayBtn" onclick="toggleMediaSynth()" class="w-10 h-10 rounded-full bg-blue-600 text-white flex items-center justify-center shadow hover:bg-blue-700">▶</button> <button onclick="switchMediaTrack(1)" class="text-slate-600 hover:text-blue-600 text-base">⏭</button> </div> </div> </section> <!-- ======================================================= 3. START MENU POPUP (IMAGE 2 PIXEL-PERFECT) ======================================================== --> <div id="startMenu" onclick="event.stopPropagation()" class="hidden fixed bottom-[58px] left-1/2 -translate-x-1/2 w-[392px] h-[475px] mica-panel rounded-2xl p-6 flex flex-col justify-between z-[900] transition-all duration-200"> <div> <!-- Greeting Header --> <div class="flex items-center justify-center gap-2.5 mb-5"> <div class="w-6 h-6 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-500 text-white flex items-center justify-center text-xs font-bold shadow-xs">⚡</div> <span class="text-xs font-medium text-slate-700 text-dark-adapt">Good Afternoon, <strong class="font-bold text-slate-900 text-dark-adapt">Abdi</strong></span> </div> <!-- Pinned Header (Click to switch between Pinned Grid and All Apps List!) --> <div class="flex items-center justify-between mb-3 px-1"> <button onclick="toggleAllAppsDrawer()" class="flex items-center gap-1.5 text-[11px] font-bold text-slate-800 text-dark-adapt hover:text-blue-600 transition"> <span id="startSectionLabel">Pinned</span> <span class="text-slate-400 font-normal">›</span> </button> <button onclick="toggleAllAppsDrawer()" id="allAppsBtn" class="text-[10px] text-blue-600 font-semibold hover:underline">All apps ›</button> </div> <!-- 5x2 Grid of Pinned Apps matching Image 2 --> <div id="startPinnedGrid" class="grid grid-cols-5 gap-y-4 gap-x-2 text-center"> <!-- Files --> <button onclick="openWindow('files'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-8 h-7 rounded-md bg-gradient-to-b from-amber-300 to-amber-500 flex items-end p-1 shadow-xs"> <div class="w-3 h-2 bg-sky-500 rounded-2xs"></div> </div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Files</span> </button> <!-- Edge --> <button onclick="openWindow('edge'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-full bg-gradient-to-tr from-blue-600 via-sky-400 to-emerald-400 flex items-center justify-center text-white font-bold text-xs shadow-xs">e</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Edge</span> </button> <!-- Outlook --> <button onclick="openWindow('office'); switchOfficeApp('outlook'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-md bg-gradient-to-b from-sky-400 to-blue-700 flex items-center justify-center text-white font-bold text-xs shadow-xs">✉</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Outlook</span> </button> <!-- Pictures --> <button onclick="openWindow('files'); navigateFiles('gallery'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-md bg-gradient-to-b from-sky-400 to-blue-600 flex items-center justify-center text-white text-xs shadow-xs">🏔️</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Pictures</span> </button> <!-- Skype --> <button onclick="openWindow('copilot'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-full bg-sky-500 flex items-center justify-center text-white font-bold text-xs shadow-xs">S</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Skype</span> </button> <!-- Copilot --> <button onclick="openWindow('copilot'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-lg bg-gradient-to-tr from-blue-500 via-purple-500 to-amber-400 flex items-center justify-center text-white text-xs font-bold shadow-xs">🌀</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Copilot</span> </button> <!-- Media Player --> <button onclick="openWindow('mediaplayer'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-full bg-slate-800 flex items-center justify-center text-orange-400 text-xs shadow-xs">▶</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Media Player</span> </button> <!-- Others (Opens Windows 7 Games Hub!) --> <button onclick="openWindow('games'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition" title="Windows 7 Games & Utilities"> <div class="w-7 h-7 rounded-md bg-white/85 border border-slate-200 grid grid-cols-2 gap-0.5 p-1 shadow-2xs"> <span class="bg-blue-500 rounded-2xs"></span><span class="bg-rose-500 rounded-2xs"></span> <span class="bg-amber-400 rounded-2xs"></span><span class="bg-emerald-500 rounded-2xs"></span> </div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Others</span> </button> <!-- Store (Highlighted white box like Image 2) --> <button onclick="openWindow('store'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl bg-white/90 shadow-sm transition"> <div class="w-7 h-7 rounded-md bg-gradient-to-b from-blue-500 to-blue-700 flex items-center justify-center text-white text-xs shadow-xs">🛍️</div> <span class="text-[10px] font-semibold text-slate-900">Store</span> </button> <!-- Ms 365 (Opens Full Office Suite!) --> <button onclick="openWindow('office'); toggleStartMenu(false);" class="flex flex-col items-center gap-1.5 p-2 rounded-xl hover:bg-white/75 transition"> <div class="w-7 h-7 rounded-md bg-gradient-to-tr from-rose-500 via-purple-500 to-sky-500 flex items-center justify-center text-white text-[9px] font-bold shadow-xs">365</div> <span class="text-[10px] font-medium text-slate-700 text-dark-adapt">Ms 365</span> </button> </div> <!-- Hidden All Apps Drawer (Office Apps, Win7 Games, Paint, Calc, Terminal) --> <div id="startAllAppsList" class="hidden max-h-[250px] overflow-y-auto space-y-1 pr-1 text-xs"> <button onclick="openWindow('office'); switchOfficeApp('word'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-blue-700 text-white font-bold flex items-center justify-center">W</span><span>Microsoft Word 365</span></button> <button onclick="openWindow('office'); switchOfficeApp('excel'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-emerald-600 text-white font-bold flex items-center justify-center">X</span><span>Microsoft Excel 365</span></button> <button onclick="openWindow('office'); switchOfficeApp('ppt'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-orange-600 text-white font-bold flex items-center justify-center">P</span><span>Microsoft PowerPoint 365</span></button> <button onclick="openWindow('games'); switchGame('minesweeper'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-sky-600 text-white flex items-center justify-center">💣</span><span>Minesweeper (Windows 7)</span></button> <button onclick="openWindow('games'); switchGame('purble'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-pink-500 text-white flex items-center justify-center">🎂</span><span>Purble Place (Windows 7)</span></button> <button onclick="openWindow('paint'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-amber-500 text-white flex items-center justify-center">🎨</span><span>Paint Studio</span></button> <button onclick="openWindow('calc'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-slate-700 text-white flex items-center justify-center">🧮</span><span>Calculator</span></button> <button onclick="openWindow('terminal'); toggleStartMenu(false);" class="w-full flex items-center gap-3 p-2 rounded-xl hover:bg-white/70"><span class="w-6 h-6 rounded bg-black text-white flex items-center justify-center">⚡</span><span>Windows PowerShell</span></button> </div> <!-- Recent Section --> <div id="startRecentSection" class="mt-6"> <div class="flex items-center gap-1.5 text-[11px] font-bold text-slate-800 text-dark-adapt mb-2.5 px-1"> <span>Recent</span> <span class="text-slate-400 font-normal">›</span> </div> <div onclick="openWindow('settings'); toggleStartMenu(false); showToast('Welcome to Windows 12 Concept Tour!');" class="flex items-center gap-3 p-2 rounded-xl hover:bg-white/65 cursor-pointer transition"> <div class="w-7 h-7 rounded-full bg-sky-500 text-white flex items-center justify-center text-xs font-bold shadow-xs">⊞</div> <div> <div class="text-[11px] font-semibold text-slate-800 text-dark-adapt">Get Started</div> <div class="text-[9.5px] text-slate-500">Welcome to Windows</div> </div> </div> </div> </div> <!-- Bottom Search Pill --> <div class="w-full bg-white/90 border border-white rounded-full px-4 py-2 flex items-center justify-between shadow-sm"> <svg class="w-3.5 h-3.5 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg> <input id="startSearchInput" oninput="searchStartApps(this.value)" type="text" placeholder="Type here to search" class="bg-transparent outline-none text-[11px] text-center w-full text-slate-700 placeholder-slate-500 font-medium" /> <span class="w-3.5"></span> </div> </div> <!-- ======================================================= 4. QUICK SETTINGS POPUP (IMAGE 5 PIXEL-PERFECT) ======================================================== --> <div id="quickSettings" onclick="event.stopPropagation()" class="hidden fixed bottom-[58px] right-3 w-[322px] mica-panel rounded-2xl p-4 flex flex-col gap-3 z-[900]"> <div class="text-[11px] font-bold text-slate-800 text-dark-adapt px-1">Quick settings</div> <!-- 3x2 Toggles Card --> <div class="card-surface bg-white/78 rounded-xl p-3 grid grid-cols-3 gap-2.5 border border-white/85"> <!-- Wi-Fi --> <div class="flex flex-col items-center gap-1"> <button onclick="toggleQuickBtn(this, 'Connected to iPhone 120 Pro Hotspot')" class="w-full h-9 rounded-lg bg-blue-600 text-white flex items-center justify-between px-2.5 text-xs shadow-xs transition"> <span>🛜</span><span class="text-[10px] opacity-80">›</span> </button> <span class="text-[9px] font-medium text-slate-700 text-dark-adapt">iPhone 120 Pro</span> </div> <!-- Bluetooth --> <div class="flex flex-col items-center gap-1"> <button onclick="toggleQuickBtn(this, 'Bluetooth toggled')" class="w-full h-9 rounded-lg bg-white text-slate-800 flex items-center justify-center text-xs shadow-2xs border border-slate-100 transition"> <span>ᛒ</span> </button> <span class="text-[9px] font-medium text-slate-700 text-dark-adapt">Bluetooth</span> </div> <!-- Airplane Mode --> <div class="flex flex-col items-center gap-1"> <button onclick="toggleQuickBtn(this, 'Airplane Mode toggled')" class="w-full h-9 rounded-lg bg-white text-slate-800 flex items-center justify-center text-xs shadow-2xs border border-slate-100 transition"> <span>✈️</span> </button> <span class="text-[9px] font-medium text-slate-700 text-dark-adapt">Airplane Mode</span> </div> <!-- Do not disturb --> <div class="flex flex-col items-center gap-1"> <button onclick="toggleQuickBtn(this, 'Do Not Disturb toggled')" class="w-full h-9 rounded-lg bg-white text-slate-800 flex items-center justify-between px-2.5 text-xs shadow-2xs border border-slate-100 transition"> <span>🔕</span><span class="text-[10px] text-slate-400">›</span> </button> <span class="text-[9px] font-medium text-slate-700 text-dark-adapt">Do not disturb</span> </div> <!-- Dark Mode --> <div class="flex flex-col items-center gap-1"> <button id="qs-dark-btn" onclick="toggleDarkMode(this)" class="w-full h-9 rounded-lg bg-white text-slate-800 flex items-center justify-center text-xs shadow-2xs border border-slate-100 transition"> <span>🌙</span> </button> <span class="text-[9px] font-medium text-slate-700 text-dark-adapt">Dark Mode</span> </div> <!-- Accessibility --> <div class="flex flex-col items-center gap-1"> <button onclick="toggleAccessibilityMode(this)" class="w-full h-9 rounded-lg bg-white text-slate-800 flex items-center justify-center text-xs shadow-2xs border border-slate-100 transition"> <span>♿</span> </button> <span class="text-[9px] font-medium text-slate-700 text-dark-adapt">Accessibility</span> </div> </div> <!-- Sliders Card --> <div class="card-surface bg-white/78 rounded-xl p-3.5 space-y-3.5 border border-white/85"> <div class="flex items-center gap-3"> <span class="text-xs text-slate-700 text-dark-adapt">🔊</span> <input type="range" min="0" max="100" value="40" oninput="setSystemVolume(this.value)" class="flex-1" /> <span class="text-[10px] text-slate-400">›</span> </div> <div class="flex items-center gap-3"> <span class="text-xs text-slate-700 text-dark-adapt">☀️</span> <input type="range" min="25" max="100" value="88" oninput="changeBrightness(this.value)" class="flex-1" /> </div> </div> <!-- Bottom User & Power Row --> <div class="flex items-center justify-between px-1 pt-0.5 text-xs text-slate-700 text-dark-adapt"> <div onclick="openWindow('settings'); switchSettingsSection('account'); toggleQuickSettings(false);" class="flex items-center gap-2 cursor-pointer hover:opacity-80"> <div class="w-5 h-5 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-500 text-white flex items-center justify-center text-[10px] font-bold">⚡</div> <span class="text-[11px] font-semibold">Abdi</span> </div> <div class="flex items-center gap-3 text-slate-600 text-dark-adapt"> <button onclick="showToast('Quick settings layout unlocked for editing')" title="Edit quick settings" class="hover:text-blue-600">✎</button> <button onclick="openWindow('settings'); toggleQuickSettings(false);" title="Settings" class="hover:text-blue-600">⚙️</button> <button onclick="lockOS()" title="Lock Screen" class="hover:text-rose-600">⏻</button> </div> </div> </div> <!-- Photo Lightbox Modal --> <div id="photoModal" onclick="this.classList.add('hidden')" class="hidden fixed inset-0 bg-black/80 backdrop-blur-md z-[1500] flex flex-col items-center justify-center p-10 cursor-zoom-out"> <img id="photoModalImg" src="" class="max-h-[82vh] max-w-[85vw] rounded-2xl shadow-2xl border border-white/30" /> <span class="text-white/80 text-xs mt-3">Click anywhere to close preview</span> </div> <!-- Toast Notification --> <div id="osToast" class="fixed top-5 right-5 mica-panel px-4 py-2.5 rounded-xl shadow-xl text-xs font-semibold text-slate-800 text-dark-adapt z-[1800] hidden flex items-center gap-2"></div> </main> <!-- ========================================================= 5. BOTTOM FLOATING TASKBAR (IMAGES 2 - 6 PIXEL-PERFECT) ========================================================== --> <footer class="taskbar-glass fixed bottom-0 left-0 right-0 h-[48px] px-3 flex items-center justify-between z-[1000]"> <!-- Left Weather Pill --> <div onclick="lockOS()" title="View Weather & Lock Screen Widgets" class="flex items-center gap-2 px-2.5 py-1 rounded-full hover:bg-white/60 cursor-pointer transition text-[11px] font-medium text-slate-800 text-dark-adapt"> <div class="relative w-4 h-4 flex items-center justify-center"> <span class="w-3 h-3 rounded-full bg-amber-400 absolute"></span> <span class="w-3.5 h-2 bg-white rounded-full absolute bottom-0 right-0 shadow-2xs"></span> </div> <span class="font-semibold">18°</span> <span class="text-slate-600 text-dark-adapt">Tokyo</span> </div> <!-- Center Apps Dock Pill --> <div class="pill-glass px-2.5 py-1 rounded-full flex items-center gap-1.5"> <!-- Windows Start Button --> <button onclick="event.stopPropagation(); toggleStartMenu();" title="Start" class="w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <div class="grid grid-cols-2 gap-[1.5px] w-4 h-4"> <span class="bg-[#0078d4] rounded-[1px]"></span><span class="bg-[#0078d4] rounded-[1px]"></span> <span class="bg-[#0078d4] rounded-[1px]"></span><span class="bg-[#0078d4] rounded-[1px]"></span> </div> </button> <!-- Search Icon --> <button onclick="event.stopPropagation(); toggleStartMenu(true); document.getElementById('startSearchInput').focus();" title="Search" class="w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center text-slate-700 text-dark-adapt transition"> <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2.2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg> </button> <!-- Task View Icon --> <button onclick="triggerTaskViewArrange()" title="Task View — Tile Open Windows" class="w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <div class="w-4 h-4 relative"> <span class="w-3 h-3 border-2 border-slate-700 rounded-2xs absolute top-0 left-0 bg-white/60"></span> <span class="w-3 h-3 bg-slate-800 rounded-2xs absolute bottom-0 right-0"></span> </div> </button> <!-- Files Explorer Icon --> <button id="tb-files" onclick="toggleAppFromTaskbar('files')" title="Files" class="relative w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <div class="w-4 h-3.5 rounded-2xs bg-gradient-to-b from-amber-300 to-amber-500 flex items-end p-0.5 shadow-2xs"> <div class="w-2 h-1 bg-sky-600 rounded-2xs"></div> </div> <span id="ind-files" class="hidden absolute bottom-0.5 w-3 h-[2.5px] bg-blue-600 rounded-full"></span> </button> <!-- Edge Browser Icon --> <button id="tb-edge" onclick="toggleAppFromTaskbar('edge')" title="Microsoft Edge" class="relative w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <div class="w-4 h-4 rounded-full bg-gradient-to-tr from-blue-600 via-sky-400 to-emerald-400 flex items-center justify-center text-white font-bold text-[9px]">e</div> <span id="ind-edge" class="hidden absolute bottom-0.5 w-3 h-[2.5px] bg-blue-600 rounded-full"></span> </button> <!-- Store Icon --> <button id="tb-store" onclick="toggleAppFromTaskbar('store')" title="Microsoft Store" class="relative w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <div class="w-4 h-3.5 rounded-2xs bg-blue-600 flex items-center justify-center text-white text-[9px]">🛍</div> <span id="ind-store" class="hidden absolute bottom-0.5 w-3 h-[2.5px] bg-blue-600 rounded-full"></span> </button> <!-- Settings Icon --> <button id="tb-settings" onclick="toggleAppFromTaskbar('settings')" title="Settings" class="relative w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <span class="text-sm">⚙️</span> <span id="ind-settings" class="hidden absolute bottom-0.5 w-3 h-[2.5px] bg-blue-600 rounded-full"></span> </button> <!-- Office 365 Icon --> <button id="tb-office" onclick="toggleAppFromTaskbar('office')" title="Microsoft Office 365" class="relative w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <span class="w-4 h-4 rounded bg-gradient-to-tr from-rose-500 via-purple-600 to-sky-500 text-white text-[8px] font-bold flex items-center justify-center">365</span> <span id="ind-office" class="hidden absolute bottom-0.5 w-3 h-[2.5px] bg-blue-600 rounded-full"></span> </button> <!-- Windows 7 Games Icon --> <button id="tb-games" onclick="toggleAppFromTaskbar('games')" title="Windows 7 Games" class="relative w-8 h-8 rounded-lg hover:bg-white/80 flex items-center justify-center transition"> <span class="text-sm">🎮</span> <span id="ind-games" class="hidden absolute bottom-0.5 w-3 h-[2.5px] bg-blue-600 rounded-full"></span> </button> <!-- Plus Button (Quick App Launcher) --> <button onclick="event.stopPropagation(); toggleStartMenu(true); toggleAllAppsDrawer();" title="All Apps & Launcher" class="w-6 h-6 rounded-full bg-slate-100 hover:bg-white flex items-center justify-center text-slate-500 text-xs font-bold ml-0.5">+</button> </div> <!-- Right System Tray & Clock Pill --> <div onclick="event.stopPropagation(); toggleQuickSettings();" class="pill-glass px-3 py-1.5 rounded-full flex items-center gap-3 cursor-pointer hover:bg-white/90 transition text-[11px] font-medium text-slate-800 text-dark-adapt"> <div class="flex items-center gap-2 text-slate-700 text-dark-adapt"> <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0"/></svg> <svg class="w-3.5 h-3.5" fill="currentColor" viewBox="0 0 20 20"><path d="M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217z"/></svg> <div class="w-4 h-2.5 border border-slate-700 rounded-2xs p-[1px] flex items-center"> <div class="w-2.5 h-full bg-slate-800 rounded-[1px]"></div> </div> </div> <span id="taskbarClock" class="font-semibold">10:12</span> </div> </footer> <!-- ========================================================= JAVASCRIPT OS ENGINE (EVERY BUTTON & APP 100% FUNCTIONAL) ========================================================== --> <script> /* ----------------------------------------------------------- WEB AUDIO SYNTHESIZER (UI Sounds & Media Player Music) ------------------------------------------------------------ */ let audioCtx = null; let sysVolume = 0.4; function playTone(freq = 520, duration = 0.08, type = 'sine') { try { if (!audioCtx) audioCtx = new (window.AudioContext || window.webkitAudioContext)(); const osc = audioCtx.createOscillator(); const gain = audioCtx.createGain(); osc.type = type; osc.frequency.setValueAtTime(freq, audioCtx.currentTime); gain.gain.setValueAtTime(sysVolume * 0.15, audioCtx.currentTime); gain.gain.exponentialRampToValueAtTime(0.001, audioCtx.currentTime + duration); osc.connect(gain); gain.connect(audioCtx.destination); osc.start(); osc.stop(audioCtx.currentTime + duration); } catch (e) {} } function setSystemVolume(val) { sysVolume = val / 100; playTone(600, 0.05); } /* ----------------------------------------------------------- 1. LOCK SCREEN & POPUPS ------------------------------------------------------------ */ let topZ = 50; function unlockOS(targetAction) { playTone(440, 0.12); setTimeout(() => playTone(660, 0.18), 90); const lock = document.getElementById('lockScreen'); lock.style.transform = 'translateY(-100%)'; lock.style.opacity = '0'; setTimeout(() => { lock.classList.add('hidden'); if (targetAction === 'excel') { openWindow('office'); switchOfficeApp('excel'); } else if (targetAction === 'games') { openWindow('games'); } else if (targetAction === 'weather') { showToast('🌤️ Seoul, KR: 17° Mostly Cloudy • High 18° / Low 14°'); toggleStartMenu(true); } else { toggleStartMenu(true); } }, 450); } function lockOS() { closePopups(); playTone(340, 0.12); const lock = document.getElementById('lockScreen'); lock.classList.remove('hidden'); requestAnimationFrame(() => { lock.style.transform = 'translateY(0)'; lock.style.opacity = '1'; }); } function toggleStartMenu(force) { playTone(520, 0.05); const menu = document.getElementById('startMenu'); document.getElementById('quickSettings').classList.add('hidden'); hideContextMenu(); if (typeof force === 'boolean') menu.classList.toggle('hidden', !force); else menu.classList.toggle('hidden'); } function toggleQuickSettings(force) { playTone(560, 0.05); const qs = document.getElementById('quickSettings'); document.getElementById('startMenu').classList.add('hidden'); hideContextMenu(); if (typeof force === 'boolean') qs.classList.toggle('hidden', !force); else qs.classList.toggle('hidden'); } function closePopups() { document.getElementById('startMenu').classList.add('hidden'); document.getElementById('quickSettings').classList.add('hidden'); const nm = document.getElementById('filesNewMenu'); if (nm) nm.classList.add('hidden'); hideContextMenu(); } function handleDesktopRightClick(e) { e.preventDefault(); closePopups(); const cm = document.getElementById('contextMenu'); cm.style.left = Math.min(e.clientX, window.innerWidth - 220) + 'px'; cm.style.top = Math.min(e.clientY, window.innerHeight - 240) + 'px'; cm.classList.remove('hidden'); } function hideContextMenu() { document.getElementById('contextMenu').classList.add('hidden'); } /* ----------------------------------------------------------- 2. START MENU: ALL APPS & LIVE SEARCH ------------------------------------------------------------ */ let showingAllApps = false; function toggleAllAppsDrawer() { showingAllApps = !showingAllApps; document.getElementById('startPinnedGrid').classList.toggle('hidden', showingAllApps); document.getElementById('startRecentSection').classList.toggle('hidden', showingAllApps); document.getElementById('startAllAppsList').classList.toggle('hidden', !showingAllApps); document.getElementById('startSectionLabel').innerText = showingAllApps ? 'All Apps' : 'Pinned'; document.getElementById('allAppsBtn').innerText = showingAllApps ? '‹ Back' : 'All apps ›'; } function searchStartApps(q) { q = q.trim().toLowerCase(); if (q.length > 0 && !showingAllApps) toggleAllAppsDrawer(); if (q.length === 0 && showingAllApps) toggleAllAppsDrawer(); const buttons = document.querySelectorAll('#startAllAppsList button'); buttons.forEach(btn => { btn.style.display = btn.innerText.toLowerCase().includes(q) ? 'flex' : 'none'; }); } /* ----------------------------------------------------------- 3. WINDOW MANAGER (OPEN, CLOSE, MIN, MAX, DRAG, TILE) ------------------------------------------------------------ */ function focusWindow(app) { topZ++; const win = document.getElementById('win-' + app); if (win) win.style.zIndex = topZ; } function openWindow(app) { playTone(620, 0.06); const win = document.getElementById('win-' + app); if (!win) return; win.classList.remove('hidden-win'); focusWindow(app); updateTaskbarIndicator(app, true); if (app === 'files') renderFilesWindow(); if (app === 'settings') renderSettingsWindow(); } function closeWindow(app) { playTone(400, 0.06); const win = document.getElementById('win-' + app); if (!win) return; win.classList.add('hidden-win'); updateTaskbarIndicator(app, false); } function minimizeWindow(app) { const win = document.getElementById('win-' + app); if (win) win.classList.add('hidden-win'); } function maximizeWindow(app) { const win = document.getElementById('win-' + app); if (!win) return; if (win.dataset.maximized === 'true') { win.style.top = win.dataset.prevTop || '6%'; win.style.left = win.dataset.prevLeft || '16%'; win.style.width = win.dataset.prevWidth || '870px'; win.style.height = win.dataset.prevHeight || '545px'; win.dataset.maximized = 'false'; } else { win.dataset.prevTop = win.style.top; win.dataset.prevLeft = win.style.left; win.dataset.prevWidth = win.style.width; win.dataset.prevHeight = win.style.height; win.style.top = '8px'; win.style.left = '8px'; win.style.width = 'calc(100vw - 16px)'; win.style.height = 'calc(100vh - 64px)'; win.dataset.maximized = 'true'; } } function toggleAppFromTaskbar(app) { closePopups(); const win = document.getElementById('win-' + app); if (win.classList.contains('hidden-win')) openWindow(app); else minimizeWindow(app); } function updateTaskbarIndicator(app, isOpen) { const ind = document.getElementById('ind-' + app); const btn = document.getElementById('tb-' + app); if (ind) ind.classList.toggle('hidden', !isOpen); if (btn) btn.classList.toggle('bg-white/85', isOpen); } function triggerTaskViewArrange() { closePopups(); openWindow('files'); openWindow('settings'); const f = document.getElementById('win-files'); const s = document.getElementById('win-settings'); f.style.left = '2%'; f.style.top = '5%'; f.style.width = '47%'; f.style.height = '82%'; s.style.left = '51%'; s.style.top = '5%'; s.style.width = '47%'; s.style.height = '82%'; showToast('⊞ Task View: Side-by-Side Snap Layout Activated'); } // Dragging Engine let dragTarget = null, offX = 0, offY = 0; function startDrag(e, winId) { const win = document.getElementById(winId); if (!win || win.dataset.maximized === 'true') return; dragTarget = win; dragTarget.classList.add('dragging'); focusWindow(winId.replace('win-', '')); const rect = dragTarget.getBoundingClientRect(); offX = e.clientX - rect.left; offY = e.clientY - rect.top; document.addEventListener('mousemove', onDrag); document.addEventListener('mouseup', stopDrag); } function onDrag(e) { if (!dragTarget) return; dragTarget.style.left = (e.clientX - offX) + 'px'; dragTarget.style.top = Math.max(0, e.clientY - offY) + 'px'; } function stopDrag() { if (dragTarget) dragTarget.classList.remove('dragging'); dragTarget = null; document.removeEventListener('mousemove', onDrag); document.removeEventListener('mouseup', stopDrag); } /* ----------------------------------------------------------- 4. COMPLETE VIRTUAL FILE SYSTEM (IMAGES 3 & 4 + ALL FOLDERS) ------------------------------------------------------------ */ let currentFilesFolder = 'home'; let selectedFileId = null; let clipboardFile = null; let clipboardMode = null; let filesGridCompact = false; let filesSortAsc = true; let filesTabs = [ { id: 1, folder: 'home', title: 'Home', icon: '🏠' } ]; let activeTabId = 1; const vfs = { desktop: [ { id: 'd1', name: 'Surface_Specs.txt', type: 'txt', content: 'Surface Pro X — Abdi Edition\n16GB RAM • Windows 12 Concept OS' }, { id: 'd2', name: 'Minesweeper.lnk', type: 'app', app: 'games' }, { id: 'd3', name: 'Office_365.lnk', type: 'app', app: 'office' } ], documents: [ { id: 'doc1', name: 'Project_Proposal.docx', type: 'word', content: 'Windows 12 Concept Proposal by Abdi.' }, { id: 'doc2', name: 'Q4_Financials.xlsx', type: 'excel' }, { id: 'doc3', name: 'Keynote_Deck.pptx', type: 'ppt' } ], downloads: [ { id: 'dl1', name: 'Win12_Concept_Theme.pack', type: 'txt', content: 'Fluent Glass Theme Package v2.4' }, { id: 'dl2', name: 'PurblePlace_Installer.exe', type: 'app', app: 'games' } ], music: [ { id: 'm1', name: 'Fluent_Horizon_Ambient.wav', type: 'audio' }, { id: 'm2', name: 'Tokyo_Morning_Rain.wav', type: 'audio' } ], videos: [ { id: 'v1', name: 'Windows_12_Reveal.mp4', type: 'video' } ], system: [ { id: 'sys1', name: 'Windows', type: 'sysfolder' }, { id: 'sys2', name: 'Program Files', type: 'sysfolder' }, { id: 'sys3', name: 'Users (Abdi)', type: 'sysfolder' } ], onedrive: [ { id: 'od1', name: 'Cloud_Backup_2025.zip', type: 'txt', content: 'Synced with Abdi@outlook.com' } ], favorites: [ { id: 'fav1', name: 'Sample Photos', type: 'link', target: 'gallery' }, { id: 'fav2', name: 'Project_Proposal.docx', type: 'word' } ], recent: [ { id: 'rec1', name: 'Sample Photos', type: 'link', target: 'gallery' }, { id: 'rec2', name: 'Q4_Financials.xlsx', type: 'excel' } ], gallery: { 'February 2017': [ 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=600&q=80', 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=600&q=80', 'https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=600&q=80' ], 'July 2016': [ 'https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=600&q=80', 'https://images.unsplash.com/photo-1454496522488-7a8e488e8606?auto=format&fit=crop&w=600&q=80' ], 'August 2015': [ 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=600&q=80', 'https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=600&q=80', 'https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=600&q=80' ] } }; const folderMeta = { home: { title: 'Home', icon: '🏠', crumb: ['Home'] }, gallery: { title: 'Sample Photos', icon: '📁', crumb: ['Home', 'Gallery', 'Sample Photos'] }, desktop: { title: 'Desktop', icon: '🖥️', crumb: ['Home', 'Desktop'] }, documents: { title: 'Documents', icon: '📄', crumb: ['Home', 'Documents'] }, downloads: { title: 'Downloads', icon: '⬇️', crumb: ['Home', 'Downloads'] }, music: { title: 'Music', icon: '🎵', crumb: ['Home', 'Music'] }, videos: { title: 'Videos', icon: '🎬', crumb: ['Home', 'Videos'] }, system: { title: 'System (C:)', icon: '💽', crumb: ['Drives', 'System (C:)'] }, onedrive: { title: 'OneDrive', icon: '☁️', crumb: ['Cloud Drives', 'OneDrive'] }, favorites: { title: 'Favorites', icon: '⭐', crumb: ['Home', 'Favorites'] }, recent: { title: 'Recent Files', icon: '🕘', crumb: ['Home', 'Recent Files'] } }; function renderFilesTabs() { const bar = document.getElementById('filesTabBar'); bar.innerHTML = ''; filesTabs.forEach(t => { const active = t.id === activeTabId; const tabEl = document.createElement('div'); tabEl.className = `flex items-center justify-between gap-4 px-3 py-1.5 rounded-t-xl rounded-b-md text-[11px] font-medium cursor-pointer transition min-w-[135px] ${active ? 'bg-white/90 text-slate-900 shadow-xs' : 'bg-white/40 text-slate-600 hover:bg-white/65'}`; tabEl.onclick = () => { activeTabId = t.id; navigateFiles(t.folder, true); }; tabEl.innerHTML = ` <div class="flex items-center gap-2 truncate"><span>${t.icon}</span><span class="truncate">${t.title}</span></div> <span onclick="closeFilesTab(event, ${t.id})" class="text-slate-400 hover:text-rose-600 text-[10px]">✕</span> `; bar.appendChild(tabEl); }); const addBtn = document.createElement('button'); addBtn.className = 'w-6 h-6 rounded-lg hover:bg-white/60 flex items-center justify-center text-slate-700 text-xs font-bold shrink-0'; addBtn.innerText = '+'; addBtn.title = 'Open New Tab'; addBtn.onclick = () => { const nextFolder = currentFilesFolder === 'home' ? 'gallery' : 'home'; const meta = folderMeta[nextFolder]; const newId = Date.now(); filesTabs.push({ id: newId, folder: nextFolder, title: meta.title, icon: meta.icon }); activeTabId = newId; navigateFiles(nextFolder, true); }; bar.appendChild(addBtn); } function closeFilesTab(e, id) { e.stopPropagation(); if (filesTabs.length === 1) return; filesTabs = filesTabs.filter(t => t.id !== id); if (activeTabId === id) activeTabId = filesTabs[filesTabs.length - 1].id; const activeTab = filesTabs.find(t => t.id === activeTabId); navigateFiles(activeTab.folder, true); } function navigateFiles(folder, skipTabUpdate) { currentFilesFolder = folder; selectedFileId = null; const meta = folderMeta[folder] || folderMeta.home; // Update current tab const activeTab = filesTabs.find(t => t.id === activeTabId); if (activeTab) { activeTab.folder = folder; activeTab.title = meta.title; activeTab.icon = meta.icon; } renderFilesTabs(); // Highlight Sidebar document.querySelectorAll('#win-files .fnav-btn').forEach(btn => { btn.classList.remove('bg-white/85', 'shadow-2xs', 'font-semibold', 'text-slate-900'); }); const activeBtn = document.getElementById('fnav-' + folder); if (activeBtn) activeBtn.classList.add('bg-white/85', 'shadow-2xs', 'font-semibold', 'text-slate-900'); // Update Breadcrumb & Search placeholder const crumbEl = document.getElementById('filesBreadcrumb'); crumbEl.innerHTML = meta.crumb.map((c, i) => `<span onclick="navigateFiles('${i === 0 ? 'home' : folder}')" class="cursor-pointer hover:text-blue-600 ${i === meta.crumb.length - 1 ? 'font-semibold text-slate-900 text-dark-adapt' : ''}">${c}</span>` ).join('<span class="text-slate-400">›</span>'); document.getElementById('filesSearchInput').placeholder = 'Search ' + meta.title; renderFilesWindow(); } function filesHistoryBack() { if (currentFilesFolder !== 'home') navigateFiles('home'); } function renderFilesWindow(filterText = '') { const body = document.getElementById('filesDynamicBody'); if (!body) return; // CASE 1: HOME VIEW (IMAGE 3 PIXEL-PERFECT) if (currentFilesFolder === 'home') { body.innerHTML = ` <div class="space-y-5"> <div> <div class="flex items-center gap-1.5 text-[11px] font-semibold text-slate-700 text-dark-adapt mb-3"> <span class="text-slate-400">⌃</span><span>Pinned</span> </div> <div class="grid ${filesGridCompact ? 'grid-cols-4' : 'grid-cols-6'} gap-3"> ${renderHomeFolderCard('Desktop', 'from-sky-400 to-blue-600', 'desktop')} ${renderHomeFolderCard('Documents', 'from-slate-300 to-slate-500', 'documents')} ${renderHomeFolderCard('Downloads', 'from-teal-400 to-emerald-600', 'downloads')} ${renderHomeFolderCard('Gallery', 'from-blue-400 to-indigo-600', 'gallery')} ${renderHomeFolderCard('Music', 'from-orange-400 to-rose-500', 'music')} ${renderHomeFolderCard('Videos', 'from-purple-400 to-violet-600', 'videos')} </div> </div> <div> <div class="flex items-center gap-1.5 text-[11px] font-semibold text-slate-700 text-dark-adapt mb-3"> <span class="text-slate-400">⌃</span><span>Drives</span> </div> <div class="grid grid-cols-6 gap-3"> <div onclick="navigateFiles('system')" class="card-surface bg-white border border-slate-100 rounded-xl p-3 flex flex-col items-center justify-between gap-2 shadow-2xs cursor-pointer hover:border-blue-400 transition"> <div class="w-10 h-8 flex flex-col items-center justify-center relative mt-1"> <span class="w-3.5 h-3.5 bg-blue-600 rounded-2xs mb-1"></span> <div class="w-9 h-2.5 bg-slate-700 rounded-2xs flex items-center justify-end px-1"> <span class="w-1 h-1 bg-emerald-400 rounded-full"></span> </div> </div> <span class="text-[10.5px] font-medium text-slate-700 text-dark-adapt">System</span> <div class="w-full h-1 bg-slate-100 rounded-full overflow-hidden"> <div class="w-1/2 h-full bg-blue-500 rounded-full"></div> </div> </div> </div> </div> <div class="space-y-2.5 pt-1 text-[11px] font-semibold text-slate-700 text-dark-adapt"> <div onclick="navigateFiles('favorites')" class="flex items-center gap-1.5 cursor-pointer hover:text-blue-600"><span class="text-slate-400">⌄</span><span>Favorites (${vfs.favorites.length})</span></div> <div onclick="navigateFiles('recent')" class="flex items-center gap-1.5 cursor-pointer hover:text-blue-600"><span class="text-slate-400">⌄</span><span>Recent Files (${vfs.recent.length})</span></div> </div> </div> `; return; } // CASE 2: GALLERY / SAMPLE PHOTOS VIEW (IMAGE 4 PIXEL-PERFECT) if (currentFilesFolder === 'gallery') { let html = `<div class="pr-8 space-y-4">`; Object.keys(vfs.gallery).forEach((group, idx) => { const yearId = group.split(' ')[1]; const imgs = vfs.gallery[group]; html += ` <div id="gal-year-${yearId}"> <div class="flex items-center justify-between text-[10.5px] font-semibold text-slate-700 text-dark-adapt mb-2"> <div class="flex items-center gap-1.5"><span class="text-slate-400">⌃</span><span>${group}</span></div> </div> <div class="grid grid-cols-3 gap-2.5 w-[84%]"> ${imgs.map(src => `<img onclick="previewPhoto('${src}')" src="${src}" class="h-24 w-full object-cover rounded-lg cursor-pointer hover:scale-[1.02] shadow-xs transition" />`).join('')} </div> </div> `; }); html += `</div> <!-- Right Timeline Scrubber (2017, 2016, 2015) --> <div class="absolute right-3 top-4 bottom-4 flex flex-col justify-between items-center text-[9px] font-semibold text-slate-400"> <div class="flex flex-col items-center gap-1 cursor-pointer" onclick="scrollGalleryYear('2017')"> <span class="text-slate-600">▲</span> <span class="text-blue-600 font-bold">2017</span> </div> <span class="cursor-pointer hover:text-blue-600" onclick="scrollGalleryYear('2016')">2016</span> <div class="flex flex-col items-center gap-1 cursor-pointer" onclick="scrollGalleryYear('2015')"> <span class="hover:text-blue-600">2015</span> <span class="text-slate-600">▼</span> </div> </div> `; body.innerHTML = html; return; } // CASE 3: ANY OTHER FOLDER (Desktop, Documents, Downloads, Music, Videos, System, OneDrive, etc.) const list = (vfs[currentFilesFolder] || []).filter(item => item.name.toLowerCase().includes(filterText.toLowerCase())); if (list.length === 0) { body.innerHTML = `<div class="h-full flex flex-col items-center justify-center text-slate-400 text-xs gap-2"><span>📂</span><span>This folder is empty. Click "+ New" to create a file or folder.</span></div>`; return; } body.innerHTML = ` <div class="grid ${filesGridCompact ? 'grid-cols-3' : 'grid-cols-5'} gap-3"> ${list.map(item => { const isSel = selectedFileId === item.id; const icon = item.type === 'folder' || item.type === 'sysfolder' ? '📁' : item.type === 'word' ? '📘' : item.type === 'excel' ? '📗' : item.type === 'ppt' ? '📙' : item.type === 'audio' ? '🎵' : item.type === 'video' ? '🎬' : item.type === 'app' ? '🎮' : '📄'; return ` <div onclick="selectFileItem('${item.id}')" ondblclick="openFileItem('${item.id}')" class="card-surface p-3 rounded-xl border ${isSel ? 'border-blue-500 bg-blue-50/70' : 'border-slate-100 bg-white'} flex flex-col items-center justify-center gap-2 cursor-pointer hover:border-blue-300 transition text-center"> <span class="text-3xl">${icon}</span> <span class="text-[11px] font-medium text-slate-700 text-dark-adapt truncate w-full">${item.name}</span> </div> `; }).join('')} </div> `; } function renderHomeFolderCard(name, grad, target) { return ` <div onclick="navigateFiles('${target}')" class="card-surface group bg-white hover:bg-blue-50/60 border border-slate-100 rounded-xl p-3 flex flex-col items-center justify-center gap-2 shadow-2xs cursor-pointer transition"> <div class="w-11 h-9 rounded-md bg-gradient-to-b ${grad} flex items-end p-1 shadow-xs group-hover:scale-105 transition"> <div class="w-3 h-2 bg-white/85 rounded-2xs"></div> </div> <span class="text-[10.5px] font-medium text-slate-700 text-dark-adapt">${name}</span> </div> `; } function scrollGalleryYear(yr) { const el = document.getElementById('gal-year-' + yr); if (el) el.scrollIntoView({ behavior: 'smooth' }); } function selectFileItem(id) { selectedFileId = id; renderFilesWindow(); } function openFileItem(id) { const list = vfs[currentFilesFolder] || []; const item = list.find(x => x.id === id); if (!item) return; if (item.type === 'link') navigateFiles(item.target); else if (item.type === 'word' || item.type === 'txt') { openWindow('office'); switchOfficeApp('word'); document.getElementById('officeDocTitle').innerText = item.name + ' — Saved'; if (item.content) document.getElementById('wordEditor').innerHTML = `<h2 class="text-xl font-bold mb-2">${item.name}</h2><p>${item.content}</p>`; } else if (item.type === 'excel') { openWindow('office'); switchOfficeApp('excel'); } else if (item.type === 'ppt') { openWindow('office'); switchOfficeApp('ppt'); } else if (item.type === 'audio' || item.type === 'video') { openWindow('mediaplayer'); } else if (item.type === 'app') { openWindow(item.app || 'games'); } else { showToast('Opened ' + item.name); } } function toggleNewMenu(e) { e.stopPropagation(); document.getElementById('filesNewMenu').classList.toggle('hidden'); } function createNewItemPrompt(type) { document.getElementById('filesNewMenu').classList.add('hidden'); if (currentFilesFolder === 'home' || currentFilesFolder === 'gallery') currentFilesFolder = 'desktop'; const name = prompt(`Enter new ${type === 'folder' ? 'Folder' : 'Document'} name:`, type === 'folder' ? 'New Folder' : 'Notes.txt'); if (!name) return; if (!vfs[currentFilesFolder]) vfs[currentFilesFolder] = []; vfs[currentFilesFolder].push({ id: 'id_' + Date.now(), name, type, content: 'Created by Abdi' }); navigateFiles(currentFilesFolder); showToast(`Created "${name}" in ${folderMeta[currentFilesFolder].title}`); } function fileClipboardAction(mode) { if (mode === 'cut' || mode === 'copy') { if (!selectedFileId) { showToast('Click a file first to ' + mode); return; } const list = vfs[currentFilesFolder] || []; clipboardFile = list.find(x => x.id === selectedFileId); clipboardMode = mode; if (mode === 'cut') vfs[currentFilesFolder] = list.filter(x => x.id !== selectedFileId); renderFilesWindow(); showToast(`${mode.toUpperCase()}: "${clipboardFile.name}"`); } else if (mode === 'paste') { if (!clipboardFile) { showToast('Clipboard is empty!'); return; } const target = (currentFilesFolder === 'home' || currentFilesFolder === 'gallery') ? 'desktop' : currentFilesFolder; vfs[target].push({ ...clipboardFile, id: 'id_' + Date.now() }); navigateFiles(target); showToast(`Pasted "${clipboardFile.name}"`); } } function fileRenameAction() { if (!selectedFileId) { showToast('Click any file to rename it'); return; } const list = vfs[currentFilesFolder] || []; const item = list.find(x => x.id === selectedFileId); if (!item) return; const next = prompt('Rename item:', item.name); if (next) { item.name = next; renderFilesWindow(); } } function fileDeleteAction() { if (!selectedFileId) { showToast('Click any file to delete it'); return; } vfs[currentFilesFolder] = (vfs[currentFilesFolder] || []).filter(x => x.id !== selectedFileId); selectedFileId = null; renderFilesWindow(); showToast('Moved item to Recycle Bin'); } function filePropertiesAction() { const meta = folderMeta[currentFilesFolder] || folderMeta.home; showToast(`ⓘ Properties: ${meta.title} • Owner: Abdi (Surface Pro X)`); } function toggleFilesGridCols() { filesGridCompact = !filesGridCompact; renderFilesWindow(); } function sortCurrentFolder() { filesSortAsc = !filesSortAsc; if (vfs[currentFilesFolder] && Array.isArray(vfs[currentFilesFolder])) { vfs[currentFilesFolder].sort((a, b) => filesSortAsc ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name)); } renderFilesWindow(); showToast(`Sorted ${filesSortAsc ? 'A → Z' : 'Z → A'}`); } function filterFilesView(val) { renderFilesWindow(val); } function toggleSidebarGroup(id) { document.getElementById(id).classList.toggle('hidden'); } function previewPhoto(src) { document.getElementById('photoModalImg').src = src; document.getElementById('photoModal').classList.remove('hidden'); } /* ----------------------------------------------------------- 5. SETTINGS APP (IMAGE 6 HOME + ALL 12 SIDEBAR CATEGORIES) ------------------------------------------------------------ */ let currentSettingsSection = 'home'; let pcDeviceName = "Abdi's PC"; function switchSettingsSection(sec) { currentSettingsSection = sec; document.querySelectorAll('#win-settings .snav-btn').forEach(btn => { btn.classList.remove('bg-white/85', 'shadow-2xs', 'font-medium', 'text-slate-900'); }); const active = document.getElementById('snav-' + sec); if (active) active.classList.add('bg-white/85', 'shadow-2xs', 'font-medium', 'text-slate-900'); const titleMap = { home: 'Home', system: 'System', bluetooth: 'Bluetooth & Devices', network: 'Network & Internet', personalisation: 'Personalisation', apps: 'Apps', account: 'Account', time: 'Time & Language', games: 'Games', accessibility: 'Accessibility', privacy: 'Privacy & Security', update: 'Windows Update' }; document.getElementById('settingsTabTitle').innerText = titleMap[sec] || 'Home'; document.getElementById('settingsBreadcrumb').innerHTML = `<span>Settings</span><span class="text-slate-400">›</span><span class="font-semibold text-slate-900 text-dark-adapt">${titleMap[sec]}</span>`; renderSettingsWindow(); } function renderSettingsWindow() { const box = document.getElementById('settingsDynamicBody'); if (!box) return; // IMAGE 6 PIXEL-PERFECT HOME VIEW if (currentSettingsSection === 'home') { box.innerHTML = ` <div class="flex items-center justify-between pb-2"> <div class="flex items-center gap-3.5"> <div class="w-24 h-14 rounded-md border-2 border-slate-700 overflow-hidden shadow-sm relative bg-sky-200"> <img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=300&q=60" class="w-full h-full object-cover" style="filter: hue-rotate(185deg) saturate(1.8) brightness(1.1);" /> </div> <div> <h3 class="text-xs font-bold text-slate-800 text-dark-adapt">${pcDeviceName}</h3> <p class="text-[10px] text-slate-500 mb-1.5">Surface Pro X</p> <button onclick="renamePC()" class="bg-blue-600 hover:bg-blue-700 text-white text-[9.5px] font-medium px-3 py-1 rounded-md transition">Rename</button> </div> </div> <div class="flex items-center gap-6 text-[10.5px]"> <div onclick="switchSettingsSection('network')" class="flex items-center gap-2 cursor-pointer"> <span class="w-6 h-6 rounded-full bg-blue-50 text-blue-600 flex items-center justify-center font-bold">🛜</span> <div> <div class="font-semibold text-slate-800 text-dark-adapt">iPhone 17 Pro Max</div> <div class="text-[9.5px] text-slate-500">Connected</div> </div> </div> <div onclick="switchSettingsSection('update')" class="flex items-center gap-2 cursor-pointer"> <span class="w-6 h-6 rounded-full bg-blue-50 text-blue-600 flex items-center justify-center font-bold">🔄</span> <div> <div class="font-semibold text-slate-800 text-dark-adapt">Windows Update</div> <div class="text-[9.5px] text-slate-500">Last checked: 3 minutes ago</div> </div> </div> </div> </div> <div class="grid grid-cols-2 gap-3.5"> <!-- Card 1: Microsoft Account + Office Icons --> <div class="card-surface bg-white border border-slate-100 rounded-xl p-4 shadow-2xs space-y-2.5"> <div class="grid grid-cols-2 gap-0.5 w-3.5 h-3.5"> <span class="bg-orange-500"></span><span class="bg-emerald-500"></span> <span class="bg-sky-500"></span><span class="bg-amber-400"></span> </div> <h4 class="text-xs font-bold text-slate-800 text-dark-adapt">It's all here with Microsoft account</h4> <p class="text-[9.5px] text-slate-500 leading-relaxed"> When you sign in, you're connecting your favourite Microsoft apps and services to your device. You'll back up your data, keep it more secure, use Microsoft 365 apps and cloud storage. </p> <div class="flex items-center gap-2 py-1"> <button onclick="openWindow('office'); switchOfficeApp('word');" title="Open Word" class="w-5 h-5 rounded-xs bg-blue-700 text-white text-[9px] flex items-center justify-center font-bold hover:scale-110 transition">W</button> <button onclick="openWindow('office'); switchOfficeApp('excel');" title="Open Excel" class="w-5 h-5 rounded-xs bg-emerald-600 text-white text-[9px] flex items-center justify-center font-bold hover:scale-110 transition">X</button> <button onclick="openWindow('office'); switchOfficeApp('ppt');" title="Open PowerPoint" class="w-5 h-5 rounded-xs bg-orange-600 text-white text-[9px] flex items-center justify-center font-bold hover:scale-110 transition">P</button> <button onclick="openWindow('files'); navigateFiles('onedrive');" title="Open OneDrive" class="w-5 h-5 rounded-xs bg-sky-500 text-white text-[9px] flex items-center justify-center font-bold hover:scale-110 transition">☁</button> <button onclick="openWindow('office'); switchOfficeApp('outlook');" title="Open Outlook" class="w-5 h-5 rounded-xs bg-blue-500 text-white text-[9px] flex items-center justify-center font-bold hover:scale-110 transition">O</button> </div> <button onclick="switchSettingsSection('account')" class="bg-slate-100 hover:bg-slate-200 text-slate-700 text-[10px] font-semibold px-4 py-1.5 rounded-md transition">Sign in</button> </div> <!-- Card 2: Recommended settings --> <div class="card-surface bg-white border border-slate-100 rounded-xl p-4 shadow-2xs flex flex-col justify-between"> <div> <h4 class="text-xs font-bold text-slate-800 text-dark-adapt">Recommended settings</h4> <p class="text-[9.5px] text-slate-400 mb-3">Recent and commonly used settings</p> </div> <div class="divide-y divide-slate-100 text-[11px] text-slate-700 text-dark-adapt"> <div onclick="switchSettingsSection('system')" class="py-2 flex items-center justify-between cursor-pointer hover:text-blue-600"> <div class="flex items-center gap-2.5"><span>🔊</span><span>Sound</span></div><span class="text-slate-400">›</span> </div> <div onclick="switchSettingsSection('apps')" class="py-2 flex items-center justify-between cursor-pointer hover:text-blue-600"> <div class="flex items-center gap-2.5"><span>⊞</span><span>Installed apps</span></div><span class="text-slate-400">›</span> </div> <div onclick="switchSettingsSection('time')" class="py-2 flex items-center justify-between cursor-pointer hover:text-blue-600"> <div class="flex items-center gap-2.5"><span>🕒</span><span>Date & time</span></div><span class="text-slate-400">›</span> </div> </div> </div> <!-- Card 3: Bluetooth devices --> <div class="card-surface bg-white border border-slate-100 rounded-xl p-4 shadow-2xs flex flex-col justify-between"> <div> <h4 class="text-xs font-bold text-slate-800 text-dark-adapt">Bluetooth devices</h4> <p class="text-[9.5px] text-slate-400 mb-3">Manage, add and remove devices</p> <div class="flex items-center justify-between py-2 px-2.5 rounded-lg bg-slate-50/70 border border-slate-100"> <div class="flex items-center gap-2.5"> <span class="text-blue-600 font-bold">ᛒ</span> <div> <div class="text-[11px] font-semibold text-slate-800">Bluetooth</div> <div class="text-[9px] text-slate-400">Discoverable as "NOTHING"</div> </div> </div> <div class="flex items-center gap-1.5"> <span class="text-[10px] text-slate-600">On</span> <button onclick="this.classList.toggle('bg-blue-600'); this.classList.toggle('bg-slate-300'); showToast('Bluetooth state updated');" class="w-8 h-4 bg-blue-600 rounded-full p-0.5 flex items-center justify-end transition"> <span class="w-3 h-3 bg-white rounded-full"></span> </button> </div> </div> </div> <div class="flex items-center justify-between pt-3 text-[10px] text-slate-600 text-dark-adapt"> <span>View all devices</span> <button onclick="switchSettingsSection('bluetooth')" class="px-2.5 py-1 bg-slate-100 rounded-md font-medium hover:bg-slate-200 text-slate-700">Add device ›</button> </div> </div> <!-- Card 4: Personalise your device --> <div class="card-surface bg-white border border-slate-100 rounded-xl p-4 shadow-2xs"> <h4 class="text-xs font-bold text-slate-800 text-dark-adapt mb-2.5">Personalise your device</h4> <div class="grid grid-cols-3 gap-2"> ${themes.map((t, i) => ` <div onclick="setTheme(${i})" class="h-12 rounded-lg overflow-hidden border-2 ${i === activeThemeIndex ? 'border-blue-600' : 'border-slate-200'} cursor-pointer hover:border-blue-500 transition"> <img src="${t.url}" class="w-full h-full object-cover" style="filter: ${t.filter};" /> </div> `).join('')} </div> </div> </div> `; return; } // ALL OTHER 11 SETTINGS PAGES (100% Interactive) const pages = { system: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">💻 System & Display</h3> <div class="card-surface p-4 rounded-xl border border-slate-100 space-y-3 text-xs"> <div class="flex justify-between items-center"><span>Brightness Level</span><input type="range" min="25" max="100" value="88" oninput="changeBrightness(this.value)" class="w-48" /></div> <div class="flex justify-between items-center"><span>Master Sound Volume</span><input type="range" min="0" max="100" value="40" oninput="setSystemVolume(this.value)" class="w-48" /></div> <div class="flex justify-between items-center"><span>Device Specifications</span><span class="font-semibold text-blue-600">${pcDeviceName} • Surface Pro X (ARM64)</span></div> </div> `, bluetooth: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🔹 Bluetooth & Connected Devices</h3> <div class="card-surface p-4 rounded-xl border border-slate-100 space-y-2 text-xs"> <div class="flex justify-between items-center py-1"><span>🎧 Nothing Ear (2)</span><span class="text-emerald-600 font-semibold">Connected (Battery 95%)</span></div> <div class="flex justify-between items-center py-1"><span>⌨️ Surface Pro Signature Keyboard</span><span class="text-emerald-600 font-semibold">Connected</span></div> <button onclick="showToast('Scanning for nearby Bluetooth devices...')" class="mt-2 bg-blue-600 text-white px-3 py-1.5 rounded-lg font-semibold">+ Pair New Device</button> </div> `, network: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🌐 Network & Internet</h3> <div class="card-surface p-4 rounded-xl border border-slate-100 space-y-2 text-xs"> <div class="flex justify-between items-center"><span>🛜 iPhone 17 Pro Max (5G Hotspot)</span><span class="px-2 py-0.5 bg-emerald-100 text-emerald-700 rounded-full font-semibold">Connected • 840 Mbps</span></div> <div class="text-slate-500">IPv4 Address: 192.168.1.104 • DNS: 1.1.1.1 (Cloudflare)</div> </div> `, personalisation: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🖌️ Personalisation & Themes</h3> <div class="card-surface p-4 rounded-xl border border-slate-100 space-y-3 text-xs"> <div class="font-semibold">Select Desktop Wallpaper Theme:</div> <div class="grid grid-cols-3 gap-3"> ${themes.map((t, i) => ` <div onclick="setTheme(${i})" class="h-20 rounded-xl overflow-hidden border-2 ${i === activeThemeIndex ? 'border-blue-600' : 'border-slate-200'} cursor-pointer"> <img src="${t.url}" class="w-full h-full object-cover" style="filter: ${t.filter};" /> </div> `).join('')} </div> <button onclick="toggleDarkMode(document.getElementById('qs-dark-btn'))" class="bg-slate-800 text-white px-4 py-1.5 rounded-lg font-semibold">🌙 Toggle Light / Dark Mode</button> </div> `, apps: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">⊞ Installed Applications</h3> <div class="space-y-2 text-xs"> <div class="card-surface p-3 rounded-xl border flex justify-between items-center"><span>📘 Microsoft Office 365 (Word, Excel, PPT, Outlook)</span><button onclick="openWindow('office')" class="bg-blue-600 text-white px-3 py-1 rounded-lg">Launch</button></div> <div class="card-surface p-3 rounded-xl border flex justify-between items-center"><span>🎮 Windows 7 Classic Games Pack</span><button onclick="openWindow('games')" class="bg-blue-600 text-white px-3 py-1 rounded-lg">Play</button></div> <div class="card-surface p-3 rounded-xl border flex justify-between items-center"><span>🎨 Paint Studio</span><button onclick="openWindow('paint')" class="bg-blue-600 text-white px-3 py-1 rounded-lg">Launch</button></div> </div> `, account: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">👤 Your Microsoft Account</h3> <div class="card-surface p-4 rounded-xl border flex items-center gap-4 text-xs"> <div class="w-12 h-12 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-500 text-white flex items-center justify-center text-xl font-bold">⚡</div> <div> <div class="font-bold text-sm">Abdi</div> <div class="text-slate-500">Abdi@outlook.com • Administrator • Microsoft 365 Active</div> </div> </div> `, time: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🕒 Time & Language</h3> <div class="card-surface p-4 rounded-xl border space-y-2 text-xs"> <div>Current System Time: <strong>10:12 AM (Saturday, October 11)</strong></div> <div>Region: Tokyo / Seoul Standard Time • Display Language: English (United States)</div> </div> `, games: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🎮 Gaming & Windows 7 Classics</h3> <div class="card-surface p-4 rounded-xl border space-y-3 text-xs"> <p>Enjoy classic Windows 7 games remastered for Windows 12 Concept OS.</p> <div class="flex gap-2"> <button onclick="openWindow('games'); switchGame('minesweeper');" class="bg-blue-600 text-white px-3.5 py-1.5 rounded-lg font-semibold">💣 Play Minesweeper</button> <button onclick="openWindow('games'); switchGame('purble');" class="bg-pink-600 text-white px-3.5 py-1.5 rounded-lg font-semibold">🎂 Play Purble Place</button> </div> </div> `, accessibility: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">♿ Accessibility</h3> <div class="card-surface p-4 rounded-xl border space-y-3 text-xs"> <p>Enhance contrast and window borders for improved visibility.</p> <button onclick="toggleAccessibilityMode()" class="bg-blue-600 text-white px-4 py-1.5 rounded-lg font-semibold">Toggle High Contrast Borders</button> </div> `, privacy: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🛡️ Privacy & Windows Security</h3> <div class="card-surface p-4 rounded-xl border space-y-2 text-xs"> <div class="text-emerald-600 font-bold">✅ Windows Defender SmartScreen is Active</div> <p class="text-slate-500">No threats found during last quick scan.</p> </div> `, update: ` <h3 class="text-sm font-bold text-slate-800 text-dark-adapt">🔄 Windows Update</h3> <div class="card-surface p-4 rounded-xl border flex items-center justify-between text-xs"> <div> <div class="font-bold text-emerald-600">✔ You're up to date</div> <div class="text-slate-500">Last checked: Just now • Windows 12 Concept Build 26100.1</div> </div> <button onclick="showToast('🔄 Checking Microsoft servers... Your OS is up to date!')" class="bg-blue-600 text-white px-4 py-1.5 rounded-lg font-semibold">Check for updates</button> </div> ` }; box.innerHTML = pages[currentSettingsSection] || pages.system; } /* ----------------------------------------------------------- 6. MICROSOFT OFFICE 365 SUITE (WORD, EXCEL, PPT, OUTLOOK) ------------------------------------------------------------ */ function switchOfficeApp(app) { ['word', 'excel', 'ppt', 'outlook'].forEach(a => { document.getElementById('office-view-' + a).classList.toggle('hidden', a !== app); }); const badge = document.getElementById('officeAppBadge'); const title = document.getElementById('officeDocTitle'); if (app === 'word') { badge.innerText = 'Word'; badge.className = 'px-2.5 py-0.5 rounded-md bg-blue-700 text-white text-[10px] font-bold'; title.innerText = 'Project_Proposal.docx — Saved to OneDrive'; } if (app === 'excel') { badge.innerText = 'Excel'; badge.className = 'px-2.5 py-0.5 rounded-md bg-emerald-600 text-white text-[10px] font-bold'; title.innerText = 'Q4_Financials.xlsx — Interactive Spreadsheet'; initExcelGrid(); } if (app === 'ppt') { badge.innerText = 'PowerPoint'; badge.className = 'px-2.5 py-0.5 rounded-md bg-orange-600 text-white text-[10px] font-bold'; title.innerText = 'Keynote_Deck.pptx — Presentation Studio'; renderPptSlides(); } if (app === 'outlook') { badge.innerText = 'Outlook'; badge.className = 'px-2.5 py-0.5 rounded-md bg-sky-600 text-white text-[10px] font-bold'; title.innerText = 'Inbox — Abdi@outlook.com'; renderOutlook(); } } // WORD function execWordCmd(cmd, val = null) { document.execCommand(cmd, false, val); } function saveWordToDocuments() { const name = prompt('Save Word Document as:', 'Abdi_Report.docx'); if (!name) return; const content = document.getElementById('wordEditor').innerText; vfs.documents.push({ id: 'w_' + Date.now(), name, type: 'word', content }); showToast(`📘 Saved "${name}" to Files → Documents!`); } // EXCEL let excelData = { 'A1': 'Item', 'B1': 'Q1 Sales', 'C1': 'Q2 Sales', 'A2': 'Surface Pro X', 'B2': '1200', 'C2': '1550', 'A3': 'Office 365', 'B3': '850', 'C3': '980', 'A4': 'Win12 Licenses', 'B4': '2300', 'C4': '3100', 'A5': 'Total', 'B5': '4350', 'C5': '5630' }; let activeExcelCell = 'B5'; function initExcelGrid() { const tbl = document.getElementById('excelTable'); if (tbl.innerHTML.trim() !== '') return; const cols = ['A', 'B', 'C', 'D', 'E', 'F']; let html = `<thead><tr class="bg-slate-100"><th class="border p-1.5 w-10"></th>${cols.map(c => `<th class="border p-1.5 font-bold text-center">${c}</th>`).join('')}</tr></thead><tbody>`; for (let r = 1; r <= 9; r++) { html += `<tr><td class="border bg-slate-50 text-center font-bold p-1.5">${r}</td>`; cols.forEach(c => { const ref = c + r; const val = excelData[ref] || ''; html += `<td class="border p-0"><input id="cell-${ref}" value="${val}" onfocus="selectExcelCell('${ref}')" oninput="updateExcelCell('${ref}', this.value)" class="w-full px-2 py-1.5 outline-none focus:bg-emerald-50/60" /></td>`; }); html += `</tr>`; } html += `</tbody>`; tbl.innerHTML = html; } function selectExcelCell(ref) { activeExcelCell = ref; document.getElementById('excelActiveCellLabel').innerText = ref; document.getElementById('excelFormulaBar').value = excelData[ref] || ''; } function updateExcelCell(ref, val) { excelData[ref] = val; if (val.startsWith('=')) { try { const expr = val.substring(1).replace(/([A-F][1-9])/g, m => parseFloat(excelData[m] || 0)); const res = eval(expr); if (!isNaN(res)) document.getElementById('cell-' + ref).value = res; } catch (e) {} } } function applyFormulaBar() { const val = document.getElementById('excelFormulaBar').value; const input = document.getElementById('cell-' + activeExcelCell); if (input) { input.value = val; updateExcelCell(activeExcelCell, val); } } function calculateExcelSum() { const b2 = parseFloat(document.getElementById('cell-B2')?.value || 0); const b3 = parseFloat(document.getElementById('cell-B3')?.value || 0); const b4 = parseFloat(document.getElementById('cell-B4')?.value || 0); const sum = b2 + b3 + b4; const b5 = document.getElementById('cell-B5'); if (b5) b5.value = sum; showToast(`📗 AutoSum calculated: B5 = ${sum}`); } // POWERPOINT let pptSlides = [ { title: 'Next-Gen Windows Experience', sub: 'Designed for Abdi • Pixel-Perfect Fluent Concept', bg: 'from-blue-600 to-indigo-800' }, { title: 'Full Office 365 & Win7 Games', sub: 'Every button, folder, and app works seamlessly inside the browser.', bg: 'from-emerald-600 to-teal-800' } ]; let currentSlideIdx = 0; const pptBgs = ['from-blue-600 to-indigo-800', 'from-emerald-600 to-teal-800', 'from-rose-600 to-purple-800', 'from-slate-800 to-black']; function renderPptSlides() { const thumbs = document.getElementById('pptThumbnails'); thumbs.innerHTML = pptSlides.map((s, i) => ` <div onclick="selectPptSlide(${i})" class="p-2.5 rounded-xl cursor-pointer border-2 ${i === currentSlideIdx ? 'border-orange-500 bg-orange-50' : 'border-slate-200 bg-white'}"> <div class="text-[10px] font-bold text-slate-400">Slide ${i + 1}</div> <div class="text-xs font-bold text-slate-800 truncate mt-0.5">${s.title}</div> </div> `).join(''); const active = pptSlides[currentSlideIdx]; const canvas = document.getElementById('pptCanvas'); canvas.className = `w-full h-full max-w-[600px] max-h-[340px] rounded-2xl shadow-xl p-10 flex flex-col justify-center bg-gradient-to-br ${active.bg} text-white`; document.getElementById('pptTitleEdit').innerText = active.title; document.getElementById('pptSubEdit').innerText = active.sub; } function selectPptSlide(i) { currentSlideIdx = i; renderPptSlides(); } function saveCurrentSlideEdit() { pptSlides[currentSlideIdx].title = document.getElementById('pptTitleEdit').innerText; pptSlides[currentSlideIdx].sub = document.getElementById('pptSubEdit').innerText; } function addPptSlide() { pptSlides.push({ title: 'New Presentation Slide', sub: 'Click here to customize text', bg: pptBgs[pptSlides.length % pptBgs.length] }); currentSlideIdx = pptSlides.length - 1; renderPptSlides(); } function cyclePptTheme() { const curr = pptSlides[currentSlideIdx].bg; const next = pptBgs[(pptBgs.indexOf(curr) + 1) % pptBgs.length]; pptSlides[currentSlideIdx].bg = next; renderPptSlides(); } function startPptSlideshow() { const canvas = document.getElementById('pptCanvas'); if (canvas.requestFullscreen) canvas.requestFullscreen(); else showToast('▶ Presenting Slide: ' + pptSlides[currentSlideIdx].title); } // OUTLOOK let outlookEmails = [ { from: 'Microsoft Windows Team', subj: 'Welcome to your Surface Pro X!', time: '10:12 AM', body: 'Hi Abdi, your Windows 12 Concept OS is now 100% activated with Office 365 and Windows 7 Games.' }, { from: 'Shape League Official', subj: 'Tournament Match Results', time: 'Yesterday', body: 'Rectangle vs Circle match starts at 01:00 PM today.' } ]; function renderOutlook() { const list = document.getElementById('outlookMailList'); list.innerHTML = outlookEmails.map((m, i) => ` <div onclick="readOutlookMail(${i})" class="p-2.5 rounded-xl border border-slate-100 hover:bg-sky-50 cursor-pointer"> <div class="flex justify-between text-[10px] text-slate-400"><span>${m.from}</span><span>${m.time}</span></div> <div class="text-xs font-bold text-slate-800 truncate">${m.subj}</div> </div> `).join(''); readOutlookMail(0); } function readOutlookMail(i) { const m = outlookEmails[i]; document.getElementById('outlookReader').innerHTML = ` <h3 class="text-base font-bold text-slate-800">${m.subj}</h3> <div class="text-xs text-slate-400 mb-4">From: ${m.from} • ${m.time}</div> <p class="text-xs text-slate-700 leading-relaxed">${m.body}</p> `; } function composeOutlookMail() { const to = prompt('Send Email To:', 'team@microsoft.com'); if (!to) return; const subj = prompt('Subject:', 'Hello from Abdi Surface Pro X'); outlookEmails.unshift({ from: 'Me → ' + to, subj: subj || 'No Subject', time: 'Just now', body: 'Sent from Outlook 365 inside Windows Concept OS.' }); renderOutlook(); showToast('✉ Email sent successfully!'); } /* ----------------------------------------------------------- 7. WINDOWS 7 CLASSIC GAMES (MINESWEEPER & PURBLE PLACE!) ------------------------------------------------------------ */ function switchGame(game) { ['minesweeper', 'purble', 'pairs'].forEach(g => { document.getElementById('game-view-' + g).classList.toggle('hidden', g !== game); }); if (game === 'minesweeper') initMinesweeper(); if (game === 'purble') initPurblePlace(); if (game === 'pairs') initPurblePairs(); } // GAME 1: MINESWEEPER let mineBoard = [], mineFlagMode = false, mineGameOver = false; function toggleMineFlagMode() { mineFlagMode = !mineFlagMode; const btn = document.getElementById('mineFlagModeBtn'); btn.innerText = mineFlagMode ? '🚩 Flag: ON' : '🚩 Flag: OFF'; btn.className = mineFlagMode ? 'px-2.5 py-0.5 rounded bg-amber-400 text-slate-900 text-[11px] font-bold' : 'px-2.5 py-0.5 rounded bg-white/20 text-[11px] font-semibold'; } function initMinesweeper() { mineGameOver = false; document.getElementById('mineFaceBtn').innerText = '😊'; document.getElementById('mineCountDisplay').innerText = '10'; mineBoard = Array.from({ length: 9 }, () => Array.from({ length: 9 }, () => ({ mine: false, rev: false, flag: false, count: 0 }))); let placed = 0; while (placed < 10) { let r = Math.floor(Math.random() * 9), c = Math.floor(Math.random() * 9); if (!mineBoard[r][c].mine) { mineBoard[r][c].mine = true; placed++; } } for (let r = 0; r < 9; r++) { for (let c = 0; c < 9; c++) { if (mineBoard[r][c].mine) continue; let cnt = 0; for (let dr = -1; dr <= 1; dr++) for (let dc = -1; dc <= 1; dc++) { if (mineBoard[r + dr]?.[c + dc]?.mine) cnt++; } mineBoard[r][c].count = cnt; } } renderMinesweeper(); } function renderMinesweeper() { const grid = document.getElementById('minesweeperGrid'); grid.innerHTML = ''; for (let r = 0; r < 9; r++) { for (let c = 0; c < 9; c++) { const cell = mineBoard[r][c]; const btn = document.createElement('button'); btn.className = `w-8 h-8 rounded-md font-bold text-xs flex items-center justify-center transition ${cell.rev ? 'mine-cell revealed' : 'mine-cell hover:brightness-105'}`; if (cell.rev) { if (cell.mine) btn.innerText = '💣'; else if (cell.count > 0) { btn.innerText = cell.count; const colors = ['', 'text-blue-600', 'text-emerald-600', 'text-rose-600', 'text-purple-700', 'text-amber-700']; btn.classList.add(colors[cell.count] || 'text-slate-800'); } } else if (cell.flag) { btn.innerText = '🚩'; } btn.onclick = () => clickMineCell(r, c); btn.oncontextmenu = (e) => { e.preventDefault(); flagMineCell(r, c); }; grid.appendChild(btn); } } } function flagMineCell(r, c) { if (mineGameOver || mineBoard[r][c].rev) return; mineBoard[r][c].flag = !mineBoard[r][c].flag; playTone(700, 0.04); renderMinesweeper(); } function clickMineCell(r, c) { if (mineGameOver) return; if (mineFlagMode) { flagMineCell(r, c); return; } const cell = mineBoard[r][c]; if (cell.flag || cell.rev) return; cell.rev = true; if (cell.mine) { mineGameOver = true; playTone(150, 0.3, 'sawtooth'); document.getElementById('mineFaceBtn').innerText = '😵'; mineBoard.forEach(row => row.forEach(x => { if (x.mine) x.rev = true; })); renderMinesweeper(); showToast('💥 Boom! Click the 😊 face to play again.'); return; } playTone(580, 0.04); if (cell.count === 0) { for (let dr = -1; dr <= 1; dr++) for (let dc = -1; dc <= 1; dc++) { if (mineBoard[r + dr]?.[c + dc] && !mineBoard[r + dr][c + dc].rev) clickMineCell(r + dr, c + dc); } } renderMinesweeper(); checkMineWin(); } function checkMineWin() { let unrev = 0; mineBoard.forEach(row => row.forEach(x => { if (!x.rev) unrev++; })); if (unrev === 10) { mineGameOver = true; document.getElementById('mineFaceBtn').innerText = '😎'; if (window.confetti) confetti({ particleCount: 70, spread: 60 }); showToast('🏆 You cleared Minesweeper!'); } } // GAME 2: PURBLE PLACE — COMFY CAKES let targetCake = {}, playerCake = {}, purblePts = 0; const shapes = ['round', 'square']; const batters = ['#fde047', '#f472b6', '#78350f']; const frostings = ['#ffffff', '#fb7185', '#38bdf8']; const toppings = ['🍒', '🍓', '🕯️']; function initPurblePlace() { targetCake = { shape: shapes[Math.floor(Math.random() * shapes.length)], batter: batters[Math.floor(Math.random() * batters.length)], frosting: frostings[Math.floor(Math.random() * frostings.length)], topping: toppings[Math.floor(Math.random() * toppings.length)] }; playerCake = { shape: 'round', batter: '#fde047', frosting: '#ffffff', topping: '🍒' }; renderPurbleCakes(); } function setCakePart(part, val) { playTone(640, 0.05); playerCake[part] = val; renderPurbleCakes(); } function renderCakeHTML(c) { const radius = c.shape === 'round' ? 'rounded-full' : 'rounded-lg'; return ` <div class="text-2xl -mb-1 z-10">${c.topping}</div> <div class="w-24 h-5 ${radius} shadow-xs z-10" style="background:${c.frosting}; border: 2px solid rgba(0,0,0,0.1);"></div> <div class="w-24 h-12 ${c.shape === 'round' ? 'rounded-2xl' : 'rounded-md'} -mt-2 shadow-md" style="background:${c.batter}; border: 2px solid rgba(0,0,0,0.12);"></div> <div class="w-28 h-2 bg-slate-300 rounded-full mt-0.5"></div> `; } function renderPurbleCakes() { document.getElementById('purbleTargetCake').innerHTML = renderCakeHTML(targetCake); document.getElementById('purblePlayerCake').innerHTML = renderCakeHTML(playerCake); document.getElementById('purbleTargetDesc').innerText = `Order: ${targetCake.shape.toUpperCase()} pan + ${targetCake.topping}`; } function servePurbleCake() { const match = targetCake.shape === playerCake.shape && targetCake.batter === playerCake.batter && targetCake.frosting === playerCake.frosting && targetCake.topping === playerCake.topping; if (match) { purblePts += 100; document.getElementById('purbleScore').innerText = purblePts; playTone(880, 0.15); if (window.confetti) confetti({ particleCount: 55, spread: 55 }); showToast('🎂 Perfect Cake! Customer loved it (+100 pts)'); initPurblePlace(); } else { playTone(220, 0.15, 'triangle'); showToast('❌ Cake does not match the customer order! Check Shape, Batter, Frosting & Topping.'); } } // GAME 3: PURBLE PAIRS const pairEmojis = ['🍀', '🎂', '💎', '👑', '🍓', '⭐', '🎈', '🦋']; let pairCards = [], flippedIdx = []; function initPurblePairs() { pairCards = [...pairEmojis, ...pairEmojis].sort(() => Math.random() - 0.5).map(e => ({ e, open: false, done: false })); flippedIdx = []; renderPurblePairs(); } function renderPurblePairs() { const g = document.getElementById('pairsGrid'); g.innerHTML = pairCards.map((c, i) => ` <button onclick="flipPairCard(${i})" class="w-14 h-14 rounded-xl font-bold text-xl flex items-center justify-center shadow-xs transition ${c.open || c.done ? 'bg-white border-2 border-emerald-400' : 'bg-emerald-600 text-white hover:bg-emerald-500'}"> ${c.open || c.done ? c.e : '🍀'} </button> `).join(''); } function flipPairCard(i) { if (flippedIdx.length === 2 || pairCards[i].open || pairCards[i].done) return; pairCards[i].open = true; flippedIdx.push(i); playTone(600, 0.05); renderPurblePairs(); if (flippedIdx.length === 2) { const [a, b] = flippedIdx; if (pairCards[a].e === pairCards[b].e) { pairCards[a].done = pairCards[b].done = true; flippedIdx = []; renderPurblePairs(); } else { setTimeout(() => { pairCards[a].open = pairCards[b].open = false; flippedIdx = []; renderPurblePairs(); }, 650); } } } /* ----------------------------------------------------------- 8. PAINT STUDIO, CALCULATOR, COPILOT, TERMINAL, MEDIA ------------------------------------------------------------ */ // PAINT const pCanvas = document.getElementById('paintCanvas'); const pCtx = pCanvas.getContext('2d'); let painting = false; pCanvas.addEventListener('mousedown', (e) => { painting = true; drawPaint(e); }); pCanvas.addEventListener('mousemove', drawPaint); window.addEventListener('mouseup', () => { painting = false; pCtx.beginPath(); }); function drawPaint(e) { if (!painting) return; const rect = pCanvas.getBoundingClientRect(); pCtx.lineWidth = document.getElementById('paintSize').value; pCtx.lineCap = 'round'; pCtx.strokeStyle = document.getElementById('paintColor').value; pCtx.lineTo(e.clientX - rect.left, e.clientY - rect.top); pCtx.stroke(); pCtx.beginPath(); pCtx.moveTo(e.clientX - rect.left, e.clientY - rect.top); } function clearPaintCanvas() { pCtx.clearRect(0, 0, pCanvas.width, pCanvas.height); } function savePaintToGallery() { const dataUrl = pCanvas.toDataURL('image/png'); vfs.gallery['February 2017'].unshift(dataUrl); showToast('🎨 Artwork saved to Files → Sample Photos (Gallery)!'); openWindow('files'); navigateFiles('gallery'); } // CALCULATOR let calcExpr = ''; function calcInput(v) { playTone(500, 0.03); const scr = document.getElementById('calcScreen'); if (v === 'C') { calcExpr = ''; scr.innerText = '0'; return; } if (v === '=') { try { calcExpr = String(eval(calcExpr)); scr.innerText = calcExpr; } catch { scr.innerText = 'Error'; calcExpr = ''; } return; } calcExpr += v; scr.innerText = calcExpr; } // COPILOT AI function runCopilotPrompt(text) { document.getElementById('copilotInput').value = text; sendCopilotMsg(); } function sendCopilotMsg() { const inp = document.getElementById('copilotInput'); const q = inp.value.trim(); if (!q) return; inp.value = ''; const chat = document.getElementById('copilotChat'); chat.innerHTML += `<div class="bg-blue-600 text-white p-2.5 rounded-xl ml-8">${q}</div>`; let reply = "I've executed that action for you on Abdi's PC!"; const low = q.toLowerCase(); if (low.includes('excel')) { openWindow('office'); switchOfficeApp('excel'); reply = '📗 Opened Microsoft Excel 365.'; } else if (low.includes('word')) { openWindow('office'); switchOfficeApp('word'); reply = '📘 Opened Microsoft Word 365.'; } else if (low.includes('purble') || low.includes('game') || low.includes('mine')) { openWindow('games'); switchGame(low.includes('purble') ? 'purble' : 'minesweeper'); reply = '🎮 Launched Windows 7 Games Explorer!'; } else if (low.includes('dark')) { toggleDarkMode(document.getElementById('qs-dark-btn')); reply = '🌙 Toggled system Dark Mode.'; } else if (low.includes('photo') || low.includes('gallery')) { openWindow('files'); navigateFiles('gallery'); reply = '🖼️ Opened Sample Photos in Gallery.'; } setTimeout(() => { chat.innerHTML += `<div class="bg-slate-100 text-slate-800 p-2.5 rounded-xl mr-8">${reply}</div>`; chat.scrollTop = chat.scrollHeight; }, 250); } // TERMINAL function execTerminal(inp) { const cmd = inp.value.trim().toLowerCase(); inp.value = ''; const out = document.getElementById('terminalOutput'); out.innerHTML += `<div class="text-white">PS C:\\Users\\Abdi&gt; ${cmd}</div>`; if (cmd === 'clear') { out.innerHTML = ''; return; } else if (cmd === 'games') { openWindow('games'); out.innerHTML += `<div>Launching Windows 7 Games Hub...</div>`; } else if (cmd === 'apps' || cmd === 'office') { openWindow('office'); out.innerHTML += `<div>Launching Microsoft Office 365...</div>`; } else if (cmd === 'matrix') { out.innerHTML += `<div class="text-emerald-300">01000001 01000010 01000100 01001001 — SYSTEM ONLINE</div>`; } else { out.innerHTML += `<div>Active OS: Windows 12 Concept • User: Abdi • Commands: games, office, matrix, clear</div>`; } out.scrollTop = out.scrollHeight; } // MEDIA PLAYER SYNTH let synthInterval = null; const tracks = ['Fluent Horizon (Ambient Synth)', 'Tokyo Aero Glass (Chime Mix)', 'Seoul 17° Cloudy Lo-Fi']; let trackIdx = 0; function toggleMediaSynth() { const btn = document.getElementById('mediaPlayBtn'); const disc = document.getElementById('mediaDisc'); if (synthInterval) { clearInterval(synthInterval); synthInterval = null; btn.innerText = '▶'; disc.classList.remove('animate-spin'); } else { btn.innerText = '⏸'; disc.classList.add('animate-spin'); const notes = [261.6, 329.6, 392.0, 523.2, 659.2, 523.2, 392.0]; let step = 0; synthInterval = setInterval(() => { playTone(notes[step % notes.length], 0.25, 'sine'); step++; }, 320); } } function switchMediaTrack(dir) { trackIdx = (trackIdx + dir + tracks.length) % tracks.length; document.getElementById('mediaTrackTitle').innerText = tracks[trackIdx]; playTone(480, 0.08); } /* ----------------------------------------------------------- 9. QUICK SETTINGS & PERSONALISATION ------------------------------------------------------------ */ function toggleQuickBtn(btn, msg) { playTone(540, 0.05); const active = btn.classList.contains('bg-blue-600'); btn.classList.toggle('bg-blue-600', !active); btn.classList.toggle('text-white', !active); btn.classList.toggle('bg-white', active); btn.classList.toggle('text-slate-800', active); if (msg) showToast(msg); } function toggleDarkMode(btn) { document.body.classList.toggle('dark-mode'); if (btn) toggleQuickBtn(btn, document.body.classList.contains('dark-mode') ? '🌙 Dark Mode Activated' : '☀️ Light Mode Activated'); } function toggleAccessibilityMode(btn) { document.body.classList.toggle('a11y-mode'); if (btn) toggleQuickBtn(btn, '♿ High-Contrast Accessibility Mode Toggled'); } function changeBrightness(val) { document.getElementById('brightnessOverlay').style.opacity = (100 - val) / 115; } function renamePC() { const next = prompt('Rename your PC:', pcDeviceName); if (next) { pcDeviceName = next; renderSettingsWindow(); showToast('💻 PC renamed to ' + next); } } let activeThemeIndex = 0; const themes = [ { url: 'https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=2200&q=95', filter: 'hue-rotate(186deg) saturate(1.95) brightness(1.14) contrast(0.94)' }, { url: 'https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=2000&q=90', filter: 'none' }, { url: 'https://images.unsplash.com/photo-1454496522488-7a8e488e8606?auto=format&fit=crop&w=2000&q=90', filter: 'saturate(1.25) brightness(1.05)' }, { url: 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=2000&q=90', filter: 'hue-rotate(165deg) saturate(1.4)' }, { url: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=2000&q=90', filter: 'none' }, { url: 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=2000&q=90', filter: 'none' } ]; function setTheme(idx) { activeThemeIndex = idx; const wp = document.getElementById('wallpaper'); wp.style.backgroundImage = `url('${themes[idx].url}')`; wp.style.filter = themes[idx].filter; renderSettingsWindow(); showToast('🖌️ Desktop wallpaper updated!'); } function showToast(msg) { const t = document.getElementById('osToast'); t.innerHTML = `<span>✨</span><span>${msg}</span>`; t.classList.remove('hidden'); clearTimeout(window.toastTimer); window.toastTimer = setTimeout(() => t.classList.add('hidden'), 2800); } // Initialize OS State on Load window.addEventListener('DOMContentLoaded', () => { renderFilesTabs(); renderFilesWindow(); renderSettingsWindow(); initMinesweeper(); initPurblePlace(); if (window.lucide) lucide.createIcons(); }); </script> </body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Windows 11/12 Concept OS — Ultimate Pixel-Perfect Edition</title>
<!-- External Libraries -->
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<style>
* {
user-select: none;
box-sizing: border-box;
font-family: 'Segoe UI Variable Display', 'Segoe UI', 'Plus Jakarta Sans', -apple-system, sans-serif;
}
body, html {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
background-color: #c2e0ff;
}
/* Pixel-Perfect Surreal Blue Infrared Landscape Wallpaper */
#wallpaper {
position: fixed;
inset: 0;
background-image: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=2200&q=95');
background-size: cover;
background-position: center 42%;
filter: hue-rotate(186deg) saturate(1.95) brightness(1.14) contrast(0.94);
transition: filter 0.5s ease, background-image 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
z-index: 0;
}
#wallpaper::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(225, 242, 255, 0.48) 0%, rgba(185, 222, 255, 0.12) 52%, rgba(20, 105, 215, 0.28) 100%);
pointer-events: none;
}
/* Mica & Acrylic Glassmorphism */
.mica-panel {
background: linear-gradient(160deg, rgba(245, 250, 255, 0.82) 0%, rgba(230, 242, 255, 0.76) 100%);
backdrop-filter: blur(32px) saturate(190%);
-webkit-backdrop-filter: blur(32px) saturate(190%);
border: 1px solid rgba(255, 255, 255, 0.72);
box-shadow: 0 24px 60px rgba(0, 35, 90, 0.18), 0 2px 12px rgba(0, 0, 0, 0.05);
}
.mica-window {
background: linear-gradient(135deg, rgba(228, 240, 255, 0.82) 0%, rgba(244, 249, 255, 0.88) 100%);
backdrop-filter: blur(36px) saturate(200%);
-webkit-backdrop-filter: blur(36px) saturate(200%);
border: 1px solid rgba(255, 255, 255, 0.8);
box-shadow: 0 28px 70px rgba(8, 38, 88, 0.24), 0 4px 16px rgba(0, 0, 0, 0.06);
}
.taskbar-glass {
background: rgba(232, 242, 255, 0.68);
backdrop-filter: blur(28px) saturate(190%);
border-top: 1px solid rgba(255, 255, 255, 0.68);
}
.pill-glass {
background: rgba(255, 255, 255, 0.76);
border: 1px solid rgba(255, 255, 255, 0.88);
box-shadow: 0 2px 10px rgba(0, 35, 90, 0.06);
}
/* Dark Mode Overrides */
body.dark-mode .mica-panel,
body.dark-mode .mica-window {
background: linear-gradient(135deg, rgba(20, 26, 40, 0.86) 0%, rgba(28, 36, 54, 0.90) 100%);
border-color: rgba(255, 255, 255, 0.12);
color: #f1f5f9;
}
body.dark-mode .window-inner-content {
background: rgba(26, 34, 50, 0.95) !important;
border-color: rgba(255, 255, 255, 0.08) !important;
color: #f1f5f9 !important;
}
body.dark-mode .card-surface {
background: rgba(38, 48, 70, 0.85) !important;
border-color: rgba(255, 255, 255, 0.09) !important;
color: #f1f5f9 !important;
}
body.dark-mode .taskbar-glass {
background: rgba(15, 20, 32, 0.78);
border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .pill-glass {
background: rgba(30, 38, 56, 0.88);
border-color: rgba(255, 255, 255, 0.14);