/* Estilos específicos para a página principal (index.php) */

/* Barra lateral de usuários online */
.online-users-sidebar {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 70px;
  max-height: calc(100vh - 120px);
  background: rgba(30, 30, 30, 0.95);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 5px;
  z-index: 999;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.online-users-sidebar::-webkit-scrollbar {
  display: none;
}

.online-users-title {
  text-align: center;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.online-user-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px;
  border-radius: 10px;
  position: relative;
}

.online-user-item:hover {
  background: rgba(255, 0, 0, 0.1);
  transform: scale(1.05);
}

.online-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff0000;
  position: relative;
  transition: all 0.3s ease;
}

.online-user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ff0000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  border: 2px solid #ff0000;
  transition: all 0.3s ease;
}

.online-indicator {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #00ff00;
  border-radius: 50%;
  border: 2px solid #1e1e1e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
  }
}

.online-user-name {
  color: #fff;
  font-size: 8px;
  font-weight: 500;
  text-align: center;
  margin-top: 3px;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-online-users {
  text-align: center;
  color: #888;
  font-size: 11px;
}

/* Responsividade para a barra lateral */
@media (max-width: 1200px) {
  .online-users-sidebar {
    right: 15px;
    width: 55px;
    top: 90px;
  }
  
  .online-user-avatar,
  .online-user-avatar-placeholder {
    width: 35px;
    height: 35px;
  }
  
  .online-user-name {
    font-size: 7px;
  }
}

@media (max-width: 768px) {
  .online-users-sidebar {
    display: none;
  }
}

/* Container principal do feed */
.feed-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 15px;
}

/* Posts do feed */
.post {
  background: rgba(30, 30, 30, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 25px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 77, 141, 0.2);
}

.post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 77, 141, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post:hover::before {
  opacity: 1;
}

/* Header do post no feed */
.post-header {
  padding: 20px 25px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 77, 141, 0.3);
  transition: all 0.3s ease;
}

.post-author-avatar:hover {
  border-color: rgba(255, 77, 141, 0.6);
  transform: scale(1.05);
}

.post-author-details h6 {
  margin: 0;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.post-author-details small {
  color: #888;
  font-size: 0.8rem;
}

.post-date {
  color: #666;
  font-size: 0.85rem;
}

/* Conteúdo do post no feed */
.post-content {
  padding: 0 25px 15px;
}

.post-text {
  color: #cccccc;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
}

.post-text.preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-text .read-more {
  color: #ff4d8d;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease;
}

.post-text .read-more:hover {
  color: #ff0000;
}

/* Mídia do post no feed */
.post-media {
  margin: 15px 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.post-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-image:hover {
  transform: scale(1.02);
}

.post-video {
  width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 12px;
}

/* Overlay para múltiplas imagens */
.post-media-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Ações do post no feed */
.post-actions {
  padding: 15px 25px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-interactions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.post-interaction {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px 8px;
  border-radius: 20px;
}

.post-interaction:hover {
  color: #ff4d8d;
  background: rgba(255, 77, 141, 0.1);
}

.post-interaction.liked {
  color: #ff0000;
}

.post-interaction.liked:hover {
  color: #ff3a7f;
}

.post-interaction i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.post-interaction:hover i {
  transform: scale(1.1);
}

/* Link para o post completo */
.post-link {
  color: #ff4d8d;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-link:hover {
  color: #ff0000;
}

.post-link i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.post-link:hover i {
  transform: translateX(3px);
}

/* Navegação principal */
.navbar {
  background: rgba(20, 20, 20, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 15, 15, 0.98) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  color: #ff0000 !important;
  font-weight: 700;
  font-size: 1.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand:hover {
  color: #ff3a7f !important;
  transform: scale(1.05);
}

.navbar-brand i {
  font-size: 1.5rem;
}

/* Botões da navbar */
.navbar .btn {
  border-radius: 25px;
  font-weight: 600;
  padding: 8px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.navbar .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.navbar .btn:hover::before {
  left: 100%;
}

.navbar .btn-primary {
  background: linear-gradient(135deg, #ff0000, #ff3a7f);
  border: none;
  color: white;
}

.navbar .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.navbar .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.navbar .btn-outline-light:hover {
  border-color: #ff0000;
  color: #ff0000;
  background: rgba(255, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Ícone de notificações */
.notification-icon {
  position: relative;
  color: #888;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}

.notification-icon:hover {
  color: #ff4d8d;
  background: rgba(255, 77, 141, 0.1);
  transform: scale(1.1);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: linear-gradient(135deg, #ff0000, #ff3a7f);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Estados de loading */
.feed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #ff0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estado vazio do feed */
.feed-empty {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.feed-empty i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #444;
}

.feed-empty h3 {
  color: #888;
  margin-bottom: 15px;
  font-weight: 600;
}

.feed-empty p {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 30px;
}

.feed-empty .btn {
  background: linear-gradient(135deg, #ff0000, #ff3a7f);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.feed-empty .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

/* Botão "Carregar mais" */
.load-more-posts {
  width: 100%;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #888;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 600;
  margin: 30px 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.load-more-posts:hover {
  border-color: #ff0000;
  color: #ff0000;
  background: rgba(255, 0, 0, 0.05);
  transform: translateY(-2px);
}

.load-more-posts:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Filtros do feed */
.feed-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(25, 25, 25, 0.5);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feed-filter {
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: #888;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.feed-filter:hover {
  border-color: #ff0000;
  color: #ff0000;
}

.feed-filter.active {
  background: linear-gradient(135deg, #ff0000, #ff3a7f);
  border-color: transparent;
  color: white;
}

/* Responsividade */
@media (max-width: 768px) {
  .feed-container {
    padding: 15px 10px;
  }
  
  .post {
    margin-bottom: 20px;
    border-radius: 12px;
  }
  
  .post-header {
    padding: 15px 20px 12px;
  }
  
  .post-content {
    padding: 0 20px 12px;
  }
  
  .post-actions {
    padding: 12px 20px 15px;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .post-interactions {
    width: 100%;
    justify-content: space-around;
  }
  
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .feed-filters {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .feed-filter {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

 .content-header {
    margin-top: 60px;
  }
}

@media (max-width: 480px) {
  .feed-container {
    padding: 10px 5px;
  }
  
  .post {
    margin-bottom: 15px;
  }
  
  .post-header {
    padding: 12px 15px 10px;
  }
  
  .post-content {
    padding: 0 15px 10px;
  }
  
  .post-actions {
    padding: 10px 15px 12px;
  }
  
  .post-text {
    font-size: 0.9rem;
  }
  
  .post-interaction {
    font-size: 0.8rem;
    gap: 4px;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  .navbar .btn {
    padding: 6px 15px;
    font-size: 0.85rem;
  }
}

/* Animações de entrada */
.post {
  animation: fadeInUp 0.6s ease-out;
}

.post:nth-child(even) {
  animation-delay: 0.1s;
}

.post:nth-child(odd) {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efeitos de scroll */
.navbar {
  transition: all 0.3s ease;
}

.navbar.navbar-scrolled {
  background: rgba(10, 10, 10, 0.98) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Botão de voltar ao topo */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #ff0000, #ff3a7f);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* Estilos para posts patrocinados */
.post.sponsored {
  border: 2px solid rgba(255, 193, 7, 0.3);
  position: relative;
}

.post.sponsored::after {
  content: 'Patrocinado';
  position: absolute;
  top: 10px;
  right: 15px;
  background: linear-gradient(135deg, #ffc107, #ff8f00);
  color: #000;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Estilos para posts fixados */
.post.pinned {
  border: 2px solid rgba(40, 167, 69, 0.3);
  position: relative;
}

.post.pinned::after {
  content: 'Fixado';
  position: absolute;
  top: 10px;
  right: 15px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Estilos para preview de links */
.link-preview {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.link-preview:hover {
  border-color: rgba(255, 77, 141, 0.3);
  transform: translateY(-2px);
}

.link-preview-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.link-preview-content {
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
}

.link-preview-title {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.link-preview-description {
  color: #888;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.link-preview-url {
  color: #ff4d8d;
  font-size: 0.8rem;
  text-decoration: none;
}

.link-preview-url:hover {
  color: #ff0000;
}

/* Estilos para polls/enquetes */
.post-poll {
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.poll-question {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.poll-option {
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.poll-option:hover {
  transform: translateX(5px);
}

.poll-option-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  height: 35px;
  position: relative;
  overflow: hidden;
}

.poll-option-fill {
  background: linear-gradient(135deg, #ff0000, #ff3a7f);
  height: 100%;
  border-radius: 20px;
  transition: width 0.5s ease;
  position: relative;
}

.poll-option-text {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 2;
}

.poll-option-percentage {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8rem;
  z-index: 2;
}

.poll-stats {
  margin-top: 10px;
  color: #888;
  font-size: 0.8rem;
  text-align: center;
}