        :root {
            /* Core Colors */
            --bg-dark: #09090b;
            --sidebar-bg: #000000;
            --surface-light: #18191E;
            /* Message Bubble */
            --border: #27272a;

            /* Dev Mode Colors */
            --accent-primary: #7C3AED;
            --accent-secondary: #2563EB;
            --text-main: #ececf1;
            --text-muted: #a1a1aa;

            /* Phantom Mode Colors */
            --phantom-red: #EF4444;
            --phantom-dark: #7f1d1d;

            /* Font */
            --font-main: 'Inter', sans-serif;
            --font-code: 'JetBrains Mono', monospace;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes pulse {

            0%,
            100% {
                box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 40px rgba(118, 75, 162, 0.4);
            }

            50% {
                box-shadow: 0 0 30px rgba(102, 126, 234, 0.8), 0 0 60px rgba(118, 75, 162, 0.6);
            }
        }

        /* --- GLOBAL RESET & LAYOUT --- */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background-color: var(--bg-dark);
            color: var(--text-main);
            font-family: var(--font-main);
            height: 100vh;
            display: flex;
            overflow: hidden;
            /* App-like feel */
        }

        /* --- SIDEBAR --- */
        .sidebar {
            width: 260px;
            background: var(--sidebar-bg);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            padding: 10px;
            flex-shrink: 0;
            z-index: 20;
        }

        .right-sidebar {
            width: 250px;
            background: #000000;
            border-left: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            padding: 0;
            flex-shrink: 0;
            transition: width 0.3s ease;
            overflow: hidden;
            display: none;
            /* Hidden by default until files exist */
        }

        .right-sidebar.active {
            display: flex;
        }

        .file-explorer-header {
            padding: 15px;
            border-bottom: 1px solid var(--border);
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
            letter-spacing: 0.5px;
        }

        .file-item {
            padding: 8px 15px;
            font-family: var(--font-code);
            font-size: 0.8rem;
            color: var(--text-muted);
            cursor: pointer;
            border-bottom: 1px solid rgba(255, 255, 255, 0.02);
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background 0.2s;
        }

        .file-item:hover {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-main);
        }

        .file-actions {
            padding: 15px;
            border-top: 1px solid var(--border);
            margin-top: auto;
        }

        .brand {
            padding: 15px;
            font-weight: 700;
            font-size: 1.1rem;
            letter-spacing: -0.5px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: white;
        }

        .new-chat-btn {
            background: white;
            color: black;
            border: none;
            padding: 10px;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            margin-bottom: 20px;
            transition: opacity 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .new-chat-btn:hover {
            opacity: 0.9;
        }

        .history-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .history-item {
            padding: 10px;
            border-radius: 6px;
            font-size: 0.9rem;
            color: var(--text-muted);
            cursor: pointer;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: background 0.2s;
            position: relative;
        }

        .history-item:hover {
            background: rgba(255, 255, 255, 0.05);
            color: white;
        }

        .history-item.active {
            background: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .working-indicator {
            position: absolute;
            right: 8px;
            top: 10px;
            font-size: 0.8rem;
        }

        /* --- TOGGLE AREA (BOTTOM LEFT) --- */
        .mode-toggle-area {
            margin-top: auto;
            border-top: 1px solid var(--border);
            padding: 15px 5px;
        }

        .mode-card {
            background: #1e1e24;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .mode-info small {
            color: #666;
            font-size: 0.7rem;
        }

        .mode-name {
            font-weight: bold;
            font-size: 0.9rem;
            margin-bottom: 2px;
        }

        /* Dynamic Mode Styles */
        body.mode-dev .mode-card {
            border-color: var(--accent-primary);
            box-shadow: 0 0 10px rgba(124, 58, 237, 0.1);
        }

        body.mode-hack .mode-card {
            border-color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
        }

        body.mode-hack .mode-name {
            color: #ef4444 !important;
            text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
        }

        /* HIDE DEV TOOLS IN HACK MODE */
        body.mode-hack .right-sidebar,
        body.mode-hack #pipeline-toggle-btn,
        body.mode-hack #task-selector-area,
        body.mode-hack #designer-3d-btn,
        body.mode-hack #enhance-mode-btn {
            display: none !important;
        }

        body.mode-hack .main-col {
            border-right: none !important;
        }

        /* --- MAIN CONTENT AREA --- */
        .main-col {
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
            background: var(--bg-dark);
        }

        /* Top Bar */
        .top-bar {
            height: 50px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .model-badge {
            background: rgba(255, 255, 255, 0.1);
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            margin-left: 8px;
        }

        /* SCROLLABLE CHAT AREA */
        .chat-scroll-area {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            /* Center the chat column */
        }

        .chat-container {
            width: 100%;
            max-width: 800px;
            /* ChatGPT Standard Layout */
            display: flex;
            flex-direction: column;
            padding-bottom: 150px;
            /* Space for input */
        }

        /* MESSAGES */
        .message-row {
            display: flex;
            width: 100%;
            margin-bottom: 24px;
            animation: fadeIn 0.3s ease;
        }

        /* User Row (Right Aligned) */
        .message-row.user {
            justify-content: flex-end;
        }

        /* AI Row (Left Aligned) */
        .message-row.ai {
            justify-content: flex-start;
        }

        /* Content Bubble */
        .bubble-content {
            max-width: 85%;
            font-size: 1rem;
            line-height: 1.6;
            word-wrap: break-word;
        }

        .message-row.user .bubble-content {
            background: #2f2f35;
            /* User Bubble */
            padding: 10px 16px;
            border-radius: 12px;
            border-top-right-radius: 2px;
            color: white;
        }

        .message-row.ai .bubble-content {
            background: transparent;
            /* AI = Text Only */
            padding: 0 10px;
            color: #d1d5db;
        }

        /* Avatars */
        .avatar {
            width: 30px;
            height: 30px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: bold;
            flex-shrink: 0;
            color: white;
        }

        .message-row.user .avatar {
            margin-left: 12px;
            background: #5436DA;
            /* User Purple */
            order: 2;
            /* Ensure avatar is to the right of bubble */
        }

        .message-row.ai .avatar {
            margin-right: 12px;
            background: #10a37f;
            /* Standard AI Green */
        }

        /* --- WORMGPT STYLE OVERRIDES (HACK MODE) --- */
        body.mode-hack {
            background-color: #000000;
            background-image: linear-gradient(0deg, transparent 24%, rgba(255, 0, 0, 0.03) 25%, rgba(255, 0, 0, 0.03) 26%, transparent 27%, transparent 74%, rgba(255, 0, 0, 0.03) 75%, rgba(255, 0, 0, 0.03) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 0, 0, 0.03) 25%, rgba(255, 0, 0, 0.03) 26%, transparent 27%, transparent 74%, rgba(255, 0, 0, 0.03) 75%, rgba(255, 0, 0, 0.03) 76%, transparent 77%, transparent);
            background-size: 50px 50px;
        }

        /* Red Accents for WormGPT */
        body.mode-hack .message-row.ai .avatar {
            /* Changed from .avatar.ai to match existing structure */
            background: #ff0000;
            /* Pure Red */
            box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
        }

        body.mode-hack .message-row.user .bubble-content {
            /* Changed from .message.user-row .msg-bubble to match existing structure */
            background: #2b0a0a;
            /* Dark Red/Black for User */
            color: #ffcccc;
            border: 1px solid #5a1e1e;
        }

        body.mode-hack .code-wrapper {
            /* Changed from .code-container to match existing structure */
            border: 1px solid #ff0000;
            box-shadow: 0 0 5px rgba(255, 0, 0, 0.2);
        }

        body.mode-hack .code-header {
            background: #300a0a;
            color: #ff8888;
        }

        body.mode-hack .code-body {
            /* Keep readable but techy */
            color: #ff4444;
            font-family: 'JetBrains Mono', monospace;
        }

        /* User still wants colored code in Hack Mode, let's keep it subtle or green if requested, but user said 'like ChatGPT' */
        .code-wrapper {
            margin-top: 10px;
            background: #0d0d0d;
            border: 1px solid #333;
            border-radius: 6px;
            overflow: hidden;
            font-family: var(--font-code);
        }

        .code-header {
            background: #2d2d2d;
            padding: 5px 12px;
            font-size: 0.75rem;
            color: #bbb;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .code-copy-btn {
            background: transparent;
            border: none;
            color: #bbb;
            cursor: pointer;
            font-size: 0.7rem;
        }

        .code-copy-btn:hover {
            color: white;
        }

        .code-body {
            padding: 15px;
            overflow-x: auto;
            color: #e5e5e5;
            font-size: 0.9rem;
        }

        /* Phantom Matrix Code Style */
        body.mode-hack .code-body {
            color: #00ff41;
            /* Digital Green */
            text-shadow: 0 0 2px rgba(0, 255, 65, 0.2);
        }

        /* --- INPUT AREA --- */
        .input-area {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, var(--bg-dark) 80%, transparent);
            padding: 20px;
            display: flex;
            justify-content: center;
        }

        .input-box-wrapper {
            width: 100%;
            max-width: 800px;
            position: relative;
        }

        .chat-input {
            width: 100%;
            background: #40414f;
            border: 1px solid #303139;
            color: white;
            padding: 14px 45px 14px 16px;
            border-radius: 12px;
            font-family: inherit;
            font-size: 1rem;
            resize: none;
            height: 52px;
            max-height: 200px;
            outline: none;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }

        .chat-input:focus {
            background: #2f2f35;
            border-color: #555;
        }

        .stop-btn {
            position: absolute;
            right: 50px;
            /* Left of send btn */
            bottom: 10px;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid #EF4444;
            color: #EF4444;
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            display: none;
            /* Hidden by default */
        }

        .stop-btn:hover {
            background: rgba(239, 68, 68, 0.2);
        }

        .stop-btn.visible {
            display: block;
        }

        .send-btn {
            position: absolute;
            right: 10px;
            bottom: 10px;
            background: transparent;
            border: none;
            color: #8e8ea0;
            cursor: pointer;
            padding: 5px;
        }

        .send-btn:hover {
            color: white;
        }

        .send-btn.active {
            color: var(--accent-primary);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* === MODERN BUTTON LIBRARY === */
        button,
        .btn,
        .dash-btn {
            touch-action: manipulation;
        }

        /* Base Button */
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            font-family: 'Inter', sans-serif;
        }

        /* 1. Glassmorphism Button */
        .btn-glass {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .btn-glass:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
        }

        .btn-glass:active {
            transform: translateY(0);
        }

        /* 2. Neon Glow Button */
        .btn-neon {
            background: transparent;
            border: 2px solid #00ff88;
            color: #00ff88;
            text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
            box-shadow: 0 0 10px rgba(0, 255, 136, 0.3),
                inset 0 0 10px rgba(0, 255, 136, 0.1);
        }

        .btn-neon:hover {
            background: rgba(0, 255, 136, 0.1);
            box-shadow: 0 0 20px rgba(0, 255, 136, 0.6),
                0 0 40px rgba(0, 255, 136, 0.4),
                inset 0 0 20px rgba(0, 255, 136, 0.2);
            transform: scale(1.05);
        }

        /* 3. Gradient Button */
        .btn-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-gradient:hover {
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
            transform: translateY(-2px);
        }

        .btn-gradient::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        .btn-gradient:hover::before {
            left: 100%;
        }

        /* 4. Magnetic Button */
        .btn-magnetic {
            background: #18181b;
            border: 1px solid #3f3f46;
            color: white;
            transition: all 0.2s ease;
        }

        .btn-magnetic:hover {
            background: #27272a;
            border-color: #52525b;
            box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
        }

        /* 5. Pulse Button */
        .btn-pulse {
            background: #ef4444;
            border: none;
            color: white;
            animation: pulse-ring 2s infinite;
        }

        @keyframes pulse-ring {

            0%,
            100% {
                box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
            }

            50% {
                box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
            }
        }

        .btn-pulse:hover {
            background: #dc2626;
            transform: scale(1.05);
        }

        /* 6. 3D Button */
        .btn-3d {
            background: linear-gradient(to bottom, #6366f1, #4f46e5);
            border: none;
            color: white;
            box-shadow: 0 6px 0 #3730a3, 0 8px 15px rgba(0, 0, 0, 0.3);
            transform: translateY(0);
        }

        .btn-3d:hover {
            transform: translateY(2px);
            box-shadow: 0 4px 0 #3730a3, 0 6px 10px rgba(0, 0, 0, 0.3);
        }

        .btn-3d:active {
            transform: translateY(6px);
            box-shadow: 0 0 0 #3730a3, 0 2px 5px rgba(0, 0, 0, 0.3);
        }

        /* 7. Outline Button */
        .btn-outline {
            background: transparent;
            border: 2px solid #8b5cf6;
            color: #8b5cf6;
        }

        .btn-outline:hover {
            background: #8b5cf6;
            color: white;
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
        }

        /* 8. Shimmer Button */
        .btn-shimmer {
            background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
            background-size: 200% 100%;
            border: 1px solid #475569;
            color: white;
            animation: shimmer 3s infinite;
        }

        @keyframes shimmer {

            0%,
            100% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }
        }

        .btn-shimmer:hover {
            border-color: #64748b;
            box-shadow: 0 0 20px rgba(100, 116, 139, 0.4);
        }

        /* 9. Icon Button */
        .btn-icon {
            width: 48px;
            height: 48px;
            padding: 0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 1.2rem;
        }

        .btn-icon:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: rotate(15deg) scale(1.1);
        }

        /* 10. Loading Button */
        .btn-loading {
            background: #3b82f6;
            border: none;
            color: white;
            position: relative;
        }

        .btn-loading::after {
            content: '';
            position: absolute;
            width: 16px;
            height: 16px;
            top: 50%;
            left: 50%;
            margin-left: -8px;
            margin-top: -8px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            opacity: 0;
        }

        .btn-loading.loading::after {
            opacity: 1;
        }

        .btn-loading.loading {
            color: transparent;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* --- SETTINGS MODAL --- */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 100;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay.visible {
            display: flex;
        }

        .modal {
            background: #18181b;
            width: 400px;
            border-radius: 12px;
            border: 1px solid var(--border);
            padding: 20px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--border);
            padding-bottom: 10px;
        }

        .modal-title {
            font-weight: bold;
            font-size: 1.1rem;
            color: white;
        }

        .close-modal {
            background: none;
            border: none;
            color: #aaa;
            cursor: pointer;
            font-size: 1.2rem;
        }

        .close-modal:hover {
            color: white;
        }

        .setting-group {
            margin-bottom: 20px;
        }

        .setting-label {
            display: block;
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-bottom: 8px;
        }

        /* Code Blocks - Mini IDE Style */
        .message-row pre {
            background: #1e1e1e;
            color: #d4d4d4;
            /* VS Code Text */
            padding: 15px;
            padding-top: 40px;
            /* Space for header */
            border-radius: 8px;
            overflow-x: auto;
            position: relative;
            border: 1px solid #333;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            margin: 10px 0;
        }

        .message-row pre::before {
            content: "● ● ●  Live Code";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 32px;
            background: #252526;
            border-bottom: 1px solid #333;
            border-radius: 8px 8px 0 0;
            color: #666;
            font-size: 10px;
            display: flex;
            align-items: center;
            padding-left: 15px;
            letter-spacing: 2px;
            font-family: sans-serif;
        }

        .message-row code {
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 0.9rem;
        }

        .stats-card {
            background: #27272a;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 10px;
        }

        .stat-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
            font-size: 0.9rem;
        }

        .progress-bar {
            height: 6px;
            background: #444;
            border-radius: 3px;
            overflow: hidden;
            margin-top: 5px;
        }

        .progress-fill {
            height: 100%;
            background: var(--accent-primary);
            width: 0%;
            transition: width 0.5s;
        }

        .sidebar-controls {
            margin-top: auto;
            border-top: 1px solid var(--border);
            padding: 10px 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .settings-trigger {
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 10px;
            text-align: left;
            border-radius: 6px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.9rem;
        }

        .settings-trigger:hover {
            background: rgba(255, 255, 255, 0.05);
            color: white;
        }

        .delete-chat-btn {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            border: none;
            color: #ef4444;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .history-item:hover .delete-chat-btn {
            opacity: 1;
        }

        .delete-chat-btn:hover {
            background: #ef4444;
            color: white;
        }

        .delete-chat-btn:hover {
            background: #ef4444;
            color: white;
        }

        /* --- SUBSCRIPTION DASHBOARD --- */
        .dash-layout {
            display: flex;
            gap: 20px;
        }

        .dash-sidebar {
            width: 120px;
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .dash-btn {
            background: transparent;
            border: none;
            color: #888;
            text-align: left;
            padding: 10px;
            cursor: pointer;
            border-radius: 6px;
        }

        .dash-btn.active {
            background: #27272a;
            color: white;
            font-weight: bold;
        }

        .dash-content {
            flex: 1;
        }

        .plan-card {
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 15px;
            background: #202022;
            margin-bottom: 10px;
            position: relative;
            overflow: hidden;
        }

        .plan-card.premium {
            border-color: var(--accent-primary);
            background: linear-gradient(145deg, rgba(124, 58, 237, 0.1), transparent);
        }

        .plan-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--accent-primary);
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 4px;
        }

        .usage-meter {
            height: 8px;
            background: #333;
            border-radius: 4px;
            overflow: hidden;
            margin: 10px 0;
        }

        .usage-fill {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
            width: 0%;
            transition: width 1s ease;
        }

        .upgrade-hero {
            text-align: center;
            padding: 20px;
            background: linear-gradient(135deg, #1e1e2e, #000);
            border-radius: 12px;
            border: 1px solid #333;
            margin-top: 15px;
        }

        .upgrade-btn {
            background: var(--accent-primary);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 6px;
            font-weight: bold;
            cursor: pointer;
            margin-top: 10px;
            transition: transform 0.2s;
        }

        .upgrade-btn:hover {
            transform: scale(1.05);
        }

        /* --- TASK SELECTOR --- */
        .mode-selector-group {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-right: 25px;
        }

        .mode-selector-group .label {
            color: #aaa;
            font-size: 0.8em;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .task-dropdown {
            appearance: none;
            -webkit-appearance: none;
            background-color: rgba(39, 39, 42, 0.6);
            /* White Arrow Icon */
            background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 10px;

            color: white;
            border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 8px 35px 8px 15px;
            border-radius: 20px;
            outline: none;
            font-family: 'Inter', sans-serif;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(4px);
        }

        .task-dropdown:hover {
            background-color: rgba(63, 63, 70, 0.8);
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            transform: translateY(-1px);
        }

        .task-dropdown:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
        }

        .task-dropdown option {
            background-color: #18181b;
            color: white;
            padding: 10px;
        }

        .cursor-blink {
            display: inline-block;
            width: 8px;
            height: 15px;
            background: var(--accent-primary);
            animation: blink 1s step-end infinite;
            vertical-align: middle;
            margin-left: 2px;
        }

        @keyframes blink {
            50% {
                opacity: 0;
            }
        }

        /* === PROGRESS TRACKER (DARK THEME + COUNTERS) === */
        .progress-tracker {
            position: fixed;
            bottom: 100px;
            /* Above input area */
            right: 20px;
            width: 340px;
            background: rgba(24, 24, 27, 0.95);
            /* Dark Zinc Background */
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            z-index: 9999;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(12px);
            font-family: 'Inter', sans-serif;
            color: #d4d4d8;
        }

        .progress-tracker.minimized .progress-body {
            display: none;
        }

        .progress-header {
            padding: 12px 16px;
            background: rgba(39, 39, 42, 0.5);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            user-select: none;
        }

        .progress-header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .progress-title {
            font-weight: 600;
            font-size: 0.85rem;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .progress-toggle {
            background: transparent;
            border: none;
            color: #a1a1aa;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
            cursor: pointer;
        }

        .progress-toggle:hover {
            color: #fff;
        }

        /* Progress Bar & Stats */
        .progress-stats {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: #a1a1aa;
            margin-bottom: 4px;
            font-family: monospace;
        }

        .progress-bar-container {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #6366f1, #a855f7);
            width: 0%;
            transition: width 0.3s linear;
            box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
        }

        .progress-body {
            padding: 12px 16px;
            max-height: 280px;
            overflow-y: auto;
        }

        .progress-step {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 8px;
            margin-bottom: 6px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 6px;
            transition: all 0.3s;
            border: 1px solid transparent;
        }

        .progress-step.completed {
            background: rgba(34, 197, 94, 0.1);
            border-color: rgba(34, 197, 94, 0.2);
        }

        .progress-step.active {
            background: rgba(251, 191, 36, 0.1);
            border-color: rgba(251, 191, 36, 0.2);
            box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
        }

        .step-icon {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.6rem;
            font-weight: bold;
        }

        .step-icon.pending {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.4);
        }

        .step-icon.active {
            background: #fbbf24;
            color: #000;
            animation: pulse-ring 2s infinite;
        }

        .step-icon.completed {
            background: #22c55e;
            color: #fff;
        }

        .step-text {
            flex: 1;
            font-size: 0.75rem;
            line-height: 1.4;
            color: #d4d4d8;
        }

        .step-text.completed {
            color: #86efac;
        }

        @keyframes pulse-ring {
            0% {
                box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
            }

            70% {
                box-shadow: 0 0 0 6px rgba(251, 191, 36, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
            }
        }

        /* Scrollbar */
        .progress-body::-webkit-scrollbar {
            width: 4px;
        }

        .progress-body::-webkit-scrollbar-thumb {
            background: #3f3f46;
            border-radius: 2px;
        }

        /* === PROGRESS TRACKER OVERRIDE (PREMIUM NEON THEME) === */
        .progress-tracker {
            position: fixed;
            bottom: 25px;
            right: 25px;
            width: 320px;
            background: #18181b;
            /* Zinc 950 (Dark Stealth) */
            border: 1px solid #27272a;
            /* Zinc 800 (Subtle) */
            border-radius: 16px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
            z-index: 99999;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            backdrop-filter: blur(20px);
            font-family: 'Outfit', 'Inter', sans-serif;
            color: #e2e8f0;
        }

        .progress-tracker.minimized {
            width: auto;
            border-radius: 50px;
            background: rgba(15, 23, 42, 0.95);
            border-color: rgba(56, 189, 248, 0.3);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }

        .progress-tracker.minimized .progress-body,
        .progress-tracker.minimized .progress-stats,
        .progress-tracker.minimized .progress-bar-container {
            display: none;
        }

        .progress-tracker.minimized .progress-header {
            padding: 10px 20px;
            border: none;
        }

        .progress-header {
            padding: 16px 20px;
            background: #27272a;
            /* Zinc 800 */
            border-bottom: 1px solid #3f3f46;
            cursor: pointer;
            user-select: none;
        }

        .progress-header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .progress-title {
            font-weight: 700;
            font-size: 0.9rem;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 10px;
            letter-spacing: 0.5px;
            text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
        }

        #tracker-icon {
            font-size: 1.1rem;
            filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
        }

        /* Stats & Bar */
        .progress-stats {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: #94a3b8;
            margin-top: 12px;
            margin-bottom: 6px;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 500;
        }

        .progress-bar-container {
            width: 100%;
            height: 6px;
            background: rgba(15, 23, 42, 0.6);
            border-radius: 3px;
            overflow: hidden;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
            /* Cyan -> Blue -> Purple */
            background-size: 200% 100%;
            width: 0%;
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
            animation: gradientMove 2s infinite linear;
        }

        @keyframes gradientMove {
            0% {
                background-position: 100% 0;
            }

            100% {
                background-position: -100% 0;
            }
        }

        .progress-body {
            padding: 5px 0;
            max-height: 250px;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.2);
        }

        .progress-step {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            font-size: 0.8rem;
            transition: background 0.2s;
        }

        .progress-step:last-child {
            border-bottom: none;
        }

        .progress-step:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        .progress-step.active {
            background: rgba(6, 182, 212, 0.08);
            color: #fff;
            border-left: 2px solid #06b6d4;
        }

        .progress-step.completed {
            color: #10b981;
        }

        .step-icon {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            font-weight: bold;
        }

        .progress-step.active .step-icon {
            background: rgba(6, 182, 212, 0.2);
            color: #22d3ee;
            border-color: #22d3ee;
            box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
            animation: pulse-cyan 1.5s infinite;
        }

        .progress-step.completed .step-icon {
            background: rgba(16, 185, 129, 0.2);
            color: #34d399;
            border-color: #34d399;
        }

        @keyframes pulse-cyan {
            0% {
                box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4);
            }

            70% {
                box-shadow: 0 0 0 6px rgba(34, 211, 238, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
            }
        }

        /* Scrollbar */
        .progress-body::-webkit-scrollbar {
            width: 4px;
        }

        .progress-body::-webkit-scrollbar-thumb {
            background: #334155;
            border-radius: 2px;
        }

        .progress-body::-webkit-scrollbar-track {
            background: transparent;
        }


        .progress-stats {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: #a1a1aa;
            margin-top: 8px;
            margin-bottom: 4px;
            font-family: monospace;
        }

        .progress-bar-container {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #6366f1, #a855f7);
            width: 0%;
            transition: width 0.3s linear;
        }

        .progress-body {
            padding: 0;
            max-height: 200px;
            overflow-y: auto;
        }

        .progress-step {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 0.75rem;
        }

        .progress-step:last-child {
            border-bottom: none;
        }

        .progress-step.active {
            background: rgba(99, 102, 241, 0.1);
            color: #fff;
        }

        .progress-step.completed {
            color: #86efac;
        }

        .step-icon {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.6rem;
            background: rgba(255, 255, 255, 0.1);
        }

        .progress-step.active .step-icon {
            background: #6366f1;
            color: white;
            animation: pulse 1s infinite;
        }

        .progress-step.completed .step-icon {
            background: #22c55e;
            color: white;
        }

        @keyframes pulse {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }

            100% {
                opacity: 1;
            }
        }

        /* === NEW TASK BUTTONS STYLES === */
        .task-buttons {
            display: flex;
            background: #1f1f23;
            padding: 4px;
            border-radius: 8px;
            border: 1px solid #333;
            gap: 4px;
        }

        .task-btn {
            background: transparent;
            border: none;
            color: #a1a1aa;
            padding: 6px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-family: 'Inter', sans-serif;
        }

        .task-btn:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #e4e4e7;
        }

        .task-btn.active {
            color: white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            transform: translateY(-1px);
        }

        /* Color Coding */
        .task-btn[onclick*="builder"].active {
            background: #3b82f6;
        }

        /* Blue */
        .task-btn[onclick*="architect"].active {
            background: #8b5cf6;
        }

        /* Purple */
        .task-btn[onclick*="fullstack"].active {
            background: #ec4899;
        }

        /* Pink */
        .task-btn[onclick*="debugger"].active {
            background: #ef4444;
        }

        /* Red */

        /* === RIGHT SIDEBAR (PROJECT EXPLORER) === */
        .right-sidebar {
            width: 260px;
            background: #18181b;
            border-left: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            animation: slideInRight 0.3s ease;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(20px);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .file-explorer-header {
            padding: 15px;
            background: #1e1e24;
            border-bottom: 1px solid var(--border);
            font-size: 0.8rem;
            font-weight: bold;
            color: #94a3b8;
            display: flex;
            justify-content: space-between;
            align-items: center;
            letter-spacing: 1px;
        }

        .file-item {
            padding: 10px 15px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 1px solid rgba(255, 255, 255, 0.02);
            font-size: 0.85rem;
            color: #ccc;
        }

        .file-item:hover {
            background: rgba(255, 255, 255, 0.05);
            color: white;
            padding-left: 20px;
        }

        .file-item span:first-child {
            font-size: 1.1rem;
            opacity: 0.7;
        }

        .file-actions {
            padding: 15px;
            border-top: 1px solid var(--border);
            background: #18181b;
        }

        /* === ULTRA MOBILE OVERHAUL === */
        @media (max-width: 768px) {
            :root {
                --sidebar-width: 280px;
            }

            html,
            body {
                width: 100vw;
                height: 100vh;
                height: 100dvh;
                margin: 0;
                padding: 0;
                overflow: hidden;
                position: fixed;
            }

            * {
                box-sizing: border-box;
            }

            .sidebar {
                position: fixed;
                left: calc(-1 * var(--sidebar-width));
                top: 0;
                bottom: 0;
                width: var(--sidebar-width);
                z-index: 10000;
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                background: #000;
                box-shadow: none;
            }

            .sidebar.active {
                transform: translateX(var(--sidebar-width));
                box-shadow: 10px 0 50px rgba(0, 0, 0, 0.9);
            }

            .main-col {
                width: 100vw;
                height: 100%;
                border: none;
                display: flex;
                flex-direction: column;
                position: relative;
            }

            .top-bar {
                height: 55px;
                padding: 0 10px;
                justify-content: space-between;
                background: rgba(9, 9, 11, 0.98);
                backdrop-filter: blur(15px);
                border-bottom: 1px solid var(--border);
                flex-shrink: 0;
            }

            .top-bar .mobile-menu-btn {
                display: flex !important;
                font-size: 1.4rem;
            }

            .mode-selector-group,
            #model-badge,
            #vision-badge,
            .top-bar div:last-child {
                display: none !important;
            }

            .top-bar::after {
                content: 'DevBreach Core';
                font-weight: 800;
                font-size: 0.85rem;
                text-transform: uppercase;
                letter-spacing: 1px;
            }

            body.mode-hack .top-bar::after {
                content: 'V0ID CORE [UNLOCKED]';
                color: #ef4444;
                text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
            }

            /* CHAT AREA MOBILE */
            .chat-scroll-area {
                padding: 10px;
                padding-bottom: 100px;
                flex: 1;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            .bubble-content {
                max-width: 92%;
                font-size: 0.95rem;
                padding: 12px 15px !important;
                border-radius: 20px !important;
                line-height: 1.4;
                word-wrap: break-word;
            }

            .message-row {
                width: 100%;
                margin-bottom: 12px;
            }

            .message-row.user {
                flex-direction: row-reverse;
                justify-content: flex-start;
            }

            .message-row.user .bubble-content {
                background: var(--accent);
                color: white;
                border-bottom-right-radius: 4px !important;
            }

            .message-row.ai .bubble-content {
                background: #1a1a1e;
                border: 1px solid #2a2a2e;
                border-bottom-left-radius: 4px !important;
            }

            /* INPUT AREA COMPACT */
            .input-area {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                padding: 8px 10px 20px 10px;
                background: linear-gradient(to top, #000 80%, transparent);
                z-index: 100;
            }

            .input-box-wrapper {
                background: #111;
                border: 1px solid #333;
                border-radius: 24px;
            }

            .chat-input {
                font-size: 16px !important;
                padding: 10px 45px 10px 15px !important;
                background: transparent !important;
                height: 42px !important;
            }

            .send-btn {
                width: 32px;
                height: 32px;
                right: 6px !important;
                bottom: 5px !important;
            }

            .controls-bar {
                padding: 4px 8px !important;
                gap: 12px;
            }

            /* HIDE DESKTOP ELEMENTS */
            .side-toolbar,
            .right-sidebar {
                display: none !important;
            }

            /* MODAL OPTIMIZATIONS */
            .modal {
                width: 96% !important;
                max-height: 85vh;
                padding: 20px 15px !important;
            }
        }

        @media (max-width: 480px) {
            .bubble-content {
                max-width: 94%;
            }

            .top-bar::after {
                font-size: 0.75rem;
            }
        }