<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NEXOS - Next Evolution Operating System</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', sans-serif;
        }

        :root {
            --primary-bg: #1a1b1e;
            --secondary-bg: #2d2e32;
            --accent-color: #00a8ff;
            --text-primary: #ffffff;
            --text-secondary: #b3b3b3;
            --taskbar-height: 50px;
            --sidebar-width: 300px;
        }

        body {
            background: var(--primary-bg);
            color: var(--text-primary);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        /* Desktop */
        .desktop {
            flex: 1;
            position: relative;
            overflow: hidden;
            background: url('https://picsum.photos/3840/2160?random=1') center/cover;
            padding: 20px;
        }

        /* Taskbar */
        .taskbar {
            height: var(--taskbar-height);
            background: rgba(26, 27, 30, 0.8);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            padding: 0 20px;
            z-index: 1000;
        }

        .start-button {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: var(--accent-color);
            margin-right: 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
        }

        .start-button:hover {
            background: #0088cc;
        }

        .taskbar-apps {
            display: flex;
            gap: 10px;
            flex: 1;
        }

        .taskbar-app {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: 0.3s;
        }

        .taskbar-app:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .system-tray {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        /* Start Menu */
        .start-menu {
            position: absolute;
            bottom: var(--taskbar-height);
            left: 20px;
            width: 600px;
            height: 500px;
            background: rgba(26, 27, 30, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 15px;
            padding: 20px;
            display: none;
            animation: slideUp 0.3s ease;
            z-index: 1000;
        }

        .start-menu.active {
            display: block;
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            right: 0;
            top: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: rgba(26, 27, 30, 0.95);
            backdrop-filter: blur(20px);
            padding: 20px;
            transform: translateX(100%);
            transition: 0.3s;
            z-index: 900;
        }

        .sidebar.active {
            transform: translateX(0);
        }

        /* Windows */
        .window {
            position: absolute;
            background: rgba(45, 46, 50, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 10px;
            min-width: 400px;
            min-height: 300px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            display: flex;
            flex-direction: column;
        }

        .window-header {
            padding: 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(26, 27, 30, 0.5);
            border-radius: 10px 10px 0 0;
        }

        .window-title {
            font-size: 14px;
            font-weight: 500;
        }

        .window-controls {
            display: flex;
            gap: 8px;
        }

        .window-button {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            cursor: pointer;
        }

        .window-close { background: #ff5f56; }
        .window-minimize { background: #ffbd2e; }
        .window-maximize { background: #27c93f; }

        .window-content {
            flex: 1;
            padding: 20px;
            overflow: auto;
        }

        /* Widgets */
        .widget {
            background: rgba(45, 46, 50, 0.8);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 15px;
            margin-bottom: 15px;
        }

        /* Animations */
        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Desktop Icons */
        .desktop-icons {
            display: grid;
            grid-template-columns: repeat(auto-fill, 100px);
            gap: 20px;
            padding: 20px;
        }

        .desktop-icon {
            width: 100px;
            height: 100px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: 0.3s;
        }

        .desktop-icon:hover {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

        .icon-image {
            width: 48px;
            height: 48px;
            background: var(--accent-color);
            border-radius: 10px;
            margin-bottom: 8px;
        }

        .icon-name {
            font-size: 12px;
            text-align: center;
            color: var(--text-primary);
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        /* Context Menu */
        .context-menu {
            position: fixed;
            background: rgba(45, 46, 50, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 8px;
            padding: 5px;
            min-width: 200px;
            display: none;
            z-index: 1100;
        }

        .context-menu.active {
            display: block;
        }

        .context-menu-item {
            padding: 8px 15px;
            cursor: pointer;
            border-radius: 4px;
            transition: 0.2s;
        }

        .context-menu-item:hover {
            background: var(--accent-color);
        }

        /* Notifications */
        .notification {
            position: fixed;
            right: 20px;
            bottom: 70px;
            background: rgba(45, 46, 50, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 10px;
            padding: 15px;
            width: 300px;
            animation: slideIn 0.3s ease;
            z-index: 1200;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* System Apps */
        .system-app {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .app-toolbar {
            padding: 10px;
            background: rgba(26, 27, 30, 0.3);
            display: flex;
            gap: 10px;
        }

        .app-content {
            flex: 1;
            padding: 20px;
            overflow: auto;
        }

        /* Terminal */
        .terminal {
            background: #1a1b1e;
            color: #00ff00;
            font-family: monospace;
            padding: 10px;
            height: 100%;
            overflow: auto;
        }

        .terminal-input {
            background: transparent;
            border: none;
            color: #00ff00;
            width: 100%;
            outline: none;
            font-family: monospace;
        }

        /* File Manager */
        .file-manager {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 15px;
            padding: 15px;
        }

        .file-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px;
            border-radius: 8px;
            cursor: pointer;
            transition: 0.2s;
        }

        .file-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* Settings */
        .settings {
            padding: 20px;
        }

        .settings-group {
            margin-bottom: 20px;
        }

        .settings-title {
            font-size: 18px;
            margin-bottom: 10px;
        }

        .settings-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            margin-bottom: 5px;
        }

        /* App Store */
        .app-store {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 20px;
            padding: 20px;
        }

        .app-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 15px;
            transition: 0.3s;
        }

        .app-card:hover {
            transform: translateY(-5px);
            background: rgba(255, 255, 255, 0.1);
        }

    </style>
</head>
<body>
    <!-- Desktop -->
    <div class="desktop">
        <!-- Desktop Icons -->
        <div class="desktop-icons">
            <div class="desktop-icon">
                <div class="icon-image"></div>
                <div class="icon-name">Files</div>
            </div>
            <div class="desktop-icon">
                <div class="icon-image"></div>
                <div class="icon-name">Terminal</div>
            </div>
            <div class="desktop-icon">
                <div class="icon-image"></div>
                <div class="icon-name">Settings</div>
            </div>
            <div class="desktop-icon">
                <div class="icon-image"></div>
                <div class="icon-name">App Store</div>
            </div>
        </div>

        <!-- Windows -->
        <div class="window" style="top: 100px; left: 100px;">
            <div class="window-header">
                <div class="window-title">Terminal</div>
                <div class="window-controls">
                    <div class="window-button window-minimize"></div>
                    <div class="window-button window-maximize"></div>
                    <div class="window-button window-close"></div>
                </div>
            </div>
            <div class="window-content">
                <div class="terminal">
                    <div class="terminal-output">Welcome to NEXOS Terminal</div>
                    <input type="text" class="terminal-input" placeholder="Enter command...">
                </div>
            </div>
        </div>
    </div>

    <!-- Taskbar -->
    <div class="taskbar">
        <div class="start-button"></div>
        <div class="taskbar-apps">
            <div class="taskbar-app"></div>
            <div class="taskbar-app"></div>
            <div class="taskbar-app"></div>
        </div>
        <div class="system-tray">
            <div class="system-tray-item">🔊</div>
            <div class="system-tray-item">📶</div>
            <div class="system-tray-item">🔋</div>
            <div class="system-tray-item">12:00</div>
        </div>
    </div>

    <!-- Start Menu -->
    <div class="start-menu">
        <div class="search-box">
            <input type="text" placeholder="Search apps, files, and web">
        </div>
        <div class="app-grid">
            <!-- App icons will be populated here -->
        </div>
    </div>

    <!-- Sidebar -->
    <div class="sidebar">
        <div class="notifications">
            <h3>Notifications</h3>
            <!-- Notifications will be populated here -->
        </div>
        <div class="quick-settings">
            <h3>Quick Settings</h3>
            <!-- Quick settings toggles -->
        </div>
    </div>

    <!-- Context Menu -->
    <div class="context-menu">
        <div class="context-menu-item">New Folder</div>
        <div class="context-menu-item">New File</div>
        <div class="context-menu-item">Refresh</div>
        <div class="context-menu-item">Display Settings</div>
        <div class="context-menu-item">Personalize</div>
    </div>

    <script>
        // Start Menu Toggle
        const startButton = document.querySelector('.start-button');
        const startMenu = document.querySelector('.start-menu');

        startButton.addEventListener('click', () => {
            startMenu.classList.toggle('active');
        });

        // Window Management
        const windows = document.querySelectorAll('.window');
        windows.forEach(window => {
            let isDragging = false;
            let currentX;
            let currentY;
            let initialX;
            let initialY;
            let xOffset = 0;
            let yOffset = 0;

            const header = window.querySelector('.window-header');

            header.addEventListener('mousedown', dragStart);
            document.addEventListener('mousemove', drag);
            document.addEventListener('mouseup', dragEnd);

            function dragStart(e) {
                initialX = e.clientX - xOffset;
                initialY = e.clientY - yOffset;

                if (e.target === header) {
                    isDragging = true;
                }
            }

            function drag(e) {
                if (isDragging) {
                    e.preventDefault();
                    currentX = e.clientX - initialX;
                    currentY = e.clientY - initialY;

                    xOffset = currentX;
                    yOffset = currentY;

                    setTranslate(currentX, currentY, window);
                }
            }

            function setTranslate(xPos, yPos, el) {
                el.style.transform = `translate(${xPos}px, ${yPos}px)`;
            }

            function dragEnd(e) {
                initialX = currentX;
                initialY = currentY;
                isDragging = false;
            }
        });

        // Context Menu
        const desktop = document.querySelector('.desktop');
        const contextMenu = document.querySelector('.context-menu');

        desktop.addEventListener('contextmenu', (e) => {
            e.preventDefault();
            contextMenu.style.display = 'block';
            contextMenu.style.left = `${e.clientX}px`;
            contextMenu.style.top = `${e.clientY}px`;
        });

        document.addEventListener('click', () => {
            contextMenu.style.display = 'none';
        });

        // Terminal Functionality
        const terminalInput = document.querySelector('.terminal-input');
        const terminalOutput = document.querySelector('.terminal-output');

        terminalInput.addEventListener('keypress', (e) => {
            if (e.key === 'Enter') {
                const command = terminalInput.value;
                terminalOutput.innerHTML += `<div>$ ${command}</div>`;
                // Add command processing logic here
                terminalInput.value = '';
            }
        });

        // Notification System
        function showNotification(message) {
            const notification = document.createElement('div');
            notification.className = 'notification';
            notification.textContent = message;
            document.body.appendChild(notification);

            setTimeout(() => {
                notification.remove();
            }, 3000);
        }

        // Example usage
        setTimeout(() => {
            showNotification('Welcome to NEXOS!');
        }, 2000);
    </script>
</body>
</html>