/* style.css - الكود المُحسّن كاملاً */
:root {
  --primary: #ff6b6b;
  --secondary: #0a0a1a;
  /* لون أعمق لإبراز التأثير */
  --accent: #4ecdc4;
  --text: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.07);
  /* شفافية عالية جداً */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --error: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;
  --header-height: 75px;
  --sidebar-width: 280px;
  /* متغيرات البحث */
  --search-bg: var(--card-bg);
  --search-fg: var(--text);
  --search-input-bg: rgba(255, 255, 255, 0.1);
  --search-input-border: rgba(255, 255, 255, 0.2);
  --search-primary: var(--primary);
  --search-dur: 1s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cairo", sans-serif;
  background: var(--secondary);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(78, 205, 196, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* فقاعات ملونة خلفية لزيادة تأثير الـ Blur */
body::before,
body::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.5;
}

body::before {
  top: -100px;
  left: -100px;
  background: var(--primary);
  animation: float 15s infinite alternate;
}

body::after {
  bottom: -100px;
  right: -100px;
  background: var(--accent);
  animation: float 18s infinite alternate-reverse;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(50px, 100px) rotate(15deg);
  }
}

body.light-mode {
  --secondary: #f0f2f5;
  --text: #1a1a2e;
  --card-bg: rgba(255, 255, 255, 0.6);
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(0, 0, 0, 0.05);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* صفحة المصادقة */
.auth-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.auth-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 20px;
  border: 2px solid var(--primary);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  margin: 20px;
  backdrop-filter: blur(20px);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  color: #2d3748;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.auth-header p {
  color: #4a5568;
  opacity: 0.8;
}

.auth-tabs {
  display: flex;
  margin-bottom: 30px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 12px;
  padding: 5px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: #4a5568;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.auth-tab.active {
  background: var(--primary);
  color: white;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #2d3748;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  color: #2d3748;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
  background: white;
}

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  margin-top: 10px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
}

.auth-footer p {
  color: #4a5568;
  font-size: 0.9rem;
}

.text-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  padding: 0;
}

.text-link:hover {
  color: #ff8e8e;
}

/* الشريط العلوي */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  padding: 0 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.light-mode .top-navbar {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}


.sidebar-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

body.light-mode .sidebar-toggle {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.nav-brand h1 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-search {
  flex: 1;
  max-width: 500px;
  margin: 0 2rem;
}

.search-box {
  display: flex;
  width: 100%;
}

.search-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px 0 0 25px;
  padding: 12px 20px;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

body.light-mode .search-box input {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
  transform: scale(1.02);
  /* توسع بسيط عند التركيز */
}

body.light-mode .search-box input:focus {
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.search-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  color: white;
  border: none;
  border-radius: 0 25px 25px 0;
  padding: 12px 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  position: relative;
}

body.light-mode .nav-action-btn {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

/* أنماط المحفظة والنقاط - تصميم بريميوم */
.wallet-container {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}

.wallet-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px !important;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.05) 100%) !important;
  border: 1.5px solid rgba(255, 215, 0, 0.3) !important;
  border-radius: 50px !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wallet-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 165, 0, 0.1) 100%) !important;
  border-color: rgba(255, 215, 0, 0.6) !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.coin-wrapper {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coin-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  animation: coinRotate 4s infinite linear;
}

@keyframes coinRotate {

  0%,
  100% {
    transform: rotateY(0deg);
  }

  50% {
    transform: rotateY(20deg);
  }
}

.points-count {
  font-family: 'Outfit', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(to bottom, #fff9d6 0%, #ffd700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
}

.wallet-btn:hover .points-count {
  filter: brightness(1.2);
  letter-spacing: 0.5px;
}

body.light-mode .wallet-btn {
  background: linear-gradient(135deg, rgba(255, 191, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%) !important;
  border-color: rgba(255, 191, 0, 0.3) !important;
  box-shadow: 0 4px 10px rgba(255, 191, 0, 0.1);
}

body.light-mode .points-count {
  background: linear-gradient(to bottom, #d4af37 0%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}



/* أنماط متجر الخدمات */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.price-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.price-card.featured {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  transform: scale(1.05);
}

.price-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
}

.price-card h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text);
}

.price-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: #ffd700;
  margin: 15px 0;
}

.price-card .duration {
  font-size: 0.9rem;
  opacity: 0.6;
  display: block;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: right;
}

.plan-features li {
  margin-bottom: 10px;
  font-size: 0.85rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-features li i {
  color: #2ecc71;
}

.price-card .buy-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.badge-discount {
  position: absolute;
  top: 10px;
  right: -30px;
  background: #e74c3c;
  color: white;
  padding: 5px 35px;
  font-size: 0.7rem;
  transform: rotate(45deg);
}

/* نموذج التوثيق */
.verification-form {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  margin-top: 15px;
}

.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  padding: 30px;
  text-align: center;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-action-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* أنماط جديدة للإشعارات في الشريط العلوي */
.notification-container {
  position: relative;
  display: inline-block;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  border: 2px solid var(--secondary);
  z-index: 1001;
}

.notifications-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  width: 350px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  margin-top: 15px;
  max-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notifications-header {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.notifications-actions {
  display: flex;
  gap: 8px;
}

.action-btn.small {
  padding: 6px 10px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cairo', sans-serif;
}

.action-btn.small:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
}

.notification-dropdown-item {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.1);
  border-right: 3px solid var(--primary);
}

.notification-dropdown-icon {
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.notification-dropdown-content {
  flex: 1;
  min-width: 0;
}

.notification-dropdown-text {
  font-size: 0.9rem;
  margin-bottom: 5px;
  line-height: 1.4;
  color: var(--text);
}

.notification-dropdown-time {
  font-size: 0.7rem;
  opacity: 0.7;
  color: var(--text);
}

/* تحسينات للوضع النهاري */
body.light-mode .notifications-dropdown {
  background: white;
  border: 2px solid var(--primary);
}

body.light-mode .notification-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .action-btn.small {
  background: rgba(0, 0, 0, 0.1);
  color: #2d3748;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .action-btn.small:hover {
  background: rgba(0, 0, 0, 0.2);
}

body.light-mode .notification-dropdown-text,
body.light-mode .notification-dropdown-time {
  color: #2d3748;
}

/* Bubble Navigation - تصميم الفقاعات */
/* Bubble Navigation - تصميم الفقاعات */
/* Bubble Navigation - تصميم الفقاعات */
.sidebar {
  position: fixed;
  top: 50% !important;
  /* فرض التوسط العمودي */
  right: 5px !important;
  /* أقصى اليمين مع هامش بسيط جداً */
  transform: translateY(-50%) !important;
  width: auto;
  height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 9999;
  /* Ensure it's on top */
  display: flex !important;
  flex-direction: column !important;
  gap: 25px;
  /* تباعد أكبر بين الأزرار */
  padding: 10px 0;
  pointer-events: none;
  /* لتمرير النقر خلف الشريط */
}

body.light-mode .sidebar {
  background: transparent !important;
}

.sidebar:hover {
  width: auto;
}

.sidebar-header,
.sidebar-footer {
  display: none !important;
}

.sidebar-nav {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
  width: 100%;
}

/* تصميم الزر العائم - Strictly Circular Enforced */
.sidebar-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 55px !important;
  height: 55px !important;
  min-width: 55px !important;
  min-height: 55px !important;
  border-radius: 50% !important;
  background: rgba(20, 20, 35, 0.4) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  cursor: pointer !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
  padding: 0 !important;
  margin: 0 !important;
  /* Reset margin, let flex gap handle spacing */
  overflow: visible !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
}

/* Ensure container aligning right */
.sidebar-nav {
  align-items: flex-end !important;
  width: auto !important;
  /* Don't stretch content */
}

body.light-mode .sidebar-item {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--secondary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* الأيقونة */
.sidebar-item i {
  font-size: 1.3rem;
  z-index: 2;
  transition: transform 0.3s ease;
}

/* النص (Floating Tooltip) */
.sidebar-item span {
  position: absolute;
  top: 50%;
  right: 70px;
  /* يظهر على يسار الزر (المسافة من اليمين) */
  transform: translateY(-50%) translateX(10px);
  /* يبدأ مزاحاً قليلاً */
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .sidebar-item span {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* عند التحويم */
.sidebar-item:hover {
  transform: scale(1.1);
  /* تكبير بسيط للدائرة نفسها */
  background: rgba(var(--primary-rgb), 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.4);
}

.sidebar-item:hover i {
  color: var(--primary);
  transform: scale(1.1);
}

/* إظهار التلميح */
.sidebar-item:hover span {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  /* حركة ظهور ناعمة */
}

/* Active State */
.sidebar-item.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 0 25px rgba(255, 107, 107, 0.5);
}

.sidebar-item.active:hover {
  width: 180px;
  /* يبقى متوسعاً عند التحويم */
}

.sidebar-item.active i {
  color: white;
}

/* تعديل المحتوى الرئيسي */
.main-content {
  margin-right: 0 !important;
  /* إلغاء الهامش لأن القائمة عائمة */
  padding-right: 80px;
  /* إضافة مسافة داخلية لمنع تغطية المحتوى */
}



/* إخفاء زر التوجل في سطح المكتب */
.sidebar-toggle {
  display: none;
}

/* === Responsive Mobile Styles === */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    /* أضيق قليلاً في التابلت */
    /* في الموبايل الحقيقي سيختفي لأننا نستخدم Bottom Nav */
    display: none;
  }

  .main-content {
    margin-right: 0;
    padding-bottom: 80px;
    /* Bottom nav space */
  }

  /* إذا تطلب الأمر سايدبار في الموبايل (مثل القائمة الجانبية القديمة)، نعيد تعريفها كـ Slide-in */
  /* لكن التصميم الحالي يعتمد على Bottom Nav + More Page */
}

/* modal styles for blocked users list */
.user-list-item button:hover {
  background: rgba(255, 107, 107, 0.1) !important;
}

.modal-content {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.users-list {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}



.sidebar-profile {
  padding: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sidebar-user-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
}

.sidebar-user-details h4 {
  color: var(--primary);
  margin-bottom: 5px;
}

.sidebar-user-details p {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9rem;
}

body.light-mode .sidebar-user-details p {
  color: #4a5568;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.sidebar-nav .sidebar-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  color: var(--text);
  opacity: 0.8;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  background: transparent;
  width: calc(100% - 30px);
  text-align: right;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  margin: 8px 15px;
  border-radius: 15px;
  border: 1px solid transparent;
}

.sidebar-nav .sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
  transform: translateX(-5px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-nav .sidebar-item.active {
  background: rgba(255, 107, 107, 0.15);
  color: var(--primary);
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.2);
}

.sidebar-item i {
  width: 20px;
  text-align: center;
}

.message-badge {
  background: var(--error);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .sidebar-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  text-align: right;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  margin: 8px 0;
  border-radius: 10px;
  border: 2px solid transparent;
}

body.light-mode .sidebar-footer .sidebar-item {
  color: #2d3748;
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-footer .sidebar-item:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--primary);
  transform: translateX(3px);
}

.sidebar-footer .logout-btn {
  background: linear-gradient(135deg, #ff4757, #ff6b6b);
  color: white;
  border-color: #ff4757;
}

.sidebar-footer .logout-btn:hover {
  background: linear-gradient(135deg, #ff3742, #ff5757);
  transform: translateX(3px);
}

/* المحتوى الرئيسي */
.main-content {
  margin-top: var(--header-height);
  padding: 30px;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.sidebar.active~.main-content {
  margin-right: var(--sidebar-width);
}

.content-section {
  display: none;
  animation: fadeInUp 0.6s ease;
}

.content-section.active {
  display: block;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-section {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-section h2 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 2rem;
}

.welcome-section p {
  color: var(--text);
  opacity: 0.8;
  font-size: 1.1rem;
}

/* بطاقات النشر */
.publish-cards {
  display: flex;
  gap: 20px;
  margin: 40px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.publish-card {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  padding: 40px;
  border: 1px solid var(--glass-border);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  text-align: center;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.publish-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: 0.4s;
}

.publish-card:hover::before {
  opacity: 1;
}

.publish-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
}

.post-card {
  border-bottom: 4px solid #4ecdc4;
}

.post-card:hover {
  box-shadow: 0 20px 40px rgba(78, 205, 196, 0.2);
}

.service-card {
  border-bottom: 4px solid #ffd166;
}

.service-card:hover {
  box-shadow: 0 20px 40px rgba(255, 209, 102, 0.2);
}

.artwork-card {
  border-bottom: 4px solid #a855f7;
}

.artwork-card:hover {
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2);
}

.card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
}

.publish-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.publish-card p {
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 20px;
  line-height: 1.6;
}

body.light-mode .publish-card p {
  color: #4a5568;
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.card-features span {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

body.light-mode .card-features span {
  background: rgba(0, 0, 0, 0.05);
  color: #4a5568;
}

/* نافذة الدردشة المحسنة */
.chat-window {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 420px;
  max-height: 85vh;
  height: 600px;
  background: rgba(18, 18, 30, 0.85);
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: var(--primary);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
}

.chat-search {
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-search .form-input {
  margin: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* === إعدادات الدردشة والقوائم === */
.chat-dropdown {
  position: absolute;
  top: 115px;
  /* Adjust based on header height */
  left: 15px;
  /* RTL support */
  width: 200px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 2005;
  padding: 5px;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: var(--text);
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

.dropdown-item.toggle-item {
  justify-content: space-between;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 5px 0;
}

/* === مفتاح التبديل الصغير === */
.switch-small {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch-small input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-small {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider-small:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider-small {
  background-color: var(--success);
}

input:checked+.slider-small:before {
  transform: translateX(16px);
}

/* === شريط الإجراءات الجماعية === */
.bulk-toolbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--primary);
  /* Use primary color for visibility */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  z-index: 2010;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.bulk-info {
  color: white;
  font-weight: bold;
}

.bulk-actions {
  display: flex;
  gap: 10px;
}

.bulk-actions button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.bulk-actions button:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.bulk-actions button.danger:hover {
  background: var(--error);
}

/* === حالة النشاط وخانات الاختيار === */
.online-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background-color: #4CAF50;
  border: 2px solid var(--card-bg);
  /* Border to separate from avatar */
  border-radius: 50%;
  z-index: 2;
}

.chat-checkbox-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s;
  border: 2px solid transparent;
}

.chat-item.selection-mode .chat-checkbox-container {
  opacity: 0.6;
  /* Show semi-transparent by default in mode */
}

.chat-item.selection-mode.selected .chat-checkbox-container {
  opacity: 1;
  background: rgba(var(--primary-rgb), 0.8);
  border-color: white;
}

.chat-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  position: relative;
}

/* Custom Scrollbar for Chat List */
.chat-list::-webkit-scrollbar,
.direct-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-list::-webkit-scrollbar-track,
.direct-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.chat-list::-webkit-scrollbar-thumb,
.direct-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 107, 0.3);
  border-radius: 10px;
}

.chat-list::-webkit-scrollbar-thumb:hover,
.direct-chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.chat-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
  background: rgba(255, 107, 107, 0.1);
  border-right: 3px solid var(--primary);
}

.chat-item-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-left: 12px;
  font-size: 1.1rem;
}

.chat-item-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  margin-left: 10px;
}

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

.chat-item-name {
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 5px;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-last-message {
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-time {
  font-size: 0.75rem;
  opacity: 0.5;
  white-space: nowrap;
}

.chat-item-unread {
  background: var(--error);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  margin-right: 5px;
}

/* نافذة الدردشة المباشرة المحسنة */
.direct-chat-window {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  height: 580px;
  background: rgba(18, 18, 30, 0.9);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.direct-chat-header {
  background: var(--primary);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.chat-user-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.chat-user-details h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.chat-user-details span {
  font-size: 0.8rem;
  opacity: 0.9;
}

.chat-header-actions {
  display: flex;
  gap: 5px;
}

.chat-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.direct-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
  word-wrap: break-word;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-message:hover {
  transform: translateY(-1px);
}

.chat-message.own {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 5px;
}

.chat-message.other {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-bottom-left-radius: 5px;
}

.chat-message-content {
  margin-bottom: 5px;
  line-height: 1.4;
}

.chat-message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  text-align: left;
}

.chat-message.own .chat-message-time {
  text-align: right;
}

.direct-chat-input {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card-bg);
}

.chat-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-container .form-input {
  flex: 1;
  margin: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-send-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.chat-send-btn:hover {
  background: #ff8e8e;
  transform: translateY(-1px);
}

.chat-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* زر الدردشات في المنتصف */
.chat-toggle-center {
  position: fixed;
  bottom: 110px;
  /* مكان مرتفع قليلاً لتجنب شريط التنقل السفلي */
  right: 30px;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 10001;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.6rem;
  touch-action: none;
  user-select: none;
  animation: chatJumpIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275), chatPulse 2s infinite 3s;
}

@keyframes chatJumpIn {
  from {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }

  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes chatPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(255, 107, 107, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}


.chat-toggle-center:active {
  cursor: grabbing;
}

.chat-toggle-center:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}


.chat-badge-center {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error);
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

/* إعدادات التصميم */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.setting-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

body.light-mode .setting-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.setting-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.setting-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-card p {
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 15px;
}

body.light-mode .setting-card p {
  color: #4a5568;
}

.setting-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.setting-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* تحسينات إضافية */
.content-display {
  margin-top: 40px;
}

.content-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-main {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 8px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.sort-select option {
  background: #1a1a1a;
  color: white;
  padding: 10px;
}

.sort-select:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn.active {
  background: var(--primary);
  color: white;
}

.filter-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Skills Bubbles inside cards */
.post-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-bubble {
  background: rgba(108, 92, 231, 0.15);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  border: 1px solid rgba(108, 92, 231, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-bubble:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Line Truncation Logic */
.content-body p {
  display: block;
  /* الحالة الافتراضية: عرض كامل */
  line-height: 1.5;
  position: relative;
}

.content-body.truncated p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.content-body {
  position: relative;
  padding-bottom: 5px;
}

/* "Read More" Button */
.read-more-btn {
  color: var(--primary);
  background: var(--card-bg);
  border: none;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  bottom: 5px;
  left: 10px;
  z-index: 999;
  /* قيمة عالية جداً لضمان النقر */
  display: none;
  border-radius: 8px;
  box-shadow: -10px 0 20px var(--card-bg), 0 0 10px rgba(0, 0, 0, 0.3);
}

.content-body.truncated .read-more-btn {
  display: block;
}

/* Expanded Post Modal (The Hub) */
.expanded-post-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.expanded-post-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 25px;
}

.expanded-post-content .close-expanded {
  position: absolute;
  top: 15px;
  left: 15px;
  /* RTL context */
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.expanded-post-content .close-expanded:hover {
  background: var(--error);
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* شارات المنشورات (مثبت وممول) */
.pinned-badge,
.promoted-badge {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  font-weight: 600;
  transition: transform 0.3s ease;
}

/* اشتراكات الملف الشخصي */
.subscriptions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.subscription-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.subscription-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

/* Sidebar Subscription Widget */
.sidebar-sub-widget {
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 10px;
  padding: 12px;
  margin-top: 15px;
  animation: slideInLeft 0.5s ease-out;
}

.sub-widget-item {
  margin-bottom: 10px;
}

.sub-widget-item:last-child {
  margin-bottom: 0;
}

.sub-widget-label {
  font-size: 0.75rem;
  opacity: 0.7;
  display: block;
  margin-bottom: 4px;
}

.sub-widget-timer {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  font-weight: bold;
  color: #ff9f43;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-widget-timer.expired {
  color: var(--danger);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-type {
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-timer {
  font-family: monospace;
  font-size: 1.1rem;
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
}

.sub-details {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* إخفاء شارة التثبيت في الصفحة الرئيسية */
#content-grid .pinned-badge {
  display: none !important;
}

.pinned-badge:hover,
.promoted-badge:hover {
  transform: scale(1.1);
}

.promoted-badge {
  background: linear-gradient(45deg, #ff9f43, #ff6b6b) !important;
}

.pinned-badge {
  background: var(--primary-gradient) !important;
}

.content-card {
  position: relative;
  /* لضمان تموضع الشارات */
}

.content-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid var(--glass-border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.content-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

body.light-mode .content-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.content-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.content-author {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.content-author:hover {
  transform: translateX(-5px);
}

.author-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.author-avatar:hover {
  transform: scale(1.1);
}

.author-info h4 {
  color: var(--primary);
  margin-bottom: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.author-info h4:hover {
  color: #ff8e8e;
}

.author-info span {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9rem;
}

.content-body h3 {
  color: var(--text);
  margin-bottom: 10px;
}

.content-body p {
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 15px;
}

.work-price,
.service-price {
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
}

/* ===== أنماط النجوم المحسنة ===== */

.rating-stars {
  display: flex;
  gap: 2px;
  margin: 10px 0;
  direction: ltr;
  unicode-bidi: bidi-override;
}

.rating-stars .star {
  color: #7c3aed;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-stars .star.empty {
  color: #e0e0e0;
}

.rating-stars.readonly .star {
  cursor: default;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.rating-value {
  font-weight: bold;
  color: var(--primary);
  font-size: 0.95rem;
}

.rating-count {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.85rem;
}

/* النجوم في البطاقات */
.content-card .rating-stars {
  margin: 8px 0;
}

.content-card .rating-stars .star {
  font-size: 1.1rem;
}

/* عرض التقييم مع الرقم */
.rating-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.rating-value {
  font-weight: bold;
  color: var(--primary);
  font-size: 0.95rem;
}

.rating-count {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.85rem;
}

/* النجوم الكبيرة للتقييم */
.rating-stars-large {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 20px 0;
  direction: ltr;
}

.rating-stars-large .star {
  font-size: 2.5rem;
  color: #7c3aed;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rating-stars-large .star.empty {
  color: #ddd;
}

.rating-stars-large .star:hover {
  transform: scale(1.2);
  color: #a855f7;
}

.content-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;

}


.action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
}

.action-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* Follow Button Styles */
.follow-btn {
  background: #1da1f2 !important;
  /* Lighter blue for follow */
  border-color: #1da1f2 !important;
  color: white !important;
}

.follow-btn.following {
  background: var(--error) !important;
  /* Red for unfollow */
  border-color: var(--error) !important;
  color: white !important;
}

.follow-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text);
  opacity: 0.7;
}

.empty-state.small {
  padding: 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.section-header {
  margin-bottom: 30px;
}

.section-header h2 {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* تحسينات الملف الشخصي */
.profile-header {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 20px;
}

.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-cover-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-cover-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.profile-info {
  padding: 0 20px 20px;
  display: flex;
  align-items: flex-end;
  /* Align items to bottom to handle the avatar pull-up */
  gap: 20px;
  position: relative;
}

.profile-avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: -50px;
  /* Pull avatar up to overlap cover */
  z-index: 2;
}

.profile-pic-container {
  width: 120px;
  /* Slightly larger */
  height: 120px;
  background: var(--card-bg);
  /* Match card background for border effect */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 4px solid var(--card-bg);
  /* Thicker border matching background */
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.edit-profile-pic {
  position: absolute;
  bottom: 5px;
  right: 5px;
  /* Better positioning */
  left: auto;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.edit-profile-pic:hover {
  transform: scale(1.1);
}

.edit-profile-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.header-stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.h-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.h-stat:hover {
  background: rgba(255, 255, 255, 0.05);
}

.h-stat i {
  color: var(--primary);
  font-size: 1rem;
  opacity: 0.9;
}

.h-stat span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.h-stat small {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 2px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.profile-actions .action-btn {
  margin: 0;
}

.profile-details {
  flex: 1;
}

.profile-name {
  color: var(--primary);
  margin-bottom: 10px;
}

.profile-bio {
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 20px;
}

.profile-stats {
  display: flex;
  gap: 30px;
  align-items: stretch;
  margin: 20px 0;
}

.stat-item {
  background: var(--card-bg);
  padding: 10px 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.8;
  color: var(--text);
}

.rate-this-user-btn {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
}

.rate-this-user-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat span {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9rem;
}

.skills-mini-section {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-self: center;
  /* Prevent stretching to full container height */
  padding-right: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.skills-grid.mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  /* Prevent tags from stretching vertically */
  max-width: 400px;
}

.skills-grid.mini .skill-tag {
  background: rgba(255, 107, 107, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 107, 107, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: normal;
  white-space: nowrap;
  height: fit-content;
  /* Ensure height is based on content */
}

.skills-grid.mini .empty-state.small {
  padding: 0;
  color: var(--text);
  opacity: 0.5;
  font-size: 0.85rem;
}

.profile-sections {
  display: grid;
  grid-template-columns: 1fr;
  /* Single column since we removed the sidebar blocks */
  gap: 20px;
}

.profile-section-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.profile-section-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-section p {
  color: var(--text);
  opacity: 0.8;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: white;
}

.stat-card h3 {
  color: var(--text);
  margin-bottom: 5px;
  font-size: 1.5rem;
}

.stat-card p {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9rem;
}

/* النماذج */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  /* تفتيح التظليل للسماح بمرور الضوء */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2100;
}

.modal-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border-radius: 30px;
  padding: 35px;
  max-width: 550px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 15px;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  resize: vertical;
  min-height: 120px;
}

.media-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-option {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: right;
}

.media-option:hover {
  background: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.save-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn:hover {
  background: #ff8e8e;
  transform: translateY(-2px);
}


/* تحسينات رسائل التأكيد */
.confirm-modal {
  text-align: center !important;
  max-width: 400px !important;
}

.confirm-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  color: var(--warning);
  animation: bounce 1s infinite;
}

.confirm-icon.danger {
  color: var(--error);
}

.confirm-modal h3 {
  justify-content: center !important;
  font-size: 1.6rem !important;
  margin-bottom: 10px !important;
}

.confirm-modal p {
  color: var(--text);
  opacity: 0.9;
  margin-bottom: 25px !important;
  font-size: 1.1rem;
}

.confirm-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  font-family: 'Cairo', sans-serif;
}

.confirm-btn.danger {
  background: linear-gradient(135deg, var(--error) 0%, #ff6b6b 100%);
}

.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* تحسينات للاستجابة */
@media (max-width: 768px) {
  .top-navbar {
    padding: 0 1rem;
  }

  .nav-brand h1 {
    font-size: 1.2rem;
  }

  .nav-search {
    display: none;
  }

  .main-content {
    padding: 15px;
    margin-top: 70px;
  }

  .publish-cards {
    flex-direction: column;
    align-items: center;
  }

  .publish-card {
    min-width: 100%;
  }

  .sidebar {
    width: 100%;
  }

  .sidebar.active~.main-content {
    margin-right: 0;
  }

  .profile-info {
    flex-direction: column;
    text-align: center;
    align-items: center;
    /* Center align on mobile */
    padding-top: 0;
  }

  .profile-avatar {
    margin-top: -60px;
    /* consistent pull-up on mobile */
  }

  .profile-stats {
    justify-content: center;
    margin-top: 15px;
  }

  .profile-actions {
    justify-content: center;
    margin-top: 15px;
  }

  .chat-window {
    width: 95%;
    height: 400px;
    bottom: 70px;
  }

  .direct-chat-window {
    width: 95%;
    height: 400px;
    right: 2.5%;
    bottom: 70px;
  }



  /* تحسينات للاستجابة للإشعارات */
  .notifications-dropdown {
    width: 300px;
    left: -100px;
  }
}

@media (max-width: 480px) {
  .chat-toggle-center {
    bottom: 15px;
    width: 60px;
    height: 60px;
  }

  .auth-container {
    margin: 10px;
    padding: 20px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .content-filters {
    justify-content: center;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 20px;
  }

  .direct-chat-window {
    width: 100%;
    height: 100%;
    right: 0;
    bottom: 0;
    border-radius: 0;
  }

  .profile-stats {
    flex-wrap: wrap;
    gap: 15px;
  }

  .stat {
    flex: 1;
    min-width: 80px;
  }

  /* تحسينات للاستجابة للإشعارات */
  .notifications-dropdown {
    width: 280px;
    left: -140px;
  }

  .notifications-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .notifications-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* أنماط إضافية للتقييم والمشاركة */
.rating-modal {
  text-align: center;
}

.rating-stars-large {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  direction: ltr;
}

.rating-stars-large .star {
  font-size: 2.5rem;
  color: #7c3aed;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rating-stars-large .star:hover {
  transform: scale(1.2);
}

.rating-stars-large .star.empty {
  color: #ccc;
}

.share-modal {
  max-width: 400px;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.share-option:hover {
  background: var(--primary);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.share-option i {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.share-link {
  display: flex;
  margin: 15px 0;
}

.share-url {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px 0 0 8px;
  padding: 10px;
  color: var(--text);
  font-size: 0.9rem;
}

.copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: #ff8e8e;
}

.like-btn.liked {
  color: var(--error);
}

.like-btn.liked i {
  color: var(--error);
}

.favorite-btn.favorited {
  color: var(--warning);
}

.favorite-btn.favorited i {
  color: var(--warning);
}

body.light-mode .share-option {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
}

body.light-mode .share-url {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .form-hint {
  background: rgba(255, 107, 107, 0.1);
  color: #2d3748;
}

/* أنماط التعليقات والدردشة */
.comments-section {
  max-height: 400px;
  overflow-y: auto;
}

.comment-item {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.comment-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author strong {
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
}

.comment-author strong:hover {
  color: #ff8e8e;
}

.comment-author span {
  font-size: 0.8rem;
  opacity: 0.7;
}

.comment-text {
  color: var(--text);
  line-height: 1.5;
  font-size: 0.95rem;
}

.add-comment {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

/* ===== الأنماط الجديدة للميزات المضافة ===== */

/* أنماط إدارة الدردشات */
.chat-management-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.management-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.management-option:hover {
  background: var(--primary);
  transform: translateX(-5px);
}

.management-option i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

body.light-mode .management-option {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .management-option:hover {
  background: var(--primary);
  color: white;
}

/* أنماط الرد على الرسائل */
.reply-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 107, 107, 0.1);
  border-right: 3px solid var(--primary);
  margin-bottom: 10px;
  border-radius: 8px;
}

.reply-info {
  flex: 1;
}

.reply-info strong {
  color: var(--primary);
  margin-left: 5px;
}

.cancel-reply-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.cancel-reply-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.reply-original {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-right: 3px solid var(--primary);
}

body.light-mode .reply-bar-container {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .reply-original {
  background: rgba(0, 0, 0, 0.05);
}

/* أنماط الصور في الدردشة */
.message-image {
  max-width: 100%;
  margin-bottom: 5px;
}

.message-image img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.message-image img:hover {
  transform: scale(1.02);
  border-color: var(--primary);
}

.image-caption {
  margin-top: 5px;
  font-size: 0.9rem;
  opacity: 0.8;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
}

/* نموذج معاينة الصورة */
.image-modal {
  max-width: 90%;
  max-height: 90%;
}

.image-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-modal-body {
  text-align: center;
  margin: 20px 0;
}

.image-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* أنماط الدردشات المثبتة والمكتومة */
.chat-item.pinned {
  border-right: 3px solid var(--primary);
  background: rgba(255, 107, 107, 0.05);
}

.chat-item.muted {
  opacity: 0.6;
}

.chat-pin-indicator {
  color: var(--primary);
  margin-left: 10px;
  font-size: 0.8rem;
}

.chat-mute-indicator {
  color: var(--warning);
  margin-left: 5px;
  font-size: 0.8rem;
}

/* تحسينات شريط إدخال الدردشة */
.chat-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-container .form-input {
  flex: 1;
  margin: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 12px 20px;
}

.chat-input-container .chat-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.chat-input-container .chat-action-btn:hover {
  background: var(--primary);
  color: white;
}

/* تحسينات حالة الرسائل */
.chat-message-status {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.chat-message.own .chat-message-status {
  text-align: right;
  justify-content: flex-end;
}

/* أنماط القوائم المنبثقة */
.context-menu {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 200px;
  padding: 8px 0;
  display: none;
  backdrop-filter: blur(10px);
}

.context-menu-item {
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.context-menu-item:hover {
  background: rgba(255, 107, 107, 0.1);
}

.context-menu-item i {
  width: 20px;
  text-align: center;
}

/* زر قائمة السياق للمنشورات */
.post-context-menu-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 14px;
  font-weight: bold;
}

.content-card:hover .post-context-menu-btn {
  opacity: 1;
}

/* تحسينات للرسائل العائمة */
@keyframes slideIn {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  to {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
}

/* تحسينات إضافية للاستجابة */
@media (max-width: 768px) {
  .theme-options {
    flex-direction: column;
    align-items: center;
  }

  .theme-option {
    width: 100%;
    max-width: 200px;
  }

  .account-actions {
    flex-direction: column;
  }

  .chat-detail-modal {
    width: 95%;
    height: 80vh;
  }

  .share-options {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .management-option {
    padding: 12px;
  }

  .reply-bar-container {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 10px;
    padding: 15px;
  }

  .comments-section {
    max-height: 300px;
  }

  .image-modal {
    max-width: 95%;
  }

  .chat-input-container {
    gap: 5px;
  }

  .chat-input-container .chat-action-btn {
    padding: 8px 10px;
  }
}

/* تحسينات للأيقونات */
.fas,
.far {
  transition: all 0.3s ease;
}

.action-btn:hover .fas,
.action-btn:hover .far {
  transform: scale(1.1);
}

/* تحسينات للظلال والتأثيرات */
.content-card,
.publish-card,
.setting-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-mode .content-card,
body.light-mode .publish-card,
body.light-mode .setting-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* تحسينات للخطوط */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
}

p {
  line-height: 1.6;
}

/* تحسينات للأزرار */
button {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
}

/* تحسينات للعناوين */
.section-header h2 {
  font-size: 1.8rem;
}

.profile-name {
  font-size: 1.5rem;
}

.content-body h3 {
  font-size: 1.3rem;
}

/* تحسينات للشريط الجانبي */
.sidebar-item {
  font-weight: 600;
}

/* تحسينات للبحث */
.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

body.light-mode .search-box input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

/* تحسينات للصور */
img {
  max-width: 100%;
  height: auto;
}

/* تحسينات للروابط */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ff8e8e;
}

/* تحسينات للقوائم */
ul,
ol {
  padding-right: 20px;
}

/* تحسينات للأشكال */
input,
textarea,
select {
  font-family: 'Cairo', sans-serif;
}

/* تحسينات للتفاعلات */
* {
  -webkit-tap-highlight-color: transparent;
}

/* تحسينات للأداء */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* تحسينات إضافية للدردشة */
.chat-typing-indicator {
  padding: 5px 15px;
  font-size: 0.8rem;
  opacity: 0.7;
  font-style: italic;
}

/* تحسينات للوضع النهاري */
body.light-mode .comment-item {
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .add-comment {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .chat-messages {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .setting-option {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .setting-option:hover {
  background: rgba(0, 0, 0, 0.1);
}

body.light-mode .theme-option {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .message-item:hover,
body.light-mode .notification-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .notification-item.unread {
  background: rgba(255, 107, 107, 0.15);
}

body.light-mode .form-textarea {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .media-option {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .cancel-btn {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .action-btn {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .empty-state {
  color: #4a5568;
}

body.light-mode .chat-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .chat-message.other {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
}

body.light-mode .direct-chat-messages {
  background: rgba(0, 0, 0, 0.02);
}

/* أنماط إضافية للبروفايلات العامة */
.profile-actions .action-btn {
  background: var(--primary);
  color: white;
  border: none;
}

.profile-actions .action-btn:hover {
  background: #ff8e8e;
}

.follow-btn {
  background: var(--accent) !important;
}

.follow-btn:hover {
  background: #3db8af !important;
}

.unfollow-btn {
  background: var(--error) !important;
}

.unfollow-btn:hover {
  background: #ff3742 !important;
}

/* تحسينات للتفاعلات */
.clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable:hover {
  transform: translateY(-2px);
}

.user-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
}

.user-avatar:hover {
  border-color: #ff8e8e;
  transform: scale(1.05);
}

/* أنماط التنقل بين الصفحات */
.navigation-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px 15px;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb-item {
  color: var(--text);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.3s ease;
}

.breadcrumb-item:hover {
  opacity: 1;
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--text);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--primary);
  opacity: 1;
  font-weight: 600;
}

/* تحسينات نهائية للدردشة المحسنة */
.chat-context-menu,
.message-context-menu {
  min-width: 180px;
}

.message-image-container {
  position: relative;
  display: inline-block;
}

.message-image-actions {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message-image-container:hover .message-image-actions {
  opacity: 1;
}

/* أنماط التسجيل الصوتي */
.audio-record-container {
  text-align: center;
  padding: 20px 0;
}

.audio-visualizer {
  width: 100%;
  height: 100px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.audio-timer {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 20px;
}

.audio-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.recording .audio-visualizer {
  animation: pulse 1s infinite;
  background: rgba(255, 107, 107, 0.2);
}

@keyframes pulse {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

/* أنماط الرسائل الصوتية */
.audio-message {
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 5px 0;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-play-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.audio-play-btn:hover {
  background: #ff8e8e;
  transform: scale(1.1);
}

.audio-progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.audio-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s ease;
}

.audio-duration {
  font-size: 0.8rem;
  opacity: 0.7;
  min-width: 40px;
}

/* تحسينات للوضع النهاري للرسائل الصوتية */
body.light-mode .audio-message {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .audio-visualizer {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .audio-progress {
  background: rgba(0, 0, 0, 0.1);
}

/* تحسينات الوصول والإمكانية */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* تحسينات التمرير */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff8e8e;
}

/* تحسينات التركيز للوصول */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* تحسينات الطباعة */
@media print {

  .top-navbar,
  .sidebar,
  .chat-window,
  .direct-chat-window,
  .chat-toggle-center {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 20px !important;
  }

  .content-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* أنماط الردود والتفاعلات */
.reply-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 107, 107, 0.1);
  border-right: 3px solid var(--primary);
  margin-bottom: 10px;
  border-radius: 8px;
}

.reply-info {
  flex: 1;
  font-size: 0.9rem;
}

.reply-info strong {
  color: var(--primary);
  margin-left: 5px;
}

.cancel-reply-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.cancel-reply-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.message-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 5px;
  border-right: 2px solid var(--primary);
}

.message-reply i {
  color: var(--primary);
  font-size: 0.8rem;
}

.reply-preview {
  flex: 1;
  font-size: 0.8rem;
  opacity: 0.8;
}

.chat-message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.chat-message-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-message:hover .chat-message-actions {
  opacity: 1;
}

.message-action-btn,
.message-reaction-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text);
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.message-action-btn:hover,
.message-reaction-btn:hover {
  background: var(--primary);
  color: white;
}

/* أنماط مشاركة الرسائل */
.share-message-preview {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  border-right: 3px solid var(--primary);
}

.message-preview {
  font-size: 0.9rem;
}

.message-preview strong {
  color: var(--primary);
}

.chat-selection {
  margin: 15px 0;
  max-height: 200px;
  overflow-y: auto;
}

.chat-list-share {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-item-share {
  display: flex;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-item-share:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

/* أنماط القائمة المنبثقة للرسائل */
.message-context-menu {
  min-width: 180px;
}

.message-context-menu .context-menu-item {
  padding: 10px 15px;
  font-size: 0.9rem;
}

/* أنماط التفاعلات والايموجي */
.reaction-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 100;
  display: none;
}

.reactions-grid {
  display: flex;
  gap: 5px;
}

.reaction-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

.message-reactions {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.reaction-bubble {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 15px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.reaction-bubble.user-reacted {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--primary);
}

.reaction-count {
  font-size: 0.7rem;
  opacity: 0.8;
}

.chat-message {
  position: relative;
}

.chat-message .reaction-picker {
  bottom: -10px;
  left: 0;
}

.chat-message.own .reaction-picker {
  left: auto;
  right: 0;
}

/* تحسينات للوضع النهاري */
body.light-mode .reaction-picker {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .reaction-bubble {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .reaction-bubble.user-reacted {
  background: rgba(255, 107, 107, 0.1);
}

/* أنماط الردود */
.reply-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 107, 107, 0.1);
  border-right: 3px solid var(--primary);
  margin-bottom: 10px;
  border-radius: 8px;
}

.reply-info {
  flex: 1;
  font-size: 0.9rem;
}

.reply-info strong {
  color: var(--primary);
  margin-left: 5px;
}

.cancel-reply-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.cancel-reply-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.message-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 5px;
  border-right: 2px solid var(--primary);
}

.message-reply i {
  color: var(--primary);
  font-size: 0.8rem;
}

.reply-preview {
  flex: 1;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* أنماط مشاركة الرسائل */
.share-message-preview {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  border-right: 3px solid var(--primary);
}

.message-preview {
  font-size: 0.9rem;
}

.message-preview strong {
  color: var(--primary);
}

.chat-selection {
  margin: 15px 0;
  max-height: 200px;
  overflow-y: auto;
}

.chat-list-share {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-item-share {
  display: flex;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-item-share:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

/* أنماط التفاعلات والايموجي */
.reaction-picker {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.reactions-grid {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.reaction-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

.message-reactions {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.reaction-bubble {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.reaction-bubble:hover {
  background: rgba(255, 255, 255, 0.15);
}

.reaction-bubble.user-reacted {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--primary);
}

.reaction-count {
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: bold;
}

.chat-message {
  position: relative;
}

.chat-message .reaction-picker {
  position: fixed;
  z-index: 1000;
}

/* تحسينات للوضع النهاري */
body.light-mode .reaction-picker {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .reaction-bubble {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .reaction-bubble.user-reacted {
  background: rgba(255, 107, 107, 0.1);
}

/* تحسينات للأزرار */
.message-action-btn,
.message-reaction-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text);
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.message-action-btn:hover,
.message-reaction-btn:hover {
  background: var(--primary);
  color: white;
}

.chat-message-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-message:hover .chat-message-actions {
  opacity: 1;
}

.comment-reply {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  border-right: 2px solid var(--primary);
  margin-left: 20px;
}

.reply-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.reply-author strong {
  color: var(--accent);
  cursor: pointer;
}

.reply-text {
  color: var(--text);
  opacity: 0.9;
  font-size: 0.95rem;
}

.comment-actions {
  margin-top: 8px;
}

.reply-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.reply-btn:hover {
  background: var(--primary);
}

.reply-input-box {
  margin-top: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.reply-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 8px;
  border-radius: 6px;
  resize: vertical;
  min-height: 40px;
}

body.light-mode .comment-reply {
  background: rgba(0, 0, 0, 0.03);
}

body.light-mode .reply-textarea {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
}

.mark-read-btn {
  background: none;
  border: none;
  color: var(--text);
  opacity: 0.6;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 4px;
}

.mark-read-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.mark-as-read-btn {
  background: none;
  border: none;
  color: var(--text);
  opacity: 0.6;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.mark-as-read-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* تحسينات الإشعارات */
.notification-dropdown-item {
  transition: all 0.3s ease;
}

.notification-dropdown-item:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

.unread {
  background: rgba(255, 107, 107, 0.05);
  border-right: 3px solid var(--primary);
}

.notification-dropdown-item {
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-dropdown-item:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

.notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.05);
  border-right: 3px solid var(--primary);
}

.notification-dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.notification-dropdown-content {
  flex: 1;
  min-width: 0;
}

.notification-dropdown-text {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 5px;
}

.notification-dropdown-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.mark-as-read-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mark-as-read-btn:hover {
  background: var(--primary);
  color: white;
}

/* للوضع النهاري */
body.light-mode .notification-dropdown-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .notification-dropdown-item:hover {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.05);
}

body.light-mode .notification-dropdown-time {
  color: rgba(0, 0, 0, 0.6);
}

/* أنماط الإشعارات المحسنة */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.notification-dropdown-item {
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-dropdown-item:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

.notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.05);
  border-right: 3px solid var(--primary);
}

.notification-dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.notification-dropdown-content {
  flex: 1;
  min-width: 0;
}

.notification-dropdown-text {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 5px;
}

.notification-dropdown-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.mark-as-read-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mark-as-read-btn:hover {
  background: var(--primary);
  color: white;
}

.notification-item {
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.notification-item:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

.notification-item.unread {
  background: rgba(255, 107, 107, 0.05);
  border-right: 3px solid var(--primary);
}

.notification-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 5px;
}

.notification-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* للوضع النهاري */
body.light-mode .notification-dropdown-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .notification-dropdown-item:hover {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.05);
}

body.light-mode .notification-dropdown-time {
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .notification-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .notification-item:hover {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .notification-item.unread {
  background: rgba(255, 107, 107, 0.05);
}

body.light-mode .notification-time {
  color: rgba(0, 0, 0, 0.6);
}

@keyframes highlight {
  0% {
    background-color: rgba(255, 107, 107, 0.3);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }

  50% {
    background-color: rgba(255, 107, 107, 0.1);
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }

  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

.highlight {
  animation: highlight 2s ease;
}

/* إصلاحات للواجهة */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* إصلاحات للاستجابة */
@media (max-width: 768px) {
  .publish-cards {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* إصلاحات للدردشة */
.direct-chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 15px;
}

.chat-message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 10px;
  max-width: 80%;
}

.chat-message.own {
  margin-left: auto;
  background: var(--primary);
  color: white;
}

.chat-message.other {
  margin-right: auto;
  background: var(--card-bg);
}

/* أنماط أزرار الإشعارات */
.notification-dropdown-actions,
.notification-actions {
  display: flex;
  gap: 5px;
  margin-right: 10px;
}

.mark-as-read-btn,
.delete-notification-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.mark-as-read-btn:hover {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  opacity: 1;
  transform: scale(1.1);
}

.delete-notification-btn:hover {
  background: rgba(244, 67, 54, 0.2);
  color: #F44336;
  opacity: 1;
  transform: scale(1.1);
}

.mark-as-read-btn i,
.delete-notification-btn i {
  font-size: 0.8rem;
}

/* تحسينات للعرض في القائمة المنسدلة */
.notification-dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.3s ease;
  position: relative;
}

.notification-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.1);
  border-right: 3px solid var(--primary);
}

.notification-dropdown-icon {
  margin-left: 12px;
  color: var(--primary);
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.notification-dropdown-content {
  flex: 1;
  min-width: 0;
  /* يمنع تجاوز النص للحاوية */
}

.notification-dropdown-text {
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.4;
  word-wrap: break-word;
}

.notification-dropdown-time {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* تحسينات للعرض في صفحة الإشعارات */
.notification-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification-item.unread {
  background: rgba(255, 107, 107, 0.15);
  border-right: 4px solid var(--primary);
}

.notification-icon {
  margin-left: 15px;
  color: var(--primary);
  font-size: 1.2rem;
  width: 30px;
  text-align: center;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  font-size: 1rem;
  margin-bottom: 5px;
  line-height: 1.4;
  word-wrap: break-word;
}

.notification-time {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* تحسينات للوضع النهاري */
body.light-mode .notification-item {
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .notification-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.light-mode .notification-item.unread {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .notification-dropdown-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .notification-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .notification-dropdown-item.unread {
  background: rgba(255, 107, 107, 0.08);
}

/* تحسينات للاستجابة على الأجهزة المحمولة */
@media (max-width: 768px) {

  .notification-dropdown-actions,
  .notification-actions {
    margin-right: 5px;
    gap: 3px;
  }

  .mark-as-read-btn,
  .delete-notification-btn {
    width: 28px;
    height: 28px;
  }

  .notification-item {
    padding: 12px;
    margin-bottom: 6px;
  }

  .notification-dropdown-item {
    padding: 10px 12px;
  }

  .notification-text {
    font-size: 0.9rem;
  }

  .notification-dropdown-text {
    font-size: 0.85rem;
  }
}

/* تأثيرات للتفاعل */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

.notification-item.deleting {
  animation: fadeOut 0.3s ease forwards;
}

/* أنماط رأس الإشعارات */
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.notifications-header h4 {
  margin: 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.notifications-header-actions {
  display: flex;
  gap: 8px;
}

.refresh-notifications-btn,
.mark-all-read-btn {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
  color: var(--text);
}

.refresh-notifications-btn:hover {
  background: rgba(33, 150, 243, 0.2);
  color: #2196F3;
  opacity: 1;
  transform: scale(1.1);
}

.mark-all-read-btn:hover {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  opacity: 1;
  transform: scale(1.1);
}

.refresh-notifications-btn.rotating {
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* تحسينات للوضع النهاري */
body.light-mode .notifications-header {
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .refresh-notifications-btn,
body.light-mode .mark-all-read-btn {
  color: #333;
}


/* إصلاح تحذير القواعد */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  /* تأكد من أن جميع القواعد تحتوي على محددات صحيحة */
  .sidebar.active {
    transform: translateX(0);
  }
}

/* تحسين أداء التحميل */
img {
  max-width: 100%;
  height: auto;
}

/* ===== أنماط إدارة الحسابات ===== */
.switch-account-modal {
  max-width: 500px;
  width: 90%;
  padding: 25px;
}

.switch-account-modal h3 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.accounts-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 5px;
}

.account-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.account-item:hover {
  background: rgba(255, 107, 107, 0.15);
  transform: translateX(-5px);
}

.account-item.current {
  border: 2px solid var(--primary);
  background: rgba(255, 107, 107, 0.1);
}

.account-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-size: 1.2rem;
  margin-left: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-info {
  flex: 1;
  min-width: 0;
  margin-right: 15px;
}

.account-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-email {
  font-size: 0.85rem;
  opacity: 0.7;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.account-meta span {
  background: rgba(255, 107, 107, 0.2);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.current-badge {
  background: rgba(76, 175, 80, 0.2) !important;
  color: #4CAF50 !important;
}

.last-login-badge {
  background: rgba(255, 165, 0, 0.2) !important;
  color: #ffa502 !important;
}

.account-actions {
  display: flex;
  align-items: center;
}

.remove-account-btn {
  background: rgba(244, 67, 54, 0.2);
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.remove-account-btn:hover {
  background: var(--error);
  color: white;
  transform: scale(1.1);
}

.account-actions-footer {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.account-actions-footer .action-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.empty-accounts {
  text-align: center;
  padding: 30px 10px;
  color: var(--text);
  opacity: 0.7;
}

.empty-accounts i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-accounts small {
  font-size: 0.85rem;
  opacity: 0.6;
  display: block;
  margin-top: 8px;
}

/* دعم الوضع النهاري */
body.light-mode .account-item {
  background: rgba(0, 0, 0, 0.03);
  color: #2d3748;
}

body.light-mode .account-item:hover {
  background: rgba(255, 107, 107, 0.1);
}

body.light-mode .account-name,
body.light-mode .account-email {
  color: #2d3748;
}

body.light-mode .remove-account-btn {
  color: #2d3748;
}

body.light-mode .remove-account-btn:hover {
  color: white;
}

body.light-mode .empty-accounts {
  color: #4a5568;
}

body.light-mode .account-meta span {
  color: #2d3748;
}

body.light-mode .switch-account-modal {
  background: white;
}

body.light-mode .account-item.current {
  border-color: var(--primary);
  background: rgba(255, 107, 107, 0.08);
}

/* تحسينات الاستجابة */
@media (max-width: 576px) {
  .accounts-list {
    max-height: 300px;
  }

  .account-actions-footer {
    flex-direction: column;
  }

  .account-actions-footer .action-btn {
    width: 100%;
  }
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-left: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

body.light-mode .checkbox-label {
  color: #2d3748;
}

.skills-input-container {
  display: flex;
  gap: 10px;
}

.skills-input-container .form-input {
  flex: 1;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.skill-tag {
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.skill-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: bold;
  padding: 0;
}

.skill-tag button:hover {
  color: #ffcccc;
}

.skills-input-container {
  display: flex;
  gap: 10px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.skill-tag {
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.skill-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.stat-item {
  text-align: center;
  padding: 10px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.8;
}

/* 🔥 أنماط تقييم المستخدم */

.user-rating-widget.own-profile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-value-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.rating-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #7c3aed;
}

.user-rating-widget.own-profile .rating-number {
  color: var(--primary);
}

.rating-text {
  font-size: 0.8rem;
  opacity: 0.8;
}

.rating-stars-container {
  display: flex;
  gap: 2px;
  direction: ltr;
}

.user-rating-star,
.static-rating-star {
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ddd;
}

.user-rating-star.filled,
.static-rating-star.filled {
  color: #7c3aed;
}

.user-rating-star.user-rated {
  color: #7c3aed;
  transform: scale(1.1);
}

.user-rating-star.hover {
  color: #7c3aed;
  transform: scale(1.2);
}

.user-rating-star:hover {
  color: #7c3aed;
  transform: scale(1.1);
}

.rating-action {
  margin-top: 5px;
}

.rate-user-btn {
  background: #7c3aed;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rate-user-btn:hover {
  background: #7B1FA2;
  transform: translateY(-2px);
}

/* 🔥 أنماط نافذة التقييم */
.rating-modal {
  max-width: 400px;
}

.rating-instruction {
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

.user-rating-stars-large {
  display: flex;
  justify-content: center;
  gap: 8px;
  direction: ltr;
  margin: 20px 0;
}

.rating-star-large {
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #ddd;
}

.rating-star-large:hover {
  color: #7c3aed;
  transform: scale(1.2);
}

.rating-star-large.user-rated {
  color: #7c3aed;
  transform: scale(1.1);
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8rem;
  opacity: 0.7;
  direction: ltr;
}

.current-rating-info {
  text-align: center;
  margin: 15px 0;
  padding: 10px;
  background: rgba(138, 43, 226, 0.1);
  border-radius: 8px;
}

/* 🔥 تحسينات للوضع النهاري */
body.light-mode .user-rating-widget {
  background: rgba(138, 43, 226, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.1);
}

body.light-mode .user-rating-widget.own-profile {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .current-rating-info {
  background: rgba(138, 43, 226, 0.05);
}

/* أنماط التقييم */
.stat-item {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 120px;
}

.stat-item .stat-value {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rating-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  display: block;
}

.rating-stars {
  color: #7c3aed;
  font-size: 1.2rem;
  margin: 5px 0;
}

.rating-count {
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.7;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.8;
  margin-top: 5px;
}

/* ===== أنماط عرض التقييم في البطاقات ===== */
.rating-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  direction: ltr;
  unicode-bidi: bidi-override;
}

.rating-stars {
  display: flex;
  gap: 2px;
  color: #7c3aed;
  font-size: 1.1rem;
}

.rating-value {
  font-weight: bold;
  color: var(--primary);
  font-size: 0.95rem;
}

.rating-count {
  color: var(--text);
  opacity: 0.7;
  font-size: 0.85rem;
}

.no-rating {
  color: var(--text);
  opacity: 0.6;
  font-size: 0.8rem;
  text-align: center;
  margin: 10px 0;
}

/* للوضع النهاري */
body.light-mode .rating-display {
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
}

body.light-mode .rating-value {
  color: var(--primary);
}

body.light-mode .rating-count {
  color: #4a5568;
}

body.light-mode .no-rating {
  color: #4a5568;
}

/* ===== أنماط صندوق البحث المُحدّث ===== */

/* تعيين أنماط العنصر `form` */
.nav-search form {
  position: relative;
  width: 100%;
  max-width: 17em;
  /* يمكنك تعديل هذا حسب الحاجة */
  margin: auto;
  /* محاذاة في المنتصف */
  display: flex;
  /* استخدام flexbox */
  align-items: center;
  /* محاذاة عمودية */
  height: 100%;
  /* ملء الارتفاع */
}

/* تعيين أنماط العنصر `input` */
.nav-search input {
  background: var(--search-input-bg);
  border: 2px solid var(--search-input-border);
  border-radius: 50%;
  box-sizing: border-box;
  color: var(--search-fg);
  caret-color: var(--search-primary);
  width: 3.5em;
  /* زيادة العرض قليلاً لتناسب الأيقونة */
  height: 3.5em;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all calc(var(--search-dur) * 0.5) cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  font-size: inherit;
  cursor: pointer;
  text-align: center;
}

.search-icon-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--search-primary);
  font-size: 1.2rem;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 5;
}

/* تغييرات عند التركيز أو وجود محتوى */
.nav-search input:focus,
.nav-search input:valid {
  background: var(--search-input-bg);
  border: 2px solid var(--search-primary);
  border-radius: 30px;
  /* شكل كبسولة */
  padding: 0 45px 0 20px;
  transition-duration: calc(var(--search-dur) * 0.4);
  width: 300px;
  /* عرض ثابت عند التمدد */
  height: 3.5em;
  text-align: right;
  cursor: text;
}

.nav-search input:focus~.search-icon-overlay,
.nav-search input:valid~.search-icon-overlay {
  left: 25px;
  transform: translateY(-50%);
  opacity: 0.8;
}

/* إزالة زر البحث الأصلي إذا كان موجودًا */
.nav-search .search-btn {
  display: none;
}

/* تعيين أنماط العنصر `caret` المخصص (إخفاؤه لصالح الأيقونة الحقيقية) */
.nav-search .caret {
  display: none;
}

/* تعيين أنماط العنصر `caret` */
.nav-search .caret {
  position: absolute;
  /* موضع مطلق داخل النموذج */
  background: var(--search-primary);
  /* استخدام اللون الأساسي */
  border-radius: 0 0 0.125em 0.125em;
  /* تدوير الزوايا */
  width: 0.25em;
  height: 1em;
  transform: translate(0, -1em) rotate(-45deg) translate(0, 0.875em);
  transform-origin: 50% 0;
  pointer-events: none;
  /* تجاهل تأثيرات الماوس */
  transition: all calc(var(--search-dur) * 0.5) linear;
  z-index: 10;
  /* لجعله ظاهرًا */
}

/* تغييرات caret عند التركيز أو وجود محتوى */
.nav-search input:focus+.caret,
.nav-search input:valid+.caret {
  animation: handleToCaret var(--search-dur) linear;
  background: transparent;
  width: 1px;
  height: 1.5em;
  transform: translate(0, -1em) rotate(-180deg) translate(7.5em, -0.25em);
  /* 7.5em تقريبي، قد تحتاج تعديل */
}

/* تعديل الـ placeholder */
.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  /* لون الـ placeholder */
  opacity: 1;
  /* لضمان رؤيته */
}

body.light-mode .nav-search input::placeholder {
  color: rgba(0, 0, 0, 0.5);
  /* لون الـ placeholder في الوضع النهاري */
}

/* إخفاء العلامة */
.nav-search label {
  color: transparent;
  /* جعل النص شفاف */
  overflow: hidden;
  position: absolute;
  width: 0;
  height: 0;
}

/* الأنماط للتحوّل */
@keyframes showCaret {
  from {
    caret-color: transparent;
  }

  to {
    caret-color: var(--search-primary);
  }
}

@keyframes handleToCaret {
  from {
    background: var(--search-primary);
    width: 0.25em;
    height: 1em;
    transform: translate(0, -1em) rotate(-45deg) translate(0, 0.875em);
  }

  25% {
    background: var(--search-primary);
    width: 0.25em;
    height: 1em;
    transform: translate(0, -1em) rotate(-180deg) translate(0, 0.875em);
  }

  50%,
  62.5% {
    background: var(--search-primary);
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, 2.5em);
    /* تعديل حسب عرض الحقل */
  }

  75%,
  99% {
    background: var(--search-primary);
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, -0.25em);
    /* تعديل حسب عرض الحقل */
  }

  87.5% {
    background: var(--search-primary);
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, 0.125em);
    /* تعديل حسب عرض الحقل */
  }

  to {
    background: transparent;
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, -0.25em);
    /* تعديل حسب عرض الحقل */
  }
}

/* تعديلات للوضع النهاري */
body.light-mode .nav-search input {
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: #2d3748;
}

body.light-mode .nav-search input:focus,
body.light-mode .nav-search input:valid {
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid var(--search-primary);
}

/* ضمان عرض الحقل بشكل صحيح داخل الشريط العلوي */
.nav-search {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  /* أو حسب احتياجاتك */
}

/* تأكد من أن النموذج يملأ الحاوية */
.nav-search form {
  width: 100%;
  max-width: 400px;
  /* حدد عرضًا أقصى مثالي */
}

/* تعيين أنماط العنصر `input` */
.nav-search input {
  background: var(--search-input-bg);
  border: 2px solid var(--search-input-border);
  /* إضافة حدود */
  border-radius: 50%;
  /* شكل دائري افتراضي */
  box-sizing: border-box;
  /* تضمين الحدود في العرض */
  color: var(--search-fg);
  caret-color: var(--search-primary);
  /* لون مؤشر الكتابة */
  width: 2em;
  height: 2em;
  padding: 0;
  /* بدون مسافة داخلية */
  -webkit-appearance: none;
  /* إزالة الأنماط الافتراضية */
  -moz-appearance: none;
  appearance: none;
  transition: all calc(var(--search-dur) * 0.5) linear;
  outline: none;
  /* إزالة الحدود عند التركيز */
  font-size: inherit;
  /* استخدام حجم الخط نفسه */
}

/* تغييرات عند التركيز أو وجود محتوى */
.nav-search input:focus,
.nav-search input:valid {
  background: var(--search-input-bg);
  border: 2px solid var(--search-primary);
  /* تغيير لون الحدود عند التركيز */
  border-radius: 0.25em;
  /* شكل مستطيل عند التوسع */
  padding: 0.75em 1em;
  /* إضافة مسافة داخلية */
  transition-duration: calc(var(--search-dur) * 0.25);
  transition-delay: calc(var(--search-dur) * 0.25);
  width: 100%;
  /* يتمدد */
  height: 3em;
  /* ارتفاع أكبر */
}

.nav-search input:focus {
  animation: showCaret var(--search-dur) steps(1);
}

/* إزالة زر البحث الأصلي */
.nav-search .search-btn {
  display: none;
  /* إخفاء الزر الأصلي */
}

/* تعيين أنماط العنصر `caret` */
.nav-search .caret {
  position: absolute;
  /* موضع مطلق داخل النموذج */
  background: currentColor;
  /* استخدام لون النص الحالي */
  border-radius: 0 0 0.125em 0.125em;
  /* تدوير الزوايا */
  width: 0.25em;
  height: 1em;
  transform: translate(0, -1em) rotate(-45deg) translate(0, 0.875em);
  transform-origin: 50% 0;
  pointer-events: none;
  /* تجاهل تأثيرات الماوس */
  transition: all calc(var(--search-dur) * 0.5) linear;
  z-index: 10;
  /* لجعله ظاهرًا */
}

/* تغييرات caret عند التركيز أو وجود محتوى */
.nav-search input:focus+.caret,
.nav-search input:valid+.caret {
  animation: handleToCaret var(--search-dur) linear;
  background: transparent;
  width: 1px;
  height: 1.5em;
  transform: translate(0, -1em) rotate(-180deg) translate(7.5em, -0.25em)
    /* 7.5em تقريبي، قد تحتاج تعديل */
  ;
}

/* تعديل الـ placeholder */
.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  /* لون الـ placeholder */
  opacity: 1;
  /* لضمان رؤيته */
}

body.light-mode .nav-search input::placeholder {
  color: rgba(0, 0, 0, 0.5);
  /* لون الـ placeholder في الوضع النهاري */
}

/* إخفاء العلامة */
.nav-search label {
  color: transparent;
  /* جعل النص شفاف */
  overflow: hidden;
  position: absolute;
  width: 0;
  height: 0;
}

/* الأنماط للتحوّل */
@keyframes showCaret {
  from {
    caret-color: transparent;
  }

  to {
    caret-color: var(--search-primary);
  }
}

@keyframes handleToCaret {
  from {
    background: currentColor;
    width: 0.25em;
    height: 1em;
    transform: translate(0, -1em) rotate(-45deg) translate(0, 0.875em);
  }

  25% {
    background: currentColor;
    width: 0.25em;
    height: 1em;
    transform: translate(0, -1em) rotate(-180deg) translate(0, 0.875em);
  }

  50%,
  62.5% {
    background: var(--search-primary);
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, 2.5em);
    /* 7.5em تقريبي */
  }

  75%,
  99% {
    background: var(--search-primary);
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, -0.25em);
    /* 7.5em تقريبي */
  }

  87.5% {
    background: var(--search-primary);
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, 0.125em);
    /* 7.5em تقريبي */
  }

  to {
    background: transparent;
    width: 1px;
    height: 1.5em;
    transform: translate(0, -1em) rotate(-180deg) translate(7.5em, -0.25em);
    /* 7.5em تقريبي */
  }
}

/* تعديلات للوضع النهاري */
body.light-mode .nav-search input {
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: #2d3748;
}

body.light-mode .nav-search input:focus,
body.light-mode .nav-search input:valid {
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid var(--search-primary);
}

/* ضمان عرض الحقل بشكل صحيح داخل الشريط العلوي */
.nav-search {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  /* أو حسب احتياجاتك */
}

/* تأكد من أن النموذج يملأ الحاوية */
.nav-search form {
  width: 100%;
  max-width: 400px;
  /* حدد عرضًا أقصى مثالي */
}

/* تحسينات للإشعارات */
.notification-dropdown-item {
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.notification-dropdown-item:hover {
  background-color: rgba(255, 107, 107, 0.1);
}

.notification-dropdown-item.unread {
  background-color: rgba(255, 107, 107, 0.05);
  border-right: 3px solid var(--primary);
}

.notification-dropdown-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-dropdown-item:hover .notification-dropdown-actions {
  opacity: 1;
}

.mark-as-read-btn,
.delete-notification-btn {
  background: none;
  border: none;
  padding: 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.mark-as-read-btn:hover {
  background-color: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.delete-notification-btn:hover {
  background-color: rgba(244, 67, 54, 0.1);
  color: #F44336;
}

/* أضف هذا في نهاية ملف CSS */
#app {
  z-index: 1;
  position: relative;
}

.auth-page {
  z-index: 2000;
}

/* إصلاح الخطوط */
@font-face {
  font-family: 'Cairo';
  /* ... */
  /* القديم: src: url(fonts/cairo.woff2) ... */
  src: url(../fonts/cairo.woff2) format('woff2');
  /* ✅ الصحيح */
}

/* إصلاح الصور */
.logo {
  /* القديم: background-image: url(images/logo.png); */
  background-image: url(../images/logo.png);
  /* ✅ الصحيح */
}

/* === إصلاح توسيط مربع البحث === */
.top-navbar {
  /* position: relative; REMOVED to keep it fixed */
  justify-content: space-between;
}

.nav-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 100;
  width: auto;
}

/* تحسينات العرض على الموبايل */
@media (max-width: 768px) {
  .nav-search {
    position: static;
    transform: none;
    flex: 1;
    margin: 0 10px;
  }

  .nav-brand h1 {
    font-size: 1.2rem;
  }

  .top-navbar {
    gap: 10px;
  }
}

/* ===== ????? ???????? ??????? ===== */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 8px 15px;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

body.light-mode .skill-tag {
  color: white;
}

/* ===== ?? ?????? ?? ????????? (Blur Glassmorphism) ===== */
.post-control-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.post-control-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.content-card {
  position: relative;
}

/* ????? ??????? ???????? */
.context-menu {
  direction: rtl;
  text-align: right;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  padding: 10px !important;
}

.context-menu-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  border-radius: 5px;
}

.context-menu-item:hover {
  background: var(--bg-color);
}

.context-menu-item i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

.context-menu-item.delete-item {
  color: #ff6b6b;
}

.context-menu-item.delete-item i {
  color: #ff6b6b;
}

/* ===== النافذة المنبثقة المحسّنة للتحكم بالمنشور ===== */
.post-context-popup {
  position: fixed;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 380px;
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  overflow: hidden;
}

.post-context-popup.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.context-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.context-popup-header h4 {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.context-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.context-popup-body {
  padding: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.context-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 5px;
}

.context-menu-item:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-3px);
}

.menu-item-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.menu-item-content {
  flex: 1;
}

.menu-item-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.menu-item-desc {
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.3;
}

.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

.danger-item .menu-item-icon {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
}

.danger-item:hover {
  background: rgba(255, 107, 107, 0.15);
}

/* نافذة التأكيد للحذف */
.delete-confirmation {
  text-align: center;
  padding: 20px;
}

.confirm-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }
}

/* === Fix for Chat Bubble Visibility === */
body.chat-open #chatToggleCenter {
  display: none !important;
}

.delete-confirmation h3 {
  color: var(--text);
  margin-bottom: 10px;
}

.delete-confirmation p {
  color: var(--text);
  opacity: 0.8;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.cancel-confirm-btn,
.delete-confirm-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.cancel-confirm-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.cancel-confirm-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.delete-confirm-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* خيارات الخصوصية */
.privacy-option {
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.privacy-option:hover {
  background: rgba(255, 107, 107, 0.1);
  transform: translateX(-5px);
}

.privacy-option i {
  color: var(--primary);
}

/* تحسينات responsive للمحفظة والهيدر */
@media (max-width: 768px) {
  .wallet-btn {
    padding: 6px 12px !important;
    gap: 8px;
    background: rgba(255, 215, 0, 0.1) !important;
    border-radius: 12px !important;
    /* شكل أكثر استقامة على الموبايل */
  }

  .coin-wrapper {
    width: 20px;
    height: 20px;
  }

  .points-count {
    font-size: 0.85rem;
  }

  .wallet-container {
    margin-right: 2px;
  }

  .nav-action-btn:not(.wallet-btn) {
    width: 38px;
    height: 38px;
    padding: 0;
  }
}

/* تحسينات للوضع النهاري */
body.light-mode .post-context-popup {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}


body.light-mode .context-popup-body {
  background: #f5f5f5;
}

body.light-mode .context-menu-item:hover {
  background: rgba(255, 107, 107, 0.08);
}

body.light-mode .context-menu-divider {
  background: rgba(0, 0, 0, 0.1);
}

body.light-mode .privacy-option {
  background: white;
}

body.light-mode .privacy-option:hover {
  background: rgba(255, 107, 107, 0.08);
}

/* تأثيرات الانتقال السلسة */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تحسينات responsive */
@media (max-width: 768px) {
  .post-context-popup {
    min-width: 280px;
    max-width: 90vw;
  }

  .context-popup-header h4 {
    font-size: 0.9rem;
  }

  .menu-item-title {
    font-size: 0.85rem;
  }

  .menu-item-desc {
    font-size: 0.75rem;
  }
}

/* === قائمة التحكم بالتعليق (Comment Context Popup) === */
.comment-context-popup {
  position: absolute;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  width: 220px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.comment-context-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* تنسيق التعليق المثبت */
.comment-item.pinned-comment {
  border-right: 4px solid var(--primary) !important;
  background: rgba(255, 107, 107, 0.05) !important;
}

/* زر التحكم في التعليق */
.comment-more-btn {
  transition: all 0.2s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-more-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary) !important;
  opacity: 1 !important;
}

/* الوضع النهاري للقائمة المنبثقة للتعليقات */
body.light-mode .comment-context-popup {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

body.light-mode .comment-more-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* الوضع النهاري للنوافذ الكبيرة */
body.light-mode .modal-content,
body.light-mode .chat-window,
body.light-mode .direct-chat-window,
body.light-mode .notifications-dropdown {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .comment-item.pinned-comment {
  background: rgba(255, 107, 107, 0.03) !important;
}

/* الزر البنفسجي المميز */
.purple-btn {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.purple-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  filter: brightness(1.1);
}

.purple-btn i {
  font-size: 1.1rem;
}

/* Fix for empty stars in rating display */
.rating-stars .star.empty {
  color: rgba(255, 255, 255, 0.3) !important;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

body.light-mode .rating-stars .star.empty {
  color: rgba(0, 0, 0, 0.1) !important;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
}

/* Ensure filled stars in profile maintain purple color */
.rating-stars .star:not(.empty) {
  color: #7c3aed;
}

/* Premium Online Status Indicator - Pulsing Effect */
.online-status-dot,
.online-dot,
.user-online-dot {
  background-color: #4ade80 !important;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

/* Chat Layout Fixes */
.direct-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex !important;
  flex-direction: column;
}

/* Fix for chat bubble alignment */
.chat-message.own {
  align-self: flex-end;
}

.chat-message.other {
  align-self: flex-start;
}