/* ✅ تنسيق الصفحة العامة */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
}

/* ✅ تنسيق حاوية الموضوع */
.thread-container {
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* ✅ عنوان الموضوع */
.thread-title {
    color: #007BFF;
    text-align: center;
    font-size: 24px;
    margin-bottom: 10px;
}

/* ✅ تنسيق قسم المستخدم والمحتوى */
.thread-content-wrapper, .post-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ✅ تنسيق معلومات المستخدم */
.user-info {
    width: 220px;
    text-align: center;
    background: #fff; /* الخلفية بيضاء */
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    border: 2px solid #f8f8f8; /* الحدود سوداء */
}


/* ✅ صورة المستخدم */
.user-info img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

/* ✅ تنسيق محتوى الموضوع والردود */
.thread-content, .post-content {
    flex-grow: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center; /* ✅ توسيط النصوص داخل الموضوع */
}

/* ✅ بيانات الموضوع والردود */
.thread-meta, .post-meta {
    font-size: 14px;
    color: #777;
    margin-top: 10px;
}

/* ✅ أزرار التحكم */
.btn {
    padding: 2px 3px;
    background-color: #007BFF;
    color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 10px 5px;
    transition: 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.edit-btn {
    background-color: #ffc107;
}

.edit-btn:hover {
    background-color: #e0a800;
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* ✅ تحسين تصميم أزرار الترقيم */
.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    text-decoration: none;
    background-color: #007BFF;
    color: white;
    border-radius: 5px;
    transition: 0.3s;
}

.pagination a:hover {
    background-color: #0056b3;
}

.pagination .active {
    background-color: #0056b3;
    font-weight: bold;
}

/* ✅ زر الإعجاب */
.like-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.like-btn:hover {
    background-color: #007BFF;
    color: white;
}

.like-btn span {
    font-weight: bold;
}

/* ✅ تنسيق صورة الموضوع */
.thread-image {
    text-align: center;
    margin-bottom: 15px;
}

.thread-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}
/* ✅ تنسيق زر اختيار الملف */
input[type="file"] {
    display: block;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

/* ✅ تنسيق زر تحميل الملف */
.attachment {
    font-size: 16px;
    margin-top: 15px;
    text-align: center;
}

.download-btn {
    display: inline-block;
    padding: 8px 12px;
    background-color: #28a745;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.download-btn:hover {
    background-color: #218838;
}
.thread-title a {
    text-decoration: none; /* إزالة الخط السفلي من الرابط */
    color: #007BFF; /* لون أزرق مثل الروابط */
    transition: 0.3s;
}

.thread-title a:hover {
    color: #0056b3; /* لون أغمق عند التحويم */
    text-decoration: underline;
}
/* ✅ تنسيق الجدول أسفل الموضوع */
.thread-actions {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.thread-actions tr {
    display: flex;
    justify-content: space-between;
}

.thread-action {
    width: 33.3%;
    text-align: center;
}

/* ✅ تحسين تصميم الأزرار */
.attachment-btn {
    background-color: #17a2b8;
}

.attachment-btn:hover {
    background-color: #138496;
}

.no-attachment {
    color: #888;
    font-size: 14px;
}

.edit-btn {
    background-color: #ffc107;
}

.edit-btn:hover {
    background-color: #e0a800;
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}
.badges {
    margin-top: 5px;
    font-size: 24px;
    line-height: 1;
}
.badges .star {
    color: #f1c40f;
    margin-right: 2px;
    cursor: pointer;
    font-size: 24px;
    transition: font-size 0.2s ease;
}
a {
    text-decoration: none;
}
.date-divider,
.content-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px 0;
}
.divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 20px 0;
  direction: rtl; /* لضبط اتجاه النص للعربية */
}

.divider-text {
  font-size: 1.2em;
  color: #333;
  margin-left: 10px; /* مسافة بين النص والخط */
}

.divider-line {
  flex: 1;
  border-top: 1px solid #ccc; /* الخط المستقيم */
}
.media-container {
    background-color: #fff;      /* خلفية بيضاء */
    border: 1px solid #eeeeee;      /* حدود سوداء */
    border-radius: 10px;         /* زوايا منحنية */
    padding: 5px;               /* حشوة داخلية */
    box-sizing: border-box;
    margin-top: 10px;            /* مسافة من الأعلى */
}
