/* --- Global Variables & Palette --- */
:root {
    anyworks-black: #000000;
    anyworks-gray: #f3f2ef; /* LinkedIn-style Background */
    anyworks-slate: #f1f5f9;
    white: #ffffff;
    border-light: #e0e0e0;
    anyworks-yellow: #ffc107;
    
    /* Professional Action Colors */
    btn-contribute: #6366f1; 
    btn-demand: #10b981;     
}

/* --- Base Setup --- */
body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--anyworks-gray);
    margin: 0;
    color: var(--anyworks-black);
    -webkit-font-smoothing: antialiased;
}

/* --- Social Feed Layout --- */
.feed-container {
    max-width: 580px; /* Standard Social Feed Width */
    margin: 0 auto;
    padding: 20px 10px;
}

/* --- 1. START A POST (Top Box) --- */
.share-box {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    padding: 12px 16px;
    margin-bottom: 15px;
}

.share-box-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--anyworks-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.trigger-input {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 35px;
    padding: 12px 20px;
    flex-grow: 1;
    text-align: left;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.trigger-input:hover { background: #ebebeb; }

/* --- 2. FEED POST CARDS --- */
.feed-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.feed-card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.innovator-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.innovator-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
}

.innovator-meta h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.innovator-meta small {
    color: #666;
    font-size: 11px;
}

/* Post Media (The Hero Area) */
.feed-media-wrap {
    background: #000;
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.feed-media-wrap iframe, .feed-media-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* Post Body (Text & Price) */
.feed-card-body {
    padding: 16px;
}

.feed-card-body h5 {
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 8px;
}

.feed-price-tag {
    font-size: 18px;
    font-weight: 900;
    color: #10b981;
    margin-bottom: 10px;
}

.feed-desc {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 3. SOCIAL ACTIONS (Bottom Bar) --- */
.feed-actions {
    display: flex;
    border-top: 1px solid #f3f2ef;
    padding: 4px;
}

.feed-action-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    color: #666;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 4px;
    transition: 0.2s;
}

.feed-action-btn:hover {
    background: #f3f2ef;
    color: var(--anyworks-black);
}

.feed-action-btn i { font-size: 16px; }

/* --- Category Slider (LinkedIn Style) --- */
.cat-slider-wrap {
    padding: 10px 0;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scrollbar-width: none;
}
.cat-slider-wrap::-webkit-scrollbar { display: none; }

.cat-pill-modern {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}

.cat-pill-modern:hover {
    border-color: var(--anyworks-yellow);
    background: #fff9e6;
}

/* --- Dot Pulse (Verified/Live Status) --- */
.dot-pulse {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* --- Mobile Specifics --- */
@media (max-width: 576px) {
    .feed-container { padding: 0; }
    .share-box, .feed-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .feed-action-btn span { display: none; } /* Show only icons on small screens */
    .feed-action-btn i { font-size: 18px; }
}

/* Sidebar Sticky Logic */
aside .sticky-top {
    z-index: 10;
    height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

aside .sticky-top::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Sidebar Card Styling */
.search-sidebar-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding: 15px;
}

@media (max-width: 991px) {
    /* Hide sidebars on tablet/mobile for feed focus */
    aside {
        display: none !important;
    }
}

/* --- Professional Sidebar Layout --- */
.search-sidebar-container {
    position: sticky;
    top: 90px; /* Adjust based on your header height */
    height: calc(100vh - 110px); /* Keeps it within the screen */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* The Scrollable Part */
.sidebar-scroll-area {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

/* Hide scrollbar for clean look but allow scrolling */
.sidebar-scroll-area::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Domain List Styling */
.domain-list-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    color: #444;
    font-size: 14px;
    transition: 0.2s;
    text-decoration: none !important;
}

.domain-list-item:hover {
    background-color: #ebebeb;
    color: #000;
}

.domain-list-item i {
    width: 25px;
    color: #666;
}
/* --- THEME DESIGN --- */
.active-theme {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

/* Sidebar Unified Scroller */
.sidebar-scroll-wrapper {
    overflow-y: auto !important; /* Forces the scrollbar to appear when needed */
    flex-grow: 1;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: #ffc107 #f1f5f9;
}
.sidebar-scroll-wrapper::-webkit-scrollbar { width: 5px; }
.sidebar-scroll-wrapper::-webkit-scrollbar-thumb { background: #ffc107; border-radius: 10px; }

/* Theme UI Components */
.theme-user-card {
    background: linear-gradient(135deg, #111, #333);
    border-bottom: 3px solid #ffc107;
}
.theme-avatar {
    width: 55px; height: 55px;
    background: #ffc107; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900; color: #000;
}

.theme-label {
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    color: #94a3b8; letter-spacing: 1px; margin-bottom: 12px; display: block;
}

.theme-mode-switcher {
    display: flex; background: #f1f5f9; padding: 4px; border-radius: 12px;
}
.t-mode-btn {
    flex: 1; border: none; background: transparent; padding: 8px;
    font-size: 11px; font-weight: 700; border-radius: 9px; transition: 0.2s;
}
.t-mode-btn.active { background: #fff; color: #000; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.theme-industry-toggle { display: flex; flex-direction: column; gap: 8px; }
.t-ind-item {
    padding: 12px; border-radius: 12px; border: 1px solid #e2e8f0;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.t-ind-item.active { background: #fff9e6; border-color: #ffc107; color: #856404; }
.t-ind-item i { width: 25px; }

.theme-domain-pill {
    display: flex; align-items: center; gap: 12px; padding: 10px;
    border-radius: 10px; font-size: 13px; font-weight: 500;
    cursor: pointer; color: #475569; transition: 0.2s;
}
.theme-domain-pill:hover { background: #f8fafc; color: #000; }
.theme-domain-pill.active { background: #1a1a1a; color: #fff; }

.theme-input {
    width: 100%; border: 1px solid #e2e8f0; padding: 8px; border-radius: 10px; font-size: 13px;
}
.theme-checkbox {
    display: flex; align-items: center; gap: 10px; font-size: 13px;
    color: #475569; cursor: pointer; margin-bottom: 8px;
}
.theme-checkbox input { accent-color: #000; width: 16px; height: 16px; }

/* Mobile Drawer Logic */
@media (max-width: 991px) {
    .filter-sidebar {
        position: fixed; left: -100%; top: 0; width: 100%; height: 100vh;
        z-index: 10000; transition: 0.3s ease; border-radius: 0;
    }
    .filter-sidebar.active { left: 0; }
}

.filter-sidebar {
    position: sticky;
    top: 90px;
    /* This is the magic line */
    height: calc(100vh - 110px); 
    display: flex;
    flex-direction: column;
}
/* Internal Domain Scroller Fix */
.domain-internal-scroller {
    max-height: 220px; /* Limits the list height */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #edf2f7;
}

/* Custom internal scrollbar */
.domain-internal-scroller::-webkit-scrollbar {
    width: 3px;
}
.domain-internal-scroller::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Master Sidebar Scroller (Unified) */
.sidebar-scroll-wrapper {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Hover effect for domain pills inside the scroller */
.theme-domain-pill {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.theme-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 1200px) {
    /* This is the sidebar drawer */
    .filter-sidebar {
        position: fixed !important;
        top: 0;
        left: -100%; /* Start off-screen */
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 10001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: block !important; /* Ensure it's not hidden by d-none */
    }

    /* This is the class added by Javascript */
    .filter-sidebar.active {
        left: 0 !important;
    }
}

@media (max-width: 1200px) {
    /* Target the sidebar by its ID */
    #mobileSidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important; /* Start hidden */
        width: 300px !important;
        height: 100vh !important;
        
        /* THE FIX: Solid background and high z-index */
        background-color: #ffffff !important; 
        z-index: 100001 !important; 
        
        display: block !important;
        transition: left 0.3s ease-in-out !important;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    /* When active class is added by JS */
    #mobileSidebar.active {
        left: 0 !important;
    }

    /* The dark overlay behind the sidebar */
    #sidebarOverlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.7) !important; /* Darken the background */
        z-index: 100000;
        display: none;
    }
    #sidebarOverlay.active {
        display: block;
    }
}

/* --- Sidebar Ad Styling --- */
.sidebar-ad-card {
    transition: transform 0.3s ease;
}

.sidebar-ad-card:hover {
    transform: translateY(-3px);
}

.sidebar-ad-card img {
    filter: brightness(0.95);
    transition: 0.3s;
}

.sidebar-ad-card:hover img {
    filter: brightness(1);
}

/* Yellow Border Highlight for Ads */
.border-sponsor {
    border: 1px solid rgba(255, 193, 7, 0.4) !important;
}

.fw-800 { font-weight: 800; }

/* Ad Card Hover Effect */
.right-column .card.overflow-hidden {
    transition: 0.3s;
}

.right-column .card.overflow-hidden:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px);
}

.right-column .btn-dark:hover {
    background: #ffc107;
    color: #000;
    border-color: #ffc107;
}

.remember-row {
    display: flex;
    justify-content: space-between; /* Pushes items to opposite sides */
    align-items: center;
    flex-wrap: wrap;       /* Allows wrapping on small screens */
    gap: 10px;             /* Ensures a gap even when they wrap */
    margin-top: 15px;
    width: 100%;
}

#forgot-link {
    font-size: 0.8rem;
    color: #007bff; /* Anyworks Primary Blue/Black */
    cursor: pointer;
    font-weight: 600;
}

#forgot-link:hover {
    text-decoration: underline;
}

/* Mobile Specific Adjustment */
@media (max-width: 350px) {
    .remember-row {
        justify-content: center; /* Centers them when stacked */
        text-align: center;
    }
}

/* Ensure the Header is above the sidebar */
.main-header {
    z-index: 1020 !important; /* Standard Bootstrap sticky-top is 1020 */
}

/* Force the Dropdown to be the top-most layer */
.dropdown-menu {
    z-index: 9999 !important;
}

/* Ensure Modals (Search/Post) are even higher */
.modal {
    z-index: 10000 !important;
}

.modal-backdrop {
    z-index: 9999 !important;
}

/* Update these specific sections in your <style> block */

.status-modal {
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0; /* Better than inset:0 for older browsers */
    background: #000; /* Pure black for the cinematic feel */
    z-index: 100000; 
    display: none;
    overflow: hidden;
}

.status-container {
    position: relative; 
    width: 100%; 
    max-width: 500px;
    height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    background: #000;
    margin: 0 auto;
}

/* Ensure the tap zones don't block the Details panel or the Close button */
.status-tap-zone { 
    position: absolute; 
    top: 80px; /* Leave space for the close button */
    bottom: 100px; /* Leave space for the slide-up handle */
    width: 30%; 
    z-index: 10;
}

/* Add a slight gradient to the bottom so white text is readable over light videos */
.status-media::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 150px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    pointer-events: none;
    z-index: 6;
}

/* Compact Sidebar PWA Styling */
.pwa-compact-box {
    padding: 15px;
    background: rgba(255, 193, 7, 0.05);
    border-radius: 12px;
    margin: 10px;
    border: 1px dashed #ffc107;
}

.btn-pwa-small {
    flex: 1;
    border: none;
    padding: 10px 5px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-pwa-small.android { background: #3DDC84; color: #000; }
.btn-pwa-small.ios { background: #000; color: #fff; }

.btn-pwa-small:active { transform: scale(0.95); }

/* iOS Modal Refinement */
.ios-popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    display: none; align-items: center; justify-content: center; z-index: 100000; padding: 20px;
}
.ios-popup { background: #fff; width: 100%; max-width: 320px; border-radius: 20px; padding: 25px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.ios-list { font-size: 13px; line-height: 1.8; color: #444; }

/* Guest Card with Mechanical Pattern */
.guest-dynamic-card {
    position: relative;
    background-color: #0d1b2a;
    /* Blueprint Grid + Gradient */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(135deg, #1A2B4C 0%, #001a33 100%);
    background-size: 20px 20px, 20px 20px, auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    overflow: hidden;
    z-index: 1;
}

/* Floating faded gear in background */
.guest-dynamic-card::after {
    content: '\f013';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 90px;
    color: rgba(255, 255, 255, 0.03);
    transform: rotate(-20deg);
    z-index: -1;
}

.pulse-icon {
    width: 50px; height: 50px; line-height: 50px;
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107; border-radius: 50%; margin: 0 auto;
    font-size: 20px; border: 1px solid rgba(255, 193, 7, 0.2);
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

.fade-loop { transition: opacity 0.4s ease-in-out; }

/* Modern Innovation Card (Glass Effect) */
.project-card {
    background: rgba(255, 255, 255, 0.7); /* Semi-transparent white */
    backdrop-filter: blur(12px); /* This creates the glass blur */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle white border */
    border-radius: 24px; /* Smoother, more modern corners */
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Smooth "lift" animation */
    position: relative;
    overflow: hidden;
}

/* The Hover "Pulse" Effect */
.project-card:hover {
    transform: translateY(-8px); /* Card lifts up */
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); /* Deep soft shadow */
    border-color: var(--anyworks-gold); /* Border turns gold on hover */
}

/* Subtle background glow for the card */
.project-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.05) 0%, transparent 70%);
    pointer-events: none;
    transition: 0.6s;
}

.project-card:hover::before {
    transform: scale(1.2);
}

.video-placeholder {
    filter: brightness(0.6) grayscale(0.3);
    transition: 0.5s;
}
.lazy-video-wrapper:hover .video-placeholder {
    filter: brightness(1) grayscale(0);
    transform: scale(1.02);
}

/* Innovation Stage Timeline */
.stage-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 15px 0;
    padding: 0 10px;
}

.stage-timeline::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #e2e8f0; /* The "Incomplete" line */
    z-index: 1;
    transform: translateY(-50%);
}

.stage-node {
    width: 10px;
    height: 10px;
    background: #cbd5e1;
    border-radius: 50%;
    z-index: 2;
    position: relative;
    transition: 0.3s;
}

.stage-node.active {
    background: var(--anyworks-gold);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
    transform: scale(1.3);
}

.stage-label {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 800;
    color: #94a3b8;
    white-space: nowrap;
    text-transform: uppercase;
}

.stage-node.active .stage-label {
    color: #000;
}

.stage-container { position: relative; padding-bottom: 10px; }

.stage-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 5px;
}

/* Background Line (Gray) */
.stage-timeline::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #edf2f7;
    z-index: 1;
    transform: translateY(-50%);
}

.stage-node {
    width: 12px;
    height: 12px;
    background: #e2e8f0;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 2;
    position: relative;
    transition: 0.4s all ease;
}

/* Active Node Styling */
.stage-node.active {
    background: #ffc107;
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.2);
    transform: scale(1.2);
}

/* Stage Label Styling */
.stage-label {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 800;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.stage-node.active .stage-label {
    color: #2d3748;
}

/* Hover Effect for the entire Card (optional) */
.project-card:hover .stage-node.active {
    box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.3);
}


.innovation-goal-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 6px; /* Industrial sharp-round corners */
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    height: 22px; /* Fixed height for perfect alignment */
}

.innovation-goal-tag .label {
    background: #ffc107; /* Anyworks Gold */
    color: #000;
    font-size: 8px;
    font-weight: 900;
    padding: 0 8px;
    height: 100%;
    display: flex;
    align-items: center;
}

.innovation-goal-tag .value {
    color: #1a202c;
    font-size: 9px;
    font-weight: 800;
    padding: 0 10px;
    letter-spacing: 0.3px;
}

/* Subtle pulse for active seekers */
.innovation-goal-tag:hover {
    border-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.15);
}

.project-card:hover {
    background: radial-gradient(circle at center, rgba(255,193,7,0.05) 0%, #fff 100%);
}

.anyworks-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    display: none; align-items: center; justify-content: center; z-index: 3000000;
}
.modal-content-glass {
    background: white; width: 90%; max-width: 400px; padding: 30px;
    border-radius: 28px; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(20px); transition: 0.3s;
}
.anyworks-modal.show { display: flex; }
.anyworks-modal.show .modal-content-glass { transform: translateY(0); }


.btn-suggestion-head {
    width: 32px;
    height: 32px;
    background: rgba(255, 193, 7, 0.1); /* Subtle Gold Tint */
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffc107;
    margin-right: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-suggestion-head:hover {
    background: #ffc107;
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

.btn-suggestion-head i {
    font-size: 14px;
}

.anyworks-modal {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* THE FIX: CENTER CONTENT */
    display: none; 
    align-items: center; 
    justify-content: center; 
    
    z-index: 3000000;
    padding: 20px; /* Prevents touching edges on small phones */
}

.modal-content-glass {
    background: white; 
    width: 100%; 
    max-width: 420px; /* Ideal width for readability */
    padding: 35px;
    border-radius: 32px; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    /* Animation state */
    transform: scale(0.9) translateY(20px); 
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

/* Active State */
.anyworks-modal.show { 
    display: flex !important; 
}

.anyworks-modal.show .modal-content-glass { 
    transform: scale(1) translateY(0); 
    opacity: 1;
}


.filter-fab-top {
    position: fixed;
    top: 65px;      /* Distance from top */
    left: 5px;     /* Distance from left */
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px; /* Professional Squircle shape */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-size: 16px;
    z-index: 3000005; /* Above Header and Modals */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.filter-fab-top:active {
    transform: scale(0.9);
    background: #ffc107;
    border-color: #ffc107;
}

/* Subtle notification dot if filters are active */
.fab-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: #ffc107;
    border-radius: 50%;
    border: 1px solid #fff;
}

.action-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
.action-btn:hover { background: #f1f5f9; color: #1e293b; }
.action-btn.active { color: #dc3545; } /* Red for Likes */
.action-btn.active i { animation: heartBeat 0.3s ease; }

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}



/* Overlay Backdrop - Centers the content */
/* Base state: Hidden */
.anyworks-modal-overlay {
    position: fixed !important; /* Overrides everything */
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); 
    backdrop-filter: blur(10px);
    z-index: 9999999;
    
    /* THE CENTERING FIX */
    display: none; /* JS will change this to flex */
    align-items: center;
    justify-content: center;
}

/* Active state: Centered and Visible */
.anyworks-modal-overlay.active {
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Modal Card - Updated for visibility and centering */
.share-modal-card {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 32px;
    padding: 35px;
    
    /* Changed to relative but ensured it stays in the flow */
    position: relative; 
    margin: auto; 
    
    /* Ensure it sits above the blurred backdrop */
    z-index: 10000000; 
    
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Animation - ensured it doesn't end with display:none */
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 3. The Active State Trigger */
.anyworks-modal-overlay.show-modal {
    display: flex !important;
}

.anyworks-modal-overlay.show-modal .share-modal-card {
    transform: scale(1);
    opacity: 1;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Ensure icons are spaced well */
.share-grid {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
}

.share-icon-circle.wa { color: #25d366; background: #f0fdf4; }
.share-icon-circle.li { color: #0077b5; background: #eff6ff; }
.share-icon-circle.link { color: #64748b; background: #f8fafc; }

.share-item:hover .share-icon-circle { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.share-item span { font-size: 12px; font-weight: 700; }

.theme-mode-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}

.t-mode-btn {
    flex: 1;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s ease;
    background: transparent;
    color: #64748b;
}

.t-mode-btn.active {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Optimized Reels Wrapper */
.lazy-video-wrapper {
    aspect-ratio: 9 / 16 !important; /* Forces the vertical Reels format */
    width: 100%;
    max-height: 500px; /* Adjust this to fit your card height preference */
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0; /* Keeps it clean for the video area */
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Update: Changed Active Interaction Color to Gold/Amber */
.action-btn.active {
    color: #f59e0b !important; /* Gold/Amber color */
    background: rgba(245, 158, 11, 0.05); /* Very subtle gold background */
    border-color: rgba(245, 158, 11, 0.1);
}

/* 1. ANIMATIONS */
@keyframes likePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.action-btn.active i, #floatLikeIcon.fa-solid {
    animation: likePulse 0.3s ease-out;
}

/* 2. VERTICAL FAB (Lightning Bolt Menu) */
.fab-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000; /* Highest priority */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fab-main {
    width: 60px;
    height: 60px;
    background: #ffc107;
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-menu {
    display: none; /* Changed from visibility for cleaner toggle */
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.fab-menu.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fab-item {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.fab-item::after {
    content: attr(data-label);
    position: absolute;
    right: 65px;
    background: #333;
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}
.fab-item:hover::after { opacity: 1; }

/* 3. BACK TO TOP (Left Side) */
#backToTop {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: #333;
    color: #ffc107;
    border-radius: 50%;
    display: none; /* Managed by JS Scroll */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}
#backToTop:hover { transform: scale(1.1); background: #000; }

/* 4. HORIZONTAL VIDEO BAR (Center) */
.video-action-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e0e0e0;
    padding: 10px 24px;
    border-radius: 40px;
    display: flex; 
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: all 0.3s ease-in-out;
}

/* Logic for auto-hiding/showing */
#floatingVideoActions.d-none {
    display: none !important;
}

#floatingVideoActions {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
    pointer-events: none;
}

#floatingVideoActions.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d1d1f;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.action-divider {
    width: 1px;
    height: 20px;
    background: #ddd;
}

/* 1. TYPOGRAPHY & LAYOUT */
.fw-900 { font-weight: 900; }

.section-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b; /* Slate-500 for a professional look */
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

/* 2. INTERACTIVE CARDS */
.engagement-card {
    background: #ffffff;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.engagement-card:hover {
    border-color: #ffc107;
    background: #fffdf7;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.1);
}

/* 3. BUTTON STYLING */
#engagementModal .btn {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 15px;
    transition: all 0.2s ease;
}

/* Specific Pill Shapes */
#engagementModal .rounded-pill {
    border-radius: 50px !important;
}

/* Rating Button Group */
#engagementModal .btn-group {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 50px;
    gap: 4px;
}

#engagementModal .btn-group .btn {
    border: none !important;
    border-radius: 50px !important;
    color: #475569;
}

/* High/Med/Low Hover States */
#engagementModal .btn-outline-danger:hover { background: #ef4444; color: white; }
#engagementModal .btn-outline-warning:hover { background: #f59e0b; color: white; }
#engagementModal .btn-outline-secondary:hover { background: #64748b; color: white; }

/* 4. MODAL OVERLAY & MOTION */
#engagementModal .modal-content {
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-backdrop.show {
    backdrop-filter: blur(8px); /* Increased blur for deep focus */
    background-color: rgba(15, 23, 42, 0.7); /* Deep slate background */
}

/* Animation for Modal Slide-Up */
#engagementModal.fade .modal-dialog {
    transform: translateY(30px);
    transition: transform 0.3s ease-out;
}

#engagementModal.show .modal-dialog {
    transform: translateY(0);
}

/* 5. MICRO-DETAILS */
.engagement-card p.text-muted {
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Success indicator for clicked actions */
.engagement-card.submitted {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* Custom Scrollbar for Comment Box */
.comment-scroll-box::-webkit-scrollbar {
    width: 4px;
}
.comment-scroll-box::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.comment-scroll-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Ensure actions don't wrap */
.comment-area .d-flex.gap-2 {
    white-space: nowrap;
}

/* Hover effect for side-by-side buttons */
.comment-area i:hover {
    filter: brightness(0.8);
    transform: scale(1.1);
    transition: 0.2s;
}


/* Style for side-by-side icons */
.action-link {
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-link:hover {
    transform: scale(1.2);
    filter: brightness(0.7);
}

/* Scrollbar specific for this box */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

#quickViewModal.status-modal {
    display: none; /* Default */
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}

/* This is what the JavaScript triggers */
#quickViewModal[style*="display: flex"], 
#quickViewModal.active {
    display: flex !important;
}

.lazy-video-wrapper {
    min-height: 400px; /* Adjust to your market card video height */
    background: #000;
    position: relative;
}

.new-posts-pill {
    position: fixed;
    top: 85px; /* Adjust this to be just below your sticky header height */
    left: 50%;
    transform: translateX(-50%);
    background: #ffc107; /* Anyworks Yellow */
    color: #000;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4);
    z-index: 2000; /* Higher than header but below modals */
    border: none;
    cursor: pointer;
    animation: slideDownFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

