/* Sobrescreve as variáveis quando o tema escuro estiver ativo */
html[data-theme='dark'] {
  --bg-primary: #18191a;
  --bg-secondary: #242526;
  --bg-tertiary: #3a3b3c;
  --bg-hover: #3a3b3c;
  --text-primary: #e4e6eb;
  --text-secondary: #b0b3b8;
  --border-color: #3e4042;
  --accent-color: #2d88ff;
}

/* Lógica para o tema Automático (baseado na preferência do sistema) */
@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] {
    --bg-primary: #18191a;
    --bg-secondary: #242526;
    --bg-tertiary: #3a3b3c;
    --bg-hover: #3a3b3c;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --border-color: #3e4042;
    --accent-color: #2d88ff;
  }
}

html, body {
    height: 100%;
    height: 100%;      /* Fallback para navegadores mais antigos */
}


:root {
    --bg-primary: #1A202C; 
    --bg-secondary: #2D3748; 
    --bg-tertiary: #171a21; 
    --border-color: #4A5568;
    --text-primary: #E2E8F0; 
    --text-secondary: #A0AEC0; 
    --accent-color: #63B3ED; 
    --green-check: #48BB78;
    --facebook-blue: #1877F2;
}
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body { 
    color: var(--text-primary); 
    font-family: 'Inter', sans-serif;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(26, 32, 44, 0.85);
    z-index: -1;
}

/* === Layout Principal === */
.main-layout-grid { 
display: grid; 
    grid-template-columns: 280px 1fr 300px; 
    gap: 20px; 
    max-width: 1920px; 
    margin: 0 auto; 
    padding: 20px; 
    padding-top: 75px; /* (55px do menu + 20px de espaço) */
}
.main-view { 
    display: none; 
    flex-direction: column; 
    gap: 40px; 
}
.main-view.active { 
flex-grow: 1; /* Faz o iframe crescer para ocupar o espaço disponível no container flex */
    border: none;  /* Remove a borda padrão do iframe */
    width: 100%;   /* Garante que ocupe a largura total */
}
.profile-page { 
    gap: 0; 
}
.center-content { 
    display: flex; 
    flex-direction: column; 
    gap: 40px; 
}

/* === Barras Laterais (Sidebars) === */
.left-sidebar, .right-sidebar { 
    position: sticky;
top: 75px; /* Deve ser igual ao padding-top do grid */
scrollbar-width: none;


}
.sidebar-link { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 12px; 
    margin-bottom: 3px;
    margin-top: 3px;
    border-radius: 8px; 
    font-weight: 600; 
    text-decoration: none; 
    color: var(--text-primary); 
    transition: background-color 0.2s; 
}
.sidebar-link:hover { 
    background-color: var(--bg-secondary);
outline: none 
}
.sidebar-link.active { 
    background-color: var(--bg-secondary); 
    color: var(--accent-color); 
}
.sidebar-link:focus {
    outline: none;
}
.sidebar-link i { 
    font-size: 1.2rem; 
    width: 32px; 
    text-align: center; 
}
.sidebar-link .sidebar-avatar-small { 
    width: 42px; 
    height: 42px; 
    border-radius: 50%; 
    object-fit: cover;
}
.sidebar-divider { 
    height: 1px; 
    background-color: var(--border-color); 
    margin: 10px 0; 
}
.right-sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.sidebar-card { 
    background-color: var(--bg-secondary); 
    padding: 20px; 
    border-radius: 12px; 
}
.sidebar-card-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 15px; 
}
.friend-list .sidebar-link { 
    padding: 8px; 
}

/* === Card de Perfil (Sidebar Direita) === */
.user-profile-card { 
    text-align: center; 
}
.profile-card-avatar { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    margin-bottom: 15px; 
    border: 3px solid var(--accent-color); 
    object-fit: cover;
}
.profile-card-name { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 15px; 
}
.profile-card-link { 
    display: inline-block; 
    padding: 8px 16px; 
    background-color: var(--bg-primary); 
    color: var(--text-primary); 
    text-decoration: none; 
    border-radius: 6px; 
    transition: background-color 0.2s; 
}
.profile-card-link:hover { 
    background-color: #333f54; 
}

/* === Títulos de Seção === */
.section-title { 
    font-size: 1.8rem; 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: var(--text-primary); 
margin-top: 12px;
}

/* === Seção Jogos Recentes === */
.recent-games-showcase { 
    display: flex; 
    gap: 20px; 
    min-height: 400px; 
}
.recent-main-wrapper { 
    flex: 3; 
}
.recent-main-card { 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px; 
    position: relative; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    padding: 25px; 
    color: white; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.8); 
}
.recent-main-card::before { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); 
    border-radius:12px; 
}
.recent-main-card .content { 
    position: relative; 
    z-index: 1; 
}
.recent-main-card h2 { 
    font-size: 2.5rem; 
}
.recent-carousel { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.recent-carousel-card { 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px; 
    flex-grow: 1; 
    cursor: pointer; 
    border: 2px solid transparent; 
    opacity: 0.6; 
    transition: all 0.2s ease; 
}
.recent-carousel-card.active, .recent-carousel-card:hover { 
    opacity: 1; 
    border-color: var(--accent-color); 
}

/* === Minha Biblioteca === */
.my-library-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
}
.my-library-card { 
    background-color: var(--bg-secondary); 
    border-radius: 12px; 
    overflow: hidden; 
    cursor: pointer; 
    transition: transform 0.2s ease; 
}
.my-library-card:hover { 
    transform: translateY(-5px); 
}
.my-library-card img { 
    width: 100%; 
    height: 150px; 
    object-fit: cover; 
}
.my-library-card .info { 
    padding: 15px; 
}
.my-library-card h3 { 
    font-size: 1.1rem; 
}

/* === Feed e Posts === */
.feed-posts-container { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.create-post-card { 
    background-color: var(--bg-secondary); 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: -18px;
margin-top: 3px;
}
.create-post-input { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
}
.create-post-input img { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover;
}
.create-post-input input { 
    flex-grow: 1; 
    background-color: var(--bg-primary); 
    border: 1px solid var(--border-color); 
    border-radius: 20px; 
    padding: 12px 18px; 
    color: var(--text-primary); 
    font-size: 1rem; 
}
.post-card { 
    background-color: var(--bg-secondary); 
    border-radius: 12px; 
    display: flex; 
    flex-direction: column; 
}
.post-header { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 15px 15px 0px;
margin-bottom: -10px; 
}
.post-avatar { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover;
}
.post-author-info { 
    display: flex; 
    flex-direction: column; 
}
.post-author-name { 
    font-weight: 600; 
    color: var(--text-primary);
}
.post-time { 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
margin-top: 4px;
}
.post-body { 
    padding: 0 15px 15px; 
}
.post-body p { 
    line-height: 1.5; 
}
.post-image { 
    width: 100%; 
    border-radius: 21px;
    padding: 8px;
}
.post-stats { 
    padding: 10px 15px; 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
display: flex;    
    gap: 15px; 
}
.post-actions { 
display: grid;
    /* Cria colunas automáticas que se ajustam ao conteúdo */
    grid-auto-flow: column; 
    grid-auto-columns: 1fr; /* Diz que cada coluna criada deve ter tamanho igual */
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding: 5px;
    margin-top: 8px;
}
.post-action-btn { 
text-align: center;
  background-color: transparent;
    background: none; 
    border: none; 
    color: var(--text-secondary); 
    font-weight: 600; 
    padding: 10px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: background-color 0.2s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    font-size: 0.9rem;
}
.post-action-btn:hover { 
    background-color: var(--bg-primary); 
}
.post-action-btn.active { 
    color: var(--facebook-blue); 
}
.comment-section { 
    display: none; 
    padding: 0 15px 15px; 
    border-top: 1px solid var(--border-color); 
    margin-top: 5px; 
}
.comment-display { 
    font-size: 0.9rem; 
    margin-top: 8px; 
    padding: 8px; 
    background-color: var(--bg-primary); 
    border-radius: 10px; 
}
.comment-input-wrapper { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-top: 10px; 
}
.comment-input-wrapper img { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
}
.comment-input { 
    flex-grow: 1; 
    background-color: var(--bg-primary); 
    border: 1px solid var(--border-color); 
    border-radius: 16px; 
    padding: 8px 12px; 
    color: var(--text-primary); 
    font-size: 0.9rem; 
}

/* === Página de Perfil === */
.profile-header { 
    background-color: var(--bg-secondary); 
    border-radius: 12px; 
    margin-bottom: 20px; 
}
.profile-cover-photo { 
    height: 280px; 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px 12px 0 0; 
    position: relative; 
}
.profile-cover-button { 
    margin-left: 11px;
    margin-top: 10px;
    background-color: rgba(0,0,0,0.6); 
    color: white; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
}
.profile-details-bar { 
    display: flex; 
    align-items: flex-end; 
    padding: 0 30px; 
    position: relative; 
    border-bottom: 1px solid var(--border-color); 
}
.profile-picture-container { 
    width: 168px; 
    height: 168px; 
    border-radius: 50%; 
    background-color: var(--bg-secondary); 
    padding: 5px; 
    margin-top: -84px; 
    z-index: 1; 
    position: relative;
    overflow: hidden;
}
.profile-picture { 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; 
    object-fit: cover; 
}
.profile-name-actions { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-grow: 1; 
    padding: 15px 0 15px 20px; 
}
.profile-name-actions h1 { 
    font-size: 2rem; 
    font-weight: 700; 
}
.profile-main-actions { 
    display: flex; 
    gap: 10px; 
}
.profile-action-btn { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 15px; 
    border-radius: 6px; 
    border: none; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 0.9rem; 
}
.profile-action-btn.primary { 
    background-color: var(--facebook-blue); 
    color: white; 
}
.profile-action-btn.secondary { 
    background-color: #4E4F50; 
    color: var(--text-primary); 
}
.profile-nav { 
    padding: 0 30px; 
}
.profile-nav-link { 
    display: inline-block; 
    padding: 15px 20px; 
    text-decoration: none; 
    color: var(--text-secondary); 
    font-weight: 600; 
    border-bottom: 3px solid transparent; 
}
.profile-nav-link:hover { 
    background-color: rgba(255,255,255,0.1); 
}
.profile-nav-link.active { 
    color: var(--accent-color); 
    border-bottom-color: var(--accent-color); 
}
.profile-body { 
    display: grid; 
    grid-template-columns: 40% 1fr; 
    gap: 20px; 
}
.profile-sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.profile-feed { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.profile-widget { 
    background-color: var(--bg-secondary); 
    padding: 20px; 
    border-radius: 12px; 
}
.widget-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 15px; 
}
.profile-bio { 
    color: var(--text-secondary); 
    margin-bottom: 15px; 
}
.widget-edit-btn { 
    width: 100%; 
    background-color: var(--bg-primary); 
    border: none; 
    color: var(--text-primary); 
    padding: 8px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
}
.widget-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
}
.widget-header-link { 
    color: var(--accent-color); 
    text-decoration: none; 
    font-size: 0.9rem; 
}
.widget-photo-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 5px; 
}
.widget-photo-item { 
    padding-bottom: 100%; 
    background-size: cover; 
    background-position: center; 
    border-radius: 8px; 
}
.widget-friend-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px; 
}
.widget-friend-item { 
    text-align: center; 
}
.widget-friend-item img { 
    width: 100%; 
    aspect-ratio: 1/1; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 5px; 
}
.widget-friend-item span { 
    font-size: 0.8rem; 
    font-weight: 600; 
}

/* === Artigos e Notícias === */
.articles-container { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.article-card-horizontal { 
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary); 
    border-radius: 12px; 
    overflow: hidden; 
    transition: box-shadow 0.2s ease-in-out; 
}
.article-card-horizontal:hover { 
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); 
}
.article-card-horizontal .article-content { 
    padding: 25px; 
}
.article-card-horizontal .article-title { 
    font-size: 1.5rem; 
    font-weight: 600; 
    margin-bottom: 15px; 
    color: var(--text-primary); 
}
.article-card-horizontal .article-excerpt { 
    font-size: 1rem; 
    color: var(--text-secondary); 
    line-height: 1.6; 
}
.article-card-horizontal .article-image { 
    width: 100%; 
    height: auto; 
    max-height: 250px;
    object-fit: cover; 
    display: block; 
}


/* === Preloader e Esqueleto === */
#preloader { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: var(--bg-primary); 
    z-index: 9999; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    opacity: 1; 
    transition: opacity 0.5s ease, visibility 0.5s ease; 
}
#preloader.hidden { 
    opacity: 0; 
    visibility: hidden; 
}
.skeleton-card {
  position: relative; /* Essencial para o posicionamento do ::after */
  overflow: hidden;   /* Essencial para esconder o brilho fora dos limites */
  background-color: #2d3748; /* Cor de fundo do skeleton */
}
.skeleton-image { 
    width: 100%; 
    height: 120px; 
    background-color: var(--border-color); 
    border-radius: 8px; 
    margin-bottom: 20px; 
}
.skeleton-text { 
    width: 90%; 
    height: 18px; 
    background-color: var(--border-color); 
    border-radius: 4px; 
    margin-bottom: 12px; 
}
.skeleton-text.small { 
    width: 50%; 
}
.skeleton-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: shimmer 1.5s infinite linear;
  transform: translateX(-100%);
}
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ================================================================ */
/* === CÓDIGO DE ESTILO PARA RESTAURAR OS BANNERS (COMO NA IMAGEM) === */
/* ================================================================ */

/* --- Destaques da Biblioteca --- */
.library-highlights-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.library-highlight-main-card { 
    min-height: 350px; 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px; 
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 30px;
    color: white;
}
.library-highlight-main-card::before { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); 
    border-radius: 12px; 
}
.library-highlight-main-card h2 {
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: right;
    text-shadow: 0 3px 10px rgba(0,0,0,0.9);
    position: relative;
}
.library-highlight-thumbnails { 
    display: flex; 
    gap: 20px; 
}
.library-highlight-thumbnail-card { 
    min-width: 200px; 
    height: 120px; 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px; 
    cursor: pointer; 
    position: relative;
    border: 3px solid transparent;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.library-highlight-thumbnail-card:hover { 
    opacity: 1;
    transform: none;
    border-color: rgba(255, 255, 255, 0.5);
}
.library-highlight-thumbnail-card.active { 
    opacity: 1;
    transform: none;
    border-color: var(--accent-color);
}
.library-highlight-thumbnail-card h3 { 
    position: absolute; 
    bottom: 10px; 
    left: 10px; 
    font-size: 1rem; 
    color: white; 
    text-shadow: 0 1px 4px rgba(0,0,0,0.7); 
    z-index: 1;
}

/* --- Continuar Jogando --- */
.minimalist-banner-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 20px;
}
.minimalist-large-banner {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    min-height: 200px;
}
.minimalist-large-banner h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}
.minimalist-large-banner p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 5px;
}
.minimalist-large-banner .game-status-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    background-color: var(--green-check);
    border-radius: 50%;
    color: white;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
}
.minimalist-small-banner {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 3px solid transparent;
}
.minimalist-small-banner:hover {
    background-color: #3a475c;
    border-color: var(--accent-color);
}
.minimalist-small-banner img, .minimalist-small-banner div[style*="height: 80px"] {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--bg-primary);
}
.minimalist-small-banner h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* --- Estilos para Edição de Perfil --- */
#change-avatar-btn:hover::after {
    content: '\f030';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2rem;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}
.profile-picture-container:hover .profile-picture {
    filter: brightness(0.6);
}
.profile-picture-container .profile-picture {
    transition: filter 0.2s ease-in-out;
}
.sidebar-link img{
    border-radius: 50%;
    width: 37px;
    height: 37px;
}

/* =================================
   ESTILOS PARA STORIES
   ================================= */
.stories-section {
    margin-bottom: 20px;
}

.stories-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    /* Para navegadores baseados em WebKit como Chrome, Safari */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-primary);
}

.stories-container::-webkit-scrollbar {
    height: 8px;
}

.stories-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.stories-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.story-item {
    position: relative;
    min-width: 110px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.story-item:hover {
    transform: scale(1.05);
}

.story-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-user-avatar {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    z-index: 2;
}

.story-user-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-name-display {
    display: none; /* Começa escondido */
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    max-width: 180px; /* Evita que nomes muito longos quebrem o layout */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Estilos para os botões de Aceitar/Recusar nas notificações */
.notification-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px; /* Um pouco menor para caber bem na notificação */
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s ease;
}

.notification-btn:hover {
    opacity: 0.85;
}

/* Botão de Aceitar - Estilo Primário */
.notification-btn.accept {
    background-color: var(--accent-color); /* Usa a cor azul principal do seu tema */
    color: white;
}

/* Botão de Recusar - Estilo Secundário */
.notification-btn.decline {
    background-color: var(--bg-primary); /* Usa uma cor de fundo sutil do seu tema */
    color: var(--text-primary);
}

.notification-actions {
    display: flex;
    gap: 8px; /* Cria um espaço entre os botões */
}



#chat-status-widget .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    background-color: var(--bg-tertiary);
}

#chat-status-widget .user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    background-color: #808080; /* Cinza para Offline por padrão */
    transition: background-color 0.3s ease;
    margin-right: 8px;
}
.status-dot.online {
    background-color: #28a745; /* Verde para Online */
}
.status-dot.offline { background-color: #808080; }

#chat-status-widget .status-selector select {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8em;
    padding: 2px;
}

#chat-status-widget .widget-body {
    display: none; /* Escondido por padrão */
    height: 300px;
    flex-direction: column;
}

#chat-status-widget.expanded .widget-body {
    display: flex; /* Visível quando expandido */
}

#chat-status-widget.expanded .widget-header {
    border-bottom: 1px solid var(--border-color);
}

.friend-list-header {
    padding: 10px;
    font-weight: bold;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.friend-list-container {
    overflow-y: auto;
    flex-grow: 1;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.friend-item:hover {
    background-color: var(--bg-hover);
}

.friend-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 8px;
}




.chat-window {
width: 298px;
    height: 358px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    font-family: 'Inter', sans-serif;
margin-left: 10px;
}

.chat-header {
display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: grab; /* Mãozinha para indicar que é arrastável */
    user-select: none; /* Impede a seleção de texto enquanto arrasta */
}

.chat-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header:active {
    cursor: grabbing; /* Mãozinha "fechada" ao clicar */
}

.chat-header .friend-name {
    flex-grow: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
}
.chat-close-btn:hover {
    color: var(--text-primary);
}

.chat-body {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    line-height: 1.4;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.chat-message.sent {
    background-color: var(--accent-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.received {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-footer {
    display: flex;
    padding: 8px;
    border-top: 1px solid var(--border-color);
    gap: 8px;
}

.chat-input {
    flex-grow: 1;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent-color);
}

.chat-send-btn {
    background-color: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}


/* Container principal dos Stories */
.stories-section {
    /* Garante que a seção não exceda a largura do conteúdo principal */
    width: 100%; 
    margin-bottom: 20px;
    padding: 0 10px; /* Adiciona um pequeno padding nas laterais */
    box-sizing: border-box;
}

/* Onde a mágica do scroll acontece */
.stories-container {
    display: flex; /* Alinha os itens lado a lado */
    gap: 10px; /* Espaçamento entre os stories */
    overflow-x: auto; /* Permite a rolagem horizontal */
    padding: 5px 0; /* Espaçamento vertical para evitar que a sombra 'corte' */
    /* Remove a barra de rolagem no Chrome/Safari */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Remove a barra de rolagem no Chrome/Safari/Outros WebKit */
.stories-container::-webkit-scrollbar {
    display: none;
}

/* Item de Story Individual - TAMANHO UNIFORME */
.story-item {
    /* Define a largura e altura exatas (ajuste estes valores conforme seu design) */
    width: 110px; 
    height: 180px; 
    
    flex-shrink: 0; /* IMPEDE que os itens sejam esmagados (essencial para scroll horizontal) */
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.story-item:hover {
    transform: scale(1.03);
}

/* Imagem/Vídeo de Fundo do Story */
.story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Avatar do usuário (deve ter a borda colorida para stories ativos) */
.story-user-avatar {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid var(--primary-color); /* Borda de destaque */
    z-index: 10;
    object-fit: cover;
}

/* Nome do Usuário */
.story-user-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    color: white;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 10;
    /* Contorno de texto para melhor legibilidade */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
}

/* Efeito de Gradiente/Overlay Escuro para legibilidade do texto (Opcional, mas recomendado) */
.story-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
    z-index: 5;
}


/* ESTILIZAÇÃO DO ITEM 'CRIAR STORY' */

.self-story-item .story-video {
    /* Suaviza a imagem de fundo para o item de criação */
    filter: brightness(0.6) grayscale(100%); 
}

.story-create-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Altura da área de texto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    transform: translateY(15px); /* Move um pouco para baixo para cobrir a borda */
    border-radius: 0 0 15px 15px;
    z-index: 15;
}

.story-create-icon {
    color: var(--primary-color, #1877f2); /* Usa a cor primária do seu site */
    font-size: 24px;
    position: absolute;
    top: -12px; /* Posiciona o ícone acima da área branca */
    background-color: white;
    border-radius: 50%;
}

.self-story-item .story-user-name {
    position: static;
    color: var(--text-color, #333);
    font-weight: 500;
    text-shadow: none;
    margin-top: 15px; /* Espaço para o ícone */
}

.bt1
{
    background-color: var(--accent-color);
    color: var(--bg-primary);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}


.group-link-in-feed {
    color: var(--text-primary); 
    text-decoration: none;      
}



/* Estilo para o indicador de privacidade clicável */
.privacy-indicator.is-editable {
    cursor: pointer;
    transition: color 0.2s;
}
.privacy-indicator.is-editable:hover {
    color: var(--primary-color);
}

/* Estilo para o menu dropdown de privacidade */
.privacy-dropdown {
    position: absolute;
    z-index: 1050; /* <-- GARANTE QUE O MENU FIQUE NA FRENTE DE TUDO */
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    padding: 5px 0;
    min-width: 150px;
}
.privacy-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.privacy-dropdown .privacy-option {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.privacy-dropdown .privacy-option:hover {
    background-color: var(--bg-primary);
}
.privacy-dropdown .privacy-option.active {
    font-weight: bold;
    color: var(--primary-color);
}

.privacy-select-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--bg-primary);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.privacy-select {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
}
.privacy-select-wrapper i {
    color: var(--text-secondary);
}
.privacy-indicator {
    margin-left: 8px;
    color: var(--text-secondary);
    font-size: 0.8em;
    cursor: default; /* Mostra um cursor normal em vez de ponteiro de link */
}
.privacy-indicator i {
    vertical-align: middle;
}
/* Estilo para o indicador de privacidade clicável */
.privacy-indicator.is-editable {
    cursor: pointer;
    transition: color 0.2s;
}
.privacy-indicator.is-editable:hover {
    color: var(--primary-color);
}

.bio-textarea-edit {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    resize: vertical;
}
.bio-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-post-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.edit-post-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.edit-post-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-post-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.edit-post-actions .cancel-edit-btn {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.edit-post-actions .save-edit-btn {
    background-color: var(--accent-color);
    color: white;
}




/* ================================================================ */
/* ESTILOS PARA BARRA DE NAVEGAÇÃO MOBILE SUPERIOR (TAB BAR) */
/* ================================================================ */

/* Estilo Básico da Nova Barra Superior */
#mobile-nav-bar {
    display: none; /* Escondido por padrão (aparece apenas no mobile) */
    position: fixed;
    bottom: 0; /* Fixa na PARTE INFERIOR, como o Facebook faz com a tab bar */
    left: 0;
    width: 100%;
    height: 55px; 
    background-color: var(--bg-secondary); 
    border-top: 1px solid var(--border-color); /* Borda superior */
    z-index: 9999; 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5); /* Sombra para destaque */
}

/* Container flexível interno */
.mobile-nav-inner {
    display: flex;
    justify-content: space-around; 
    align-items: center;
    height: 100%;
    padding: 0 5px;
}

/* Estilo dos Links/Ícones */
.mobile-nav-inner .sidebar-link {
    display: flex;
    flex-direction: column; /* Ícone e texto um em cima do outro */
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-grow: 1; 
    color: var(--text-secondary); 
    text-decoration: none;
    font-size: 10px; /* Texto pequeno (label) */
    padding: 5px 0;
    border-top: 2px solid transparent; /* Para o indicador de aba ativa */
    transition: color 0.2s, border-top-color 0.2s;
}

/* Ícone de Avatar no menu mobile */
.sidebar-avatar-mobile-nav {
    width: 24px; 
    height: 24px; 
    border-radius: 50%;
    margin-bottom: 2px;
    object-fit: cover;
    border: 1px solid transparent;
}

/* Estado Ativo/Selecionado */
.mobile-nav-inner .sidebar-link.active {
    color: var(--accent-color);
    border-top-color: var(--accent-color);
}

.mobile-nav-inner .sidebar-link.active .sidebar-avatar-mobile-nav {
    border-color: var(--accent-color);
}

.mobile-nav-inner .sidebar-link i {
    font-size: 20px; 
    margin-bottom: 2px;
}


.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: grab; /* Indica que o cabeçalho é arrastável */
    user-select: none; /* Impede a seleção de texto durante o arraste */
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border-color);
}




::-webkit-scrollbar {
  width: 12px;  /* Largura da barra vertical */
  height: 12px; /* Altura da barra horizontal */
}

/* Estilo da área de fundo (o "caminho" da barra) */
::-webkit-scrollbar-track {
  background: #2D3748; /* Cor escura, combinando com seu tema (--bg-secondary) */
  border-radius: 10px;
}

/* Estilo do "polegar" (a parte que você arrasta) */
::-webkit-scrollbar-thumb {
  background-color: #4A5568; /* Cor um pouco mais clara que o fundo (--border-color) */
  border-radius: 10px;
  border: 3px solid #2D3748; /* Cria um preenchimento ao redor do polegar */
}

/* Estilo do "polegar" quando você passa o mouse por cima */
::-webkit-scrollbar-thumb:hover {
  background-color: #A0AEC0; /* Cor de destaque (--text-secondary) */
}

.chat-friend-item {
    position: relative; /* Necessário para posicionar a notificação */
}

.unread-count {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid var(--bg-secondary);
}

/* ================================================================ */
/* MEDIA QUERY: AÇÕES EM TELAS PEQUENAS (max-width: 768px) */
/* ================================================================ */

@media (max-width: 768px) {
    
    /* A. MOSTRA A NOVA BARRA DE NAVEGAÇÃO INFERIOR */
    #mobile-nav-bar {
        display: flex !important; /* Mudei para flex para exibir o conteúdo */
    }

    /* B. OCULTA AS BARRAS LATERAIS EXISTENTES */
    
    /* Oculta a barra lateral esquerda (corrigido o seletor) */
    .left-sidebar { 
        display: none !important;
    }

    /* Oculta a barra lateral direita (grupos, contatos) */
    .right-sidebar { 
        display: none !important;
    }

    /* Oculta o widget de chat flutuante, se houver */
    #chat-status-widget {
        display: none !important;
    }
    
    /* C. AJUSTA O CABEÇALHO TOP-NAV-BAR (O fixo original) */
    /* Apenas ajusta a altura para garantir que a barra inferior não cubra o botão do topo */
    .top-nav-bar {
        height: 50px;
    }
    
    /* D. AJUSTA O LAYOUT PRINCIPAL */
    .main-layout-grid {
        /* Garante que o conteúdo ocupe a largura total */
        grid-template-columns: 1fr !important; 
        
        /* === CORREÇÃO 2: Valor do padding inferior ajustado === */
        /* 55px da barra + 15px de margem de segurança */
        padding-bottom: 70px !important; 
        
        /* Garante margem lateral */
        padding-left: 10px !important; 
        padding-right: 10px !important;
    }
}