/* 🔠 فونت و بدنه */
body {
  font-family: Vazir, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  direction: rtl;
}

/* 🔠 عنوان انجمن */
.forum-title {
  color: white;
  text-align: center;
  margin-top: 2rem;
}

/* 🔵 لوگوی سایت */
.ext-site-logo {
  position: absolute;
  top: 24px;
  right: 125px;
  z-index: 50;
  display: inline-block;
}

.header {
  position: relative;
}

/* 🔵 هدر */
.header-container {
  width: 100%;
  background: #ff9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  margin-bottom: 2rem;
}

.header {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #333;
}

.header nav .header-btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1rem;
  margin-left: 0.5rem;
  transition: background-color 0.3s ease;
}

.header nav .header-btn:hover {
  background-color: #0056b3;
}

/* 🔍 سرچ‌باکس */
.search-hint {
  text-align: center;
  font-size: 18px;
  margin-top: 10px;
  color: #fff;
}

.search-box {
  display: flex;
  justify-content: center;
  margin: 10px auto 20px;
  max-width: 300px;
  position: relative;
}

.search-input {
  flex: 1;
  padding: 0.4rem 2rem 0.4rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  direction: rtl;
  width: 100%;
}

.clear-btn {
  position: absolute;
  left: 10px;
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  color: #999;
}

.clear-btn:hover {
  color: #000;
}

/* 🌊 پس‌زمینه موج */
.background-wave {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50vh;
  z-index: -1;
}
.background-wave img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 🧱 ساختار کلی صفحه */
.page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  padding: 30px 10px;
  flex-wrap: wrap;
}

/* 🧱 ستون راست (سایدبار) */
.sidebar {
  width: 25%;
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow: hidden;
}

.sidebar a {
  background: #000b76;
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: bold;
}

/* 🧱 ستون وسط (تاپیک‌ها) */
.container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  background: rgba(255,255,255,0.85);
  padding: 20px;
  border-radius: 16px;
}

/* 📦 کارت کاربر */
.user-card {
  background: #ffffff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
  text-align: center;
}
.user-card .status {
  float: left;
  font-weight: bold;
}

/* 📦 کارت تاپیک */
.topic-row {
  display: flex;
  flex-direction: row-reverse; /* کارت سمت راست */
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.5rem;
}


.topic-stats {
  width: 180px;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  background: #f4f4f8;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.topic-stats .stat {
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
}

.topic-stats .label {
  display: block;
  font-size: 0.8rem;
  color: #333;
  margin-top: 0.25rem;
}

.topic-card {
  flex: 1;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-align: right;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.topic-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #222;
}

.topic-card h2 a {
  text-decoration: none;
  color: #222;
}
.topic-card h2 a:hover {
  color: #007bff;
}

.topic-card p {
  color: #444;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.meta {
  font-size: 0.9rem;
  color: #666;
}

/* 👍 رأی */
.vote-area {
  margin-top: 0.5rem;
}
.vote-btn {
  background-color: #007bff;
  border: none;
  padding: 0.4rem 0.8rem;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}
.vote-btn.disabled {
  background-color: #ddd;
  cursor: not-allowed;
}

/* 📱 ریسپانسیو */
@media (max-width: 768px) {
  .container, .sidebar {
    width: 95%;
  }
  .page-wrapper {
    flex-direction: column;
    align-items: center;
  }
}
.author-avatar {
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.author-placeholder {
  border-radius: 50%;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #fff;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  user-select: none;
}

.topic-header {
  display: flex;
  flex-direction: row;       /* چرخش برعکس حذف شد */
  justify-content: flex-end; /* آواتار سمت راست */
  align-items: center;       /* وسط عمودی */
  gap: 15px;
  margin-bottom: 10px;
}

.topic-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-avatar img,
.topic-avatar .author-placeholder {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  object-fit: cover;
}



.topic-title {
  flex: 1;                  /* بقیه فضا رو بگیره */
}

