        /* Global Reset - Removes default browser styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent; /* Remove gray flash on tap (iOS) */
        }

        /* CSS Variables - New Design System */
        :root {
            --monero-orange: #FF6600;
            --bitcoin-orange: #F7931A;
            --dark-bg: #0a0a0a;
            --darker-bg: #050505;
            --card-bg: rgba(255, 255, 255, 0.03);
            --card-hover: rgba(255, 255, 255, 0.05);
            --text-primary: #ffffff;
            --text-secondary: #a0a0a0;
            --text-muted: #606060;
            --border-color: rgba(255, 255, 255, 0.08);
            --border-hover: rgba(255, 255, 255, 0.15);
            --success: #10B981;
            --danger: #EF4444;
            --purple: #9B59B6;
            --warning: #F59E0B;
            --info: #3B82F6;
        }

        /* Main body styling - Dark theme with flexible layout */
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: var(--dark-bg);
            color: var(--text-primary);
            line-height: 1.6;
            height: 100vh;
            overflow: hidden;
        }

        /* Left navigation sidebar - Fixed position with scrolling */
        .sidebar {
            width: 260px;
            background: #000;
            border-right: 1px solid #333;
            padding: 20px;
            position: fixed;
            height: 100vh;
            overflow-y: auto;
        }

        /* Nosmero branding logo in sidebar */
        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 40px;
            color: #FF6600; /* Orange brand color to match Monero */
        }

        /* Navigation menu items (Home, Profile, etc.) */
        .nav-item {
            display: flex;
            align-items: center;
            padding: 14px 16px;
            min-height: 44px;
            margin-bottom: 8px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            font-size: 16px;
        }

        .nav-item:hover {
            background: #1a1a1a;
        }

        .nav-item.active {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            color: #000;
        }

        .nav-item span {
            margin-left: 12px;
        }

        /* Main "Post" button in sidebar with gradient */
        .post-button {
            background: linear-gradient(135deg, #FF6600, #8B5CF6); /* Orange gradient */
            border: none;
            color: #000;
            padding: 14px 24px;
            min-height: 48px;
            border-radius: 24px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            width: 100%;
            margin-top: 20px;
            transition: transform 0.2s;
        }

        .post-button:hover {
            transform: scale(1.02);
        }

        .post-button:active {
            transform: scale(0.98);
        }

        /* ==================================
           NEW MINIMAL HEADER & NAVIGATION
           ================================== */

        /* Minimal Fixed Header - Single Row Layout */
        .minimal-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(10, 10, 10, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border-color);
            z-index: 100;
        }

        /* Single Row: All elements in one horizontal line */
        .header-single-row {
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;
            gap: 1.5rem;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .header-logo {
            height: auto;
            max-height: 50px; /* Smaller for single row */
            width: auto;
            object-fit: contain;
            display: block;
        }

        .tagline {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 400;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        /* Hamburger Menu Button */
        .mobile-menu-btn {
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            min-width: 44px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Feed Selector Tabs */
        .feed-selector {
            display: flex;
            gap: 0.75rem;
            align-items: center;
            flex: 1;
            justify-content: flex-start;
        }

        .feed-tab {
            color: var(--text-secondary);
            font-weight: 500;
            font-size: 0.9rem;
            padding: 0.5rem 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            white-space: nowrap;
        }

        .feed-tab.active {
            color: #fff;
            background: linear-gradient(135deg, var(--monero-orange), var(--purple));
            border-color: transparent;
        }

        .feed-tab:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.08);
            border-color: var(--monero-orange);
        }

        .feed-tab.active:hover {
            color: #fff;
            background: linear-gradient(135deg, var(--monero-orange), var(--purple));
            transform: scale(1.02);
        }

        /* Quick Actions */
        .quick-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .relay-indicator {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--success);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .login-btn {
            background: transparent;
            color: var(--text-primary);
            padding: 0.6rem 1.2rem;
            border-radius: 50px;
            border: 1px solid var(--border-color);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 44px;
        }

        .login-btn:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--monero-orange);
        }

        /* Orange Login Button in Feed Navigation */
        .login-btn-orange {
            background: linear-gradient(135deg, var(--monero-orange), var(--purple));
            color: white;
            padding: 0.6rem 1.2rem;
            border-radius: 50px;
            border: none;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 44px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .login-btn-orange:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
        }

        /* Create Note Button in Header */
        .create-note-btn {
            background: linear-gradient(135deg, var(--monero-orange), var(--purple));
            color: white;
            padding: 0.6rem 1.2rem;
            border-radius: 50px;
            border: none;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 44px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .create-note-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
        }

        /* Notifications Button in Header */
        .notifications-btn {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            padding: 0.6rem 0.8rem;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 44px;
            min-width: 44px;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notifications-btn:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--monero-orange);
        }

        /* Slide-out Hamburger Menu */
        .slide-menu {
            position: fixed;
            top: 0;
            left: -280px;
            width: 280px;
            height: 100vh;
            background: var(--darker-bg);
            border-right: 1px solid var(--border-color);
            transition: left 0.3s ease;
            z-index: 200;
            overflow-y: auto;
        }

        .slide-menu.active {
            left: 0;
        }

        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 199;
            display: none;
        }

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

        .menu-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .menu-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
            min-width: 44px;
            min-height: 44px;
        }

        .menu-nav {
            padding: 1rem;
            padding-bottom: 180px; /* Extra space for mobile bottom nav + user info + logout button */
            display: flex;
            flex-direction: column;
            min-height: calc(100vh - 60px); /* Full height minus header */
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.875rem 1rem;
            margin-bottom: 0.25rem;
            border-radius: 12px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.2s;
            font-weight: 500;
            cursor: pointer;
        }

        .menu-item:hover {
            background: var(--card-bg);
            color: var(--text-primary);
        }

        .menu-item:active {
            background: var(--border-color);
        }

        .menu-item.active {
            background: var(--card-bg);
            color: var(--text-primary);
        }

        .menu-icon {
            font-size: 1.25rem;
            width: 24px;
            text-align: center;
        }

        /* Welcome Banner for First-Time Users */
        .welcome-banner {
            background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(155, 89, 182, 0.1));
            border: 1px solid rgba(255, 102, 0, 0.2);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            position: relative;
        }

        .welcome-banner.hidden {
            display: none;
        }

        .close-banner {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 1.2rem;
            min-width: 44px;
            min-height: 44px;
        }

        .welcome-title {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .welcome-text {
            color: var(--text-secondary);
            margin-bottom: 1rem;
        }

        .welcome-actions {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .welcome-btn {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            min-height: 44px;
            display: flex;
            align-items: center;
        }

        .welcome-btn.primary {
            background: var(--monero-orange);
            color: white;
            border: none;
        }

        .welcome-btn.secondary {
            background: transparent;
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        /* ==================================
           END NEW HEADER & NAVIGATION
           ================================== */

        /* Main content area - Left-aligned feed-first layout */
        .main {
            margin-top: 71px; /* Offset for single-row header (70px + 1px border) */
            width: 100%;
            max-width: 1200px; /* Wide column for better content display */
            margin-left: 2rem; /* Left alignment with breathing room */
            margin-right: 0;
            padding: 1.5rem;
            height: calc(100vh - 71px);
            overflow-y: auto;
        }

        /* Mobile: Add bottom padding for bottom navigation */
        @media (max-width: 768px) {
            .main {
                padding-bottom: 120px; /* Space for bottom nav (64px) + interaction icons + buffer */
            }
        }

        /* Custom Dark Scrollbar for Feed */
        .main::-webkit-scrollbar {
            width: 12px;
        }

        .main::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
        }

        .main::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, var(--monero-orange), var(--purple));
            border-radius: 10px;
            border: 2px solid rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
        }

        .main::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #FF8533, #A66BCF);
            box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
        }

        /* Firefox scrollbar styling */
        .main {
            scrollbar-width: thin;
            scrollbar-color: var(--monero-orange) rgba(0, 0, 0, 0.3);
        }

        /* Sticky header with blur effect for feed sections */
        .header {
            padding: 16px 20px;
            border-bottom: 1px solid #333;
            position: sticky;
            top: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px); /* Glass effect */
        }

        /* Tab navigation container (Latest/Following tabs) */
        .tab-bar {
            display: flex;
            gap: 0;
        }

        .tab {
            flex: 1;
            padding: 12px;
            text-align: center;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            color: #A78BFA;
            cursor: pointer;
            font-size: 15px;
            border-radius: 20px;
            transition: all 0.2s ease;
            font-weight: 500;
        }

        .tab:hover {
            color: #FFFFFF;
            background: rgba(139, 92, 246, 0.2);
            border-color: rgba(139, 92, 246, 0.5);
        }

        .tab.active {
            background: linear-gradient(135deg, #FF6600, #FF8533);
            color: #FFFFFF;
            font-weight: bold;
            border: 1px solid transparent;
        }

        /* Main feed container for posts */
        .feed {
            min-height: calc(100vh - 80px);
        }

        /* Mobile: Add bottom padding for feed to clear bottom nav */
        @media (max-width: 768px) {
            .feed {
                padding-bottom: 120px; /* Space for bottom nav (64px) + interaction icons + buffer */
            }
        }

        /* Individual post/note container - Glassmorphism cards */
        .post {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            transition: all 0.2s;
            max-width: 100%;
            overflow: hidden;
        }

        .post:hover {
            background: var(--card-hover);
            border-color: var(--border-hover);
            transform: translateY(-2px);
        }

        .post-header {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }

        /* User avatar - Shows image or fallback gradient with initial */
        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF6600, #8B5CF6); /* Orange gradient */
            margin-right: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            object-fit: cover;
        }
        
        img.avatar {
            background: none;
        }
        
        /* Hover effects for clickable avatars and usernames */
        .avatar:hover {
            transform: scale(1.05);
            transition: transform 0.2s ease;
        }

        .post-info {
            flex: 1;
        }

        .username {
            font-weight: bold;
            margin-right: 8px;
        }
        
        .username:hover {
            color: #FF6600;
            transition: color 0.2s ease;
        }

        .handle {
            color: #666;
            margin-right: 8px;
        }
        
        .handle:hover {
            color: #8B5CF6;
            transition: color 0.2s ease;
        }

        .timestamp {
            color: #666;
            font-size: 14px;
        }

        /* Parent post styling for replies */
        .parent-post {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 8px;
            padding: 8px 12px;
            margin-bottom: 12px;
            transition: background 0.2s;
        }
        
        .parent-post:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .parent-post .post-header {
            margin-bottom: 6px;
        }
        
        .parent-post .avatar {
            width: 28px;
            height: 28px;
            font-size: 13px;
        }
        
        .parent-post .post-content {
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.4;
        }
        
        .reply-indicator {
            color: #666;
            font-size: 13px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* Post text content with proper word wrapping for long URLs */
        .post-content {
            margin: 12px 0;
            line-height: 1.4;
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-word; /* Ensures long URLs don't overflow */
            max-width: 100%;
            overflow: hidden;
        }
        
        .post-content a {
            color: #1d9bf0;
            text-decoration: none;
            word-break: break-all;
        }
        
        .post-content a:hover {
            text-decoration: underline;
        }
        
        .post-content img {
            max-width: 100% !important;
            width: auto !important;
            height: auto !important;
            border-radius: 8px;
            margin: 8px 0;
            display: block;
        }

        .post-content video {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            margin: 8px 0;
            display: block;
        }

        .post-content .mention {
            color: #1d9bf0;
            text-decoration: none;
        }
        
        /* Quoted/embedded notes (nevent links) display */
        .embedded-note {
            border: 1px solid #333;
            border-radius: 8px;
            padding: 12px;
            margin: 8px 0;
            background: #0a0a0a;
        }
        
        .embedded-note .note-header {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
            gap: 8px;
        }
        
        .embedded-note .note-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 14px;
            object-fit: cover;
        }
        
        .embedded-note .note-author {
            font-weight: bold;
            font-size: 14px;
        }
        
        .embedded-note .note-time {
            color: #666;
            font-size: 12px;
            margin-left: auto;
        }
        
        .embedded-note .note-content {
            font-size: 14px;
            line-height: 1.4;
            color: #ccc;
        }

        /* Action buttons row (reply, repost, like, XMR zap) */
        .post-actions {
            display: flex;
            justify-content: space-between;
            max-width: 400px;
            margin-top: 12px;
        }

        .action-btn {
            background: none;
            border: none;
            color: #666;
            cursor: pointer;
            padding: 12px;
            min-width: 44px;
            min-height: 44px;
            border-radius: 50%;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }

        .action-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .action-btn:active {
            background: rgba(255, 255, 255, 0.15);
            transform: scale(0.95);
        }

        /* Monero zap button styling */
        .xmr-zap {
            color: #FF6600;
            font-weight: bold;
            font-size: 13px;
        }

        .xmr-zap:hover {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            color: #000;
        }

        /* ==================================
           DUAL ZAP BUTTONS (XMR + Lightning)
           ================================== */

        /* Container for dual zap buttons */
        .zap-actions {
            display: flex;
            gap: 0.5rem;
            margin: 1rem 0;
        }

        .zap-btn {
            flex: 1;
            padding: 0.75rem;
            border-radius: 10px;
            border: 1px solid var(--border-color);
            background: rgba(255, 255, 255, 0.02);
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
            position: relative;
            min-height: 44px;
        }

        .monero-zap {
            border-color: rgba(255, 102, 0, 0.3);
            background: rgba(255, 102, 0, 0.05);
            color: var(--monero-orange);
        }

        .monero-zap:hover {
            border-color: var(--monero-orange);
            background: rgba(255, 102, 0, 0.1);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 102, 0, 0.2);
        }

        .lightning-zap {
            border-color: rgba(247, 147, 26, 0.3);
            background: rgba(247, 147, 26, 0.05);
            color: var(--bitcoin-orange);
        }

        .lightning-zap:hover {
            border-color: var(--bitcoin-orange);
            background: rgba(247, 147, 26, 0.1);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(247, 147, 26, 0.2);
        }

        .zap-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background: var(--success);
            color: white;
            padding: 0.15rem 0.5rem;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: bold;
            min-width: 20px;
            text-align: center;
        }

        /* ==================================
           END DUAL ZAP BUTTONS
           ================================== */

        /* Modal overlay for login, XMR QR codes, etc. */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: #1a1a1a;
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 90%;
            max-height: 85vh;
            overflow-y: auto;
            text-align: center;
            -webkit-overflow-scrolling: touch;
        }

        /* Mobile: Add padding for bottom navigation */
        @media (max-width: 768px) {
            .modal-content {
                padding-bottom: 120px; /* Extra space for bottom nav + buttons */
                max-height: 75vh; /* Reduce height to ensure visibility */
                margin-bottom: 80px; /* Push entire modal up from bottom */
            }
        }

        .modal-header {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 20px;
        }

        /* QR code display container (for XMR addresses) */
        .qr-container {
            background: white;
            padding: 20px;
            border-radius: 12px;
            margin: 20px 0;
        }

        .modal-footer {
            margin-top: 20px;
        }

        .close-btn {
            background: #333;
            border: 1px solid #666;
            color: #FFFFFF;
            padding: 14px 24px;
            min-height: 48px;
            border-radius: 8px;
            cursor: pointer;
            margin-top: 16px;
            transition: all 0.2s ease;
        }

        .close-btn:hover {
            background: #444;
            border-color: #888;
        }

        /* Modal actions - Horizontal button layout */
        .modal-actions {
            display: flex;
            gap: 12px;
            margin-top: 16px;
            flex-wrap: wrap;
        }

        .modal-actions button {
            flex: 1;
            margin-top: 0; /* Override individual button margin */
            min-width: 120px;
        }

        .login-option-btn {
            background: #1a1a1a;
            border: 1px solid #333;
            color: #fff;
            padding: 16px 20px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.2s;
            text-align: left;
        }

        .login-option-btn:hover {
            background: #2a2a2a;
            border-color: #FF6600;
        }

        /* New post composition area */
        .compose-area {
            padding: 16px 20px;
            border-bottom: 1px solid #333;
        }

        .compose-textarea {
            width: 100%;
            background: transparent !important;
            border: none;
            outline: none;
            color: #fff !important;
            caret-color: #FF6600 !important; /* Use brand orange for better visibility */
            font-size: 16px;
            resize: vertical;
            min-height: 120px;
            max-height: 400px;
            font-family: inherit;
            line-height: 1.5;
            padding: 8px 0;
            /* Ensure cursor is always visible */
            text-shadow: none;
            -webkit-text-fill-color: #fff;
            /* Force caret visibility on webkit browsers */
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }
        
        .compose-textarea:focus {
            caret-color: #FF6600 !important;
            color: #fff !important;
            outline: none;
            /* Add subtle glow to show focus */
            box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
            border-radius: 4px;
        }

        .compose-textarea::placeholder {
            color: #666;
            opacity: 0.7;
        }
        
        /* Ensure cursor visibility in all text inputs */
        input[type="text"], input[type="email"], input[type="password"], textarea {
            caret-color: #FF6600 !important;
        }
        
        input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus {
            caret-color: #FF6600 !important;
            outline: none;
        }
        
        /* Fix for dark mode cursor issues */
        * {
            caret-color: inherit;
        }
        
        body {
            caret-color: #FF6600;
        }
        
        /* Webkit-specific cursor fixes */
        @media screen and (-webkit-min-device-pixel-ratio:0) {
            .compose-textarea {
                -webkit-text-fill-color: #fff !important;
                caret-color: #FF6600 !important;
            }
        }
        
        /* Firefox-specific fixes */
        @-moz-document url-prefix() {
            .compose-textarea {
                color: #fff !important;
                caret-color: #FF6600 !important;
            }
        }

        .compose-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 12px;
        }

        /* Monero address input field in compose area */
        .xmr-address-input {
            background: #1a1a1a;
            border: 1px solid #333;
            color: #fff;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 12px;
            width: 200px;
        }

        .compose-buttons {
            display: flex;
            gap: 8px;
        }

        .send-btn {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            border: none;
            color: #000;
            padding: 8px 16px;
            border-radius: 16px;
            font-weight: bold;
            cursor: pointer;
        }

        .cancel-btn {
            background: #333;
            border: 1px solid #666;
            color: #FFFFFF;
            padding: 8px 16px;
            border-radius: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .cancel-btn:hover {
            background: #444;
            border-color: #888;
        }

        .send-btn:hover {
            transform: scale(1.02);
        }

        .status {
            text-align: center;
            padding: 20px;
            color: #666;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
        }

        .error {
            color: #f56565;
            text-align: center;
            padding: 20px;
        }

        .retry-btn {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            color: #000;
            cursor: pointer;
            margin-left: 8px;
        }

        /* Notification interface styling */
        .notif-type-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .notif-type-btn {
            background: #1a1a1a;
            border: 1px solid #333;
            color: #ccc;
            padding: 8px 16px;
            border-radius: 16px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .notif-type-btn.active {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            color: #000;
            border-color: #FF6600;
        }

        .notif-type-btn:hover:not(.active) {
            background: #2a2a2a;
            border-color: #666;
        }

        .notification-item {
            border-bottom: 1px solid #333;
            padding: 16px 20px;
            transition: background 0.2s;
            cursor: pointer;
            max-width: 100%;
            overflow: hidden;
        }

        .notification-item .post-content {
            max-width: 100%;
            overflow: hidden;
        }

        .notification-item .post-content img,
        .notification-item img {
            max-width: 100% !important;
            height: auto !important;
            display: block;
        }

        .notification-item:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        .notification-header {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }

        .notification-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin-right: 12px;
            font-size: 16px;
        }

        .notification-content {
            flex: 1;
            overflow: hidden;
        }

        .notification-content img,
        .notification-item img {
            max-width: 100%;
            height: auto;
            display: block;
        }

        .notification-text {
            margin-bottom: 4px;
            line-height: 1.4;
        }

        .notification-time {
            color: #666;
            font-size: 12px;
        }

        .notification-preview {
            background: #0a0a0a;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 12px;
            margin-top: 8px;
            color: #ccc;
            font-size: 14px;
            line-height: 1.4;
            overflow: hidden;
        }

        .notification-preview img {
            max-width: 100%;
            height: auto;
            display: block;
        }

        .notifications-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding: 0 20px;
        }

        /* Profile page specific styling for text overflow prevention */
        .profile-text-content {
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-word;
            max-width: 100%;
            white-space: pre-wrap;
        }

        .profile-lightning-address {
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-all;
            max-width: 250px;
            display: inline-block;
            vertical-align: top;
        }

        .profile-website-link {
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-all;
            max-width: 200px;
            display: inline-block;
            vertical-align: top;
        }

        .profile-npub {
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-all;
            max-width: 100%;
            font-family: monospace;
        }

        /* Mobile responsive design - Enhanced mobile navigation */
        /* ==================== MESSAGES STYLES ==================== */
        
        .messages-page {
            width: 100%;
            height: 100vh;
            display: none;
            background: #000;
        }
        
        .messages-container {
            display: flex;
            height: 100%;
            width: 100%;
        }
        
        .conversations-list {
            width: 320px;
            border-right: 1px solid #333;
            display: flex;
            flex-direction: column;
            background: #0a0a0a;
        }
        
        .conversations-header {
            padding: 20px;
            border-bottom: 1px solid #333;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .conversations-header h2 {
            margin: 0;
            font-size: 20px;
        }
        
        .new-message-btn {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .new-message-btn:hover {
            background: #E55A00;
        }
        
        .conversations {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }
        
        .conversation-item {
            padding: 15px;
            border-radius: 8px;
            cursor: pointer;
            margin-bottom: 8px;
            transition: background 0.2s;
            border: 1px solid transparent;
            display: flex;
            align-items: center;
            position: relative;
        }
        
        .conversation-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .conversation-item.active {
            background: rgba(74, 144, 226, 0.1);
            border-color: #FF6600;
        }
        
        .conversation-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-right: 12px;
            flex-shrink: 0;
        }
        
        .conversation-info {
            flex: 1;
            overflow: hidden;
            min-width: 0;
        }
        
        .conversation-name {
            font-weight: bold;
            margin-bottom: 4px;
        }
        
        .conversation-preview {
            color: #888;
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .conversation-time {
            position: absolute;
            top: 15px;
            right: 15px;
            color: #666;
            font-size: 12px;
        }
        
        .message-thread {
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .message-header {
            padding: 20px;
            border-bottom: 1px solid #333;
            background: #0a0a0a;
            font-weight: bold;
        }
        
        .messages-display {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .message-bubble {
            max-width: 70%;
            padding: 12px 16px;
            border-radius: 18px;
            word-wrap: break-word;
            position: relative;
        }
        
        .message-bubble.sent {
            align-self: flex-end;
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            color: white;
            margin-left: auto;
        }
        
        .message-bubble.received {
            align-self: flex-start;
            background: #333;
            color: white;
        }

        .message-content {
            white-space: pre-wrap;
            word-wrap: break-word;
            overflow-wrap: break-word;
            word-break: break-word;
            max-width: 100%;
        }

        .message-time {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 4px;
        }
        
        .message-composer {
            padding: 20px;
            border-top: 1px solid #333;
            background: #0a0a0a;
            display: flex;
            gap: 10px;
            align-items: flex-end;
        }
        
        #messageInput {
            flex: 1;
            background: #1a1a1a;
            border: 1px solid #333;
            color: white;
            padding: 10px;
            border-radius: 20px;
            resize: none;
            font-family: inherit;
            font-size: 14px;
        }
        
        #messageInput:focus {
            outline: none;
            border-color: #FF6600;
        }
        
        .send-message-btn {
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
        }
        
        .send-message-btn:hover {
            background: #E55A00;
        }

        /* Media Upload Styles */
        .media-upload-section {
            margin-top: 12px;
        }
        
        .media-btn {
            background: #333;
            border: 1px solid #555;
            color: #fff;
            padding: 8px 16px;
            border-radius: 16px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .media-btn:hover {
            background: #444;
            border-color: #666;
        }
        
        .media-preview {
            margin-top: 12px;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 12px;
            background: #1a1a1a;
        }
        
        .media-preview img {
            max-width: 100%;
            max-height: 300px;
            border-radius: 8px;
            display: block;
        }
        
        .media-preview video {
            max-width: 100%;
            max-height: 300px;
            border-radius: 8px;
            display: block;
        }
        
        .media-preview .media-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 12px;
            color: #999;
        }
        
        .media-preview .remove-media {
            background: #ff4444;
            border: none;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }
        
        .media-preview .remove-media:hover {
            background: #ff6666;
        }
        
        .upload-progress {
            margin-top: 8px;
        }
        
        .upload-progress-bar {
            width: 100%;
            height: 4px;
            background: #333;
            border-radius: 2px;
            overflow: hidden;
        }
        
        .upload-progress-fill {
            height: 100%;
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            transition: width 0.3s ease;
        }
        
        .upload-status {
            font-size: 12px;
            color: #999;
            margin-top: 4px;
        }

        /* Post Context Menu */
        .post-menu {
            background: #1a1a1a;
            border: 1px solid #333;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            min-width: 180px;
            z-index: 10000;
        }

        .post-menu button {
            display: block;
            width: 100%;
            padding: 12px 16px;
            background: none;
            border: none;
            color: #fff;
            text-align: left;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s;
        }

        .post-menu button:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .post-menu button:first-child {
            border-radius: 8px 8px 0 0;
        }

        .post-menu button:last-child {
            border-radius: 0 0 8px 8px;
        }

        /* Thread Page */
        .thread-page {
            background: #000;
            color: #fff;
            min-height: 100vh;
        }

        .thread-header {
            padding: 16px 20px;
            border-bottom: 1px solid #333;
            display: flex;
            align-items: center;
            position: sticky;
            top: 0;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
        }

        .thread-header h2 {
            margin: 0;
            font-size: 20px;
        }

        .thread-content {
            padding: 20px;
            max-width: 800px;
        }

        /* Mobile: Add bottom padding for thread view to clear bottom nav */
        @media (max-width: 768px) {
            .thread-content {
                padding-bottom: 120px; /* Space for bottom nav (64px) + interaction icons + buffer */
            }
        }

        /* ==================== MOBILE NAVIGATION ==================== */
        
        /* Mobile menu toggle button */
        .mobile-menu-toggle {
            display: none;
            position: fixed;
            top: 16px;
            left: 16px;
            z-index: 1001;
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            border: none;
            color: #000;
            padding: 12px;
            border-radius: 8px;
            font-size: 18px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            min-width: 44px; /* Touch target size */
            min-height: 44px;
            transition: all 0.2s ease;
        }
        
        .mobile-menu-toggle:active {
            transform: scale(0.95);
        }
        
        /* Mobile menu button animation */
        .mobile-menu-toggle.menu-open {
            background: #333;
            color: #FF6600;
        }
        
        /* Mobile overlay for sidebar */
        .mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }
        
        @media (max-width: 768px) {
            /* NEW RESPONSIVE RULES FOR FEED-FIRST DESIGN */
            .feed-selector {
                display: none; /* Hide feed tabs on mobile */
            }

            .relay-indicator {
                display: none; /* Hide relay indicator on mobile */
            }

            .main {
                padding: 1rem; /* Reduce padding on mobile */
            }

            .logo img {
                width: 80px !important; /* Smaller logo on mobile */
                font-size: 0.7rem;
            }

            /* Show mobile menu toggle */
            .mobile-menu-toggle {
                display: block;
            }

            /* Transform sidebar for mobile */
            .sidebar {
                position: fixed;
                top: 0;
                left: -260px; /* Hidden by default */
                width: 260px;
                height: 100vh;
                background: #000;
                border-right: 1px solid #333;
                transition: left 0.3s ease;
                z-index: 1000;
                overflow-y: auto;
            }
            
            /* Show sidebar when mobile menu is open */
            .sidebar.mobile-open {
                left: 0;
            }
            
            /* Show overlay when mobile menu is open */
            .mobile-overlay.active {
                display: block;
            }
            
            /* Adjust main content for mobile */
            .main {
                margin-left: 0;
                max-width: 100%;
                padding-top: 60px; /* Space for mobile menu button */
            }
            
            /* Mobile header adjustments */
            .header {
                padding-left: 60px; /* Space for menu button */
            }
            
            /* Adjust logo size for mobile sidebar */
            .sidebar .logo img {
                width: 100px !important;
            }
            
            /* Mobile-specific nav item adjustments */
            .nav-item {
                padding: 16px;
                font-size: 18px;
            }
            
            /* Mobile post button */
            .post-button {
                padding: 16px 24px;
                font-size: 18px;
            }
            
            /* Mobile modal adjustments */
            .modal-content {
                width: 95%;
                max-width: 400px;
                max-height: 92vh;
                margin: 4vh auto;
            }
            
            /* Mobile compose area adjustments */
            .compose-area {
                padding: 16px;
            }
            
            /* Mobile post adjustments */
            .post {
                padding: 16px;
            }
            
            .post-content {
                font-size: 16px;
                line-height: 1.5;
            }
            
            /* Mobile search adjustments */
            .search-input {
                font-size: 16px; /* Prevents zoom on iOS */
            }
            
            /* Mobile form input adjustments */
            input, textarea, select {
                font-size: 16px !important; /* Prevents zoom on iOS */
            }
            
            /* Mobile touch improvements */
            .nav-item, .post-button, button {
                min-height: 44px; /* iOS recommended touch target size */
                display: flex;
                align-items: center;
            }
            
            /* Mobile notification adjustments */
            .notification-toast {
                top: 70px !important; /* Below mobile menu button */
                right: 10px !important;
                left: 10px !important;
                max-width: none !important;
            }
            
            /* Mobile profile page adjustments */
            .profile-header {
                padding: 16px !important;
            }
            
            /* Mobile thread view adjustments */
            .thread-modal {
                width: 100% !important;
                height: 100% !important;
                margin: 0 !important;
                border-radius: 0 !important;
            }
            
            /* Mobile settings page adjustments */
            .settings-container {
                padding: 16px !important;
            }
            
            /* Improve mobile scrolling */
            .main, .sidebar {
                -webkit-overflow-scrolling: touch;
            }
        }

        /* Media Upload Styles */
        .media-upload-section {
            margin-top: 12px;
        }
        
        .media-btn {
            background: #333;
            border: 1px solid #555;
            color: #fff;
            padding: 8px 16px;
            border-radius: 16px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            margin-right: 8px;
        }
        
        .media-btn:hover {
            background: #444;
            border-color: #666;
        }
        
        .media-preview {
            margin-top: 12px;
            border: 1px solid #333;
            border-radius: 8px;
            padding: 12px;
            background: #1a1a1a;
        }
        
        .media-preview img {
            max-width: 100%;
            max-height: 300px;
            border-radius: 8px;
            display: block;
        }
        
        .media-preview video {
            max-width: 100%;
            max-height: 300px;
            border-radius: 8px;
            display: block;
        }
        
        .media-preview .media-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 12px;
            color: #999;
        }
        
        .media-preview .remove-media {
            background: #ff4444;
            border: none;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }
        
        .media-preview .remove-media:hover {
            background: #ff6666;
        }
        
        .upload-progress {
            margin-top: 8px;
        }
        
        .upload-progress-bar {
            width: 100%;
            height: 4px;
            background: #333;
            border-radius: 2px;
            overflow: hidden;
        }
        
        .upload-progress-fill {
            height: 100%;
            background: linear-gradient(135deg, #FF6600, #8B5CF6);
            transition: width 0.3s ease;
        }
        
        .upload-status {
            font-size: 12px;
            color: #999;
            margin-top: 4px;
        }
        /* === EMBEDDED NOTES === */
        .embedded-note {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 12px;
            margin: 8px 0;
            transition: all 0.2s ease;
        }

        .embedded-note:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 102, 0, 0.3);
        }

        .embedded-note-content {
            color: #fff;
        }

        .embedded-note-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 12px;
        }

        .embedded-note-author {
            color: #FF6600;
            font-weight: bold;
        }

        .embedded-note-time {
            color: #888;
        }

        .embedded-note-text {
            color: #ccc;
            line-height: 1.4;
            font-size: 14px;
        }

        .embedded-note-unavailable,
        .embedded-note-error {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #888;
            font-size: 12px;
            font-style: italic;
        }

        .embedded-note-label {
            color: #666;
        }

        .embedded-note-id {
            font-family: monospace;
            color: #999;
        }

        .embedded-note-status {
            color: #ff6666;
        }

        .embedded-note.loaded {
            border-color: rgba(255, 102, 0, 0.2);
        }

        .embedded-note.unavailable {
            opacity: 0.6;
            border-color: rgba(255, 255, 255, 0.05);
        }

        .embedded-note.error {
            border-color: rgba(255, 102, 102, 0.3);
        }

/* Spinner animation for sync status indicator */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Screen Loading Animations */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.skeleton-loader {
    width: 100%;
    padding: 20px;
}

.skeleton-post {
    border-bottom: 1px solid #333;
    padding: 16px 20px;
    margin-bottom: 0;
}

.skeleton-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    background: linear-gradient(to right, #222 0%, #333 50%, #222 100%);
    background-size: 468px 104px;
    animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(to right, #222 0%, #333 50%, #222 100%);
    background-size: 468px 104px;
    animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-line-short {
    width: 40%;
}

.skeleton-line-medium {
    width: 60%;
}

.skeleton-line-long {
    width: 100%;
}

.skeleton-content {
    margin-bottom: 12px;
}

.skeleton-content .skeleton-line {
    margin-bottom: 8px;
}

.skeleton-actions {
    display: flex;
    gap: 40px;
    margin-top: 12px;
}

.skeleton-action {
    width: 60px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(to right, #222 0%, #333 50%, #222 100%);
    background-size: 468px 104px;
    animation: shimmer 1.2s ease-in-out infinite;
}

/* ==================== TOAST NOTIFICATIONS ==================== */

/* Toast container - bottom right on desktop, top center on mobile */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

/* Individual toast message */
.toast {
    background: #1a1a1a;
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.toast:hover {
    transform: translateX(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* Toast types with different colors */
.toast.success {
    border-left-color: #4CAF50;
    background: linear-gradient(to right, rgba(76, 175, 80, 0.1), #1a1a1a);
}

.toast.error {
    border-left-color: #f44336;
    background: linear-gradient(to right, rgba(244, 67, 54, 0.1), #1a1a1a);
}

.toast.info {
    border-left-color: #2196F3;
    background: linear-gradient(to right, rgba(33, 150, 243, 0.1), #1a1a1a);
}

.toast.warning {
    border-left-color: #FF6600;
    background: linear-gradient(to right, rgba(255, 102, 0, 0.1), #1a1a1a);
}

/* Toast icon */
.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Toast content */
.toast-content {
    flex: 1;
    color: #fff;
}

.toast-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}

.toast-message {
    font-size: 13px;
    color: #ccc;
    line-height: 1.4;
}

/* Toast close button */
.toast-close {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #fff;
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 0 8px;
    animation: progress 3s linear;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile adjustments for toasts */
@media (max-width: 768px) {
    #toastContainer {
        top: 80px;
        bottom: auto;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    @keyframes slideIn {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }

    /* ========================================
       MOBILE BOTTOM NAVIGATION BAR
       ======================================== */
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--darker-bg);
        border-top: 1px solid var(--border-color);
        padding: 8px 0;
        z-index: 1000;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }

    .mobile-bottom-nav .nav-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 8px 12px;
        min-width: 60px;
        min-height: 56px; /* Thumb-zone friendly - exceeds 48px minimum */
        transition: all 0.2s ease;
        border-radius: 12px;
        position: relative;
    }

    .mobile-bottom-nav .nav-btn:active {
        transform: scale(0.95);
        background: var(--card-hover);
    }

    .mobile-bottom-nav .nav-btn.active {
        color: var(--monero-orange);
    }

    .mobile-bottom-nav .nav-btn.active::after {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        background: var(--monero-orange);
        border-radius: 50%;
    }

    .mobile-bottom-nav .nav-icon {
        font-size: 22px;
        margin-bottom: 2px;
        display: block;
    }

    .mobile-bottom-nav .nav-label {
        font-size: 11px;
        font-weight: 500;
        display: block;
    }

    .mobile-bottom-nav .nav-btn-primary {
        background: linear-gradient(135deg, var(--monero-orange), #FF8533);
        color: white;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    }

    .mobile-bottom-nav .nav-btn-primary:active {
        background: linear-gradient(135deg, #FF5500, var(--monero-orange));
        box-shadow: 0 2px 8px rgba(255, 102, 0, 0.4);
    }

    .mobile-bottom-nav .nav-btn-primary .nav-icon {
        font-size: 24px;
    }

    /* Add padding to main content to account for bottom nav */
    body {
        padding-bottom: 64px;
    }

    #posts {
        padding-bottom: 80px; /* Extra space for bottom nav */
    }

    /* Hide bottom nav on desktop (show on mobile only) */
    @media (min-width: 769px) {
        .mobile-bottom-nav {
            display: none;
        }

        body {
            padding-bottom: 0;
        }

        #posts {
            padding-bottom: 20px;
        }
    }
}

/* ==================== TRUST BADGE STYLES (NIP-85 WoT) ==================== */

/* Trust badge container */
.trust-badge {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: help;
    user-select: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.trust-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Trust level specific colors */
.trust-level-verified {
    background-color: rgba(16, 185, 129, 0.15); /* Green background */
    color: #10B981; /* Green text */
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.trust-level-trusted {
    background-color: rgba(59, 130, 246, 0.15); /* Blue background */
    color: #3B82F6; /* Blue text */
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.trust-level-neutral {
    color: #a0a0a0; /* Gray (unused, no badge shown) */
}

.trust-level-low {
    background-color: rgba(245, 158, 11, 0.15); /* Orange background */
    color: #F59E0B; /* Orange text */
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.9em; /* Slightly larger for emoji warning */
    padding: 1px 4px;
}

.trust-level-unknown {
    color: #606060; /* Dark gray (unused, no badge shown) */
}

/* Trust badge in profile header */
.profile-header .trust-badge {
    font-size: 1.2em;
    margin-left: 8px;
}

/* Trust badge in feed/notes */
.post .username .trust-badge {
    margin-left: 4px;
}

/* Trust badge tooltip (optional enhancement) */
.trust-badge[title] {
    cursor: help;
}

/* Trust score details (for hover or click) */
.trust-score-details {
    display: none;
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    font-size: 13px;
    line-height: 1.5;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.trust-score-details.visible {
    display: block;
}

.trust-score-details .score-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--monero-orange);
    margin-bottom: 8px;
}

.trust-score-details .score-label {
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== PAYWALL STYLES ==================== */

/* Locked content container */
.paywall-locked {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin: 12px 0;
    background: var(--card-bg);
}

.paywall-preview {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.paywall-preview p {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.paywall-overlay {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.paywall-lock-icon {
    font-size: 32px;
    opacity: 0.8;
}

.paywall-price {
    font-size: 18px;
    font-weight: 700;
    font-family: monospace;
    color: #FF6600;
}

.paywall-unlock-btn {
    background: linear-gradient(135deg, #FF6600, #cc5200);
    border: none;
    color: #000;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 44px; /* Mobile touch target */
}

.paywall-unlock-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.paywall-unlock-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Unlocked content */
.paywall-unlocked {
    position: relative;
    padding: 16px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    background: rgba(74, 222, 128, 0.05);
    margin: 12px 0;
}

.paywall-unlocked-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.paywall-content {
    color: var(--text-primary);
    line-height: 1.6;
}

/* Paywall toggle in compose */
.paywall-toggle-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-top: 12px;
}

.paywall-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.paywall-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #FF6600;
}

.paywall-toggle label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.paywall-price-input {
    display: none;
    align-items: center;
    gap: 8px;
}

.paywall-price-input.visible {
    display: flex;
}

.paywall-price-input input {
    width: 100px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 16px; /* Prevent iOS zoom */
}

.paywall-price-input span {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Paywall Compose Toggle - Row Layout */
.paywall-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Paywall Preview Section */
.paywall-preview-section {
    display: none;
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.paywall-preview-section.visible {
    display: block;
}

.paywall-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
    min-height: 44px; /* Mobile touch target */
}

.paywall-preview-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.paywall-preview-header span:first-child {
    font-size: 13px;
    color: var(--text-secondary);
}

.paywall-preview-toggle {
    font-size: 12px;
    color: var(--monero-orange);
    transition: transform 0.2s;
}

.paywall-preview-toggle.expanded {
    transform: rotate(180deg);
}

.paywall-preview-suggested {
    display: none;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(255, 102, 0, 0.05);
    border-top: 1px solid var(--border-color);
    font-style: italic;
    line-height: 1.4;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.paywall-preview-edit {
    display: none;
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.paywall-preview-edit.visible {
    display: block;
}

.paywall-preview-edit textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 16px; /* Prevent iOS zoom */
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.paywall-preview-edit textarea:focus {
    outline: none;
    border-color: var(--monero-orange);
}

.paywall-preview-edit textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.paywall-preview-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    padding-left: 2px;
}

/* Unlock modal */
.paywall-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: 16px;
}

.paywall-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.paywall-modal {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--border-color);
    transform: scale(0.95);
    transition: transform 0.2s;
    max-height: 90vh;
    overflow-y: auto;
}

.paywall-modal-overlay.visible .paywall-modal {
    transform: scale(1);
}

.paywall-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.paywall-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.paywall-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paywall-modal-body {
    margin-bottom: 20px;
}

.paywall-modal-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.paywall-modal-row:last-child {
    border-bottom: none;
}

.paywall-modal-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.paywall-modal-value {
    color: var(--text-primary);
    font-size: 14px;
    font-family: monospace;
}

.paywall-modal-value.highlight {
    color: #FF6600;
    font-weight: 600;
}

.paywall-modal-total {
    background: rgba(255, 102, 0, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.paywall-modal-total .paywall-modal-value {
    font-size: 18px;
    color: #FF6600;
}

.paywall-modal-footer {
    display: flex;
    gap: 12px;
}

.paywall-modal-btn {
    flex: 1;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    min-height: 48px; /* Mobile touch target */
}

.paywall-modal-btn:hover:not(:disabled) {
    transform: scale(1.02);
}

.paywall-modal-btn.cancel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.paywall-modal-btn.confirm {
    background: linear-gradient(135deg, #FF6600, #cc5200);
    border: none;
    color: #000;
}

.paywall-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Unlock progress */
.paywall-progress {
    text-align: center;
    padding: 20px;
}

.paywall-progress-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: #FF6600;
    border-radius: 50%;
    animation: paywall-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes paywall-spin {
    to { transform: rotate(360deg); }
}

.paywall-progress-message {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Success state */
.paywall-success {
    text-align: center;
    padding: 20px;
}

.paywall-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.paywall-success-message {
    color: #4ade80;
    font-size: 16px;
    font-weight: 600;
}

/* Error state */
.paywall-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.paywall-error-message {
    color: #ef4444;
    font-size: 13px;
}

/* Wallet required notice */
.paywall-wallet-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.paywall-wallet-notice p {
    color: #ffc107;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.paywall-wallet-notice a {
    color: #FF6600;
    text-decoration: none;
    font-weight: 600;
}

/* Creator stats */
.paywall-creator-stats {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.paywall-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.paywall-stat-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.paywall-stat-value {
    color: var(--text-primary);
    font-size: 13px;
    font-family: monospace;
}

/* ==================== PAYWALL PAYMENT METHOD SELECTION ==================== */

.paywall-price-display {
    text-align: center;
    padding: 16px;
    background: rgba(255, 102, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.paywall-price-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.paywall-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #FF6600;
    font-family: monospace;
}

.paywall-method-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.paywall-method-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    min-height: 70px;
}

.paywall-method-btn:hover {
    border-color: var(--monero-orange);
    background: rgba(255, 102, 0, 0.05);
}

.paywall-method-btn.recommended {
    border-color: rgba(255, 102, 0, 0.5);
    background: rgba(255, 102, 0, 0.08);
}

.paywall-method-btn.setup {
    border-style: dashed;
    opacity: 0.8;
}

.paywall-method-btn .method-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.paywall-method-btn .method-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.paywall-method-btn .method-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.paywall-method-btn .method-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.paywall-method-btn .method-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
}

.paywall-method-btn .method-badge.delay {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* External wallet payment UI */
.paywall-external-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #fbbf24;
}

.paywall-external-warning .warning-icon {
    font-size: 18px;
}

.paywall-payment-details {
    margin-bottom: 20px;
}

.paywall-qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.paywall-qr {
    padding: 12px;
    background: #fff;
    border-radius: 8px;
}

.paywall-address-box,
.paywall-amount-box {
    margin-bottom: 12px;
}

.paywall-address-box label,
.paywall-amount-box label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.address-copy,
.amount-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 44px;
}

.address-copy:hover,
.amount-copy:hover {
    border-color: var(--monero-orange);
}

.address-copy code,
.amount-copy code {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-primary);
}

.copy-icon {
    font-size: 14px;
    opacity: 0.7;
}

.paywall-tx-entry {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Pending confirmation UI */
.paywall-pending-status {
    text-align: center;
    padding: 20px 0;
}

.paywall-pending-status .pending-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.paywall-pending-status h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.paywall-pending-status p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.paywall-pending-status .pending-txid {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.paywall-pending-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
}

.paywall-pending-progress .pending-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: #FF6600;
    border-radius: 50%;
    animation: paywall-spin 1s linear infinite;
}

.paywall-pending-progress span {
    font-size: 13px;
    color: var(--text-secondary);
}
