        /* iOS Mobile Optimizations */
        html {
            /* Prevent text size adjustment on orientation change */
            -webkit-text-size-adjust: 100%;
            /* Smooth momentum scrolling */
            -webkit-overflow-scrolling: touch;
            /* Prevent overscroll bounce */
            overscroll-behavior-y: none;
            /* Full height including safe areas */
            height: 100%;
        }

        body { 
            background-color: #18181b; 
            color: #e5e5e5; 
            font-family: 'IBM Plex Sans', sans-serif;
            /* Prevent overscroll bounce on body */
            overscroll-behavior-y: none;
            position: fixed;
            width: 100%;
            height: 100%;
            /* iOS Safari safe areas */
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            /* Disable tap highlight */
            -webkit-tap-highlight-color: transparent;
            /* Disable text selection on UI elements */
            -webkit-user-select: none;
            user-select: none;
            /* Prevent callout menu on long press */
            -webkit-touch-callout: none;
        }

        /* Allow text selection in content areas */
        p, span, div.content, .selectable {
            -webkit-user-select: text;
            user-select: text;
        }

        /* Root container fixes */
        #root {
            /* Use CSS custom property for accurate viewport height on iOS */
            height: 100%;
            height: calc(var(--vh, 1vh) * 100);
            overflow: hidden;
        }

        /* iOS Active State Fix - enable :active pseudo class */
        * {
            -webkit-tap-highlight-color: transparent;
        }

        button, a, [role="button"] {
            /* Enable active state on iOS */
            cursor: pointer;
            -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
            transition: opacity 0.15s ease, transform 0.15s ease;
        }

        button:active, a:active, [role="button"]:active,
        button.touch-active, a.touch-active, [role="button"].touch-active {
            opacity: 0.8;
            transform: scale(0.98);
        }

        /* Improve touch feedback with visual indicator */
        .touch-active {
            background-color: rgba(59, 130, 246, 0.15) !important;
        }

        /* Prevent input zoom on iOS (font-size must be >= 16px) */
        input, textarea, select {
            font-size: 16px;
            -webkit-user-select: text;
            user-select: text;
        }

        /* Prevent iOS from adding shadows/gloss to inputs */
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="search"],
        input[type="datetime-local"],
        textarea,
        select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            border-radius: 8px;
        }

        /* Better button styling for iOS */
        button {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }
        
        /* Mono headings */
        h1, h2, h3, h4, h5, h6 {
            font-family: 'JetBrains Mono', 'Space Mono', monospace;
            font-weight: 600;
        }
        
        /* Mono accents */
        .font-mono {
            font-family: 'JetBrains Mono', 'Space Mono', monospace;
            font-weight: 500;
        }
        
        /* Labels use body font */
        label {
            font-family: 'IBM Plex Sans', sans-serif;
            font-weight: 500;
        }

        /* Touch targets should be at least 44x44px for iOS */
        .touch-target {
            min-height: 44px;
            min-width: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* Safe area utilities */
        .mobile-safe-top {
            padding-top: env(safe-area-inset-top);
        }
        .mobile-safe-bottom {
            padding-bottom: env(safe-area-inset-bottom);
        }
        .mobile-safe-left {
            padding-left: env(safe-area-inset-left);
        }
        .mobile-safe-right {
            padding-right: env(safe-area-inset-right);
        }
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        ::-webkit-scrollbar-track {
            background: #18181b; 
        }
        ::-webkit-scrollbar-thumb {
            background: #4b5563; 
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #6b7280; 
        }
        .scrollbar-hide::-webkit-scrollbar { display: none; }
        .scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
        
        /* Cyber Aesthetics */
        :root {
            --neon-blue: #3B82F6;
            --neon-pink: #10B981;
            --neon-purple: #2563EB;
            --dark-bg: #18181b;
            --panel-bg: #1f1f25;
        }
        
        @keyframes pulse-accent {
            0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
            70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
        }
        .live-pulse { animation: pulse-accent 2s infinite; }
        
        @keyframes scan-x {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(200%); }
        }
        .scanning-line {
            animation: scan-x 2s linear infinite;
            background: linear-gradient(90deg, transparent, #3b82f6, transparent);
        }

        @keyframes crt-flicker {
            0% { opacity: 0.97; }
            5% { opacity: 0.95; }
            10% { opacity: 0.9; }
            15% { opacity: 0.95; }
            20% { opacity: 0.99; }
            50% { opacity: 0.95; }
            80% { opacity: 0.9; }
            100% { opacity: 0.97; }
        }
        
        @keyframes scanline {
            0% { top: -20px; opacity: 0; }
            10% { opacity: 1; }
            90% { opacity: 1; }
            100% { top: 100%; opacity: 0; }
        }

        .cyber-panel {
            background: var(--panel-bg);
            border: 1px solid #25262b;
            position: relative;
            overflow: hidden;
        }
        
        .cyber-panel::before {
            content: "";
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(rgba(24, 24, 27, 0) 50%, rgba(24, 24, 27, 0.3) 50%), linear-gradient(90deg, rgba(59, 130, 246, 0.06), rgba(16, 185, 129, 0.04), rgba(59, 130, 246, 0.06));
            background-size: 100% 2px, 3px 100%;
            pointer-events: none;
            z-index: 10;
        }

        .cyber-glow {
            box-shadow: 0 0 30px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(16, 185, 129, 0.1);
        }
        
        .cyber-text-glow {
            text-shadow: 0 0 5px var(--neon-blue);
        }
        
        .scanline-overlay {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
            background-size: 100% 4px;
            pointer-events: none;
            z-index: 5;
        }

        .moving-scanline {
            position: absolute;
            width: 100%;
            height: 10px;
            background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.25), transparent);
            animation: scanline 6s linear infinite;
            pointer-events: none;
            z-index: 6;
        }

        @keyframes delayed-fade-in {
            0%, 50% { opacity: 0; }
            100% { opacity: 1; }
        }
        .delayed-fade-in {
            animation: delayed-fade-in 1s ease-out forwards;
        }
        
        /* Custom Range Slider */
        .cyber-range {
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
        }
        .cyber-range::-webkit-slider-thumb {
            -webkit-appearance: none;
            height: 16px;
            width: 16px;
            border-radius: 50%;
            background: var(--neon-blue);
            cursor: pointer;
            margin-top: -6px;
            box-shadow: 0 0 10px var(--neon-blue);
        }
        .cyber-range::-webkit-slider-runnable-track {
            width: 100%;
            height: 4px;
            cursor: pointer;
            background: #333;
            border-radius: 2px;
        }
        
        /* Custom Calendar Icon for Inputs */
        input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            filter: invert(1);
            cursor: pointer;
            opacity: 0.6;
        }
        input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
            opacity: 1;
        }

        /* Scrollable container optimizations for iOS */
        .scrollable-container {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-y: contain;
        }

        /* Mobile Improvements */
        @media (max-width: 768px) {
            /* Improve tap targets on mobile */
            button, a, [role="button"] {
                min-height: 44px;
                min-width: 44px;
            }

            /* Better spacing for mobile */
            .mobile-stack {
                flex-direction: column;
            }

            /* Standalone PWA mode detection */
            @media (display-mode: standalone) {
                body {
                    /* Additional padding when in PWA mode if needed */
                }
            }
        }
        
        #error-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #18181b; color: #ef4444; padding: 20px; z-index: 9999; }
\n/* Summarizer Styles */\n
        :root {
            --neon-blue: #3B82F6;
            --neon-purple: #2563EB;
            --dark-bg: #18181b;
            --panel-bg: #1f1f25;
        }

        /* Override earlier styles for Summarizer section */
        html { 
            /* Keep previous iOS optimizations */
        }
        
        body.summarizer-body { 
            height: 100%; 
            margin: 0;
            background-color: var(--dark-bg); 
            color: #e5e5e5; 
            font-family: 'IBM Plex Sans', sans-serif; 
            overflow: hidden; 
        }
        
        #root {
            height: 100%;
            overflow: hidden;
        }
        
        /* Mono headings */
        h1, h2, h3, h4, h5, h6 {
            font-family: 'JetBrains Mono', 'Space Mono', monospace;
            font-weight: 600;
        }
        
        /* Mono accents */
        .font-mono {
            font-family: 'JetBrains Mono', 'Space Mono', monospace;
            font-weight: 500;
        }
        
        /* Labels use body font */
        label {
            font-family: 'IBM Plex Sans', sans-serif;
            font-weight: 500;
        }
        .touch-target {
            min-height: 44px;
            min-width: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .mobile-safe-bottom {
            padding-bottom: env(safe-area-inset-bottom);
        }

        /* Custom Scrollbars */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: #18181b; }
        ::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #6b7280; }
        .scrollbar-hide::-webkit-scrollbar { display: none; }
        .scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

        .custom-scrollbar::-webkit-scrollbar { width: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: rgba(24,24,27,0.25); }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(91,91,112,0.35); border-radius: 3px; }

        /* Interface Panels */
        .cyber-panel {
            background: var(--panel-bg);
            border-right: 1px solid #2a2b32;
            position: relative;
            overflow: hidden;
        }
        
        .cyber-panel::before {
            content: "";
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(rgba(24, 24, 27, 0) 50%, rgba(24, 24, 27, 0.3) 50%), linear-gradient(90deg, rgba(59, 130, 246, 0.06), rgba(16, 185, 129, 0.04), rgba(59, 130, 246, 0.06));
            background-size: 100% 2px, 3px 100%;
            pointer-events: none;
            z-index: 10;
        }

        .cyber-glow {
            box-shadow: 0 0 30px rgba(59, 130, 246, 0.1), inset 0 0 20px rgba(16, 185, 129, 0.05);
        }
        
        .cyber-text-glow {
            text-shadow: 0 0 5px var(--neon-blue);
        }

        .scanline-overlay {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
            background-size: 100% 4px;
            pointer-events: none;
            z-index: 5;
        }

        @keyframes scanline-move {
            0% { top: -20px; opacity: 0; }
            10% { opacity: 1; }
            90% { opacity: 1; }
            100% { top: 100%; opacity: 0; }
        }

        .moving-scanline {
            position: absolute;
            width: 100%;
            height: 10px;
            background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.25), transparent);
            animation: scanline-move 6s linear infinite;
            pointer-events: none;
            z-index: 6;
        }

        .cyber-input {
            background-color: #202028;
            border: 1px solid #30313a;
            color: #e5e5e5;
            font-family: 'IBM Plex Sans', sans-serif;
            transition: all 0.2s;
        }
        .cyber-input:focus {
            border-color: var(--neon-blue);
            outline: none;
            box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
        }
        
        /* Custom Calendar Icon for Inputs */
        input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            filter: invert(1);
            cursor: pointer;
            opacity: 0.6;
        }
        input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
            opacity: 1;
        }

        .preset-btn {
            transition: all 0.2s ease;
        }
        .preset-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
        }
        .preset-btn:active {
            transform: translateY(0);
        }
        
        /* Markdown Styles */
        .summary-content h1, .summary-content h2, .summary-content h3 {
            color: #3B82F6;
            margin-top: 1.5em;
            margin-bottom: 0.75em;
            font-weight: 700;
        }
        .summary-content h1 { font-size: 1.5em; border-bottom: 1px solid #1f2937; padding-bottom: 0.5em; }
        .summary-content h2 { font-size: 1.25em; }
        .summary-content h3 { font-size: 1.1em; }
        .summary-content p { margin-bottom: 1em; line-height: 1.7; color: #d1d5db; }
        .summary-content ul, .summary-content ol { margin-bottom: 1em; padding-left: 1.5em; }
        .summary-content li { margin-bottom: 0.5em; }
        .summary-content strong { color: #f9fafb; font-weight: 600; }
        .summary-content hr { border-color: #30313a; margin: 2em 0; }
        .summary-content code {
            background-color: #1f293a;
            padding: 0.2em 0.4em;
            border-radius: 0.25em;
            font-family: monospace;
            color: #e5e5e5;
        }

        /* Mobile specific adjustments */
        @media (max-width: 768px) {
            body { overflow: auto; }
            .cyber-panel { border-right: none; border-bottom: 1px solid #333; }
        }
        
        .settings-panel-desktop {
            width: 100%;
        }

        @media (min-width: 768px) {
            .settings-panel-desktop {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                width: 420px;
                height: 100vh;
            }

            .main-content-desktop {
                margin-left: 420px;
            }
        }
\n/* Debugger Styles */\n
        :root {
            --dark-bg: #18181b;
            --panel-bg: #1f1f25;
            --accent-blue: #3B82F6;
            --accent-purple: #8B5CF6;
            --accent-cyan: #22D3EE;
        }

        /* Debugger styles inherit iOS optimizations from main styles */
        body.debugger-body {
            height: 100%;
            margin: 0;
            background-color: var(--dark-bg);
            color: #e5e5e5;
            font-family: 'IBM Plex Sans', sans-serif;
        }

        #root.debugger-root {
            min-height: 100%;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: 'JetBrains Mono', 'Space Mono', monospace;
            font-weight: 600;
        }

        .font-mono {
            font-family: 'JetBrains Mono', 'Space Mono', monospace;
        }

        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: #18181b; }
        ::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #6b7280; }

        .prompt-card {
            position: relative;
            overflow: hidden;
            background: linear-gradient(150deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.08) 35%, rgba(59, 130, 246, 0.05));
        }

        .prompt-card::before {
            content: "";
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 45%);
            opacity: 0.9;
        }

        .prompt-card::after {
            content: "";
            position: absolute;
            inset: 1px;
            border: 1px solid rgba(59, 130, 246, 0.15);
            border-radius: 0.75rem;
            pointer-events: none;
        }

        .prompt-card > * {
            position: relative;
            z-index: 10;
        }

        .glass-panel {
            background: rgba(31, 31, 37, 0.9);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(59, 130, 246, 0.12);
        }

        .animate-spin-slow {
            animation: spin 1.4s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
