/* Community Feed CSS - Dark Theme for BitcoinCounterFlow */
:root {
    --cf-primary-color: linear-gradient(93deg, #0b0b0b, #0c3fae);
    --cf-liked-color: #E0245E; /* Twitter-like red for liked state */
    --cf-background: #080808; /* Dark background to match theme */
    --cf-border-color: #2F2F2F;
    --cf-text-color: #E6E6E6; /* Light text for dark theme */
    --cf-secondary-text: #A0A0A0; /* Muted text for meta info */
    --cf-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --cf-border-radius: 12px;
    --cf-spacing: 16px;
    --cf-sidebar-width: 300px;
    --cf-sidebar-compact-width: 60px;
    --cf-right-sidebar-width: 280px;
    --cf-chat-width: 300px; /* Mantido para compatibilidade, mas não usado */
    --cf-header-height: 60px;
}

#cf-ws-status-bar {
 display: none;   
}

/* Layout Base - Discord Style */
.cf-discord-layout {
    display: grid;
    grid-template-columns: var(--cf-sidebar-compact-width) 1fr var(--cf-right-sidebar-width);
    grid-template-rows: var(--cf-header-height) 1fr;
    gap: 1px;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: var(--cf-background);
    transition: grid-template-columns 0.3s ease;
}

/* Sidebar em modo compacto */
#cf-sidebar {
    background: var(--cf-background);
    border-right: 1px solid var(--cf-border-color);
    transition: width 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* Sidebar expandido */
#cf-sidebar.expanded {
    width: var(--cf-sidebar-width);
}

/* Botão de toggle do sidebar */
.cf-sidebar-toggle {
    position: absolute;
    top: 15px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--cf-text-color);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.cf-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Quando sidebar está compacto, mostrar apenas títulos essenciais */
#cf-sidebar:not(.expanded) .cf-sidebar-header h3 {
    display: block;
}

#cf-sidebar:not(.expanded) .cf-category-title {
    padding: 8px;
    text-align: center;
}

#cf-sidebar:not(.expanded) .cf-category-title .cf-arrow {
    display: none;
}

#cf-sidebar:not(.expanded) .cf-channels {
    display: none;
}

/* Quando expandido, mostrar tudo */
#cf-sidebar.expanded .cf-sidebar-header h3 {
    display: block;
}

#cf-sidebar.expanded .cf-category-title .cf-arrow {
    display: inline-block;
}

/* Container for the community feed */
#primary.content-area {
    margin: 0;
    padding: 0;
    background: var(--cf-background);
    height: 100vh;
    overflow: hidden;
}

/* Page title styling */
.page-header .page-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--cf-text-color);
    text-align: center;
    margin-bottom: calc(var(--cf-spacing) * 2);
    position: relative;
    padding-bottom: 8px;
}

.page-header .page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 92.5%;
    height: 3px;
    background: var(--cf-primary-color);
    border-radius: 2px;
}

/* Post card styling */
article.post-community_post {
    background: var(--cf-background);
    border: 1px solid var(--cf-border-color);
    border-radius: var(--cf-border-radius);
    margin-bottom: var(--cf-spacing);
    padding: var(--cf-spacing);
    box-shadow: var(--cf-shadow);
    transition: box-shadow 0.2s ease;
}


article.post-community_post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Post header */
.entry-header {
    display: block;
    margin-bottom: var(--cf-spacing);
}

.entry-header .entry-title {
    font-size: 1.2rem;
    color: var(--cf-text-color);
    margin: 0 0 8px 0;
    font-weight: 500;
    text-transform: uppercase;
}

.entry-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--cf-secondary-text);
    font-size: 0.9rem;
}

.entry-meta .posted-on,
.entry-meta .byline {
    display: block;
}

/* Post content */
.entry-content {
    color: var(--cf-text-color);
    line-height: 1.5;
    position: relative;
}

.content-preview {
    transition: max-height 0.3s ease;
}

.content-preview img,
.content-preview video {
    max-width: 100%;
    border-radius: var(--cf-border-radius);
    margin-top: 8px;
    border: 2px solid #333;
}

/* Load More button */
.cf-load-more {
    background: none;
    border: 1px solid var(--cf-border-color);
    color: var(--cf-text-color);
    padding: 8px 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 22px;
    transition: background 0.2s ease, color 0.2s ease;
    display: block;
}

.cf-load-more:hover {
    background: var(--cf-primary-color);
    color: #fff;
}

/* Footer with interactions */
.entry-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--cf-border-color);
    padding-top: var(--cf-spacing);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* Like button */
.cf-like-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cf-secondary-text);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.cf-like-button:hover {
    color: var(--cf-liked-color);
}

.cf-like-button.liked {
    color: var(--cf-liked-color);
}

.cf-like-button::before {
    content: '\f004'; /* Font Awesome heart icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
}

.cf-like-button.liked::before {
    font-weight: 900; /* Solid heart for liked state */
}

.cf-like-count {
    color: var(--cf-secondary-text);
    font-size: 0.9rem;
}

/* Comments link */
.comments-link {
    color: var(--cf-secondary-text);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comments-link::before {
    content: '\f075'; /* Font Awesome comment icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
}

.comments-link:hover {
    color: var(--cf-primary-color);
}

/* Chat widget base styles */
.cf-chat-widget {
    background: var(--cf-background);
    border: 1px solid var(--cf-border-color);
    border-radius: var(--cf-border-radius);
    box-shadow: var(--cf-shadow);
    display: flex;
    flex-direction: column;
}

/* Chat widget on /feed page */
.cf-chat-widget.cf-feed-chat {
    position: sticky;
    margin-top: 10px;
    margin-right: 10px;
    width: 300px;
    min-height: 450px;
    height: 100vh ;
    max-height: 100%;
    margin-bottom: 10px;
    bottom: 0;
    
}

/* Chat widget on other pages */
.cf-chat-widget.cf-default-chat {
    width: 100%;
    max-width: 400px;
    min-height: 300px;
    margin: 20px auto;
    border-radius: 8px;
}

/* Chat widget full height */
.cf-chat-widget.full-height-chat {
    height: 100%;
    min-height: 0;
}

/* Chat header */
.cf-chat-header {
    padding: 10px;
    border-bottom: 1px solid var(--cf-border-color);
}

.cf-chat-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--cf-text-color);
    text-transform: uppercase;
    font-weight: 500;
}

/* Chat messages */
.cf-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Chat message */
.cf-chat-message {
    margin-bottom: 10px;
    position: relative;
}

.cf-chat-message p {
    margin: 5px 0;
    color: var(--cf-text-color);
    font-size: 0.8rem;
}

.cf-chat-author {
    font-weight: 600;
    color: var(--cf-text-color);
    font-size: 0.9rem;
}

.cf-chat-date {
    color: var(--cf-secondary-text);
    font-size: 0.8rem;
    margin-left: 5px;
}

/* Delete button */
.cf-delete-message {
    background: none;
    border: none;
    color: var(--cf-liked-color);
    font-size: 0.8rem;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    padding: 2px 5px;
}

button.cf-delete-chat-btn {
    background: #ff00009c;
    padding-inline: 5px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

button.cf-delete-post-btn {
    background: #ff00009c;
    font-weight: 600;
    padding-inline: 5px;
    cursor: pointer;
    border-radius: 4px;
}

.cf-delete-message:hover {
    text-decoration: underline;
}

/* Hide delete button for non-admins */
body:not(.cf-is-admin) .cf-delete-message {
    display: none;
}

/* Chat form */
.cf-chat-form {
    padding: 10px;
    border-top: 1px solid var(--cf-border-color);
}

.cf-chat-form textarea {
    width: 100%;
    height: 50px;
    resize: none;
    background: #1A1A1A;
    color: var(--cf-text-color);
    border: 1px solid var(--cf-border-color);
    border-radius: 5px;
    padding: 5px;
    font-size: 0.9rem;
}

.cf-chat-form button {
    width: 100%;
    padding: 8px;
    background: var(--cf-primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 400;
}

.cf-chat-form button:hover {
    opacity: 0.9;
}

/*
 * Ajustes para a mensagem completa do chat
 */
.cf-chat-message {
    display: flex;
    align-items: flex-start; /* Alinha o conteúdo no topo da linha */
    flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha */
}

.cf-chat-author-info {
    display: flex; /* Transforma o contêiner em um flexbox */
    align-items: center; /* Alinha os itens verticalmente no centro */
    gap: 8px; /* Adiciona um pequeno espaço entre a imagem e o nome */
}

.cf-chat-avatar {
    width: 32px; /* Reduz o tamanho da imagem */
    height: 32px; /* Reduz o tamanho da imagem */
    border-radius: 50% !important; /* Mantém a imagem circular */
    object-fit: cover; /* Garante que a imagem preencha a área sem distorcer */
}

/* Ajusta o nome do usuário */
.cf-chat-author {
    font-weight: 400;
    color: #f7f7f7; /* Cor do nome do usuário */
}

/* Ajusta a data para ficar ao lado do nome */
.cf-chat-date {
    margin-left: auto; /* Empurra a data para a direita do contêiner */
    display: none;
}

/* Ajusta o parágrafo da mensagem para ocupar a linha toda */
.cf-chat-message p {
    flex-basis: 100%; /* Faz com que o parágrafo ocupe 100% da largura disponível */
    margin: 0;
}

/*
 * Estilização para o rótulo do plano (Maxi, PRO, ADM)
 */
.cf-user-label {
    background-color: #111;
    color: #fff;
    font-size: 10px;
    border: 1px solid #222;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1; /* Garante alinhamento vertical */
    text-transform: uppercase;
    margin-left: 4px; /* Espaço entre o nome e o rótulo */
}



/* Responsive design for chat widget */
@media (max-width: 600px) {
    .cf-chat-widget.cf-feed-chat {
        width: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
        display: none;
    }

    .cf-chat-widget.cf-default-chat {
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
        min-height: 250px;
    }
}

/* Responsive design */
@media (max-width: 600px) {
    #primary.content-area {
        padding: 0;
    }

    article.post-community_post {
        padding: calc(var(--cf-spacing) / 2);
    }

    .page-header .page-title {
        font-size: 1.5rem;
    }

    .entry-header .entry-title {
        font-size: 1.1rem;
    }

    .entry-meta {
        font-size: 0.8rem;
    }

    .cf-chat-widget {
        width: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
        display: none;
    }
}



/* Integration with Blocksy dark theme */
body.ct-theme {
    --cf-primary-color: var(--theme-palette-color-1, linear-gradient(93deg, #e71792, #0084ff));
    --cf-background: var(--theme-palette-color-7, #080808);
    --cf-border-color: var(--theme-border-color, #2F2F2F);
    --cf-text-color: var(--theme-text-color, #E6E6E6);
    --cf-secondary-text: var(--theme-secondary-text-color, #A0A0A0);
}

/* ==============================================================
   DISCORD-LIKE LAYOUT - COMMUNITY FEED
   ============================================================== */

.cf-discord-layout {
    display: flex;
    min-height: 80vh;
    background: var(--cf-background);
    position: relative;
}

/* ===== SIDEBAR ESQUERDA ===== */
.cf-channel-sidebar {
    width: 300px;
    background: #070707;
    border-right: 1px solid #151515;
    overflow-y: auto;
    padding: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
            height: 100vh;

}

.cf-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 8px;
}

.cf-sidebar-header h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

.cf-hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Categorias */
.cf-category {
    margin-bottom: 20px;
}

.cf-category-title {
    color: #8b8b8b;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 8px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cf-arrow {
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.cf-category-title.collapsed .cf-arrow {
    transform: rotate(-90deg);
}

.cf-channels {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cf-channel-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--cf-secondary-text);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.cf-channel-item:hover {
    background: #111;
    color: #fff;
}

.cf-channel-item.active {
    background: var(--cf-primary-color);
    color: #fff;
    font-weight: 500;
}

.cf-locked {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* ===== ÁREA CENTRAL ===== */
.cf-channel-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--cf-background);
}

#cf-channel-header {
    padding: 12px 0;
    border-bottom: 1px solid var(--cf-border-color);
    margin-bottom: 16px;
}

#cf-current-channel-name {
    font-size: 1.4rem;
    color: var(--cf-text-color);
    margin: 0;
    font-weight: 500;
}

#cf-messages-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    height: 800px;
}

.cf-message {
    margin-bottom: 16px;
    padding: 10px;
    background: #111;
    border-radius: 8px;
    border-left: 3px solid #444;
}

.cf-message.pinned {
    border-left-color: #0f3460;
}

.cf-message strong {
    color: var(--cf-primary-color);
    font-weight: 600;
}

.cf-message .content-preview {
    margin-top: 6px;
    color: var(--cf-text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Formulário de envio */
.cf-channel-form {
    border-top: 1px solid var(--cf-border-color);
    padding-top: 16px;
    margin-top: 16px;
}

.cf-channel-form textarea {
    width: 100%;
    height: 60px;
    resize: none;
    background: #1a1a1a;
    border: 1px solid var(--cf-border-color);
    border-radius: 6px;
    padding: 10px;
    color: var(--cf-text-color);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.cf-channel-form button {
    background: var(--cf-primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.cf-channel-form button:hover {
    opacity: 0.9;
}

/* ===== CHAT GERAL DIREITA ===== */
.cf-chat-widget.cf-feed-chat {
    position: sticky;
    top: 80px;
    width: 320px;
    height: 100vh;
    max-height: calc(100vh - 40px);
    align-self: flex-start;
    margin-left: 16px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .cf-channel-sidebar { width: 200px; }
    .cf-chat-widget.cf-feed-chat { width: 280px; }
}

@media (max-width: 768px) {
    
    .cf-channel-messages {
        margin-left: 42px;
        overflow: auto;
        position: absolute;
        height: 100vh;
                width: calc(100vw - 42px);

    }
    
    .cf-discord-layout {
        flex-direction: column;
    }

    .cf-channel-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .cf-channel-sidebar.open {
        left: 0;
    }

    .cf-hamburger {
        display: block !important;
    }

    .cf-chat-widget.cf-feed-chat {
        position: relative;
        width: 100%;
        margin: 20px 0 0;
        max-height: 400px;
    }

   
}


/* ==============================================================
   MELHORIAS VISUAIS - ETAPA 3
   ============================================================== */

.cf-message {
    margin-bottom: 16px;
    padding: 10px;
    background: #111;
    border-radius: 8px;
    border-left: 3px solid #444;
    position: relative;
}

.cf-message.pinned {
    background: #111;
    border-left-color: #2a2a2a;
}

.cf-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.cf-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.cf-user-label {
    background: #333;
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.cf-timestamp {
    color: #666;
    font-size: 0.75rem;
    margin-left: auto;
}

.cf-message-content {
    color: var(--cf-text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cf-message-content code {
    font-family: monospace;
}

/* ===== REPLY QUOTE STYLING ===== */
.cf-reply-quote {
    background: rgba(11, 126, 232, 0.08);
    border-left: 3px solid #0b7ee8;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cf-reply-quote:hover {
    background: rgba(11, 126, 232, 0.15);
    transform: translateX(2px);
}

.cf-reply-quote-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cf-reply-quote-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--cf-border-color);
    object-fit: cover;
}

.cf-reply-quote-header strong {
    font-size: 0.9rem;
    color: #0b7ee8;
    font-weight: 600;
}

.cf-reply-quote-content {
    font-size: 0.9rem;
    color: var(--cf-text-secondary-color, #999);
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.cf-message-reply {
    border-left: 2px solid #0b7ee8;
    background: rgba(11, 126, 232, 0.02);
}

.cf-mention {
    background: #1a4b8c;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
}

.cf-badge {
    background: #e0245e;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: -6px;
    top: -6px;
}

/* ==============================================================
   UPLOAD + REAÇÕES + MODERAÇÃO
   ============================================================== */

.cf-channel-form.dragover {
    border: 2px dashed #00bfff;
    background: rgba(0, 191, 255, 0.1);
}

.cf-message-actions {
    position: absolute;
    right: 8px;
    top: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    gap: 4px;
}

.cf-message:hover .cf-message-actions {
    opacity: 1;
}

.cf-message-actions button {
    background: none;
    border: none;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
}

.cf-reactions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
        justify-content: flex-end;

}

.cf-reaction {
    background: #333;
    border: 1px solid #555;
    border-radius: 16px;
    padding: 2px 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cf-reaction:hover {
    background: #444;
    transform: scale(1.1);
}

.cf-reaction.cf-reaction-removing {
    animation: reactionRemove 0.3s ease-out;
}

input#cf-search-input {
    border-radius: 5px;
    font-size: 13px;
    border: 1px solid #555;
    /* color: #ccc; */
    height: 35px;
}

@keyframes reactionRemove {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

.cf-edit-textarea {
    width: 100%;
    min-height: 60px;
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
}

.cf-save-edit {
    background: #0f0;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* ==============================================================
   AJUSTES ETAPA 4.1
   ============================================================== */

/* Botões de reações transparentes */
.cf-reaction-btn {
    background: transparent !important;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.cf-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Add reaction button */
.cf-add-reaction-btn {
    background: transparent !important;
    border: 1px solid rgba(11, 126, 232, 0.3);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--cf-text-color);
}

.cf-add-reaction-btn:hover {
    background: rgba(11, 126, 232, 0.1) !important;
    border-color: rgba(11, 126, 232, 0.6);
    transform: scale(1.15);
}

/* Emoji picker */
.cf-emoji-picker {
    background: var(--cf-background);
    border: 1px solid var(--cf-border-color);
    border-radius: 12px;
    padding: 12px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}

.cf-emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-width: 280px;
}

.cf-emoji-option {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.5rem;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-emoji-option:hover {
    background: rgba(11, 126, 232, 0.2);
    border-color: rgba(11, 126, 232, 0.5);
    transform: scale(1.2) rotate(-5deg);
}

/* Main Insights: imagens e conteúdo rico */
.cf-message.pinned .cf-message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
    display: block;
}

.cf-message.pinned .cf-message-content {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Imagens no chat normal */
.cf-message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 6px 0;
    display: block;
}

/* ==============================================================
   COMPOSER + PREVIEW DE LINKS
   ============================================================== */

.cf-composer-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cf-toolbar-btn {
    background: #333;
    border: none;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
}

.cf-toolbar-btn:hover {
    background: #444;
}

#cf-image-btn {
    cursor: pointer;
}

.cf-emoji-picker {
    position: absolute;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    gap: 6px;
    z-index: 100;
    flex-wrap: wrap;
    max-width: 200px;
}

.cf-emoji {
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
}

.cf-emoji:hover {
    background: #333;
    border-radius: 4px;
}

.cf-link-preview {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
}

.cf-yt-preview iframe {
    border-radius: 8px;
}

.cf-tweet-preview {
    background: #000;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
}

/* ==============================================================
   COMPOSER SIMPLES + SVG
   ============================================================== */

.cf-message-composer {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border: 1px solid var(--cf-border-color);
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 12px;
}

#cf-message-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--cf-text-color);
    font-size: 0.95rem;
    resize: none;
    height: 40px;
    outline: none;
    overflow: hidden;
}

.cf-upload-btn {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-upload-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cf-upload-btn svg {
    stroke: #888;
    transition: stroke 0.2s;
}

.cf-upload-btn:hover svg {
    stroke: #fff;
}

.cf-channel-form button[type="submit"] {
    background: var(--cf-primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

svg#cf-collapse-icon {
     fill: white; 
}


/* ==============================================================
   REAÇÕES ALINHADAS: CONTAGEM ESQ + BOTÕES DIR
   ============================================================== */

.cf-reactions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.cf-reactions-left {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cf-reactions-right {
    display: flex;
    gap: 4px;
}

.cf-reaction {
    background: #333;
    border: 1px solid #555;
    border-radius: 16px;
    padding: 2px 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cf-reaction-btn {
    background: transparent !important;
    border: 1px solid #555;
    border-radius: 16px;
    padding: 2px 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cf-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #777;
}

/* Estilos para a barra lateral */
#cf-sidebar.hidden {
    display: none;
}

.cf-arrow svg {
    transition: transform 0.2s ease;
}

.cf-arrow svg.rotated {
    transform: rotate(90deg);
}

/* Outros estilos para responsividade e acessibilidade */
@media (max-width: 768px) {
    #cf-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100%;
        z-index: 1000;
        background: #000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    #cf-sidebar:not(.hidden) {
        transform: translateX(0);
    }

/* ===== SIDEBAR DIREITA ===== */
#cf-right-sidebar {
    background: var(--cf-background);
    border-left: 1px solid var(--cf-border-color);
    padding: var(--cf-spacing);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--cf-spacing);
    max-height: 100vh;
}

.cf-sidebar-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--cf-border-radius);
    padding: var(--cf-spacing);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.cf-sidebar-section:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cf-sidebar-section h4 {
    margin: 0 0 var(--cf-spacing) 0;
    color: var(--cf-text-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--cf-border-color);
    padding-bottom: 8px;

}

.cf-user-list, .cf-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cf-user-list li, .cf-post-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.cf-user-list li:hover, .cf-post-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cf-user-list li:last-child, .cf-post-list li:last-child {
    border-bottom: none;
}

.cf-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid var(--cf-border-color);
}

.cf-contributor-name {
    cursor: pointer;
    transition: color 0.2s ease;
}

.cf-contributor-name:hover {
    color: #00bfff;
    text-decoration: underline;
}

.cf-crown-emoji {
    margin-left: 6px;
    display: inline-block;
    animation: crownBounce 1.5s ease-in-out infinite;
}

.cf-post-list li {
    flex-direction: column;
    align-items: flex-start;
}

.cf-post-list a {
    color: var(--cf-text-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.cf-post-list a:hover {
    color: #00bfff;
    text-decoration: underline;
}

.cf-post-meta {
    font-size: 12px;
    color: var(--cf-secondary-text);
    display: flex;
    gap: 8px;
    align-items: center;
}

.cf-liked-post-item {
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.cf-liked-post-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.cf-post-content {
    width: 100%;
}

.cf-post-link {
    display: block;
    color: var(--cf-text-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 4px;
    transition: color 0.2s ease;
    font-size: 13px;
    line-height: 1.3;
}

.cf-post-link:hover {
    color: #00bfff;
    text-decoration: underline;
}

.cf-post-author {
    color: var(--cf-secondary-text);
}

.cf-post-channel {
    color: #888;
    font-style: italic;
}

.cf-post-likes {
    color: #ff6b6b;
    font-weight: 500;
}

/* Rules & Tips section */
#cf-rules-tips ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    font-size: 12px;
    color: var(--cf-secondary-text);
    line-height: 1.5;
}

#cf-rules-tips li {
    margin: 6px 0;
}

/* Loading states */
.cf-loading {
    text-align: center;
    color: var(--cf-secondary-text);
    font-size: 12px;
    padding: 16px;
}

.cf-loading::after {
    content: "...";
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}
}

/* ==============================================================
   PAINEL DIREITO
   ============================================================== */
   
   img.cf-user-avatar {
    height: 33px;
    border-radius: 50px;
        margin-right: 15px;
}

.cf-sidebar-section H4 {
    font-weight: 400;
    font-size: 1.1rem;
}

.cf-sidebar-section li {
    display: flex;
    flex-wrap: wrap;
        margin-bottom: 10px;

}

#cf-top-liked-posts p {
    font-size: 0.8rem;
}

aside#cf-right-sidebar {
    padding: 15px 25px 25px 25px;
    border-left: 1px solid #333;
    max-width: 350px;
    overflow: auto;
}

ul#cf-news-list, ul.cf-user-list {
    padding: 0;
}

aside .cf-sidebar-section {
    margin-bottom: 20px;
    margin-top: 20px;

}

span.cf-post-meta {
    margin-left: 10px;
    margin-right: 10px;
    font-size: 13.5px;
}

/* ===== EDIT MESSAGE MODAL ===== */
.cf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.cf-modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid var(--cf-border-color);
    border-radius: var(--cf-border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 10000;
}

.cf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--cf-border-color);
}

.cf-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--cf-text-color);
}

.cf-modal-close {
    background: none;
    border: none;
    color: var(--cf-secondary-text);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.cf-modal-close:hover {
    color: var(--cf-text-color);
}

.cf-edit-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cf-edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid var(--cf-border-color);
    border-radius: 8px;
    color: var(--cf-text-color);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.cf-edit-textarea:focus {
    outline: none;
    border-color: #0b7ee8;
}

.cf-edit-char-count {
    font-size: 12px;
    color: var(--cf-secondary-text);
    text-align: right;
}

.cf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px;
}

.cf-btn-cancel, .cf-btn-save {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cf-btn-cancel {
    background: #2F2F2F;
    color: var(--cf-text-color);
}

.cf-btn-cancel:hover {
    background: #3F3F3F;
}

.cf-btn-save {
    background: #0b7ee8;
    color: white;
}

.cf-btn-save:hover {
    background: #0a6ec8;
}

/* Edit button styling */
button.cf-edit-chat-btn {
    background: transparent;
    border: none;
    color: #0b7ee8;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-right: 8px;
}

button.cf-edit-chat-btn:hover {
    background: rgba(11, 126, 232, 0.1);
    color: #0a6ec8;
}

/* Reply button styling */
button.cf-reply-btn {
    background: transparent;
    border: none;
    color: #00bfff;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-right: 8px;
}

button.cf-reply-btn:hover {
    background: rgba(0, 191, 255, 0.1);
    color: #00d4ff;
}

/* ===== REPLY MODAL - TWITTER STYLE ===== */
.cf-reply-modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cf-reply-original-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cf-border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

.cf-reply-original-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cf-reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--cf-border-color);
    object-fit: cover;
}

.cf-reply-author-info {
    display: flex;
    flex-direction: column;
}

.cf-reply-author-info strong {
    color: var(--cf-text-color);
    font-size: 14px;
    font-weight: 600;
}

.cf-reply-timestamp {
    color: var(--cf-secondary-text);
    font-size: 12px;
    margin-top: 2px;
}

.cf-reply-original-content {
    color: var(--cf-text-color);
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    margin: 0;
}

.cf-reply-compose-section {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cf-reply-connector {
    width: 2px;
    height: 20px;
    background: rgba(11, 126, 232, 0.3);
    margin-left: 20px;
    margin-bottom: 12px;
}

.cf-reply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.cf-reply-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid var(--cf-border-color);
    border-radius: 8px;
    color: var(--cf-text-color);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.cf-reply-textarea:focus {
    outline: none;
    border-color: #0b7ee8;
    box-shadow: 0 0 8px rgba(11, 126, 232, 0.2);
}

.cf-reply-textarea::placeholder {
    color: #666;
}

.cf-reply-char-count {
    font-size: 12px;
    color: var(--cf-secondary-text);
    text-align: right;
}

/* Message highlight animation */
.cf-message-highlighted {
    animation: highlightMessage 0.6s ease-in-out;
}

@keyframes highlightMessage {
    0% {
        background: rgba(0, 191, 255, 0.3);
        border-left-color: #00bfff;
    }
    50% {
        background: rgba(0, 191, 255, 0.15);
    }
    100% {
        background: transparent;
        border-left-color: #444;
    }
}

/* Edited indicator */
.cf-edited-indicator {
    color: var(--cf-secondary-text);
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.7;
    cursor: help;
}

/* ==============================================================
   EMPTY STATE STYLES
   ============================================================== */
.cf-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 400px;
    background: linear-gradient(135deg, rgba(11, 126, 232, 0.05) 0%, rgba(11, 126, 232, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(11, 126, 232, 0.1);
}

.cf-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    opacity: 0.8;
}

.cf-empty-state h3 {
    margin: 0 0 10px 0;
    color: var(--cf-text-color);
    font-size: 24px;
    font-weight: 500;
}

.cf-empty-state p {
    margin: 0 0 20px 0;
    color: var(--cf-secondary-text);
    font-size: 14px;
    max-width: 300px;
}

.cf-empty-cta-btn {
    display: inline-block;
    background: linear-gradient(93deg, #0b0b0b, #0c3fae);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(11, 126, 232, 0.3);
}

.cf-empty-cta-btn:hover {
    background: linear-gradient(93deg, #0c3fae, #0b7ee8);
    border-color: #0b7ee8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 126, 232, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes crownBounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.1);
    }
}

/* ==============================================================
   SEARCH/FILTER BAR STYLES
   ============================================================== */
.cf-search-container {
    position: relative;
    flex-shrink: 0;
}

.cf-search-input {
    width: 280px;
    padding: 8px 12px 8px 40px;
    background: #1a1a1a;
    border: 1px solid var(--cf-border-color);
    border-radius: 6px;
    color: var(--cf-text-color);
    font-size: 13px;
    transition: all 0.2s ease;
}

.cf-search-input:focus {
    outline: none;
    border-color: #0b7ee8;
    background: #0a0a0a;
    box-shadow: 0 0 8px rgba(11, 126, 232, 0.2);
}

.cf-search-input::placeholder {
    color: #666;
}

.cf-search-input::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.cf-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.cf-search-clear:hover {
    color: var(--cf-text-color);
}

#cf-channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--cf-border-color);
    margin-bottom: 16px;
}

#cf-channel-header > div {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

#cf-current-channel-name {
    font-size: 1.4rem;
    color: var(--cf-text-color);
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

/* ==============================================================
   SEARCH HIGHLIGHT STYLES
   ============================================================== */
.cf-search-highlight {
    background: linear-gradient(120deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    animation: highlightPulse 0.5s ease-out;
}

@keyframes highlightPulse {
    0% {
        background: linear-gradient(120deg, #FFD700 0%, #FFA500 100%);
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 0px rgba(255, 215, 0, 0);
    }
}

/* Responsive search */
@media (max-width: 768px) {
    .cf-search-input {
        width: 150px;
        padding: 6px 10px 6px 32px;
        font-size: 12px;
    }
    
    #cf-channel-header > div {
        gap: 12px;
    }
}

/* ==============================================================
   USER PROFILE MODAL STYLES
   ============================================================== */
.cf-profile-modal-content {
    max-width: 500px;
    width: 90%;
}

.cf-profile-content {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cf-profile-avatar-wrapper {
    margin-bottom: 20px;
}

.cf-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--cf-primary-color);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(11, 126, 232, 0.3);
}

.cf-profile-content h2 {
    margin: 0 0 10px 0;
    color: var(--cf-text-color);
    font-size: 24px;
    font-weight: 600;
}

.cf-profile-bio {
    color: var(--cf-secondary-text);
    font-size: 14px;
    margin: 0 0 20px 0;
    max-width: 400px;
}

/* Stats grid */
.cf-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cf-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--cf-primary-color);
}

.cf-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--cf-secondary-text);
    letter-spacing: 0.5px;
}