        :root {
            /* Combined Clean & Luxury Palette */
            --q-red: #b92b27;
            --q-blue: #1DA1F2;
            --q-bg: #f8fafc;
            --q-surface: #ffffff;
            --q-border: #e2e8f0;
            --q-text: #0f1419;
            --q-muted: #64748b;
            --q-light: #e1e8ed;
            --feed-w: 680px;

            /* Luxury UI Extensions */
            --card-bg: #ffffff;
            --border-soft: #e2e8f0;
            --text-dark: #0f172a;
            --text-gray: #64748b;
            --brand-blue: #4f46e5;
            --brand-light: #e0e7ff;
            --danger: #ef4444;
        }

        * { box-sizing: border-box; }
        body { margin: 0; background: var(--q-bg); font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text-dark); line-height: 1.5; }
        a { text-decoration: none; color: inherit; }

        .opn-wrapper { padding-top: 0px; }

        /* --- SEARCH BAR --- */
        .app-search-wrapper { position: sticky; top: 0; z-index: 100; background: var(--q-bg); padding: 15px 0; border-bottom: 1px solid var(--border-soft); }
        .search-inner { max-width: 600px; margin: 0 auto; padding: 0 15px; position: relative; }
        .search-box input { width: 100%; padding: 12px 24px; border-radius: 9999px; border: 1px solid var(--border-soft); background: #f0f2f5; font-size: 15px; outline: none; transition: all 0.2s ease; font-family: inherit; color: var(--text-dark); }
        .search-box input::placeholder { color: #8492a6; }
        .search-box input:hover { background: #e9ecef; }
        .search-box input:focus { border-color: #cbd5e1; background: #fff; box-shadow: 0 0 0 4px #f1f5f9; }

        /* LIVE SEARCH DROPDOWN */
        .live-search-results { display: none; position: absolute; top: 55px; left: 15px; right: 15px; background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); z-index: 101; max-height: 400px; overflow-y: auto; overflow-x: hidden; }
        .live-search-item { display: block; padding: 14px 18px; border-bottom: 1px solid #f0f2f5; transition: background 0.1s; cursor: pointer; }
        .live-search-item:hover { background: #f8f9fa; }
        .live-search-item:last-child { border-bottom: none; }
        .ls-user { font-size: 12px; color: var(--text-gray); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
        .ls-content { font-size: 14px; color: var(--text-dark); line-height: 1.4; }
        .live-search-all { padding: 14px; text-align: center; color: var(--brand-blue); font-weight: 600; font-size: 14px; cursor: pointer; background: #fafbfc; border-top: 1px solid #f0f2f5; transition: 0.2s; }
        .live-search-all:hover { background: #f1f5f9; }

        /* --- CATEGORY SWIPER --- */
        .cat-swiper-container { position: sticky; top: 60px; z-index: 90; background: rgba(248, 250, 252, 0.9); backdrop-filter: blur(10px); padding: 12px 0; margin-bottom: 16px; border-bottom: 1px solid var(--border-soft); width: 100%; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
        .cat-swiper { display: flex; gap: 8px; overflow-x: auto; padding: 0 15px; scrollbar-width: none; max-width: 1000px; margin: 0 auto; -ms-overflow-style: none; }
        .cat-swiper::-webkit-scrollbar { display: none; }
        .cat-item { white-space: nowrap; padding: 0px 16px; border-radius: 99px; background: var(--card-bg); border: 1px solid var(--border-soft); color: var(--text-gray); text-decoration: none; font-size: 14px; font-weight: 600; transition: 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.02); cursor: pointer; user-select: none; }
        .cat-item:hover { border-color: var(--text-gray); color: var(--text-dark); background-color: rgba(29, 161, 242, 0.05); }
        .cat-item.active { background: var(--text-dark); color: var(--card-bg); border-color: var(--text-dark); }

        /* --- LAYOUT --- */
        .app-container { max-width: 1050px; margin: 24px auto; display: grid; grid-template-columns: 1fr 320px; gap: 30px; padding: 0 15px; align-items: start; }
        .main-feed { max-width: var(--feed-w); width: 100%; margin: 0 auto; }

        /* --- COMPOSER --- */
        .composer { background: var(--card-bg); border: 1px solid var(--border-soft); border-radius: 16px; padding: 16px 20px; margin-bottom: 20px; display: flex; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.02); position: relative; }
        .comp-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
        .comp-body { flex: 1; min-width: 0;}
        .comp-textarea { padding-top: 10px; width: 100%; border: none; font-size: 16px; outline: none; resize: none; min-height: 65px; font-family: inherit; margin-bottom: 10px; color: var(--text-dark); line-height: 1.5; background: transparent;}
        .comp-textarea::placeholder { color: #8492a6; }
        
        .comp-tools { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-soft); padding-top: 12px; flex-wrap: wrap; gap: 10px; }
        .tool-btn { color: var(--text-gray); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--border-soft); transition: 0.2s; background: transparent;}
        .tool-btn:hover { background: var(--brand-light); color: var(--brand-blue); border-color: var(--brand-light); }
        
        .char-counter { font-size: 13px; font-weight: 600; color: var(--text-gray); }
        .char-counter.warning { color: orange; }
        .char-counter.danger { color: var(--danger); }
        .post-btn { background: var(--brand-blue); color: white; border: none; padding: 8px 24px; border-radius: 99px; font-weight: 600; cursor: pointer; transition: 0.2s; opacity: 0.5; pointer-events: none; font-family: inherit; }
        .post-btn.ready { opacity: 1; pointer-events: auto; }
        .post-btn.ready:hover { background: #4338ca; transform: scale(0.98); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2); }

        /* FLOATING CATEGORY SELECTOR (Integrated inline with tools) */
        .custom-select-wrapper { position: relative; z-index: 20; }
        .custom-select-btn { background: var(--card-bg); border: 1px solid var(--border-soft); color: var(--text-dark); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 99px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
        .custom-select-btn:hover { border-color: var(--brand-blue); }
        .cat-color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
        .custom-select-dropdown { position: absolute; top: auto; left: 0; background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 160px; display: none; flex-direction: column; overflow: hidden; margin-bottom: 5px; }
        .custom-select-dropdown.open { display: flex; animation: slideDown 0.2s ease forwards; }
        .custom-select-item { padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-dark); transition: 0.2s; }
        .custom-select-item:hover { background: #f8fafc; }

        /* --- CARDS --- */
        .card { background: var(--card-bg); border: 1px solid var(--border-soft); border-radius: 16px; margin-bottom: 16px; padding: 16px 20px; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.02); position: relative; }
        .card:hover { background: #fafafa; }
        
        .user-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; position: relative; z-index: 2; padding-right: 40px; }
        .user-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
        .user-name { font-weight: 700; font-size: 15px; color: var(--text-dark); }
        .user-name:hover { text-decoration: underline; }
        .user-meta { font-size: 13px; color: var(--text-gray); }
        .badge-box svg { display: inline-block; vertical-align: middle; margin-bottom: 2px; }
        
        .op-text { font-size: 16px; color: var(--text-dark); margin-bottom: 12px; line-height: 1.5; white-space: pre-wrap; }
        
       /* --- DELETE BUTTON --- */
        .del-btn { 
            position: absolute; 
            top: 12px; 
            right: 12px; 
            background: #f1f5f9; 
            border: none; 
            color: #cbd5e1; 
            cursor: pointer; 
            font-size: 16px; 
            transition: 0.2s; 
            width: 32px; 
            height: 32px; 
            border-radius: 50%; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            z-index: 5; 
            padding: 0; 
            opacity: 1; /* Changed to 1 so it is always visible */
            pointer-events: auto; /* Always clickable */
        }
        
        .del-btn:hover { 
            color: var(--danger); 
            background: #fef2f2; 
        }
        
        .del-btn svg { 
            width: 18px; 
            height: 18px; 
        }

        /* ALWAYS show on mobile/touch screens (since they can't hover) */
        @media (hover: none) {
            .del-btn { opacity: 1; pointer-events: auto; }
        }
        /* --- METACARDS / LINKS --- */
        .opn-hashtag { color: var(--brand-blue); font-weight: 600; text-decoration: none; cursor: pointer; transition: color 0.2s; }
        .opn-hashtag:hover { text-decoration: underline; color: #4338ca; }
        
        .meta-card.large { display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; margin-top: 12px; transition: all 0.2s ease; background: var(--card-bg); position: relative; max-width: 100%; }
        .meta-card.large:hover { border-color: #cbd5e1; box-shadow: 0 8px 20px rgba(0,0,0,0.06); transform: translateY(-2px); }
        .meta-img-wrapper { width: 100%; height: 220px; background-color: #f1f5f9; position: relative; overflow: hidden; }
        .meta-img-large { width: 100%; height: 100%; background-position: center; background-size: cover; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #94a3b8; transition: transform 0.5s ease; }
        .meta-card.large:hover .meta-img-large { transform: scale(1.05); }
        .meta-title-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 16px 16px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%); color: white; font-weight: 700; font-size: 16px; line-height: 1.3; z-index: 2; margin: 0; }
        .meta-domain-footer { padding: 12px 16px; font-size: 12px; color: var(--text-gray); display: flex; align-items: center; gap: 6px; font-weight: 600; background: #f8fafc; border-top: 1px solid var(--border-soft); z-index: 3; position: relative; }

        .ap-link-card { border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; margin: 10px 0; background: var(--card-bg); transition: 0.2s; display: flex; align-items: center; cursor: pointer; position: relative; z-index: 2; }
        .ap-link-card:hover { background: #f8f9fa; }
        .ap-link-icon { background: #f0f2f5; padding: 15px; font-size: 24px; border-right: 1px solid var(--border-soft); }
        .ap-link-info { padding: 12px 15px; }
        .ap-link-title { font-weight: 700; font-size: 14px; color: var(--text-dark); }
        .ap-link-url { font-size: 13px; color: var(--text-gray); }

        /* --- ACTION BAR & STATS --- */
        .action-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; position: relative; z-index: 2; }
        .vote-grp { display: flex; align-items: center; background: #f0f2f5; border-radius: 20px; }
        .v-btn { background: none; border: none; padding: 8px 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--text-gray); font-size: 13px; font-weight: 600; border-radius: 20px; transition: 0.1s; outline: none; }
        .v-btn:hover { background: rgba(0,0,0,0.05); }
        .v-btn.up-active { color: var(--brand-blue); }
        .v-btn.down-active { color: var(--danger); }
        .v-sep { width: 1px; height: 16px; background: #cbd5e1; }

        .stats-grp { display: flex; align-items: center; gap: 15px; font-size: 13px; color: var(--text-gray); font-weight: 500; }
        .stat-item { display: flex; align-items: center; gap: 5px; }

        /* --- RIGHT WIDGET --- */
        aside { position: sticky; top: 80px; }
        .widget { background: var(--card-bg); border: 1px solid var(--border-soft); border-radius: 16px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
        .side-title { font-size: 16px; font-weight: 800; color: var(--text-dark); margin-bottom: 12px; }
        .trend-item { display: block; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
        .trend-item:last-child { border: none; padding-bottom: 0; }
        .trend-item:hover .trend-q { color: var(--brand-blue); }
        .trend-q { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--text-dark); transition: 0.1s; }
        .trend-v { color: var(--text-gray); font-size: 12px; }

        /* --- MOBILE RESPONSIVE --- */
        @media (max-width: 900px) {
            .app-container { grid-template-columns: 1fr; margin-top: 15px; overflow-x: hidden; }
            aside { display: none; }
            .main-feed { max-width: 100%; overflow-x: hidden; }
            
            .composer { padding: 12px; gap: 8px; border-radius: 12px; }
            .comp-avatar { width: 36px; height: 36px; }
            .comp-tools select, .custom-select-btn { max-width: 120px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
            .comp-right { width: 100%; justify-content: space-between; margin-top: 5px; }
        }

        @keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
