/* --- 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; }

:root {
    anyworks-gold: #ffc107;
    slate-border: rgba(226, 232, 240, 0.8);
}

/* Modern Innovation Card (Professional Glass) */
.project-card {
    background: rgba(255, 255, 255, 0.95); /* Nearly pure white for content clarity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--slate-border); 
    border-radius: 24px;
    /* Removed padding here to manage it inside section-wise (Header/Media/Footer) */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Hover Lift & Glow */
.project-card:hover {
    transform: translateY(-8px);
    background: #ffffff; /* Becomes solid white on hover */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--anyworks-gold);
}

/* Subtle internal radial glow */
.project-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.03) 0%, transparent 60%);
    pointer-events: none;
    transition: 0.6s;
    z-index: 0;
}

.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 !important;
    top: 82px !important; /* Slightly adjusted for better alignment */
    right: 12px !important;
    left: auto !important;
    transform: none !important;
    
    /* Ultra-Thin & Borderless */
    padding: 0 10px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    
    /* Premium Look: No Border, Soft Shadow */
    background: #ffc107 !important;
    color: #000 !important;
    border: none !important; 
    border-radius: 6px !important;
    
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    z-index: 999999 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-posts-pill:active {
    transform: scale(0.95) !important;
    background: #e5ad00 !important;
}

/* Red blinking dot for "Live" feel */
.new-dot {
    width: 5px;
    height: 5px;
    background: #ff4757;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* New isolated styles for Auto-Preview */
.anyworks-video-box {
    position: relative;
    overflow: hidden;
}
.anyworks-video-box .video-placeholder {
    transition: opacity 0.5s ease;
    z-index: 1;
}
.anyworks-video-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

:root {
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
}

.text-slate { color: var(--slate-900); }
.text-amber { color: var(--amber-500); }
.bg-amber-light { background: var(--amber-100); }
.bg-slate-soft { background: var(--slate-100); }

.project-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0 !important;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Play Button Styling */
.play-btn-circle {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.project-card:hover .play-btn-circle {
    background: var(--amber-500);
    border-color: var(--amber-500);
    transform: scale(1.1);
}

/* Metric Items */
.metric-item {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* New Modern Buttons */
.btn-amber { background: var(--amber-500); color: #fff; border: none; }
.btn-amber:hover { background: #d97706; color: #fff; }

.btn-slate-outline {
    border: 2px solid var(--slate-900);
    color: var(--slate-900);
    background: transparent;
}
.btn-slate-outline:hover {
    background: var(--slate-900);
    color: #fff;
}

.btn-mute-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 25;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

/* Subtle styling for the identity area */
.text-dark {
    color: #1e293b !important; /* Professional Slate Blue-Black */
}

.avatar-container {
    transition: transform 0.3s ease;
}

.project-card:hover .avatar-container {
    transform: scale(1.05);
}

/* Badge specific adjustments for the "Glass" look */
.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Seeking Label Style */
.anyworks-seeking-label {
    display: inline-flex;
    align-items: center;
    background: #fffbeb; /* Very soft yellow */
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 4px 10px;
}
.label-prefix {
    font-size: 9px;
    font-weight: 800;
    color: #b45309; /* Deep amber */
    margin-right: 8px;
    opacity: 0.8;
}
.label-value {
    font-size: 11px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.3px;
}

/* ID Badge Style */
.anyworks-id-badge {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 6px;
}

/* Modern Stage Tracker */
.anyworks-stage-tracker {
    padding: 10px 0 25px 0;
}
.stage-track-base {
    position: relative;
    height: 3px;
    background: #e2e8f0;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stage-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--anyworks-gold);
    transition: width 1s ease;
    border-radius: 10px;
}
.stage-point {
    position: relative;
    z-index: 2;
}
.stage-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    transition: 0.3s;
}
.stage-point.is-active .stage-dot {
    background: var(--anyworks-gold);
    border-color: var(--anyworks-gold);
}
.stage-point.is-current .stage-dot {
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.2);
}
.stage-name {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}
.stage-point.is-active .stage-name {
    color: #1e293b;
}

/* Valuation Pill Design */
.valuation-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}
.valuation-pill .v-label {
    font-size: 8px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}
.valuation-pill .v-amount {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

/* Modern Tech Box Design */
.modern-tech-box {
    position: relative;
    background: #f8fafc; /* Very clean slate-gray tint */
    border-radius: 12px;
    padding: 12px 15px;
    margin: 12px 0;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}
.tech-accent-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--anyworks-gold), #fbbf24);
}
.tech-content {
    font-size: 12.5px;
    color: #475569; /* Slate 600 - easier on the eyes than pure black */
    line-height: 1.6;
    font-weight: 500;
}
.specs-link {
    color: #3b82f6; /* Professional Link Blue */
    font-weight: 700;
    font-size: 10px;
    cursor: pointer;
    display: inline-block;
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.specs-link:hover {
    text-decoration: underline;
    color: #2563eb;
}
/* Cinematic Media Frame */
.anyworks-media-frame {
    aspect-ratio: 16 / 9; /* Professional standard */
    background-color: #0f172a;
    margin: 0; /* Full-bleed to card edges */
    position: relative;
}

/* Glass Play Overlay */
.glass-play-overlay {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.2); /* Tinted for contrast */
    transition: 0.3s ease;
}

.play-pulse {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    padding-left: 4px; /* Optical centering for play icon */
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .play-pulse {
    transform: scale(1.15);
    background: var(--anyworks-gold);
    border-color: var(--anyworks-gold);
    color: #1e293b;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
}

/* Controls */
.video-control-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 30;
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: 0.2s;
}

.video-control-btn:hover {
    background: #000;
    transform: scale(1.1);
}

.video-control-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Hide the placeholder once the iframe is injected */
.lazy-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20; /* Sits above the placeholder */
}

/* Fix: If placeholder is blocking autoplay, we lower its z-index when active */
.lazy-video-wrapper.is-playing .video-placeholder {
    display: none;
}

/* Static Image Zoom */
.static-feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s ease;
}

.project-card:hover .static-feature-img {
    transform: scale(1.05);
}

.media-bottom-shadow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    z-index: 15;
    pointer-events: none;
}

/* Metric Pill Design */
.metric-pill {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 4px 10px 4px 4px;
    border-radius: 50px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: left;
}

.metric-pill:hover {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.metric-pill .m-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-right: 8px;
}

.metric-pill .m-data {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.metric-pill .m-count {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
}

.metric-pill .m-label {
    font-size: 7px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

/* Specific Pill Highlights */
.bg-success-subtle { background-color: rgba(16, 185, 129, 0.1) !important; }
.bg-info-subtle { background-color: rgba(59, 130, 246, 0.1) !important; }

/* Velocity specific tweak to match previous pills */
.bg-danger-subtle { background-color: rgba(239, 68, 68, 0.1) !important; }

/* Status Indicator (Dot + Text) */
.status-indicator {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f8fafc;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}

.status-text {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* 1. Remove the full red background from the card */
.status-high { 
    background-color: #ffffff !important; /* Forces background back to white */
    border: 1.5px solid rgba(239, 68, 68, 0.4) !important; /* Adds a soft red border */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1) !important; /* Subtle outer glow */
}

/* 2. Style the text so it's readable on white (Dark Red/Slate) */
.status-high .status-text, 
.status-high .card-title, 
.status-high .feed-desc {
    color: #1e293b !important; 
}

/* 3. The "Live" Pulsing Dot Logic */
.status-high .status-dot { 
    background-color: #ef4444 !important; 
    position: relative;
}

.status-high .status-dot::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: statusPulse 2s infinite;
}

/* 4. The Pulse Animation */
@keyframes statusPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* 5. Optional: Highlight the Price in high demand */
.status-high .feed-price-tag {
    color: #ef4444 !important;
    font-weight: 900;
}

/* Reach Pill Highlight */
.bg-warning-subtle { 
    background-color: rgba(245, 158, 11, 0.1) !important; 
}

/* Minimalist Share Button */
.btn-share-minimal {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-share-minimal:hover {
    background: #f1f5f9;
    color: #0f172a;
}
/* Compact Metric Style */
.metric-pill-compact {
    flex-shrink: 0; /* Important: Prevents icons from squishing */
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 4px 8px; /* Slightly tighter padding */
    border-radius: 8px;
    height: 28px; /* Match height with utility icons */
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.metric-pill-compact:hover {
    background: #fff;
    border-color: #e2e8f0;
}

/* Mini Status Chip */
.status-chip {
    display: flex;
    align-items: center;
    border-radius: 8px;
    font-size: 10px;
}

.status-text-mini {
    font-size: 10px;
    font-weight: 900;
}

/* Share Icon Only */
.btn-share-icon {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    padding: 4px 8px;
    transition: 0.2s;
}

.btn-share-icon:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

/* Hide Scrollbar but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ghost Action Button */
.btn-action-ghost {
    background: #f1f5f9; /* Slate 100 */
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 10px 0;
    transition: all 0.2s;
}

.btn-action-ghost:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Slate Action Button */
.btn-action-slate {
    background: #1e293b; /* Slate 800 */
    border: 1px solid #1e293b;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-action-slate:hover {
    background: #0f172a; /* Slate 900 */
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

/* Small adjustments for icons inside buttons */
.btn-action-slate i, .btn-action-ghost i {
    opacity: 0.9;
}

/* Tech Query Input */
.tech-query-input {
    background: #f8fafc !important; /* Soft Slate */
    border: 1.5px solid #f1f5f9 !important;
    border-radius: 50px !important;
    padding: 12px 50px 12px 20px !important;
    font-size: 12px !important;
    height: auto !important;
    color: #1e293b;
    transition: 0.3s;
}

.tech-query-input:focus {
    background: #ffffff !important;
    border-color: #ffc107 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.1) !important;
}

/* Floating Send Button */
.btn-query-send {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffc107;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #000;
    z-index: 5;
    transition: 0.2s;
}

.btn-query-send:hover {
    background: #eab308;
    transform: translateY(-50%) scale(1.05);
}

/* Discussion Thread Styling */
.discussion-label {
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.query-bubble {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.query-author {
    font-size: 10px;
    font-weight: 700;
    color: #1e293b;
}

.query-text {
    font-size: 11.5px;
    color: #475569;
    margin-bottom: 0;
    line-height: 1.4;
}

.live-indicator {
    font-size: 8px;
    font-weight: 800;
    color: #10b981;
    opacity: 0.7;
}

/* Ensure the custom mute button always wins the "Z-Index" war */
.btn-dark.rounded-circle {
    z-index: 150 !important; /* Higher than the iframe (20) and wrapper (10) */
    pointer-events: auto !important;
    background-color: rgba(15, 23, 42, 0.9) !important; /* Professional Slate */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Smooth transition for the video appearing */
.lazy-video-wrapper iframe {
    animation: fadeInVideo 0.4s ease-in-out;
}

@keyframes fadeInVideo {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Prevent the mobile "gray highlight" when tapping buttons */
.btn-dark.rounded-circle, .metric-pill-compact {
    -webkit-tap-highlight-color: transparent;
}

/* This hides the top 50px of the YouTube player (where the title lives) */
.lazy-video-wrapper {
    position: absolute;
    top: -50px; /* Moves the title bar off-screen */
    height: calc(100% + 50px); /* Extends height to compensate */
    width: 100%;
    overflow: hidden;
}

/* Ensure the iframe fills the extended container */
.lazy-video-wrapper iframe {
    height: 100% !important;
    width: 100% !important;
}
/* Individual Wrapper for separation logic */
.metric-wrapper {
    display: inline-block;
    flex-shrink: 0; /* Prevents the pills from squishing on mobile */
}

.metric-pill-compact .m-count {
    font-size: 11.5px; /* Slightly smaller for mobile flexibility */
    font-weight: 700;
}

.metric-pill-compact:active {
    transform: scale(0.95);
    background: #f1f5f9;
}

/* Mobile swipe-ability insurance */
.overflow-x-auto {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
}

/* 1. Reset: Force all panels to be hidden by default */
.aw-panel { 
    display: none !important; 
}

/* 2. State-Based Display: Only show the panel that matches the modal's data-view */
[data-view="investor"] #p-investor { 
    display: block !important; 
}

[data-view="solution"] #p-solution { 
    display: block !important; 
}

[data-view="rating"] #p-rating { 
    display: block !important; 
}

/* 3. Smooth Transition (Optional) */
.modal-body {
    transition: all 0.3s ease-in-out;
}