:root {
    /* Premium Color Palette */
    --primary: #0037ffda;

    --primary-hover: #0037ff;

    --secondary: #0ea5e9;

    --success: #10b981;

    --warning: #f59e0b;

    --danger: #ef4444;

    --dark: #0f172a;

    --bg-body: #f1f5f9;

    --bg-card: #ffffff;

    --text-main: #334155;

    --text-muted: #64748b;

    --border-light: #e2e8f0;


    --sidebar-width: 260px;

    --header-height: 70px;

}

* { 
    box-sizing: border-box;

}


body {
    font-family: 'Inter', sans-serif;

    background-color: var(--bg-body);

    color: var(--text-main);

    overflow-x: hidden;

    font-size: 14px;

}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px;
 height: 6px;
}
::-webkit-scrollbar-track { background: transparent;
}
::-webkit-scrollbar-thumb { background: #cbd5e1;
 border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8;
}

/* --- Auth View --- */
#authView,#signupView,#forgotPasswordView,#resetPasswordView { 
    height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    background: linear-gradient(135deg, #e0e7ff 0%, #f1f5f9 100%);
}

.auth-card { 
    width: 100%;

    max-width: 420px;

    padding: 40px;

    border-radius: 20px;

    background: #fff;

    box-shadow: 0 20px 40px rgba(0,0,0,0.08);

}


/* --- Layout --- */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;

    top: 0;

    bottom: 0;

    left: 0;


    background: #f1f5f9;

    color: #fff;

    z-index: 1040;

    padding: 20px 0;


    display: flex;

    flex-direction: column;

    transition: transform 0.3s ease;


}
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin 0.3s ease;

}
.top-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border-light);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);

}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(0,0,0,0.5);
    z-index: 1035;
    display: none;

}

/* --- Mobile Responsiveness --- */
@media (max-width: 991px) {
    .sidebar { 
        transform: translateX(-100%);
    }
    .sidebar.show { 
        transform: translateX(0);
    }
    .main-wrapper { 
        margin-left: 0;
    }
    .top-header { 
        padding: 0 15px;
    }
    
    .modal-body-custom { 
        flex-direction: column !important;
        height: auto !important;
        overflow-y: auto;
    }
    .col-editor, .col-options, .col-preview { 
        flex: none !important;
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-light);
    }
    .col-editor { 
        min-height: 400px;
    }
    .col-preview { 
        min-height: 350px;
    }
    .app-modal .modal-content { 
        height: 90vh !important;
    }
}

/* --- Sidebar Nav --- */
.brand-logo { 
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    padding: 0 24px 24px;

    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    letter-spacing: -0.5px;

}
.brand-logo i { 
    color: var(--primary);
    font-size: 28px;
}
/* Uploaded Customizer logo (Appearance -> Customize -> Site Identity) -
   get_custom_logo() renders a full <img>/<a> block with its own natural
   size, so cap it to sit comfortably in the same space the bolt-icon +
   text wordmark used to occupy. */
.brand-logo-custom img {
    margin: 0px 25px;
    max-height: 70px;
    width: auto;
}
.auth-card .custom-logo-link img {
    max-height: 48px;
    width: auto;
}
.nav-link { color: #4a5564;
 padding: 12px 24px;
 font-weight: 500;
 display: flex;
 align-items: center;
 transition: all 0.2s;
 border-left: 3px solid transparent;
 cursor: pointer;
}
.nav-link i { width: 24px;
 font-size: 16px;
}
.nav-link:hover, .nav-link.active { color: #000000;
 background: rgba(73, 73, 73, 0.05);
 border-left: 3px solid var(--primary);
}
.sidebar-section { font-size: 11px;
 text-transform: uppercase;
 font-weight: 700;
 color: #171c22;
 padding: 20px 24px 10px;
 letter-spacing: 0.5px;
}

.user-profile-bottom {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid #1e293b;

    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;

}
.user-profile-bottom:hover { 
    background: rgba(255,255,255,0.05);
}

/* --- UI Elements --- */
.saas-card { 
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.btn-primary { 
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover { 
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}
.cursor-pointer { 
    cursor: pointer;
}

/* --- Network Grid --- */
.network-grid-card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    height: 100%;
    position: relative;

}
.network-grid-card:hover { 
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}
.network-grid-card .plus-icon { 
    position: absolute;
    top: 12px;
    right: 12px;
    color: #cbd5e1;
    font-size: 14px;
}
.network-grid-card .net-name { 
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 2px;
}
.network-grid-card .net-type { 
    font-size: 12px;
    color: var(--text-muted);
}
.post-media-thumbnail { 
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-light);
}
.post-media-thumbnail.p-0 {
    background: #000;
}
.posts-table-row:hover {
    background-color: rgba(0,0,0,0.02);
}

/* --- Settings Specific --- */
.settings-nav-link { 
    padding: 12px 16px;
    margin-right: 16px;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}
.settings-nav-link:hover { 
    color: var(--dark) !important;
}
.settings-pane { 
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { 
    opacity: 0;
} to { 
    opacity: 1;
} }

.cover-photo-container { 
    height: 180px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    margin-bottom: 60px;
}
.brand-logo-upload { 
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 12px;
    border: 4px solid #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: absolute;
    bottom: -40px;
    left: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

/* --- Composers (Modals) --- */
.modal-backdrop.show { 
    opacity: 0.6;
    backdrop-filter: blur(4px);
}
.app-modal .modal-content { 
    height: 85vh;
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-header-custom { 
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}
.modal-body-custom { 
    display: flex;
    height: calc(100% - 70px);
    background: #fff;
}
.modal-body-custom-stories { 
    display: flex;
    height: calc(100% - 70px);
    background: #fff;
    flex-direction: column !important;
    height: auto !important;
    overflow-y: auto;
}
.col-editor { 
    flex: 1;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}
.col-options { 
    flex: 0 0 350px;
    /*border-right: 1px solid var(--border-light);*/
    background: #fdfdfd;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.col-preview { 
 flex: 0 0 350px;
 background: #f8fafc;
 display: flex;
 flex-direction: column;
}

@media (max-width: 1299.98px) {
    .col-preview {
        display: none !important;
    }
}
.editor-header-wrapper {
    width: 100%;
    border-bottom: 1px solid var(--border-light);
}

/* --- Dropdown UI --- */
.composer-dropdown-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transition: 0.2s;
}
.composer-dropdown-btn:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}
/* --- Dropdown UI --- */

/* --- Brand-Wise Network Selectors (Icon Only) --- */
.editor-header { 
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    /*border-bottom: 1px solid var(--border-light);*/
    overflow-x: auto;
    width: 100%;
    max-width: 1100px;
}

.brand-group-divider {
    height: 32px;
    width: 1px;
    background: var(--border-light);
    margin: 0 8px;
}
.brand-icon-selector {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.4; /* Inactive state */
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.brand-icon-selector.active {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-color: #fff;
}

.network-avatar { 
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.network-avatar.active { 
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79,70,229,0.2);
}
.network-avatar.add-btn { 
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: var(--text-muted);
}
.network-avatar img { 
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.platform-badge { 
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* --- Avatar Channel Selectors --- */
.composer-profile-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.composer-profile-avatar:hover {
    transform: translateY(-2px);
}

/* The actual profile picture */
.composer-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* Bottom-Right Social Badge */
.composer-profile-avatar .network-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    border: 2px solid #fff;
    z-index: 1;
}

/* Top-Right Close (X) Badge */
.composer-profile-avatar .remove-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #000; /* Black like the reference */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    border: 2px solid #fff;
    cursor: pointer;
    opacity: 0; /* Hidden by default */
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 2;
}

/* Show Close Badge on Hover */
.composer-profile-avatar:hover .remove-badge {
    opacity: 1;
    transform: scale(1);
}

.composer-profile-avatar .remove-badge:hover {
    background: var(--danger); /* Turns red when directly hovering the X */
}

/* Red ring style for active/specific avatars (optional from your screenshot) */
.composer-profile-avatar.ring-danger img {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--danger);
}

.editor-body { 
    flex: 1;
    padding: 0 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}
.composer-textarea { 
    flex: 1;
    width: 100%;
    border: none;
    resize: none;
    font-size: 15px;
    color: var(--text-main);
}
.composer-textarea:focus { 
    outline: none;
}
/* --- Editor Footer Action Buttons --- */
.editor-footer { 
    padding: 12px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff; /* Clean white background */
    overflow-x: auto;
}
.editor-footer i { 
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}
.editor-footer i:hover { 
    color: var(--primary);
}
.editor-action-btn {
    height: 38px;
    padding: 0 12px;
    border-radius: 19px; /* Perfect pill/circle shape */
    border: 1px solid var(--border-light);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.editor-action-btn:hover, .editor-action-btn[aria-expanded="true"] {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--primary);
}
.options-header { 
    padding: 26px 24px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 15px;
}
.options-body { 
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}
.options-footer { 
    padding: 12px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #fff;
}
.editor-action-btn i.main-icon {
    font-size: 15px;
}
.editor-action-btn i.caret-icon {
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.6;
}
/* Toolbar buttons disabled because no compatible platform is selected
   (First Comment / Hashtag / Emoji / YouTube Settings / Poll). pointer-events: none
   on the button itself means the click never actually reaches Bootstrap's
   dropdown-toggle handler (which is bound to the button) - the click instead
   resolves to the wrapper div, which our JS listens on to show a toast. */
.toolbar-btn-disabled .editor-action-btn {
    color: #cbd5e1;
    background: #f8fafc;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}
.toolbar-btn-disabled .editor-action-btn:hover {
    background: #f8fafc;
    border-color: var(--border-light);
    color: #cbd5e1;
}
/* --- Inline Radio Options --- */
.form-check-custom {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    background: #fff;
}
.form-check-custom input { 
    margin-top: 0; 
    margin-right: 12px; 
    cursor: pointer; 
}
.form-check-custom label { 
    cursor: pointer; 
    font-weight: 500; 
    font-size: 13px; 
    margin: 0; 
    flex-grow: 1; 
}
.form-check-custom:hover { 
    background: #f1f5f9;
}
.form-check-custom.active { 
    border-color: var(--primary);
    background: #eff6ff;
}
.form-check-custom .form-check-input { 
    cursor: pointer;
}
@media (max-width: 360px) {
    .options-footer .btn {
        white-space: nowrap !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        font-size: 13px !important;
    }
}
/* --- Preview Scroll Area --- */
.preview-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.preview-header { 
    padding: 26px 24px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
}
.preview-body { 
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
}
.preview-card { 
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    /*width: 100%;*/
    /*max-width: 320px;*/
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    overflow: hidden;
}

.stories-upload-zone { 
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    max-width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f8fafc;
    transition: 0.2s;
    margin: auto;
    aspect-ratio: 9 / 16;
}
.stories-upload-zone:hover { 
    border-color: var(--primary);
    background: #eff6ff;
}
.stories-icon { 
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    font-size: 24px;
    color: var(--primary);
}

/* Toast Container */
.toast-container { 
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1060;
}


/* --- Premium Brand Icon Boxes --- */
.brand-icon-box {
    width: 54px;

    height: 54px;

    border-radius: 14px;
    /* Gives that smooth, premium iOS-style rounded square */
    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 16px;

    color: #ffffff;

    font-size: 26px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.08);

    transition: transform 0.2s ease;

}

.network-grid-card:hover .brand-icon-box {
    transform: scale(1.05);
    /* Slight pop effect on hover */
}

/* Official Brand Background Colors */
.bg-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.bg-threads   { background-color: #000000;
}
.bg-linkedin  { background-color: #0A66C2;
}
.bg-facebook  { background-color: #1877F2;
}
.bg-bluesky   { background-color: #0085FF;
}
.bg-youtube   { background-color: #FF0000;
}
.bg-tiktok    { background-color: #000000;
}
.bg-mastodon  { background-color: #563ACC;
}
.bg-pinterest { background-color: #E60023;
}
.bg-google    { background-color: #4285F4;
}
.bg-x         { background-color: #000000;
}
.bg-reel      { background: linear-gradient(45deg, #833ab4, #fd1d1d, #fcb045);
}
.text-reel    { color: #833ab4;
}

/* Refined Typography for the cards to match reference */
.network-grid-card .net-name { font-weight: 600;
 font-size: 15px;
 color: var(--dark);
 margin-bottom: 4px;
}
.network-grid-card .net-type { font-size: 13px;
 color: var(--text-muted);
}

/* --- Mastodon UI Styles --- */
.server-option {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.server-option:hover {
    background-color: #f8f9fa;
}
.server-option input[type="radio"] {
    cursor: pointer;
    transform: scale(1.15); /* Makes the radio buttons slightly larger and easier to click */
}
.server-option span {
    font-size: 15px;
}

/* --- Bluesky UI Styles --- */
.bsky-instructions {
    background-color: #f0f8ff; /* Soft Bluesky Blue */
    border: 1px solid #cce5ff;
}
.bsky-instructions ol li {
    margin-bottom: 8px;
}
.bsky-instructions strong {
    color: #0056b3;
}

/* --- Social Media Library UI --- */
.media-dropzone {
    border: 2px dashed #cbd5e1;
    background-color: #f8fafc;
    height: 160px;
    transition: all 0.2s ease-in-out;
}
.media-dropzone:hover, .media-dropzone.dragover {
    border-color: #5542f6;
    background-color: #f0f4ff;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    align-content: start;
}

.library-media-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
}
.library-media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.library-media-item img, .library-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video badge indicator */
.library-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    padding: 4px 6px;
    border-radius: 4px;
}

/* --- Modern Popups (Dropdown Overrides) --- */

.custom-media-popup {
    width: 320px;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
}

/* Upload Dropzone inside Media Popup */
.upload-dropzone {
    border: 1px dashed #cbd5e1;
    transition: all 0.2s ease;
}
.upload-dropzone:hover {
    border-color: var(--primary);
    background-color: #eff6ff !important;
}

/* Emoji Grid Hover */
.emoji-item {
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
}
.emoji-item:hover {
    transform: scale(1.2);
}

/* Ensure Dropdown doesn't break button layout */
.editor-action-btn.dropdown-toggle::after {
    display: none; 
}

/* Make emoji picker fit seamlessly */
emoji-picker {
    width: 100%;
    --background: #ffffff;
    --border-color: transparent;
    --indicator-color: var(--primary);
}

/* --- Channel Selector Popup CSS --- */
.channel-selector-btn.dropdown-toggle::after {
    display: none; /* Hide default dropdown arrow */
}
.custom-checkbox-row {
    padding: 6px 8px;
    border-radius: 6px;
    margin-left: -8px;
    margin-right: -8px;
    transition: background-color 0.2s ease;
}
.custom-checkbox-row:hover {
    background-color: var(--bg-body);
}
.custom-checkbox-row .form-check-input {
    cursor: pointer;
}
/* Prevent icons and groups from squishing together */
.editor-header > div,
.brand-group-divider,
.brand-icon-selector {
    flex-shrink: 0;
}

/* Premium Horizontal Scrollbar Styling */
.editor-header::-webkit-scrollbar {
    height: 6px;
}
.editor-header::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 20px; /* Keeps scrollbar neatly inside */
}
.editor-header::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.editor-header::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Facebook Native Post Typography --- */
.fb-post-text {
    color: #050505;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 4px 16px 16px;
}

/* --- Facebook Dynamic Image Grids --- */
.fb-media-grid {
    display: grid;
    gap: 2px; /* Authentic FB 2px white gap */
    width: 100%;
    background: #fff;
}
.fb-media-item {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
}
.fb-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Grid: 1 Image */
.fb-media-grid[data-count="1"] { grid-template-columns: 1fr; }
.fb-media-grid[data-count="1"] .fb-media-item { max-height: 500px; }

/* Grid: 2 Images (Side by Side) */
.fb-media-grid[data-count="2"] { grid-template-columns: 1fr 1fr;  }

/* Grid: 3 Images (1 Top, 2 Bottom) */
.fb-media-grid[data-count="3"] { grid-template-columns: 1fr 1fr;  }
.fb-media-grid[data-count="3"] .fb-media-item:first-child { grid-column: span 2; }

/* Grid: 4 Images (2x2 Square) */
.fb-media-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 400px; }

/* Grid: 5+ Images (2 Top, 3 Bottom) */
.fb-media-grid[data-count="5"] { 
    grid-template-columns: repeat(6, 1fr); 
    grid-template-rows: 220px 140px; 
}
.fb-media-grid[data-count="5"] .fb-media-item:nth-child(1),
.fb-media-grid[data-count="5"] .fb-media-item:nth-child(2) { grid-column: span 3; }

.fb-media-grid[data-count="5"] .fb-media-item:nth-child(3),
.fb-media-grid[data-count="5"] .fb-media-item:nth-child(4),
.fb-media-grid[data-count="5"] .fb-media-item:nth-child(5) { grid-column: span 2; }

/* The "+5" Overlay for remaining images */
.fb-more-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* --- Facebook Video/Reels Preview --- */
.fb-video-preview {
    position: relative;
    width: 100%;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.fb-video-preview.landscape { aspect-ratio: 16/9; }
.fb-video-preview.portrait { aspect-ratio: 4/5; max-height: 550px; background-color: #242526; }
.fb-video-preview img { width: 100%; height: 100%; object-fit: cover; }
.fb-video-preview.portrait img { object-fit: contain; } /* Prevents bad cropping on vertical videos */

.fb-play-button {
    position: absolute;
    width: 68px;
    height: 68px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.2s;
}
.fb-play-button:hover { background: #fff; transform: scale(1.05); }
.fb-play-button i { color: #1c1e21; font-size: 26px; margin-left: 5px; } /* Margin pushes triangle to optical center */

/* --- Facebook Video/Reels Preview --- */
.fb-video-preview {
    position: relative;
    width: 100%;
    background-color: #000000; /* Facebook uses black for video backgrounds */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

/* Standard Landscape Video */
.fb-video-preview.landscape { 
    aspect-ratio: 16/9; 
}

/* Vertical Short / Reel */
.fb-video-preview.reel { 
    aspect-ratio: 9/16; 
    max-height: 600px; /* Prevents it from taking up the entire screen on desktop */
}

/* The video thumbnail */
.fb-video-preview img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* 'contain' ensures the whole video fits inside without cropping */
}

/* Authentic Facebook Play Button */
.fb-play-button {
    position: absolute;
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.fb-play-button:hover { 
    background: #ffffff; 
    transform: scale(1.05); 
}

.fb-play-button i { 
    color: #1c1e21; 
    font-size: 28px; 
    margin-left: 6px; /* Off-center margin makes the triangle look optically centered */
}

/* Video Duration Badge (Bottom Right) */
.fb-video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
}

/*Instagram Preview*/
/* --- Authentic Instagram Preview Card --- */
.ig-preview-card {
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 4px; /* Instagram uses very subtle rounding */
    width: 100%;
    max-width: 350px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.ig-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
}

.ig-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #efefef;
}

.ig-username {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
}

/* Instagram Media Containers */
.ig-media-container {
    position: relative;
    width: 100%;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top: 1px solid #efefef;
    border-bottom: 1px solid #efefef;
}
.ig-media-container.square { aspect-ratio: 1/1; }
.ig-media-container.portrait { aspect-ratio: 4/5; }
.ig-media-container.reel { aspect-ratio: 9/16; max-height: 520px; background: #000; }

.ig-media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ig-media-container.reel img {
    object-fit: contain;
}

/* Image Carousel Badge (1/4) */
.ig-carousel-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 2;
}

/* Instagram Play Button */
.ig-play-btn {
    position: absolute;
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.ig-play-btn:hover { transform: scale(1.05); background: #ffffff; }
.ig-play-btn i { font-size: 22px; color: #000; margin-left: 4px; }

/* Instagram Action Bar */
.ig-actions {
    padding: 10px 14px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ig-actions i {
    font-size: 22px;
    color: #262626;
    cursor: pointer;
}
.ig-actions-left {
    display: flex;
    gap: 16px;
}

/* Carousel Dots */
.ig-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.ig-dot {
    width: 6px; height: 6px;
    background-color: #dbdbdb;
    border-radius: 50%;
}
.ig-dot.active { background-color: #0095f6; }

/* Caption & Timestamp */
.ig-caption-area {
    padding: 0 14px;
    font-size: 14px;
    color: #262626;
    line-height: 1.4;
    word-wrap: break-word;
}
.ig-timestamp {
    padding: 6px 14px 14px;
    font-size: 12px;
    color: #8e8e8e;
}

/* Linkedin */

/* --- Authentic LinkedIn Preview Card --- */
.li-preview-card {
    background: #ffffff;
    border: 1px solid #e0dfdc; /* LinkedIn's specific light grey border */
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    overflow: hidden;
}

.li-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.li-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.li-user-info {
    display: flex;
    flex-direction: column;
}

.li-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0,0,0,0.9);
    line-height: 1.2;
}

.li-meta {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    line-height: 1.4;
}

.li-post-text {
    font-size: 14px;
    color: rgba(0,0,0,0.9);
    padding: 0 16px 8px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* --- LinkedIn Media Grid (4+ Images Layout) --- */

/* Grid: 1 Image */
.li-media-grid[data-count="1"] { 
    grid-template-columns: 1fr;
}
.li-media-grid[data-count="1"] .li-media-item { 
    max-height: 500px; 
}

/* Grid: 2 Images (Side by Side) */
.li-media-grid[data-count="2"] { 
    grid-template-columns: 1fr 1fr;  
}

/* Grid: 3 Images (1 Top, 2 Bottom) */
.li-media-grid[data-count="3"] { 
    grid-template-columns: 1fr 1fr;  
}
.li-media-grid[data-count="3"] .li-media-item:first-child { 
    grid-column: span 2; 
}

/* Grid: 4 Images (2x2 Square) */
.li-media-grid[data-count="4"] { 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 1fr 1fr; 
    height: 400px; 
}

/* Grid: 5+ Images (2 Top, 3 Bottom) */
.li-media-grid[data-count="5"] { 
    grid-template-columns: repeat(6, 1fr); 
    grid-template-rows: 220px auto; 
}
.li-media-grid[data-count="5"] .li-media-item:nth-child(1),
.li-media-grid[data-count="5"] .li-media-item:nth-child(2) { 
    grid-column: span 3;
}

.li-media-grid[data-count="5"] .li-media-item:nth-child(3),
.li-media-grid[data-count="5"] .li-media-item:nth-child(4),
.li-media-grid[data-count="5"] .li-media-item:nth-child(5) { 
    grid-column: span 2; 
}

.li-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: #fff;
    border-top: 1px solid #e0dfdc;
    border-bottom: 1px solid #e0dfdc;
}

.li-media-item {
    position: relative;
    overflow: hidden;
}

.li-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The first image spans the full width on top */
.li-media-item.large {
    grid-column: span 3;
    height: 220px;
}

/* The bottom row images */
.li-media-item.small {
    aspect-ratio: 1 / 1;
}

/* The "+X" Overlay */
.li-more-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 400;
}

/* --- LinkedIn Action Footer --- */
.li-actions {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
}

.li-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    color: rgba(0,0,0,0.6);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
    flex: 1;
}

.li-action-btn:hover {
    background: rgba(0,0,0,0.08);
}

.li-action-btn i {
    font-size: 18px;
    margin-bottom: 4px;
}

.li-action-btn span {
    font-size: 12px;
    font-weight: 600;
}

/* --- LinkedIn Video Preview --- */
.li-video-preview {
    position: relative;
    width: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 16/9; /* Standard horizontal video */
    border-top: 1px solid #e0dfdc;
    border-bottom: 1px solid #e0dfdc;
    overflow: hidden;
}

.li-video-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents cropping */
}

/* Authentic LinkedIn Play Button */
.li-play-btn {
    position: absolute;
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.li-play-btn:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.8);
}

.li-play-btn i {
    color: #ffffff;
    font-size: 24px;
    margin-left: 4px; /* Optical centering for the play triangle */
}

/* LinkedIn Duration Badge (Bottom Left) */
.li-video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/*Linkedin Poll*/
/* --- Authentic LinkedIn Poll Additions --- */
.li-poll-container {
    margin: 0 16px 12px;
    border: 1px solid #e0dfdc;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
}

.li-poll-question {
    font-size: 16px;
    font-weight: 600;
    color: rgba(0,0,0,0.9);
    margin-bottom: 16px;
    line-height: 1.4;
    word-wrap: break-word;
}

.li-poll-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border: 1px solid rgba(0,0,0,0.6);
    border-radius: 24px; /* Distinct pill shape */
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.li-poll-option:hover {
    background-color: rgba(0, 0, 0, 0.04);
    border-color: rgba(0,0,0,0.9);
}

.li-poll-option-text {
    font-size: 15px;
    font-weight: 600;
    color: rgba(0,0,0,0.7);
}

/* Empty circle for the un-voted radio button state */
.li-poll-radio {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.6);
    border-radius: 50%;
}

.li-poll-meta {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    margin-top: 4px;
}
/*Linkedin Poll*/


/* Youtube */
/* --- Authentic YouTube Preview Card --- */
.yt-preview-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    font-family: "Roboto", Arial, sans-serif; /* YouTube uses Roboto */
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* YouTube Thumbnail Area */
.yt-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    cursor: pointer;
}

.yt-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Classic YouTube Play Button Overlay (Shows on Hover) */
.yt-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.yt-thumbnail-container:hover .yt-play-overlay {
    opacity: 1;
}

.yt-play-overlay i {
    color: #FF0000; /* YouTube Red */
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
    border-radius: 10px; /* Gives the white background behind the red play button */
    padding: 0 4px;
}

/* Duration Badge */
.yt-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 4px;
    border-radius: 4px;
    line-height: 1;
    letter-spacing: 0.5px;
}

/* YouTube Info Area (Below Thumbnail) */
.yt-info-area {
    padding: 12px;
    display: flex;
    gap: 12px;
}

.yt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.yt-text-content {
    display: flex;
    flex-direction: column;
}

/* Title truncates at 2 lines exactly like YouTube */
.yt-title {
    font-size: 14px;
    font-weight: 500;
    color: #0f0f0f;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-meta {
    font-size: 12px;
    color: #606060;
    line-height: 1.4;
}

.yt-meta span {
    display: block;
}

/* --- Authentic YouTube Shorts Preview --- */
.yt-short-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9 / 16;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    font-family: "Roboto", Arial, sans-serif;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.yt-short-card img.short-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark gradient overlay for text readability */
.yt-short-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    pointer-events: none;
}

/* Top Right controls (Camera/Audio placeholder) */
.yt-short-top-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 16px;
}

.yt-short-top-controls i {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    cursor: pointer;
}

/* Right-side Vertical Action Bar */
.yt-short-sidebar {
    position: absolute;
    right: 12px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    z-index: 2;
}

.yt-short-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.yt-short-action i {
    font-size: 24px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.yt-short-action span {
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Bottom-left Content Area */
.yt-short-content {
    position: absolute;
    left: 16px;
    right: 70px; /* Leave space for the sidebar */
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
}

.yt-short-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-short-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
}

.yt-short-username {
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.yt-short-subscribe {
    background: #ffffff;
    color: #0f0f0f;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.yt-short-title {
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.yt-short-audio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.yt-short-audio i {
    font-size: 12px;
}

/* Pinterest */
.pin-preview-card {
    width: 100%;
    max-width: 280px; /* Pinterest columns are usually around 236px to 280px */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, "ãƒ’ãƒ©ã‚®ãƒŽè§’ã‚´ Pro W3", "Hiragino Kaku Gothic Pro", "ãƒ¡ã‚¤ãƒªã‚ª", Meiryo, "ï¼­ï¼³ ï¼°ã‚´ã‚·ãƒƒã‚¯", Arial, sans-serif;
    background: transparent;
}

/* Pin Image Container */
.pin-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3; /* Standard Pinterest Vertical Ratio */
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pin-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Pin Hover Overlay (Authentic UI) */
.pin-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}

.pin-image-container:hover .pin-overlay {
    opacity: 1;
}

/* Red Save Button */
.pin-save-btn {
    align-self: flex-end;
    background-color: #E60023; /* Pinterest Red */
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 24px;
    cursor: pointer;
    border: none;
}
.pin-save-btn:hover { background-color: #ad081b; }

/* Bottom Action Bar */
.pin-bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Link Button */
.pin-link-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #111;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    max-width: 120px;
}
.pin-link-btn:hover { background: #fff; }
.pin-link-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Small Action Icons */
.pin-icon-group {
    display: flex;
    gap: 6px;
}
.pin-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}
.pin-icon-btn:hover { background: #fff; }

/* Pin Title (Caption) */
.pin-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Pin Author */
.pin-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pin-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.pin-username {
    font-size: 12px;
    color: #111;
    font-weight: 400;
}

/* --- Pinterest Video Pin Additions --- */
.pin-video-duration {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 2;
    letter-spacing: 0.3px;
}

.pin-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pin-video-play:hover {
    transform: translate(-50%, -50%) scale(1.05);
    background: #ffffff;
}

.pin-video-play i {
    font-size: 22px;
    color: #111;
    margin-left: 4px; /* Optical centering for play icon */
}

.pin-sound-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 2;
    cursor: pointer;
    transition: background 0.2s;
}

.pin-sound-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Ensure the hover overlay sits above the video elements but doesn't block them entirely */
.pin-image-container.video-pin:hover .pin-video-play,
.pin-image-container.video-pin:hover .pin-sound-btn {
    opacity: 0; /* Hides play/sound buttons when the Pinterest hover UI activates */
}

/* --- Authentic X (Twitter) Preview Card --- */
.x-preview-card {
    background: #ffffff;
    border: 1px solid #cfd9de; /* X's specific border color */
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 4px;
}

.x-header {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px 4px;
    gap: 12px;
}

.x-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.x-author-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.x-name-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    line-height: 20px;
    white-space: nowrap;
}

.x-name {
    font-weight: 700;
    color: #0f1419;
}

.x-verified {
    color: #1d9bf0; /* X Blue */
    font-size: 14px;
}

.x-handle, .x-time {
    color: #536471;
    font-weight: 400;
}

.x-options {
    color: #536471;
    cursor: pointer;
    padding: 0 4px;
}

.x-content {
    font-size: 15px;
    line-height: 20px;
    color: #0f1419;
    padding: 0 16px;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 12px;
}

/* X Media Container */
.x-media-container {
    margin: 0 16px 12px;
    border-radius: 16px;
    border: 1px solid #cfd9de;
    overflow: hidden;
    position: relative;
}

/* Default to a flexible aspect ratio, max-height to avoid massive images */
.x-media-container img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* X Action Bar */
.x-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    max-width: 400px;
}

.x-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #536471;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 8px 0;
}

.x-action-item i {
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

/* X-specific hover colors */
.x-action-item.reply:hover { color: #1d9bf0; }
.x-action-item.reply:hover i { background: rgba(29, 155, 240, 0.1); }

.x-action-item.repost:hover { color: #00ba7c; }
.x-action-item.repost:hover i { background: rgba(0, 186, 124, 0.1); }

.x-action-item.like:hover { color: #f91880; }
.x-action-item.like:hover i { background: rgba(249, 24, 128, 0.1); }

.x-action-item.view:hover { color: #1d9bf0; }
.x-action-item.view:hover i { background: rgba(29, 155, 240, 0.1); }

.x-action-group-right {
    display: flex;
    gap: 12px;
}

.x-action-group-right .x-action-item:hover { color: #1d9bf0; }
.x-action-group-right .x-action-item:hover i { background: rgba(29, 155, 240, 0.1); }

/* --- Authentic X (Twitter) Video Additions --- */
.x-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.x-video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    background-color: #ffffff;
}

.x-video-play-btn i {
    font-size: 26px;
    color: #1d9bf0; /* Official X Blue */
    margin-left: 4px; /* Optical centering */
}

/* X places the video duration in the bottom-left */
.x-video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* X poll */

/* --- Authentic X (Twitter) Poll Results Additions --- */
.x-poll-results {
    padding: 0 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.x-poll-result-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 32px;
}

/* The background fill for the poll results. 
   Set width to ~6px for 0%, or a percentage for actual votes */
   .x-poll-result-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 6px; /* Base width for 0% to match screenshot */
    background-color: #cfd9de; 
    border-radius: 4px;
    z-index: 0;
}

.x-poll-result-text {
    position: relative;
    z-index: 1;
    padding-left: 14px;
    font-size: 15px;
    color: #0f1419;
    word-break: break-word;
}

.x-poll-result-pct {
    position: relative;
    z-index: 1;
    font-size: 15px;
    color: #0f1419;
    padding-left: 12px;
}

.x-poll-meta {
    margin-top: 4px;
    font-size: 15px;
    color: #536471;
    display: flex;
    gap: 4px;
}

/* --- Authentic Meta Threads Preview Card --- */
.threads-preview-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

/* Left Column: Avatar & Thread Line */
.threads-left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.threads-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.05);
}

.threads-line {
    width: 2px;
    flex-grow: 1;
    background-color: #e5e5e5;
    margin-top: 8px;
    border-radius: 2px;
    min-height: 40px; /* Ensures the line is visible even without media */
}

/* Right Column: Content */
.threads-right-col {
    flex-grow: 1;
    min-width: 0; /* Prevents text overflow */
}

.threads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.threads-name-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.threads-username {
    font-weight: 600;
    font-size: 15px;
    color: #000000;
}

.threads-verified {
    color: #0095f6;
    font-size: 12px;
}

.threads-time {
    color: #999999;
    font-size: 14px;
    font-weight: 400;
    margin-left: 4px;
}

.threads-options {
    color: #000000;
    cursor: pointer;
    padding: 0 4px;
}

/* Threads Post Text */
.threads-content {
    font-size: 15px;
    color: #000000;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 10px;
}

/* Threads Media Container */
.threads-media {
    width: 100%;
    border-radius: 12px; /* Threads uses softer corners on media */
    border: 1px solid #e5e5e5;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.threads-media img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Threads Action Icons */
.threads-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.threads-action-btn {
    color: #000000;
    font-size: 18px; /* Threads icons are slightly smaller/sleeker */
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.threads-action-btn:hover {
    opacity: 0.5;
}

/* Threads Footer Stats */
.threads-stats {
    font-size: 14px;
    color: #999999;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Video Play Button (If Video) */
.threads-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s ease;
}
.threads-video-play:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%) scale(1.05);
}
.threads-video-play i { margin-left: 3px; }

/* --- Threads Video Additions --- */
.threads-video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    z-index: 2;
}

/* --- Authentic Mastodon Preview Card --- */
.masto-preview-card {
    background: #ffffff;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.masto-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

/* Mastodon famously uses subtly rounded squares for avatars by default */
.masto-avatar {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.masto-author-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.masto-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.masto-display-name {
    font-weight: 700;
    font-size: 15px;
    color: #282c37;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masto-time {
    font-size: 14px;
    color: #606984;
    text-decoration: none;
    flex-shrink: 0;
}

.masto-username {
    font-size: 14px;
    color: #606984;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masto-content {
    font-size: 15px;
    line-height: 1.5;
    color: #282c37;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Mastodon Media Container */
.masto-media-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #e6ecf0;
    border: 1px solid #d9e1e8;
}

.masto-media-container img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Mastodon Action Bar */
.masto-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #606984;
    font-size: 14px;
    padding-right: 16px; /* Mastodon doesn't stretch actions all the way to the right edge */
}

.masto-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.masto-action-btn i {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* Mastodon-specific Hover Colors */
.masto-action-btn.reply:hover { color: #2b90d9; }
.masto-action-btn.reply:hover i { background: rgba(43, 144, 217, 0.1); }

.masto-action-btn.boost:hover { color: #18a47b; } /* Mastodon Green */
.masto-action-btn.boost:hover i { background: rgba(24, 164, 123, 0.1); }

.masto-action-btn.favorite:hover { color: #ca8f04; } /* Mastodon Gold */
.masto-action-btn.favorite:hover i { background: rgba(202, 143, 4, 0.1); }

.masto-action-btn.bookmark:hover { color: #2b90d9; }
.masto-action-btn.bookmark:hover i { background: rgba(43, 144, 217, 0.1); }

/* --- Mastodon Video Additions --- */
.masto-media-container.video {
    position: relative;
    cursor: pointer;
    background: #000000; /* Videos often have a black background in the player */
    display: flex;
    align-items: center;
    justify-content: center;
}

.masto-media-container.video img {
    object-fit: contain; /* Ensures the whole video frame is visible */
    width: 100%;
    max-height: 400px;
}

.masto-video-play-btn {
    position: absolute;
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 2;
}

.masto-media-container.video:hover .masto-video-play-btn {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    border-color: #ffffff;
}

.masto-video-play-btn i {
    margin-left: 5px; /* Optically center the play triangle */
}

.masto-video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* --- Mastodon Detailed Poll Preview --- */
.masto-detailed-card {
    background: #ffffff;
    border: 1px solid #e0e4e9;
    border-radius: 4px; /* Matches the sharp but slightly rounded corners */
    width: 100%;
    max-width: 500px;
    padding: 16px 16px 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header */
.masto-d-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.masto-d-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px; /* Mastodon's distinct rounded-square avatar */
    background-color: #dbe4ea;
    object-fit: cover;
}

.masto-d-author {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.masto-d-display-name {
    font-weight: 600;
    font-size: 15px;
    color: #111111;
}

.masto-d-handle {
    font-size: 14px;
    color: #606984;
}

/* Content */
.masto-d-content {
    font-size: 16px;
    color: #111111;
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Detailed Poll Section */
.masto-d-poll-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.masto-d-poll-option {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.masto-d-poll-pct-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 32px;
}

.masto-d-poll-pct {
    font-weight: 700;
    font-size: 14px;
    color: #111111;
}

/* The signature Mastodon purple indicator dot */
.masto-d-poll-dot {
    width: 6px;
    height: 6px;
    background-color: #6364ff; 
    border-radius: 50%;
    margin-top: 4px;
}

.masto-d-poll-text {
    font-size: 15px;
    color: #111111;
    padding-top: -1px; /* Align with percentage text */
}

.masto-d-poll-meta {
    font-size: 14px;
    color: #606984;
    margin-bottom: 20px;
}

.masto-d-poll-meta span.refresh {
    text-decoration: underline;
    cursor: pointer;
}

/* Meta Data & Stats Footer */
.masto-d-time {
    font-size: 14px;
    color: #606984;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.masto-d-divider {
    height: 1px;
    background-color: #e0e4e9;
    margin: 0 -16px; /* Stretches the line to the edges of the card */
}

.masto-d-stats {
    padding: 12px 0;
    font-size: 14px;
    color: #606984;
    display: flex;
    gap: 12px;
}

.masto-d-stats strong {
    color: #111111;
    font-weight: 600;
}

/* Action Bar */
.masto-d-actions {
    display: flex;
    justify-content: space-around;
    padding: 14px 0;
    color: #606984;
    font-size: 18px;
}

.masto-d-action-btn {
    cursor: pointer;
    transition: color 0.2s ease;
}

.masto-d-action-btn:hover { color: #6364ff; }


/* --- Authentic Bluesky Preview Card --- */
.bsky-preview-card {
    background: #ffffff;
    border: 1px solid #e2e8f0; /* Light gray border typical of standard feeds */
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    padding: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    gap: 12px;
}

/* Left Column: Avatar */
.bsky-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    /* Bluesky default avatar background */
    background-color: #0085ff; 
}

/* Right Column: Content Area */
.bsky-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

/* Header */
.bsky-header {
    /*display: flex;*/
    align-items: baseline;
    /*gap: 4px;*/
    margin-bottom: 2px;
    /*white-space: nowrap;*/
    /*overflow: hidden;*/
    text-overflow: ellipsis;
}

.bsky-display-name {
    font-weight: 700;
    font-size: 15px;
    color: #0b0f14;
}

.bsky-meta {
    font-size: 15px;
    color: #54718c; /* Bluesky's specific slate-gray for meta text */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Text Content */
.bsky-content {
    font-size: 15px;
    color: #0b0f14;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 12px;
}

/* Media Container (For future use if you add images) */
.bsky-media-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.bsky-media-container img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Action Bar */
.bsky-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bsky-actions-main {
    display: flex;
    gap: 25px; /* Spreading out the primary actions like the screenshot */
}

.bsky-actions-extra {
    display: flex;
    gap: 16px; /* Grouping secondary actions tighter on the right */
}

.bsky-action-btn {
    color: #54718c;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: -8px; /* Offset the padding for a larger click area */
}

/* Bluesky Hover Effects */
.bsky-action-btn.reply:hover { color: #0085ff; background: rgba(0, 133, 255, 0.1); }
.bsky-action-btn.repost:hover { color: #20bc3b; background: rgba(32, 188, 59, 0.1); } /* Green */
.bsky-action-btn.like:hover { color: #e0245e; background: rgba(224, 36, 94, 0.1); } /* Pink/Red */
.bsky-action-btn.extra:hover { color: #0085ff; background: rgba(0, 133, 255, 0.1); }

/* --- Authentic Bluesky Video Additions --- */
.bsky-media-container.video {
    position: relative;
    background: #000000; /* Videos use a dark background */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bsky-media-container.video img {
    width: 100%;
    max-height: 400px;
    object-fit: contain; /* Ensures the whole video is visible */
    opacity: 0.9;
}

/* Play Button Overlay */
.bsky-video-play-btn {
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 22px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.bsky-media-container.video:hover .bsky-video-play-btn {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.8);
}

.bsky-video-play-btn i {
    margin-left: 4px; /* Optical centering for the play triangle */
}

/* Duration Badge */
.bsky-video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* Tiktok */

/* --- Authentic TikTok Preview Card --- */
.tiktok-preview-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9 / 16;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tiktok-preview-card img.tiktok-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark gradient overlay for text readability */
.tiktok-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    pointer-events: none;
}

/* Right-side Vertical Action Bar */
.tiktok-sidebar {
    position: absolute;
    right: 12px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 2;
}

/* Profile Avatar with Pink Plus Badge */
.tiktok-profile-wrapper {
    position: relative;
    margin-bottom: 10px;
    cursor: pointer;
}

.tiktok-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
}

.tiktok-plus-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #fe2c55; /* TikTok Pink */
    color: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #000000; /* Blends with video background */
}

/* Sidebar Actions */
.tiktok-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.tiktok-action i {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    transition: transform 0.2s ease;
}

.tiktok-action:hover i {
    transform: scale(1.1);
}

.tiktok-action span {
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Spinning Audio Record Placeholder */
.tiktok-audio-disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333333;
    border: 8px solid #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.tiktok-audio-disc img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Bottom-left Content Area */
.tiktok-info {
    position: absolute;
    left: 12px;
    right: 64px; /* Leave space for the sidebar */
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.tiktok-username {
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tiktok-caption {
    font-size: 14px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Truncates at 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiktok-audio-track {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    overflow: hidden;
    white-space: nowrap;
}

.tiktok-audio-track i {
    font-size: 12px;
}


/*Story*/

/* --- Story Preview UI --- */
.story-preview-wrapper {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin: 0 auto;
}

.story-preview-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.6) 100%);
    display: flex;
    flex-direction: column;
    padding: 12px;
    pointer-events: none; /* Lets clicks pass through to video play/pause */
}

/* Classic Story Progress Bar */
.story-progress-container {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.story-progress-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    flex-grow: 1;
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    transition: width 0.1s linear;
}

/* Story Header Overlay */
.story-header-overlay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto; /* Re-enable clicks for buttons */
}

.story-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.story-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
}

.story-time {
    font-weight: 400;
    opacity: 0.8;
}

/* Change/Remove Button */
.story-change-btn {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.story-change-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Reel caption overlay - sits at the bottom of the vertical preview */
.reel-preview-caption-wrap {
    pointer-events: none;
}
.reel-preview-caption {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

@media (max-width: 991.98px) {
    .story-scroll-row { 
        flex-direction: column !important;
        display: flex !important;
        overflow-y: auto !important;
    }
    .story-col-left { 
        border-right: none !important; 
        border-bottom: 1px solid #e2e8f0 !important;
        height: auto !important; /* Removes 100% height restriction */
        flex: none !important;   /* Prevents absorbing all screen space */
    }
    .story-col-right { 
        height: auto !important; 
        flex: none !important;
    }
}
@media (max-width: 415px) {
    .modal-body-custom-stories .border-top .btn {
        white-space: nowrap !important; /* Forces text to stay on one line */
        padding-left: 1.5rem !important; /* Reduces the px-5 spacing to fit the screen */
        padding-right: 1.5rem !important;
        font-size: 14px !important; /* Slightly smaller font to ensure perfect fit */
    }
}

.fade-in-animation {
    animation: spaFadeIn 0.3s ease-in-out;
}
@keyframes spaFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   Notification bell + unread badge
   ==========================================
   #notificationBell is a .btn.rounded-circle, but Bootstrap's default .btn
   padding is NOT equal on all sides (more left/right than top/bottom), so
   without an explicit fixed size the button renders as a wide oval rather
   than a true circle. The badge's old positioning (Bootstrap's top-0 +
   start-100 + translate-middle) places it 100% across from the button's
   LEFT edge - which is correct for a plain square/circle icon, but on this
   wider-than-tall oval it lands too far to the right, past where the bell
   icon actually is, making it look hidden/misplaced.
   Fixing the button to a true fixed-size circle and pinning the badge with
   plain top/right offsets (rather than a percentage of the button's own,
   inconsistent width) keeps it sitting right on the bell's corner. */
#notificationBell {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#notificationBadge {
    top: 2px;
    right: 2px;
    left: auto;
    transform: none;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}