/* ================================
   Quest4You - Explorar Styles
   Artigos, Fórum, Chat
   ================================ */

/* ================================
   HERO
   ================================ */
.explorar-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 0 2rem;
  text-align: center;
}

.explorar-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.explorar-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* ================================
   TAB NAVIGATION
   ================================ */
.explorar-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: white;
  color: #667eea;
  border-color: white;
}

/* ================================
   TAB CONTENT
   ================================ */
.tab-content {
  display: none;
  padding: 2rem 0;
  min-height: 60vh;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ================================
   ARTICLES FILTER
   ================================ */
.articles-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  background: #f0f0f0;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #e0e0e0;
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* ================================
   ARTICLES GRID
   ================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.article-image {
  height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.article-image.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.article-image.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.4) 100%);
}

.article-image.has-image .article-icon {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.article-body {
  padding: 1.25rem;
}

.article-category {
  display: inline-block;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-excerpt {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #999;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Article Admin Badge */
.article-admin-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff6b6b;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  display: none;
}

.admin-mode .article-admin-badge {
  display: block;
}

/* ================================
   FORUM
   ================================ */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.forum-header h2 {
  margin: 0;
}

.forum-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.forum-cat-btn {
  background: #f5f5f5;
  border: 2px solid transparent;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.forum-cat-btn:hover {
  background: #e8e8e8;
}

.forum-cat-btn.active {
  background: white;
  border-color: #667eea;
  color: #667eea;
}

.forum-topics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topic-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  gap: 1rem;
}

.topic-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.topic-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.topic-content {
  flex: 1;
}

.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.topic-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.topic-category-badge {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
}

.topic-preview {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.topic-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #999;
}

.topic-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.topic-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 60px;
  text-align: center;
}

.topic-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.topic-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #667eea;
}

.topic-stat-label {
  font-size: 0.7rem;
  color: #999;
}

/* ================================
   CHAT
   ================================ */
.chat-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.5rem;
  height: 70vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chat-sidebar {
  background: #f8f9fa;
  padding: 1.5rem;
  border-right: 1px solid #e0e0e0;
}

.chat-sidebar h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.chat-rooms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.room-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  border: 2px solid transparent;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.room-btn:hover {
  border-color: #667eea;
}

.room-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.room-icon {
  font-size: 1.2rem;
}

.room-name {
  flex: 1;
  font-size: 0.9rem;
}

.room-users {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

.room-btn.active .room-users {
  background: rgba(255, 255, 255, 0.2);
}

.chat-main {
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.chat-header h3 {
  margin: 0;
}

.chat-online {
  color: #4caf50;
  font-size: 0.85rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-welcome {
  text-align: center;
  color: #666;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.chat-message {
  display: flex;
  gap: 0.75rem;
  max-width: 80%;
}

.chat-message.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chat-message-content {
  background: #f0f0f0;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  border-top-left-radius: 4px;
}

.chat-message.own .chat-message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 4px;
}

.chat-message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}

.chat-message-name {
  font-weight: 600;
  color: #667eea;
}

.chat-message.own .chat-message-name {
  color: rgba(255, 255, 255, 0.8);
}

.chat-message-time {
  color: #999;
}

.chat-message.own .chat-message-time {
  color: rgba(255, 255, 255, 0.6);
}

/* Delete button for admin */
.chat-delete-btn {
  background: none;
  border: none;
  padding: 2px 6px;
  margin-left: auto;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.chat-message:hover .chat-delete-btn {
  opacity: 0.6;
}

.chat-delete-btn:hover {
  opacity: 1 !important;
  background: rgba(220, 53, 69, 0.15);
  transform: scale(1.1);
}

.chat-message.own .chat-delete-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-message-text {
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-input-container {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.chat-login-required {
  text-align: center;
  color: #666;
}

.chat-login-required a {
  color: #667eea;
}

.chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
}

.chat-input-wrapper input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.chat-input-wrapper input:focus {
  outline: none;
  border-color: #667eea;
}

/* ================================
   PRIVATE MESSAGES
   ================================ */
.messages-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: 70vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.messages-sidebar {
  background: #f8f9fa;
  border-right: 1px solid #e0e0e0;
}

.messages-sidebar h3 {
  padding: 1.5rem;
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
}

.conversations-list {
  overflow-y: auto;
  max-height: calc(70vh - 70px);
}

.no-conversations {
  padding: 2rem;
  text-align: center;
  color: #666;
}

.no-conversations a {
  color: #667eea;
}

.conversation-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  transition: background 0.3s ease;
}

.conversation-item:hover {
  background: #e8e8e8;
}

.conversation-item.active {
  background: white;
  border-left: 3px solid #667eea;
}

.conversation-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.conversation-preview {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-meta {
  text-align: right;
  font-size: 0.75rem;
  color: #999;
}

.conversation-unread {
  background: #8B4A5E;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.messages-main {
  display: flex;
  flex-direction: column;
}

.messages-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.messages-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.messages-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.messages-user-name {
  font-weight: 600;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.private-message {
  display: flex;
  gap: 0.75rem;
  max-width: 70%;
}

.private-message.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.private-message-content {
  background: #f0f0f0;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  border-top-left-radius: 4px;
}

.private-message.own .private-message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 4px;
}

.messages-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 0.75rem;
}

.messages-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 0.95rem;
}

.messages-input input:focus {
  outline: none;
  border-color: #667eea;
}

.messages-login-required {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-prompt {
  text-align: center;
}

.login-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

/* ================================
   PRIVATE MESSAGES (Additional)
   ================================ */
.private-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(70vh - 140px);
}

.private-message-time {
  font-size: 0.7rem;
  color: #999;
  margin-top: 0.25rem;
  display: block;
}

.private-message.own .private-message-time {
  color: rgba(255, 255, 255, 0.7);
}

.private-message-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
  display: flex;
  gap: 0.75rem;
}

.private-message-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 0.95rem;
}

.private-message-input input:focus {
  outline: none;
  border-color: #667eea;
}

.no-messages {
  text-align: center;
  color: #999;
  padding: 2rem;
}

/* ================================
   TOPIC FULL VIEW
   ================================ */
.topic-full {
  padding: 0;
}

.topic-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  color: white;
}

.author-name {
  font-weight: 600;
  color: #333;
}

.topic-date {
  color: #999;
}

.topic-text {
  color: #444;
  line-height: 1.6;
}

/* ================================
   REPLIES
   ================================ */
.topic-replies {
  padding: 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.topic-replies h3 {
  margin: 0 0 1rem 0;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.reply {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: white;
  border-radius: 10px;
}

.reply-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.reply-content {
  flex: 1;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.reply-author {
  font-weight: 600;
  color: #333;
}

.reply-time {
  font-size: 0.8rem;
  color: #999;
}

.reply-text {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reply-form textarea {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  font-size: 0.95rem;
}

.reply-form textarea:focus {
  outline: none;
  border-color: #667eea;
}

.no-replies,
.no-comments {
  text-align: center;
  color: #999;
  padding: 1rem;
  background: white;
  border-radius: 10px;
}

/* ================================
   COMMENT ITEM (fix from comment-item)
   ================================ */
.comment {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: white;
  border-radius: 10px;
}

.comment-time {
  font-size: 0.8rem;
  color: #999;
}

/* ================================
   NO CONTENT STATES
   ================================ */
.no-articles,
.no-topics {
  text-align: center;
  padding: 3rem;
  color: #666;
  grid-column: 1 / -1;
}

.error {
  text-align: center;
  color: #8B4A5E;
  padding: 1rem;
}

/* ================================
   BUTTONS
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

/* ================================
   MOBILE CHAT ROOMS TOGGLE
   ================================ */
@media (max-width: 768px) {
  .chat-container {
    display: flex;
    flex-direction: column;
  }
  
  .chat-sidebar {
    display: block;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem;
  }
  
  .chat-rooms {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .room-btn {
    padding: 0.5rem 0.75rem;
  }
  
  .room-name {
    display: none;
  }
  
  .room-icon {
    font-size: 1.1rem;
  }
  
  .messages-container {
    display: flex;
    flex-direction: column;
  }
  
  .messages-sidebar {
    display: block;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .conversations-list {
    max-height: 150px;
  }
}

/* ================================
   MODALS
   ================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h3 {
  font-size: 1.4rem;
  color: #333;
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #667eea;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body h4 {
  font-size: 1.15rem;
  color: #555;
  margin: 1.25rem 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body p {
  color: #444;
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: justify;
}

.modal-body ul,
.modal-body ol {
  margin: 0.75rem 0 1rem 0;
  padding-left: 1.5rem;
}

.modal-body li {
  color: #555;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.modal-body ul li::marker {
  color: #667eea;
}

.modal-body ol li::marker {
  color: #667eea;
  font-weight: 600;
}

.modal-body strong {
  color: #333;
  font-weight: 600;
}

.modal-body em {
  font-style: italic;
  color: #666;
}

/* Quote/Highlight blocks */
.modal-body blockquote {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-left: 4px solid #667eea;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #555;
}

/* Separator between sections */
.modal-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
  margin: 2rem 0;
}

/* ================================
   ADMIN ARTICLE MANAGEMENT
   ================================ */
.admin-controls {
  display: none;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  color: white;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-controls.visible {
  display: flex;
}

.admin-controls h4 {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-controls .admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-admin {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-admin:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-admin.delete {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 0, 0, 0.3);
}

.btn-admin.delete:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Admin Edit Form in Modal */
.admin-edit-header {
  display: none;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  padding: 0.75rem 1.5rem;
  color: white;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.admin-edit-header.visible {
  display: flex;
}

.admin-edit-header span {
  font-weight: 600;
}

.article-edit-form {
  display: none;
  padding: 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.article-edit-form.visible {
  display: block;
}

.article-edit-form .form-group {
  margin-bottom: 1rem;
}

.article-edit-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.article-edit-form input,
.article-edit-form select,
.article-edit-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.article-edit-form textarea {
  min-height: 300px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.article-edit-form input:focus,
.article-edit-form select:focus,
.article-edit-form textarea:focus {
  outline: none;
  border-color: #667eea;
}

.article-edit-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

/* Delete Confirmation */
.delete-confirm {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  text-align: center;
  max-width: 400px;
}

.delete-confirm.active {
  display: block;
}

.delete-confirm h3 {
  margin: 0 0 1rem 0;
  color: #ff6b6b;
}

.delete-confirm p {
  color: #666;
  margin-bottom: 1.5rem;
}

.delete-confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.delete-confirm-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
}

.delete-confirm-overlay.active {
  display: block;
}

/* Create Article Modal Specific */
.create-article-content-preview {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.help-text {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.25rem;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  .explorar-tabs {
    gap: 0.25rem;
  }
  
  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .chat-container,
  .messages-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .chat-sidebar,
  .messages-sidebar {
    display: none;
  }
  
  .chat-messages,
  .messages-list {
    height: 50vh;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .topic-card {
    flex-direction: column;
  }
  
  .topic-stats {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
  }
}
