/* =========================================
   1. GLOBAIS E RESET
   ========================================= */
body {
    background-color: #f0f2f5; /* Cinza claro suave (Estilo Facebook) */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #050505;
    overflow-x: hidden; /* Evita rolagem horizontal indesejada */
}

a {
    text-decoration: none;
    transition: 0.2s;
}

/* Espaçamento para o Menu Superior Fixo (Apenas no sistema) */
body.sistema {
    padding-top: 60px;
}

/* =========================================
   2. LANDING PAGE (Tela Inicial / Index)
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1470472304068-4398a9cafab5?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

/* Botões da Capa */
.btn-cta-primary {
    background-color: #e60023;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    transition: transform 0.2s;
}

.btn-cta-primary:hover {
    transform: scale(1.05);
    background-color: #c4001d;
    color: white;
}

.btn-cta-outline {
    border: 2px solid white;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    margin-left: 10px;
    background: transparent;
}

.btn-cta-outline:hover {
    background: white;
    color: black;
}

/* Estatísticas da Capa */
.stats-bar {
    position: absolute;
    bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    z-index: 2;
    flex-wrap: wrap;
}
.stat-item h3 {
    font-weight: 800;
    margin-bottom: 0;
    color: #e60023;
}

/* =========================================
   3. AUTH (Login e Cadastro)
   ========================================= */
.register-container, .login-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-brand {
    background-color: #e60023;
    color: white;
    font-weight: bold;
    border: none;
}
.btn-brand:hover {
    background-color: #c4001d;
    color: white;
}

/* Modal de Idade (+18) */
#age-gate {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* =========================================
   4. SISTEMA / FEED (Layout Novo)
   ========================================= */

/* Cards Brancos (Base do Feed) */
.card-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: none;
    overflow: hidden;
}

/* Colunas Laterais Fixas (Sticky) */
.sticky-column {
    position: -webkit-sticky;
    position: sticky;
    top: 90px; /* Altura do menu + respiro */
    height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin; /* Barra fina no Firefox */
}

/* Efeito Hover nos Menus Laterais */
.hover-bg-gray:hover {
    background-color: #e4e6eb;
    transition: 0.2s;
}

/* Lista de Chat (Direita) */
.chat-list-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
    text-decoration: none;
    color: #050505;
}
.chat-list-item:hover {
    background-color: #e4e6eb;
}

/* Bolinha de Status Online */
.avatar-status {
    position: relative;
}
.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #31a24c; /* Verde Online */
    border: 2px solid #fff;
    border-radius: 50%;
}

/* Navbar do Sistema */
.navbar-brand img {
    display: block;
}

/* =========================================
   5. PAYWALL E BLUR (Regras de Negócio)
   ========================================= */

/* O Efeito de Blur (Censura) */
.blur-img {
    filter: blur(15px);
    -webkit-filter: blur(15px);
    pointer-events: none; /* Impede clicar/arrastar */
    user-select: none;
    transform: scale(1.03); /* Zoom leve para esconder bordas brancas */
}

/* Overlay do Cadeado (Bloqueio) */
.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    z-index: 10;
}

.lock-box {
    background: rgba(0, 0, 0, 0.75);
    padding: 20px;
    border-radius: 12px;
    color: white;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Utilitário de Cursor */
.cursor-pointer {
    cursor: pointer;
}
/* Correção para o Menu Fixo */
body.sistema {
    padding-top: 50px !important; /* O !important força o navegador a obedecer */
}

/* --- ESTILO DO UPLOAD (MODAL) --- */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: #fafafa;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.upload-area:hover {
    border-color: #e60023;
    background: #fff5f5;
}
.upload-area i {
    color: #ccc;
    transition: 0.2s;
}
.upload-area:hover i {
    color: #e60023;
    transform: scale(1.1);
}
#preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hover-opacity-100:hover { opacity: 1 !important; }

/* --- SISTEMA DE REAÇÕES --- */
.reaction-wrapper {
    position: relative;
    display: inline-block;
}

/* O Menu de Emojis (Escondido por padrão) */
.reaction-box {
    position: absolute;
    bottom: 100%; /* Fica acima do botão */
    left: 0;
    background: white;
    border-radius: 50px;
    padding: 5px 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: none; /* Escondido */
    gap: 10px;
    z-index: 100;
    white-space: nowrap;
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Mostrar quando passar o mouse no botão OU na própria caixa */
.reaction-wrapper:hover .reaction-box, 
.reaction-box:hover {
    display: flex;
}

/* Emojis individuais */
.reaction-icon {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}
.reaction-icon:hover {
    transform: scale(1.3) translateY(-5px);
}

@keyframes popUp {
    from { opacity: 0; transform: translateY(10px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Notificação Não Lida: Um azul bem clarinho */
.bg-unread {
    background-color: #f0f7ff !important; /* Azul "ice" */
}

/* Hover na notificação não lida (escurece um pouco) */
.bg-unread:hover {
    background-color: #e0efff !important;
}

/* Ajuste na imagem para não quebrar layout */
.list-group-item img {
    object-fit: cover;
}
@keyframes pulse-yellow {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

.animate-pulse {
    animation: pulse-yellow 2s infinite;
}

#preview-img-modal {
    max-width: 100%;
    border-radius: 8px;
    display: none; /* Começa oculto */
}

/* --- INÍCIO DA PADRONIZAÇÃO DAS FOTOS --- */
    .feed-img-wrapper {
        width: 100%;
        height: 400px; /* Altura fixa para todos os posts */
        background-color: #f0f2f5;
        overflow: hidden;
        cursor: pointer;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .feed-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Corta a imagem para caber sem esticar */
        transition: transform 0.3s ease;
    }

    .feed-img-wrapper:hover img {
        transform: scale(1.02); /* Leve zoom ao passar o mouse */
    }
    /* --- FIM --- */
    
    /* --- CORREÇÃO: PONTE INVISÍVEL --- */

.reaction-wrapper {
    position: relative !important;
    display: inline-block;
    width: 100%;
}

.reaction-box {
    /* Lógica de esconder/mostrar */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    
    /* Posição */
    position: absolute;
    bottom: 100%; 
    left: 0;
    
    /* ESPAÇO VISUAL (O culpado, mas vamos mantê-lo) */
    margin-bottom: 10px; 
    
    z-index: 10000;
    background: #fff;
    border-radius: 50px;
    padding: 8px 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border: 1px solid #f0f0f0;
    
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* --- AQUI ESTÁ A SOLUÇÃO MÁGICA --- */
/* Cria um bloco invisível embaixo da caixa que preenche o buraco */
.reaction-box::before {
    content: '';
    position: absolute;
    top: 100%; /* Começa logo abaixo da caixa branca */
    left: 0;
    width: 100%;
    height: 15px; /* Altura suficiente para cobrir o margin-bottom de 10px */
    background: transparent; /* Invisível */
}

/* O triangulozinho visual (opcional) */
.reaction-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

/* --- HOVER --- */
.reaction-wrapper:hover .reaction-box {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Emojis */
.reaction-box span {
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.2s;
    line-height: 1;
}
.reaction-box span:hover {
    transform: scale(1.35);
}

/* Botão principal */
.reaction-wrapper > button {
    position: relative;
    z-index: 1;
}

/* Remove a barra de rolagem visual dos filtros, mas mantém a função */
.scroll-horizontal {
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.scroll-horizontal::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Ajuste da Aba (Tab) Ativa */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    background: transparent;
    font-weight: 500;
}
.nav-tabs .nav-link.active {
    color: #000;
    font-weight: bold;
    border-bottom: 2px solid #000; /* A linha preta embaixo */
    background: transparent;
}

.badge-fundador {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}