.message-box {
    width: 50%;
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
}

.success {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #3c763d;
}

.error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #a94442;
}

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #0073e6;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.btn:hover {
    background: #005bb5;
}

الرسائل 

/* أساليب عامة */
body {
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  font-family: sans-serif;
  direction: rtl;
}

/* تنسيق الشريط العلوي */
.top-bar {
  background-color: #4a90e2;
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 1.2rem;
  border-radius: 0 0 15px 15px;
  margin-bottom: 10px;
}

/* تنسيق الحاوية الرئيسية */
.main-container {
  max-width: 1200px;
  margin: 20px auto;
  display: flex;
  gap: 10px;
}

/* تنسيق ملف البروفايل في حالة عدم تسجيل الدخول */
.centered-profile {
  margin: 50px auto;
  width: 300px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
}
.centered-profile img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

/* تنسيق الشريط الجانبي لصندوق الرسائل */
.inbox-sidebar {
  background-color: #fff;
  flex: 0 0 200px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 15px;
}
.inbox-sidebar h3 {
  text-align: center;
  margin-bottom: 15px;
}
.inbox-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.inbox-sidebar li {
  margin: 10px 0;
}
.inbox-sidebar a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}
.inbox-sidebar a:hover {
  color: #4a90e2;
}

/* تنسيق المحتوى المركزي */
.profile-center {
  flex: 1;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 15px;
  min-height: 400px;
}
.profile-center h2 {
  text-align: center;
  margin-top: 0;
}

/* تنسيق بطاقات الرسائل */
.message-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 10px 15px;
  margin-bottom: 10px;
}
.message-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 5px;
}
.message-title {
  font-weight: bold;
  margin-bottom: 5px;
}
.message-actions {
  text-align: left;
}
.message-actions .btn {
  text-decoration: none;
  padding: 5px 10px;
  margin-right: 5px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.9rem;
}
.btn-view {
  background-color: #28a745;
}
.btn-delete {
  background-color: #dc3545;
}

/* تنسيق الترقيم */
.pagination {
  text-align: center;
  margin: 10px 0;
}
.pagination a {
  display: inline-block;
  padding: 5px 10px;
  margin: 2px;
  background: #eee;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
}
.pagination a:hover {
  background: #ccc;
}

/* تنسيق نموذج كتابة الرسالة */
.compose-form label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}
.compose-form input[type="text"],
.compose-form textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.compose-form button {
  background-color: #4a90e2;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}
.compose-form button:hover {
  background-color: #357ab7;
}

/* صف الإيموجي */
.emoji-row {
  margin-bottom: 10px;
}
.emoji-row .emoji {
  font-size: 1.5rem;
  cursor: pointer;
  margin-right: 5px;
  transition: transform 0.2s;
}
.emoji-row .emoji:hover {
  transform: scale(1.2);
}

/* تنسيق بطاقة العضو اليمنى */
.profile-card-right {
  background-color: #fff;
  flex: 0 0 220px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
}
.profile-card-right img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 2px solid #ddd;
}
.profile-card-right h3 {
  margin: 0;
  font-size: 1.1rem;
}
.profile-card-right .rank {
  color: #666;
  font-weight: bold;
  margin: 5px 0;
}
.profile-card-right .stats {
  font-size: 0.9rem;
  color: #333;
  margin: 5px 0;
}

/* تنسيق التنبيهات */
.alert {
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}
.alert.success { background: #d4edda; color: #155724; }
.alert.error   { background: #f8d7da; color: #721c24; }
/* تنسيق خاص لمتصفحي الجوال */
@media screen and (max-width: 768px) {
  /* تغيير تخطيط الحاوية الرئيسية لتكون عمودية */
  .main-container {
    flex-direction: column;
  }
  /* إعادة ترتيب العناصر باستخدام خاصية order */
  .author-info-container {
    order: 1;
    margin-bottom: 10px;
  }
  .mobile-message-nav {
    order: 2;
    display: block;
    margin-bottom: 10px;
  }
  .inbox-sidebar {
    display: none; /* إخفاء القائمة الجانبية الخاصة بسطح المكتب */
  }
  .profile-center {
    order: 3;
  }
  
  /* تحسين مظهر القائمة المنسدلة */
  .mobile-message-nav select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
  }
}
