
        /* Theme System - CSS Custom Properties */
        :root {
            /* Default Theme (Slate) */
            --theme-bg-primary: #1a2332;
            --theme-bg-secondary: #1e293b;
            --theme-bg-tertiary: #334155;
            --theme-bg-card: #1e293b;
            --theme-bg-header: #1a2332;
            --theme-bg-modal: #1e293b;
            --theme-bg-sidebar: #1a2332;
            
            --theme-text-primary: #f1f5f9;
            --theme-text-secondary: #94a3b8;
            --theme-text-muted: #64748b;
            
            --theme-border-primary: #334155;
            --theme-border-secondary: #475569;
            --theme-border-muted: #374151;
            
            --theme-accent: rgb(59, 130, 246);
            --theme-accent-hover: #2563eb;
            --theme-accent-muted: #1d4ed8;
            
            --theme-scrollbar-thumb: #475569;
            --theme-scrollbar-track: rgba(15, 23, 42, 0.3);
            --theme-scrollbar-hover: #64748b;
            
            /* Grid pattern color */
            --theme-grid-color: rgba(255, 255, 255, 0.02);
        }

        /* Dark Theme (Black) - Matching Login Screen */
        .theme-dark {
            --theme-bg-primary: #0a0a0a;
            --theme-bg-secondary: #111111;
            --theme-bg-tertiary: #222222;
            --theme-bg-card: #111111;
            --theme-bg-header: #0a0a0a;
            --theme-bg-modal: #111111;
            --theme-bg-sidebar: #0a0a0a;
            
            --theme-text-primary: #ffffff;
            --theme-text-secondary: #888888;
            --theme-text-muted: #666666;
            
            --theme-border-primary: #222222;
            --theme-border-secondary: #333333;
            --theme-border-muted: #555555;
            
            /* Neutral blue accent for dark theme (no purple) */
            --theme-accent: #1d9bf0;
            --theme-accent-hover: #2563eb;
            --theme-accent-muted: #1d4ed8;
            
            --theme-scrollbar-thumb: #333333;
            --theme-scrollbar-track: rgba(0, 0, 0, 0.5);
            --theme-scrollbar-hover: #444444;
            
            /* Grid pattern color - slightly more visible on pure black */
            --theme-grid-color: rgba(255, 255, 255, 0.03);
        }

        /* Purple Theme (Elegant Violet) */
        .theme-purple {
            --theme-bg-primary: #150d26;
            --theme-bg-secondary: #1a0f2e;
            --theme-bg-tertiary: #2d1b45;
            --theme-bg-card: #1a0f2e;
            --theme-bg-header: #150d26;
            --theme-bg-modal: #1a0f2e;
            --theme-bg-sidebar: #150d26;
            
            --theme-text-primary: #f5f3ff;
            --theme-text-secondary: #c4b5fd;
            --theme-text-muted: #8b5cf6;
            
            --theme-border-primary: #2d1b45;
            --theme-border-secondary: #4c1d95;
            --theme-border-muted: #5b21b6;
            
            --theme-accent: #a855f7;
            --theme-accent-hover: #9333ea;
            --theme-accent-muted: #7c3aed;
            
            --theme-scrollbar-thumb: #4c1d95;
            --theme-scrollbar-track: rgba(15, 10, 26, 0.5);
            --theme-scrollbar-hover: #5b21b6;
            
            /* Grid pattern color - with subtle purple tint */
            --theme-grid-color: rgba(255, 255, 255, 0.025);
        }

        /* Modern CSS Reset */
        *, *::before, *::after {
            box-sizing: border-box;
        }
        
        * {
            margin: 0;
            padding: 0;
        }
        
        html {
            scroll-behavior: instant;
        }

        /* Lock viewport to remove global scrollbar */
        html, body {
            height: 100vh;
            overflow: hidden;
        }
        
        body {
            background: var(--theme-bg-primary);
            /* Modern dot pattern - clean and minimal */
            background-image: radial-gradient(circle, var(--theme-grid-color) 1px, transparent 1px);
            background-size: 24px 24px;
            background-attachment: fixed;
            
            
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            color: var(--theme-text-primary);
        }

        /* Flex wrapper: header/banners fixed height; feed area scrolls */
        #contentWrapper {
            display: flex;
            flex-direction: column;
            height: 100vh;
            max-height: 100vh;
            overflow: hidden;
            width: 100%;
        }

        /* Ensure non-feed sections never shrink */
        #contentWrapper > header,
        #contentWrapper > footer,
        #contentWrapper > #audioWarningBanner,
        #contentWrapper > #subscriptionWarningBanner {
            flex-shrink: 0;
        }

        /* Scrollable feed viewport */
        #feedScrollContainer {
            flex: 1;
            min-height: 0; /* critical for flex children */
            overflow-y: auto;
            overflow-x: hidden;
        }

        #gamesDock {
            flex-shrink: 0;
        }

        .games-dock-bar {
            position: relative;
            overflow: hidden;
            border-bottom: 1px solid var(--theme-border-primary);
            background: var(--theme-bg-card);
        }

        #gamesMenuView:not(.hidden) {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem 0.6rem;
        }

        .games-menu-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 1.55rem;
            height: 1.55rem;
            border-radius: 0.4rem;
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(96, 165, 250, 0.12);
            color: #93c5fd;
            flex-shrink: 0;
        }

        .games-menu-items {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            flex: 1;
            min-width: 0;
        }

        .games-menu-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.28rem 0.5rem;
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 0.4rem;
            background: rgba(255, 255, 255, 0.03);
            color: var(--theme-text-secondary);
            font-family: inherit;
            font-size: 0.7rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
            white-space: nowrap;
        }

        .games-menu-btn:hover {
            background: rgba(59, 130, 246, 0.1);
            border-color: rgba(96, 165, 250, 0.25);
            color: var(--theme-text-primary);
            transform: translateY(-1px);
        }

        .games-menu-btn.is-active {
            background: rgba(59, 130, 246, 0.15);
            border-color: rgba(96, 165, 250, 0.4);
            color: var(--theme-text-primary);
        }

        .games-menu-btn svg {
            opacity: 0.4;
            transition: opacity 120ms ease;
        }

        .games-menu-btn:hover svg {
            opacity: 0.7;
        }

        .games-menu-dot {
            width: 0.35rem;
            height: 0.35rem;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .games-menu-dot--blue {
            background: #60a5fa;
            box-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
        }

        .games-menu-dot--green {
            background: #4ade80;
            box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
        }

        .games-menu-dot--amber {
            background: #f59e0b;
            box-shadow: 0 0 6px rgba(245, 158, 11, 0.52);
        }

        .games-menu-dot--violet {
            background: #a78bfa;
            box-shadow: 0 0 6px rgba(167, 139, 250, 0.54);
        }

        .games-menu-dot--red {
            background: #f87171;
            box-shadow: 0 0 6px rgba(248, 113, 113, 0.54);
        }

        .games-menu-close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 1.5rem;
            height: 1.5rem;
            border: none;
            border-radius: 0.375rem;
            background: transparent;
            color: var(--theme-text-muted);
            cursor: pointer;
            transition: background 120ms ease, color 120ms ease;
            flex-shrink: 0;
            margin-left: auto;
        }

        .games-menu-close:hover {
            background: rgba(255, 255, 255, 0.06);
            color: var(--theme-text-primary);
        }

        .games-game-view:not(.hidden) {
            display: flex;
            height: 100%;
        }

        #gamesDock.games-active .games-dock-bar {
            height: clamp(118px, 14vh, 164px);
        }

        .games-panel {
            width: 100%;
        }

        #gamesDock.games-active .games-panel {
            height: 100%;
        }

        /* Feed container scrollbar styling */
        #feedScrollContainer::-webkit-scrollbar { width: 6px; height: 6px; }
        #feedScrollContainer::-webkit-scrollbar-track { background: var(--theme-scrollbar-track); }
        #feedScrollContainer::-webkit-scrollbar-thumb {
            background: var(--theme-scrollbar-thumb);
            border-radius: 3px;
            border: 1px solid var(--theme-border-primary);
        }
        #feedScrollContainer::-webkit-scrollbar-thumb:hover {
            background: var(--theme-scrollbar-hover);
            border-color: var(--theme-border-secondary);
        }
        #feedScrollContainer { scrollbar-width: thin; scrollbar-color: var(--theme-scrollbar-thumb) var(--theme-scrollbar-track); }
        
         /* Custom scrollbar for all elements */
         ::-webkit-scrollbar {
             width: 6px;
             height: 6px;
         }
         
         ::-webkit-scrollbar-track {
             background: var(--theme-scrollbar-track);
             border-radius: 3px;
         }
         
         ::-webkit-scrollbar-thumb {
             background: var(--theme-scrollbar-thumb);
             border-radius: 3px;
             border: 1px solid var(--theme-border-primary);
             transition: all 0.3s ease;
         }
         
         ::-webkit-scrollbar-thumb:hover {
             background: var(--theme-scrollbar-hover);
             border-color: var(--theme-border-secondary);
             box-shadow: 0 0 8px rgba(100, 116, 139, 0.3);
         }
         
         ::-webkit-scrollbar-thumb:active {
             background: var(--theme-scrollbar-hover);
         }
         
         ::-webkit-scrollbar-corner {
             background: var(--theme-scrollbar-track);
         }
         
         /* Firefox support */
         * {
             scrollbar-width: thin;
             scrollbar-color: var(--theme-scrollbar-thumb) var(--theme-scrollbar-track);
         }
         
         /* Enhanced scrollbar for specific containers */
         .custom-scrollbar::-webkit-scrollbar {
             width: 8px;
             height: 8px;
         }
         
        .custom-scrollbar::-webkit-scrollbar-thumb {
             background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
             border-radius: 4px;
             border: 1px solid rgba(99, 102, 241, 0.3);
        }
         
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
             background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
             box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
        }

        /* Account Toggle Switch - Lightweight optimized version */
        .account-toggle {
            position: relative;
            display: inline-flex;
            align-items: center;
            width: 2.75rem; /* 44px */
            height: 1.5rem; /* 24px */
            border-radius: 9999px;
            background-color: rgba(99, 102, 241, 0.8); /* accent-500/80 */
            transition: background-color 200ms;
            cursor: pointer;
            border: none;
            padding: 0;
        }
        
        .account-toggle:hover {
            background-color: rgb(99, 102, 241); /* accent-500 */
        }
        
        .account-toggle[data-state="off"] {
            background-color: rgba(75, 85, 99, 0.5); /* gray-600/50 */
        }
        
        .account-toggle[data-state="off"]:hover {
            background-color: rgba(75, 85, 99, 0.7);
        }
        
        /* Toggle knob */
        .account-toggle::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 1.25rem; /* 20px */
            height: 1.25rem; /* 20px */
            border-radius: 9999px;
            background-color: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
            transition: transform 200ms;
            transform: translateX(0);
        }
        
        .account-toggle[data-state="on"]::after {
            transform: translateX(1.25rem); /* 20px - slides to the right */
        }

        /* Account Filter Buttons */
        .accounts-filter-btn {
            display: inline-flex;
            align-items: center;
            padding: 0.375rem 0.875rem;
            font-size: 0.813rem;
            font-weight: 500;
            border-radius: 0.5rem;
            border: 1px solid transparent;
            background-color: transparent;
            color: rgba(156, 163, 175, 0.8);
            cursor: pointer;
            transition: all 150ms ease;
        }

        .accounts-filter-btn:hover {
            background-color: rgba(99, 102, 241, 0.1);
            color: rgba(156, 163, 175, 1);
        }

        .accounts-filter-btn.active {
            background-color: rgba(99, 102, 241, 0.15);
            border-color: rgba(99, 102, 241, 0.3);
            color: rgb(99, 102, 241);
        }

        /* Bulk Action Buttons */
        .bulk-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.375rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
            border-radius: 0.5rem;
            border: 1px solid transparent;
            cursor: pointer;
            transition: all 150ms ease;
        }

        .bulk-action-enable {
            background-color: rgba(34, 197, 94, 0.1);
            color: rgba(34, 197, 94, 0.9);
            border-color: rgba(34, 197, 94, 0.2);
        }

        .bulk-action-enable:hover {
            background-color: rgba(34, 197, 94, 0.15);
            color: rgb(34, 197, 94);
            border-color: rgba(34, 197, 94, 0.3);
        }

        .bulk-action-disable {
            background-color: rgba(239, 68, 68, 0.1);
            color: rgba(239, 68, 68, 0.9);
            border-color: rgba(239, 68, 68, 0.2);
        }

        .bulk-action-disable:hover {
            background-color: rgba(239, 68, 68, 0.15);
            color: rgb(239, 68, 68);
            border-color: rgba(239, 68, 68, 0.3);
        }

        /* Theme Option Styles */
        .theme-option {
            background: var(--theme-bg-secondary);
            border-color: var(--theme-border-primary);
        }
        
        .theme-option:hover {
            border-color: var(--theme-border-secondary);
            background: var(--theme-bg-tertiary);
        }
        
        .theme-option.selected {
            border-color: var(--theme-accent);
            background: var(--theme-bg-tertiary);
            box-shadow: 0 0 0 1px var(--theme-accent);
        }

        /* Custom Theme Classes to Replace Tailwind */
        .theme-bg-primary {
            background-color: var(--theme-bg-primary) !important;
        }
        
        .theme-bg-secondary {
            background-color: var(--theme-bg-secondary) !important;
        }
        
        .theme-bg-tertiary {
            background-color: var(--theme-bg-tertiary) !important;
        }
        
        .theme-bg-modal {
            background-color: var(--theme-bg-modal) !important;
        }
        
        .theme-bg-sidebar {
            background-color: var(--theme-bg-sidebar) !important;
        }
        
        .theme-border-primary,
        .theme-border-primary.theme-border-primary {
            border-color: var(--theme-border-primary) !important;
        }
        
        .theme-border-secondary,
        .theme-border-secondary.theme-border-secondary {
            border-color: var(--theme-border-secondary) !important;
        }
        
        .theme-text-primary {
            color: var(--theme-text-primary) !important;
        }
        
        .theme-text-secondary {
            color: var(--theme-text-secondary) !important;
        }
        
        .theme-text-muted {
            color: var(--theme-text-muted) !important;
        }
        
        /* Theme-aware semi-transparent backgrounds for context containers */
        .theme-bg-context {
            background: rgba(15, 23, 42, 0.6); /* Default slate */
        }
        
        .theme-dark .theme-bg-context {
            background: rgba(10, 10, 10, 0.5); /* Dark theme */
        }
        
        .theme-purple .theme-bg-context {
            background: rgba(15, 10, 26, 0.5); /* Purple theme */
        }
        
        .theme-bg-context-blue {
            background: rgba(30, 58, 138, 0.3);
        }
        
        /* Reply context containers (top-level replies) */
        .reply-context-container {
            border-top: none;
            border-right: none;
            border-bottom: none;
            border-left: 2px solid var(--theme-accent);
        }
        
        /* Retweet context containers (top-level retweets) */
        .retweet-context-container {
            border-top: none;
            border-right: none;
            border-bottom: none;
            border-left: 2px solid #10b981;
        }
        
        .theme-border-context-blue {
            border-color: rgba(29, 78, 216, 0.3);
        }
        
        /* Nested context styling - using theme colors */
        .nested-context-outer {
            background: var(--theme-bg-secondary);
            border: 1px solid var(--theme-border-primary);
            border-left: 3px solid var(--theme-border-primary);
            margin-left: 1.5rem;
            margin-top: 0.75rem;
            position: relative;
        }
        
        .nested-context-outer::before {
            display: none; /* Remove weird line */
        }
        
        .nested-context-inner {
            background: var(--theme-bg-secondary);
            border: 1px solid var(--theme-border-primary);
            border-left: 3px solid var(--theme-border-primary);
            margin-left: 1.5rem;
            margin-top: 0.75rem;
            position: relative;
        }
        
        .nested-context-inner::before {
            display: none; /* Remove weird line */
        }
        
        /* Performance-focused minimal animations */
        .pulse-dot {
            animation: pulse-dot 2s ease-in-out infinite;
        }
        @keyframes pulse-dot {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        

        
        /* Modern header buttons inspired by sidebar design */
        .header-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            height: 32px;
            font-size: 14px;
            font-weight: 500;
            transition: all 150ms ease;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid transparent;
            cursor: pointer;
            outline: none;
            text-decoration: none;
        }
        
        .header-btn svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }
        
        .header-btn.inactive {
            color: var(--theme-text-secondary);
            border-color: transparent;
        }
        
        .header-btn.inactive:hover {
            color: var(--theme-text-primary);
            background-color: var(--theme-bg-secondary);
            border-color: var(--theme-border-muted);
        }
        
        .header-btn.active {
            background-color: var(--theme-bg-secondary);
            color: var(--theme-accent);
            border-color: rgba(255, 255, 255, 0.2);
        }
        /* Ensure users button uses white in dark theme */
        .theme-dark #usersButton.active,
        .theme-dark #usersButton.inactive {
            color: #ffffff;
        }
        
        .header-btn.active:hover {
            background-color: var(--theme-bg-tertiary);
        }
        
        /* Small users button next to NIGGATRON */
        .users-btn-small {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            height: auto;
            font-size: 14px;
            font-weight: 500;
            transition: all 150ms ease;
            padding: 2px 6px;
            border-radius: 4px;
            border: 1px solid transparent;
            cursor: pointer;
            outline: none;
            text-decoration: none;
            background: none;
            color: var(--theme-text-secondary);
        }
        
        .users-btn-small svg {
            width: 12px;
            height: 12px;
            flex-shrink: 0;
        }
        
        .users-btn-small.active {
            background-color: var(--theme-bg-secondary);
            color: var(--theme-accent);
            border-color: rgba(255, 255, 255, 0.2);
        }
        
        /* Ensure users button uses white in dark theme */
        .theme-dark .users-btn-small.active,
        .theme-dark .users-btn-small {
            color: #94a3b8;
        }
        
        /* Streamer mode blur effect */
        .streamer-blur {
            filter: blur(3px);
            transition: filter 0.2s ease;
        }
        
        .streamer-blur:hover {
            filter: blur(1px);
        }
        
        /* Connection status indicator */
        .connection-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .connection-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: #ef4444; /* Red by default (disconnected) */
            transition: background-color 0.3s ease;
        }
        
        .connection-dot.connected {
            background-color: #22c55e; /* Green when connected */
        }
        
        .connection-dot.connecting {
            background-color: #f59e0b; /* Orange when connecting */
            animation: pulse 1.5s ease-in-out infinite;
        }

        .ws-reconnect-overlay {
            position: fixed;
            inset: 0;
            z-index: 70;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(2, 6, 23, 0.74);
            backdrop-filter: blur(10px);
        }

        .ws-reconnect-overlay.hidden {
            display: none;
        }

        .ws-reconnect-card {
            width: min(100%, 420px);
            padding: 28px 24px 22px;
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background:
                radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 55%),
                linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
            text-align: center;
        }

        .ws-reconnect-kicker {
            margin-bottom: 10px;
            color: rgba(148, 163, 184, 0.9);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .ws-reconnect-title {
            margin: 0;
            color: #f8fafc;
            font-size: 24px;
            line-height: 1.15;
            font-weight: 700;
        }

        .ws-reconnect-copy {
            margin: 12px 0 0;
            color: rgba(226, 232, 240, 0.82);
            font-size: 14px;
            line-height: 1.6;
        }

        .ws-reconnect-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 132px;
            min-height: 42px;
            margin-top: 18px;
            padding: 0 18px;
            border: 1px solid rgba(96, 165, 250, 0.28);
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.18));
            color: #eff6ff;
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 0.01em;
            transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
        }

        .ws-reconnect-button:hover {
            transform: translateY(-1px);
            border-color: rgba(96, 165, 250, 0.45);
            background: linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.24));
        }

        .ws-reconnect-button:focus-visible {
            outline: 2px solid rgba(147, 197, 253, 0.45);
            outline-offset: 3px;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        /* Settings dropdown menu items */
        .settings-dropdown-item {
            transition: all 0.15s ease;
        }
        
        .settings-dropdown-item:hover {
            background-color: var(--theme-bg-tertiary);
        }
        
        .settings-dropdown-item:hover svg {
            opacity: 1;
        }
        
        .settings-dropdown-item svg {
            opacity: 0.6;
            transition: opacity 0.15s ease;
        }
        
        .settings-dropdown-item:active {
            opacity: 0.8;
        }
        
        .settings-dropdown-item.text-red-400:hover {
            background-color: rgba(248, 113, 113, 0.1);
        }
        
        .settings-dropdown-item.text-red-400 svg {
            opacity: 0.8;
        }
        
        /* Modern toggle switch */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }
        
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #475569;
            transition: .2s;
            border-radius: 24px;
        }
        
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .2s;
            border-radius: 50%;
        }
        
        input:checked + .toggle-slider {
            background-color: #3b82f6;
        }
        
        input:checked + .toggle-slider:before {
            transform: translateX(20px);
        }
        
        /* User tracking highlight styles */
        .tracked-user-highlight {
            border: 2px solid !important;
            border-radius: inherit;
            position: relative;
        }
        
        .tracked-user-highlight::before {
            content: '';
            position: absolute;
            inset: 0;
            background: currentColor;
            opacity: 0.02;
            pointer-events: none;
            border-radius: inherit;
        }
        
        .tracked-user-high-priority {
            border: 3px solid !important;
            border-radius: inherit;
            position: relative;
        }
        
        .tracked-user-high-priority::before {
            content: '';
            position: absolute;
            inset: 0;
            background: currentColor;
            opacity: 0.035;
            pointer-events: none;
            border-radius: inherit;
        }
        
        .tracked-user-ultra-priority {
            border: 3px solid !important;
            border-radius: inherit;
            position: relative;
        }
        
        .tracked-user-ultra-priority::before {
            content: '';
            position: absolute;
            inset: 0;
            background: currentColor;
            opacity: 0.035;
            pointer-events: none;
            border-radius: inherit;
        }
        
        /* Keep author names in default color, not highlighted */
        .tracked-user-name {
            color: inherit !important;
        }
        
        /* Preserve accent colors in follow card enhanced data even when card is highlighted */
        .tracked-user-highlight .text-accent-400,
        .tracked-user-high-priority .text-accent-400,
        .tracked-user-ultra-priority .text-accent-400 {
            color: rgb(251 191 36) !important; /* Keep accent-400 color */
        }
        
        /* Ensure external link and translate button stay clickable above highlight overlays */
        .tweet-external-link,
        .tweet-translate-btn,
        .chat-translate-btn {
            z-index: 5;
            pointer-events: auto;
        }
        
        /* Pinned tweet classes are handled in JS for positioning only - no visual styling */
        
        /* Pinned action line - emphasize importance */
        .pinned-action-line {
            background: rgba(251, 191, 36, 0.08);
            border: 1px solid rgba(251, 191, 36, 0.22);
            border-left-width: 3px;
            border-left-color: #fbbf24;
            color: #fbbf24 !important;
            padding: 6px 10px;
            border-radius: 10px;
            font-weight: 600;
            opacity: 1 !important;
        }
        .pinned-action-line .timestamp {
            color: var(--theme-text-secondary) !important;
            font-weight: 500;
        }
        .pinned-action-line .dot-separator {
            color: var(--theme-text-secondary) !important;
        }
        /* Layout-stable timestamps: avoid ripple on text updates */
        .timestamp {
            display: inline-block;
            min-width: 12ch;                 /* stable width across labels */
            font-variant-numeric: tabular-nums;
            contain: layout style paint;      /* isolate layout/paint */
        }
        .pinned-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 2px 8px;
            background: rgba(251, 191, 36, 0.15);
            border: 1px solid rgba(251, 191, 36, 0.35);
            color: #fbbf24;
            border-radius: 9999px;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        /* Unpinned action line - similar layout, less urgent color */
        .unpinned-action-line {
            background: rgba(148, 163, 184, 0.06); /* slate-400-ish, subtle */
            border: 1px solid rgba(148, 163, 184, 0.20);
            border-left-width: 3px;
            border-left-color: rgba(148, 163, 184, 0.6);
            color: rgba(148, 163, 184, 0.95) !important;
            padding: 6px 10px;
            border-radius: 10px;
            font-weight: 600;
            opacity: 1 !important;
        }
        .unpinned-action-line .timestamp {
            color: var(--theme-text-secondary) !important;
            font-weight: 500;
        }
        .unpinned-action-line .dot-separator {
            color: var(--theme-text-secondary) !important;
        }
        .unpinned-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 2px 8px;
            background: rgba(148, 163, 184, 0.12);
            border: 1px solid rgba(148, 163, 184, 0.28);
            color: rgba(148, 163, 184, 0.95);
            border-radius: 9999px;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        
        /* Follow/Unfollow action border effects */
        .follow-glow {
            border: 2px solid rgba(34, 197, 94, 0.4) !important;
        }
        
        .unfollow-glow {
            border: 2px solid rgba(239, 68, 68, 0.4) !important;
        }

        .follow-preview-shell {
            padding: 0.75rem;
        }

        .follow-preview-card {
            border-radius: 14px;
            overflow: hidden;
            border: 1px solid rgba(148, 163, 184, 0.14);
            border-left-width: 3px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }

        .follow-preview-card.follow-preview-follow {
            border-left-color: rgba(34, 197, 94, 0.565);
        }

        .follow-preview-card.follow-preview-unfollow {
            border-left-color: rgba(239, 68, 68, 0.565);
        }
        /* Volume slider styling */
        #volumeControl::-webkit-slider-thumb {
            appearance: none;
            height: 20px;
            width: 20px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
        }
        
        #volumeControl::-moz-range-thumb {
            height: 20px;
            width: 20px;
            border-radius: 50%;
            background: #3b82f6;
            cursor: pointer;
            border: none;
        }
        
        /* Modern card styles */
        .tweet-card {
            background: var(--theme-bg-card);
            border: 2px solid var(--theme-border-primary);
            position: relative;
        }
        

        /* Override py-8 to reduce vertical padding */
        .py-8 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
        .px-6 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }

        /* Regular tweet body text */
        .tweet-body { font-size: 15px; }
        
        /* Context container text sizing - override Tailwind to use 13px */
        .text-xs {
            font-size: 13px !important;
        }

        /* Deleted tweet appearance */
        .deleted-tweet { 
            opacity: 1;
        }
        
        .deleted-author-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.15rem 0.45rem;
            border-radius: 9999px;
            border: 1px solid rgba(239, 68, 68, 0.2);
            background: rgba(239, 68, 68, 0.1);
            color: rgba(252, 165, 165, 0.95);
            font-size: 11px;
            font-weight: 600;
            line-height: 1;
            letter-spacing: 0.01em;
            flex-shrink: 0;
        }

        .deleted-author-badge svg {
            flex-shrink: 0;
        }

        /* Deleted tweet card with diagonal stripe pattern */
        .tweet-card.deleted-tweet {
            background: repeating-linear-gradient(
                45deg,
                rgba(220, 38, 38, 0.15),
                rgba(220, 38, 38, 0.15) 10px,
                rgba(185, 28, 28, 0.15) 10px,
                rgba(185, 28, 28, 0.15) 20px
            ) !important;
            border-color: #7f1d1d !important;
        }

        /* Default card styling */
        .tweet-card {
            --tweet-card-pad: 0.75rem;
            --tweet-card-gap: 0.75rem;
            border-radius: 10px;
            overflow: hidden;
            margin-top: 0.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        .tweet-card-inner {
            padding: var(--tweet-card-pad);
            display: flex;
            flex-direction: column;
            gap: var(--tweet-card-gap);
        }
        .tweet-visibility-toggle .tweet-visibility-icon-closed {
            display: none;
        }
        .tweet-visibility-toggle[data-collapsed="true"] .tweet-visibility-icon-open {
            display: none;
        }
        .tweet-visibility-toggle[data-collapsed="true"] .tweet-visibility-icon-closed {
            display: block;
        }
        .tweet-card.tweet-card-collapsed > :not(.tweet-card-inner) {
            display: none !important;
        }
        .tweet-card.tweet-card-collapsed .tweet-card-inner {
            gap: 0;
        }
        .tweet-card-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.08);
            margin: -0.125rem 0;
            margin-left: calc(var(--tweet-card-pad) * -1);
            margin-right: calc(var(--tweet-card-pad) * -1);
            width: calc(100% + (var(--tweet-card-pad) * 2));
        }
        .tweet-card.tweet-card-collapsed .tweet-card-divider {
            display: none;
        }
        .tweet-card.tweet-card-collapsed .tweet-card-section:not(.tweet-card-header-section) {
            display: none;
        }
        .tweet-card-section > .mt-4,
        .tweet-card-section > .mt-3,
        .tweet-card-section > .mt-2 {
            margin-top: 0 !important;
        }
        .tweet-card .p-6,
        .truth-social-card .p-6 { padding: 0.75rem !important; }
        .tweet-card .mb-4,
        .truth-social-card .mb-4,
        .instagram-card .mb-4 { margin-bottom: 0.75rem !important; }
        .tweet-card .pb-4,
        .truth-social-card .pb-4,
        .instagram-card .pb-4 { padding-bottom: 0 !important; }

        /* Chat specific styles */
        .chat-card {
            background: var(--theme-bg-card);
            border: 1px solid var(--theme-border-primary);
            border-radius: 10px;
            margin-top: 0.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        .chat-card .chat-body {
            font-size: 14px;
            line-height: 1.35rem;
            white-space: pre-wrap; /* Preserve newlines and wrap text */
        }

        /* Chat card action buttons (react + translate) */
        .chat-card .chat-card-actions {
            opacity: 0;
            transition: opacity 0.15s ease;
        }
        .chat-card:hover .chat-card-actions {
            opacity: 1;
        }

        /* Chat reactions row */
        .chat-reactions {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 4px;
        }
        .chat-reactions:empty {
            display: none;
        }
        .chat-reaction-pill {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            padding: 1px 6px;
            font-size: 12px;
            line-height: 1.4;
            border-radius: 6px;
            background: var(--theme-bg-card);
            border: 1px solid var(--theme-border-primary);
            color: var(--theme-text-secondary, #a1a1aa);
            cursor: pointer;
            transition: border-color 0.15s ease, background 0.15s ease;
            user-select: none;
        }
        .chat-reaction-pill:hover {
            border-color: var(--theme-accent, #3b82f6);
            background: rgba(59, 130, 246, 0.08);
        }
        .chat-reaction-pill.active {
            border-color: var(--theme-accent, #3b82f6);
            background: rgba(59, 130, 246, 0.12);
            color: var(--theme-accent, #3b82f6);
        }

        /* Emoji picker popover */
        .chat-emoji-picker {
            display: flex;
            gap: 2px;
            padding: 4px 6px;
            background: var(--theme-bg-card, #18181b);
            border: 1px solid var(--theme-border-primary, #27272a);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            z-index: 9999;
            position: absolute;
            top: -36px;
            right: 0;
        }
        .chat-emoji-option {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            border-radius: 4px;
            border: none;
            background: transparent;
            cursor: pointer;
            transition: background 0.1s ease, transform 0.1s ease;
        }
        .chat-emoji-option:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: scale(1.2);
        }
        .chat-emoji-option.used {
            background: rgba(59, 130, 246, 0.15);
            border-radius: 4px;
            box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4);
        }

        /* Truth Social card styles - Modern patriotic design */
        .truth-social-card {
            background: #ffffff !important;
            border-radius: 16px;
            position: relative;
            color: #1a202c !important;
            overflow: hidden;
            margin-top: 0.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        
        /* Patriotic border gradient */
        .truth-social-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, #B31942 0%, #ffffff 50%, #0A3161 100%);
            border-radius: 16px;
            padding: 2px;
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask-composite: xor;
            -webkit-mask-composite: xor;
            z-index: -1;
        }
        
        
        /* Truth Social header accent */
        .truth-social-card::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #B31942 0%, #ffffff 50%, #0A3161 100%);
            z-index: 1;
        }
        
        /* Truth Social specific text styling - white background needs dark text */
        .truth-social-card .text-white,
        .truth-social-card .text-gray-100,
        .truth-social-card .text-gray-200,
        .truth-social-card .text-gray-300,
        .truth-social-card .text-white\/95,
        .truth-social-card .text-white\/90,
        .truth-social-card .text-white\/80 {
            color: #111827 !important;
        }
        
        .truth-social-card .text-primary,
        .truth-social-card div .text-primary,
        .truth-social-card article .text-primary {
            color: #111827 !important;
        }
        
        .truth-social-card .text-gray-400,
        .truth-social-card .text-gray-500,
        .truth-social-card .text-muted,
        .truth-social-card div .text-muted,
        .truth-social-card article .text-muted {
            color: #6b7280 !important;
        }
        
        /* Truth Social links - use theme accent color */
        .truth-social-card a {
            color: var(--theme-accent) !important;
            transition: color 0.2s ease;
        }
        
        
        /* Truth Social timestamps and meta info */
        .truth-social-card .timestamp,
        .truth-social-card .text-sm {
            color: #6b7280 !important;
        }
        
        /* (Deprecated) Truth Social platform badge - no longer used */
        .truth-social-badge { display: inline-flex; align-items: center; gap: 4px; background: transparent; padding: 0; box-shadow: none; border-radius: 0; font-size: inherit; font-weight: inherit; }
        
        .truth-social-badge::before {
            content: none;
        }
        
        /* Truth Social footer with patriotic design */
        .truth-social-footer {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 40px;
            background: linear-gradient(90deg, #B31942 0%, #ffffff 50%, #0A3161 100%);
            border-radius: 0; /* let parent clipping handle corners to avoid seams */
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            z-index: 2;
            border-top: 1px solid rgba(0,0,0,0.06); /* subtle separation */
        }
        
        .truth-social-footer .platform-name {
            color: white;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .truth-social-footer .eagle-icon {
            color: white;
            font-size: 16px;
        }
        
        /* Padding adjustment for footer */
        .truth-social-card article {
            padding-bottom: 48px !important;
            position: relative;
            z-index: 1;
        }
        
        /* Instagram card styles - Black design */
        .instagram-card {
            background: #000000 !important;
            border: 1px solid #1a1a23 !important;
            border-radius: 8px;
            position: relative;
            color: #ffffff !important;
            overflow: hidden;
            box-shadow: none !important;
            margin-top: 0.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        
        
        /* Instagram text styling */
        .instagram-card .text-primary,
        .instagram-card div .text-primary,
        .instagram-card article .text-primary {
            color: #ffffff !important;
        }
        
        .instagram-card .text-muted,
        .instagram-card div .text-muted,
        .instagram-card article .text-muted {
            color: #94a3b8 !important;
        }
        
        /* Instagram links */
        .instagram-card a {
            color: #e2e8f0 !important;
            transition: color 0.2s ease;
        }
        
        
        /* Instagram profile picture gradient border */
        .instagram-profile-pic-container {
            position: relative;
            border-radius: 50%;
            padding: 2px;
            background: linear-gradient(45deg, #ff6b6b, #feca57);
        }
        
        .instagram-profile-pic {
            border-radius: 50% !important;
            display: block;
        }
        
        /* Instagram tag bubble */
        .instagram-tag {
            background: linear-gradient(45deg, #e1306c, #c13584) !important;
            color: white !important;
            font-size: 10px !important;
            font-weight: 600 !important;
            padding: 2px 6px !important;
            border-radius: 4px !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
        }
        
        /* Slim Instagram gradient bar */
        .instagram-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
            z-index: 1;
        }
        
        /* (Deprecated) Instagram platform badge - no longer used */
        .instagram-badge { display: inline-flex; align-items: center; gap: 4px; background: transparent; padding: 0; box-shadow: none; border-radius: 0; font-size: inherit; font-weight: inherit; }
        
        .instagram-logo-badge {
            width: 14px;
            height: 14px;
            fill: white;
        }
        
        
        /* Instagram card padding */
        .instagram-card article {
            padding: 0 !important;
            position: relative;
            z-index: 1;
        }

        /* News Card Styles */
        .news-card {
            background: #0a0a0f !important;
            border: 1px solid #1a1a23 !important;
            border-radius: 8px;
            position: relative;
            color: #ffffff !important;
            overflow: hidden;
            box-shadow: none !important;
            margin-top: 0.75rem !important;
            margin-bottom: 0.75rem !important;
        }
        
        
        .news-card .text-primary,
        .news-card div .text-primary,
        .news-card article .text-primary {
            color: #e2e8f0 !important;
        }
        
        .news-card .text-secondary,
        .news-card div .text-secondary,
        .news-card article .text-secondary {
            color: #94a3b8 !important;
        }
        
        .news-card .text-muted,
        .news-card div .text-muted,
        .news-card article .text-muted {
            color: #64748b !important;
        }
        
        .news-card a {
            color: #64748b !important;
            text-decoration: none;
        }
        

        /* Media grid improvements */
        .media-grid {
            display: grid;
            gap: 8px;
            width: 100%;
            max-width: 600px; /* Prevent media from getting too wide */
        }
        
        .media-grid img, .media-grid video {
            max-width: 100%;
            max-height: 320px;
            height: auto;
            width: auto;
            object-fit: contain;
            border-radius: 8px;
        }
        
        /* Wrapper shrinks to fit image */
        .media-grid .media-item {
            display: flex;
            justify-content: center;
        }
        
        /* Inner wrapper uses inline-flex to shrink to image size */
        .media-grid .media-item > div {
            position: relative;
            display: inline-flex;
            max-width: 600px;
        }
        
        .media-grid .media-item img {
            max-height: 320px;
        }
        
        .media-grid .media-item video {
            max-height: 400px;
        }
        
        /* Context media (quoted tweets) - smaller dimensions */
        .context-media .media-item > div {
            max-width: 500px;
        }
        
        .context-media .media-item img {
            max-height: 250px;
        }
        
        .context-media .media-item video {
            max-height: 250px;
        }
        
        /* Tweet URL styles */
        .tweet-url {
            color: #60a5fa;
            text-decoration: none;
            font-weight: 500;
            font-size: 14px;
            display: inline-block;
            padding: 4px 8px;
            background: rgba(96, 165, 250, 0.1);
            border-radius: 6px;
            border: 1px solid rgba(96, 165, 250, 0.2);
            transition: all 0.2s ease;
            margin: 2px 0;
        }
        
        .tweet-url:hover {
            color: #93c5fd;
            background: rgba(96, 165, 250, 0.2);
            border-color: rgba(96, 165, 250, 0.4);
            text-decoration: none;
        }
        
        /* Special handling for single images to allow them to be larger */
        .media-grid.grid-cols-1 { max-width: none; }
        
        .media-grid.grid-cols-1 .media-item img,
        .media-grid.grid-cols-1 .media-item video {
            max-height: 400px; /* Allow single images to be a bit taller */
        }
        
        /* Responsive media grid adjustments */
        @media (max-width: 640px) {
            .media-grid .media-item img,
            .media-grid .media-item video {
                max-height: 280px;
            }
            
            .context-media .media-item img,
            .context-media .media-item video {
                max-height: 200px;
            }
        }
        
        /* Status indicators */
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: inline-block;
        }
        
        .status-connected { background: #10b981; }
        .status-connecting { background: #f59e0b; }
        .status-error { background: #ef4444; }
        
        /* Typography improvements */
        .text-primary { color: #f1f5f9; }
        .text-secondary { color: #cbd5e1; }
        .text-muted { color: #94a3b8; }
        .text-accent { color: var(--theme-accent); }
        
        /* Improved form controls */
        .form-control {
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 8px;
            color: #f1f5f9;
            font-size: 14px;
            padding: 8px 12px;
            transition: border-color 0.15s ease;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--theme-accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.20);
        }
        
        /* Modern checkbox */
        .checkbox-modern {
            appearance: none;
            width: 18px;
            height: 18px;
            border: 2px solid #334155;
            border-radius: 4px;
            background: #0f172a;
            cursor: pointer;
            position: relative;
            transition: all 0.15s ease;
        }
        
        .checkbox-modern:checked {
            background: var(--theme-accent);
            border-color: var(--theme-accent);
        }
        
        .checkbox-modern:checked::after {
            content: '✓';
            position: absolute;
            top: -2px;
            left: 2px;
            color: white;
            font-size: 12px;
            font-weight: bold;
        }
        
        /* Accent utilities (Tailwind-like aliases mapped to theme variables) */
        .bg-accent-500 { background-color: var(--theme-accent) !important; }
        .hover\:bg-accent-600:hover { background-color: var(--theme-accent-hover) !important; }
        .text-accent-300 { color: var(--theme-accent) !important; opacity: .85; }
        .focus\:ring-accent-500:focus { box-shadow: 0 0 0 2px var(--theme-accent) !important; }
        .focus\:ring-accent-500\/50:focus { box-shadow: 0 0 0 3px rgba(99,102,241,.35) !important; }
        .hover\:bg-accent-500\/10:hover { background-color: rgba(99,102,241,.10) !important; }
        .border-accent-500\/40 { border-color: rgba(99,102,241,.40) !important; }

        /* Settings sidebar responsive collapse on narrow viewports */
        #settingsSidebar { width: 12rem; transition: width .2s ease; }
        #settingsSidebar .nav-button { display: flex; align-items: center; gap: .5rem; }
        #settingsSidebar .tab-label { display: inline; }
        @media (max-width: 900px) {
            #settingsSidebar { width: 3.5rem; padding-left: .5rem; padding-right: .5rem; }
            #settingsSidebar .tab-label { display: none; }
            #settingsSidebar .nav-button { justify-content: center; }
        }
        
        /* Header glass effect - cleaner, more subtle */
        .glass-header {
            backdrop-filter: blur(16px) saturate(150%);
            background: rgba(26, 35, 50, 0.8);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            position: relative;
        }
        
        /* Smooth transitions for header logo/pause icon swap */
        #headerLogo, #headerPauseIcon {
            transition: opacity 0.08s ease;
        }
        
        .theme-dark .glass-header {
            background: rgba(10, 10, 10, 0.85);
        }
        
        .theme-purple .glass-header {
            background: rgba(21, 13, 38, 0.8);
        }
        
        /* Subtle top accent line for depth */
        .glass-header::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1) 50%, transparent);
            opacity: 0.5;
        }

        /* Active Users Popup - minimalistic footer aesthetic */
        #usersTooltip > div:first-child {
            background: rgba(17, 17, 17, 0.9);
        }
        .theme-dark #usersTooltip > div:first-child {
            background: rgba(10, 10, 10, 0.9);
        }
        .theme-purple #usersTooltip > div:first-child {
            background: rgba(21, 13, 38, 0.9);
        }
        #usersTooltip .absolute {
            background: rgba(17, 17, 17, 0.9);
        }
        .theme-dark #usersTooltip .absolute {
            background: rgba(10, 10, 10, 0.9);
        }
        .theme-purple #usersTooltip .absolute {
            background: rgba(21, 13, 38, 0.9);
        }
        /* Minimal scrollbar for users list */
        #usersList::-webkit-scrollbar {
            width: 4px;
        }
        #usersList::-webkit-scrollbar-track {
            background: transparent;
        }
        #usersList::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }
        #usersList::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        #usersList {
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
        }

        /* Floating "New Tweets" button */
        #newTweetsButton {
            position: fixed;
            top: 2.5rem; /* roughly top-20 */
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000; /* ensure above header/overlays */
            display: none;
            background: rgba(17, 17, 17, 0.5);
            color: var(--theme-text-primary);
            border: 1px solid var(--theme-border-secondary);
            border-radius: 9999px;
            padding: 0.25rem 0.6rem; /* py-1 px-2.5 approximate */
            box-shadow: 0 10px 25px rgba(0,0,0,0.35);
            backdrop-filter: blur(8px);
        }
        #newTweetsButton:hover { background: rgba(24, 24, 27, 0.65); }
        #newTweetsButton .icon { width: 16px; height: 16px; margin-right: 6px; }
        #newTweetsButton .label { font-size: 12px; font-weight: 600; }
        
        /* Audio Warning Banner */
        .audio-warning-banner {
            background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
            border-bottom: 1px solid rgba(217, 119, 6, 0.2);
            backdrop-filter: blur(8px);
            position: relative;
            z-index: 48;
            animation: slideDown 0.3s ease-out;
        }
        
        .audio-warning-banner.hidden {
            display: none;
        }
        
        /* Subscription Warning Banner */
        .subscription-warning-banner {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.08) 100%);
            border-bottom: 1px solid rgba(239, 68, 68, 0.2);
            backdrop-filter: blur(8px);
            position: relative;
            z-index: 48;
            animation: slideDown 0.3s ease-out;
        }
        
        .subscription-warning-banner.hidden {
            display: none;
        }
        
        @keyframes slideDown {
            from {
                transform: translateY(-100%);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
        /* Chat input subtle interactions */
        #chatInput {
            transition: all 150ms ease;
        }
        
        #chatInput:focus {
            color: var(--theme-text-primary);
        }
        
        #chatInput::placeholder {
            color: var(--theme-text-muted);
            opacity: 0.6;
        }
        
        #chatInput:focus::placeholder {
            opacity: 0.4;
        }
        
        /* Chat container focus state */
        #chatInputContainer {
            transition: border-color 200ms ease;
        }
        
        #chatInputContainer:has(#chatInput:focus) {
            border-top-color: rgba(255, 255, 255, 0.1);
        }
        
        #chatInputContainer:has(#chatInput:focus) .chat-prompt {
            opacity: 1;
        }
        
        /* Color picker improvements */
        .color-picker-container {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .color-picker {
            width: 32px;
            height: 32px;
            border: 2px solid #334155;
            border-radius: 8px;
            background: transparent;
            cursor: pointer;
            padding: 0;
            outline: none;
        }
        
        .color-picker::-webkit-color-swatch-wrapper {
            padding: 0;
            border: none;
            border-radius: 6px;
        }
        
        .color-picker::-webkit-color-swatch {
            border: none;
            border-radius: 6px;
        }
        
        .color-picker::-moz-color-swatch {
            border: none;
            border-radius: 6px;
        }

        /* Highlight color swatch button */
        .highlight-color-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 8px 4px 5px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.08);
            background: var(--theme-bg-tertiary, #1a1a2e);
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
        }
        .highlight-color-btn:hover {
            background: var(--theme-bg-secondary, #222);
            border-color: rgba(255,255,255,0.15);
        }
        .highlight-color-swatch {
            display: block;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.12);
            flex-shrink: 0;
            box-shadow: 0 0 6px rgba(0,0,0,0.3);
        }
        .highlight-color-chevron {
            color: var(--theme-text-secondary, #888);
            transition: transform 0.15s;
            flex-shrink: 0;
        }
        .highlight-color-btn.open .highlight-color-chevron {
            transform: rotate(180deg);
        }

        /* Color picker popup */
        .highlight-color-popup {
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            z-index: 60;
            background: var(--theme-bg-primary, #111);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.5);
            min-width: 170px;
            animation: hlPopupIn 0.12s ease-out;
        }
        .highlight-color-popup.hidden {
            display: none;
        }
        @keyframes hlPopupIn {
            from { opacity: 0; transform: translateY(-4px) scale(0.97); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* Preset color grid */
        .highlight-color-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        .highlight-preset {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: none;
            background: none;
            cursor: pointer;
            border-radius: 8px;
            transition: transform 0.1s, box-shadow 0.1s;
        }
        .highlight-preset span {
            display: block;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 2.5px solid transparent;
            transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
        }
        .highlight-preset:hover span {
            transform: scale(1.15);
            box-shadow: 0 0 8px rgba(255,255,255,0.15);
        }
        .highlight-preset.selected span {
            border-color: #fff;
            box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
        }

        /* Divider */
        .highlight-color-divider {
            height: 1px;
            background: rgba(255,255,255,0.07);
            margin: 8px 0;
        }

        /* Custom color button */
        .highlight-custom-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            padding: 6px 0;
            border: 1px dashed rgba(255,255,255,0.12);
            border-radius: 6px;
            background: none;
            color: var(--theme-text-secondary, #999);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
        }
        .highlight-custom-btn:hover {
            background: rgba(255,255,255,0.04);
            color: var(--theme-text-primary, #eee);
            border-color: rgba(255,255,255,0.2);
        }

        .kw-color-wrapper .highlight-color-popup {
            position: fixed;
            top: auto;
            right: auto;
            left: auto;
            z-index: 9999;
            min-width: 170px;
        }
        
        .color-reset {
            width: 24px;
            height: 24px;
            border: 1px solid #475569;
            border-radius: 4px;
            background: var(--theme-bg-secondary);
            color: #94a3b8;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }
        
        .color-reset:hover {
            background: #334155;
            color: #f1f5f9;
            border-color: #64748b;
        }


        /* CA Action Buttons */
        .ca-actions-container {
            margin-top: 16px;
            padding: 16px;
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: 12px;
            backdrop-filter: blur(10px);
        }
        
        .ca-actions-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
            font-size: 14px;
            font-weight: 600;
            color: #a78bfa;
        }
        
        .ca-actions-buttons {
            display: flex;
            gap: 8px;
            width: 100%;
            padding-top: 10px;
        }
        
        .ca-action-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            color: white;
            min-height: 44px;
        }
        
        .ca-action-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        
        .ca-action-btn:active {
            transform: translateY(0);
        }
        
        .ca-action-btn.open-browser {
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            border: 1px solid rgba(59, 130, 246, 0.3);
        }
        
        .ca-action-btn.open-browser:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
        }
        
        .ca-action-btn.copy-ca {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            border: 1px solid rgba(5, 150, 105, 0.3);
        }
        
        .ca-action-btn.copy-ca:hover {
            background: linear-gradient(135deg, #047857 0%, #065f46 100%);
        }
        
        .ca-action-btn.copy-ca.copied {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            border: 1px solid rgba(220, 38, 38, 0.3);
        }
        
        .ca-address {
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 14px;
            color: #cbd5e1;
            background: rgba(0, 0, 0, 0.3);
            padding: 6px 8px;
            border-radius: 6px;
            word-break: break-all;
            line-height: 1.3;
        }

        /* Fallback styles */
        .tailwind-fallback * {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
        }
        
        .tailwind-fallback .bg-dark-900 { background-color: #0f172a !important; }
        .tailwind-fallback .text-primary { color: #f1f5f9 !important; }
        .tailwind-fallback .text-secondary { color: #cbd5e1 !important; }
        .tailwind-fallback .text-muted { color: #94a3b8 !important; }

        /* Simple CA UI */
        .ca-simple {
            margin-top: 12px;
            margin-bottom: 10px;
            display: flex;
            align-items: stretch;
            gap: 0;
            background: rgba(39, 39, 42, 0.8);
            border: 2px solid rgba(253, 224, 71, 0.8);
            border-radius: 10px;
            overflow: hidden;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 8px rgba(253, 224, 71, 0.15);
        }

        .ca-simple.solana {
            border: 2px solid transparent;
            background: rgba(39, 39, 42, 0.8);
            background-image: linear-gradient(rgba(39, 39, 42, 0.8), rgba(39, 39, 42, 0.8)), linear-gradient(135deg, #00FFA3 0%, #DC1FFF 100%);
            background-origin: border-box;
            background-clip: padding-box, border-box;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 8px rgba(0, 255, 163, 0.15);
        }

        .ca-simple.evm {
            border: 2px solid rgba(253, 224, 71, 0.8);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 8px rgba(253, 224, 71, 0.15);
        }

        .ca-simple.base {
            border: 2px solid rgba(0, 82, 255, 0.8);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 8px rgba(0, 82, 255, 0.15);
        }

        .ca-hover-copy {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            background: transparent;
            border: 0;
            cursor: pointer;
            text-align: left;
            color: #e5e7eb;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 15px;
            line-height: 1.2;
        }

        .ca-hover-copy:hover {
            background: rgba(39, 39, 42, 0.5);
        }

        .ca-hover-copy .ca-label {
            font-weight: 600;
            color: #fde047;
        }

        .ca-chain-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .ca-hover-copy .ca-text {
            word-break: break-all;
        }

        .ca-divider {
            display: none;
        }

        .ca-platform-link {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 12px;
            background: transparent;
            border: 0;
            border-left: 1px solid rgba(71, 85, 105, 0.4);
            color: #cbd5e1;
            text-decoration: none;
            cursor: pointer;
        }

        .ca-platform-link:hover {
            background: rgba(39, 39, 42, 0.5);
        }

        .ca-platform-link img {
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }


        /* Profile Change Text Container */
        .profile-change-text {
            line-height: 1.8;
        }

        /* Profile Change Text Bubbles */
        .profile-change-added {
            display: inline;
            background: rgba(34, 197, 94, 0.15);
            border: 1px solid rgba(34, 197, 94, 0.3);
            padding: 1px 5px;
            border-radius: 4px;
            color: #4ade80 !important;
            font-weight: 500;
            box-decoration-break: clone;
            -webkit-box-decoration-break: clone;
        }
        
        .profile-change-removed {
            display: inline;
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid rgba(239, 68, 68, 0.3);
            padding: 1px 5px;
            border-radius: 4px;
            color: #f87171 !important;
            font-weight: 500;
            box-decoration-break: clone;
            -webkit-box-decoration-break: clone;
        }
        
        /* Profile Change Image Borders */
        .profile-image-added {
            border: 3px solid rgba(34, 197, 94, 0.7);
            box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
        }
        
        .profile-image-removed {
            border: 3px solid rgba(239, 68, 68, 0.7);
            box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
            opacity: 0.85;
        }

        /* Image Placeholder Styles */
        .image-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(20, 20, 30, 0.9) 100%);
            border: 1px solid rgba(100, 100, 120, 0.2);
            border-radius: 8px;
            min-height: 150px;
            width: 100%;
            position: relative;
            overflow: hidden;
        }

        .image-placeholder::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 48px;
            height: 48px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='rgba(120, 120, 140, 0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
            background-size: contain;
            background-repeat: no-repeat;
            opacity: 0.6;
        }

        .image-placeholder::after {
            content: 'Image unavailable';
            position: absolute;
            bottom: 12px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 11px;
            color: rgba(140, 140, 160, 0.7);
            text-align: center;
            white-space: nowrap;
        }

        /* Hide the actual broken image when it fails */
        img.image-failed {
            display: none !important;
        }

        /* Ensure placeholder maintains proper aspect ratio in media grids */
        .media-item .image-placeholder {
            min-height: 150px;
            max-height: 400px;
        }

        .context-media .media-item .image-placeholder {
            min-height: 120px;
            max-height: 300px;
        }

        /* Chat media placeholder */
        .chat-media.image-failed + .image-placeholder {
            max-width: 384px;
            max-height: 256px;
        }

        /* Chat-only mode (H key held) - hide all non-chat items */
        .chat-only-mode > *:not(.chat-card) {
            display: none !important;
        }
    