/* ==========================================================================
   FIREBIX UNIFIED POSTS FEED ARCHITECTURE (YT-COMMUNITY COMPACT LOCK)
   ========================================================================== */

:root {
    --app-bg: #FAFAFB;
    --card-surface: #FFFFFF;
    --border-light: rgba(0, 0, 0, 0.04);
    --text-main: #111827;
    --text-secondary: #6B7280;
    --fire-brand: #F13423;
    --pill-idle: #F3F4F6;
    --radius-card: 14px;
    --radius-inner: 10px;
}

/* 🟢 FIX: Global Tap Highlight Removal for App-Like Feel */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--app-bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* 🟢 FIX: Prevent text selection on buttons and links for native feel */
button, a {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation; /* Removes 300ms click delay on mobile */
}

/* 💻 FIXED DESKTOP SYSTEM ALIGNMENT & LAYER RESTORATION (No flex overrides) */
.app-layout-wrapper {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 96px; 
    box-sizing: border-box;
}

.main-content-stream {
    width: 100%;
    max-width: 600px; 
    margin: 0 auto;
    padding: 20px 16px;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .app-layout-wrapper {
        padding-left: 260px; 
        padding-bottom: 40px;
    }
}

/* 📱 FEED TOP BAR SECTION WITH BACK NAVIGATION */
.feed-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
}

.feed-left-branding-node {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-nav-action-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.back-nav-action-btn:hover { background: #E5E7EB; }

.feed-title-context {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.feed-title-context h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    color: var(--text-main);
}

.feed-title-context span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 1px;
}

.feed-right-actions-node {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-action-node {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card-surface);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    font-size: 15px;
    padding: 0;
    transition: background 0.15s ease;
}
.header-action-node:hover { background: #F3F4F6; }

/* 🪐 SMART SMOOTH SLIDING CHIPS CONTAINER */
.feed-filter-chips-wrapper {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    padding: 0;
    margin-bottom: 0;
    scrollbar-width: none;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.feed-filter-chips-wrapper::-webkit-scrollbar { display: none; }

.feed-filter-chips-wrapper.is-open {
    max-height: 50px;
    opacity: 1;
    visibility: visible;
    padding: 4px 0 14px 0;
    margin-bottom: 12px;
}

.filter-chip-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #F3F4F6;
    color: #4B5563;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.filter-chip-node:hover { background: #E5E7EB; }
.filter-chip-node.is-active { background: #111827; color: #FFFFFF !important; }

/* 🎴 YT-STYLE MASTER COMPACT CARDS */
.fire-feed-stream-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.yt-style-post-card {
    position: relative;
    background: var(--card-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.post-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
    gap: 8px;
}

.post-card-profile-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.creator-identity-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
}

.avatar-holder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.02);
    background-size: cover;
    flex-shrink: 0;
}

.creator-meta-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.display-name {
    font-size: 13.5px;
    font-weight: 750;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.handle-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.inline-follow-btn {
    border: none;
    background: #111827; 
    color: #ffffff;      
    font-size: 10px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.inline-follow-btn:hover { background: var(--fire-brand); }

.top-right-badges { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.category-pill-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; background: var(--pill-idle); color: #4B5563; padding: 3px 6px; border-radius: 20px; }

.post-options-menu-trigger {
    background: none; border: none; font-size: 15px; color: var(--text-secondary); cursor: pointer; padding: 2px; display: flex; align-items: center; justify-content: center;
}

/* 📸 PURE CHRISP COVER CANVAS: काला रंग और साइड बार गायब, पूरी इमेज भरी हुई */
.post-preview-media-frame {
    position: relative !important;
    width: 100% !important;
    height: 320px !important; /* निश्चित पतली ऊंचाई */
    border-radius: var(--radius-inner) !important;
    overflow: hidden !important;
    margin-bottom: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    background: #F3F4F6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.post-preview-media-frame img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* पूरी इमेज बॉक्स को भर देगी बिना किसी काले बार के */
    position: relative !important;
    z-index: 1 !important;
}

.multiple-images-indicator-badge {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    background: rgba(17, 24, 39, 0.8) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #FFFFFF !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    z-index: 2;
}

/* 📥 UNIFIED CONTENT AREA */
.post-card-content-area {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.post-headline-title {
    font-size: 15px !important;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    margin: 0 0 4px 0;
}

.post-desc-container { width: 100%; }
.post-body-prose { font-size: 13.5px !important; line-height: 1.45; color: #374151; margin: 0; white-space: pre-wrap; }
.post-body-prose.data-truncate { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 🛠 PILL SHAPED ACTION SYSTEM BAR */
.post-card-action-bar-nodes {
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 5px 0;
    margin-bottom: 10px;
    width: 100%;
}

.segmented-like-dislike-pill { display: flex; background: var(--pill-idle); border-radius: 30px; padding: 1.5px; }
.action-btn-item {
    background: var(--pill-idle); border: none; color: var(--text-main); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 30px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.segmented-like-dislike-pill .action-btn-item { background: transparent; padding: 5px 10px; }
.segmented-like-dislike-pill .dislike-node { padding-left: 6px; border-left: 1px solid rgba(0, 0, 0, 0.06); border-radius: 0 30px 30px 0; }
.action-btn-item:hover { background: rgba(0, 0, 0, 0.04); }
.action-btn-item.is-liked { color: #FF6B35; background: rgba(255, 107, 53, 0.06); }
.post-like-count { font-weight: 700; }
.youtube-share-arrow { transform: scaleX(-1); font-size: 14px; }

.post-card-time-metadata { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); font-size: 11px; font-weight: 500; }

.empty-feed-graphic-card {
    background: var(--card-surface); border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 40px 20px; text-align: center; width: 100%;
}
.empty-feed-graphic-card i { font-size: 32px; color: #D1D5DB; display: block; margin-bottom: 10px; }
.empty-feed-graphic-card h4 { margin: 0 0 4px 0; font-size: 15px; font-weight: 700; }
.empty-feed-graphic-card p { margin: 0; font-size: 12.5px; color: var(--text-secondary); }

/* 🪐 POSTS OVERLAY COMMENTS SHEET SYSTEM */
.posts-comments-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.posts-comments-modal.show { display: flex; }

.posts-comments-sheet {
    width: 100%;
    max-width: 480px;
    height: 75vh;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.posts-sheet-drag-handle { width: 40px; height: 4px; background: #E5E7EB; border-radius: 2px; margin: 10px auto 4px auto; }
.posts-comments-header { padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #F3F4F6; }
.posts-comments-header h3 { font-size: 15px; font-weight: 800; color: #111827; }
.posts-comments-header h3 span { color: #6B7280; font-size: 13px; }

#closePostsComments { background: transparent; border: none; font-size: 22px; cursor: pointer; color: #4B5563; }

.posts-comments-list { flex: 1; overflow-y: auto; padding: 10px 20px; }
.posts-comments-loading, .posts-comments-empty-message { text-align: center; padding: 30px 0; color: #9CA3AF; font-size: 13px; }

.posts-comments-input-wrap {
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #F3F4F6;
    background: #ffffff;
}
.posts-comments-input-wrap input {
    flex: 1; padding: 10px 14px; border-radius: 20px; border: 1px solid #E5E7EB; background: #F9FAFB; font-size: 13px; outline: none;
}
#sendPostsCommentBtn {
    background: #F13423; color: #ffffff; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ==========================================================================
   🎇 CELEBRATION MATRIX
   ========================================================================== */
#followCelebrationCanvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10000; }
.follow-thanks-toast-alert { position: fixed; top: -80px; left: 50%; transform: translateX(-50%) scale(0.9); background: #111827; color: #ffffff; padding: 10px 20px; border-radius: 30px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); z-index: 10001; opacity: 0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.follow-thanks-toast-alert.show-toast { top: 20px; opacity: 1; transform: translateX(-50%) scale(1); }
.thanks-toast-content { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.thanks-toast-content b { color: #FF6B35; }

/* 📱 MOBILE MODIFIERS */
@media (max-width: 768px) {
    .main-content-stream { padding: 12px 10px 84px 10px; }
    .yt-style-post-card { padding: 10px; }
    .action-btn-item span { display: none; }
    .post-preview-media-frame { max-height: 340px; aspect-ratio: 1 / 1; }
    .display-name { max-width: 105px !important; font-size: 13.5px !important; }
    .handle-name { max-width: 105px !important; font-size: 11px !important; }
    .inline-follow-btn { padding: 4px 10px !important; font-size: 10.5px !important; margin-left: 6px !important; }
    .category-pill-tag { font-size: 9px !important; padding: 3px 6px !important; }
}