* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
}

body {
  background: #f5f5f5;
  color: #333;
  direction: rtl;
  font-size: 16px;
  line-height: 1.5;
}

/* الحاوية الرئيسية */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* الهيدر */
header {
  background: #1a1a2e;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

header h2 {
  font-size: 1.5rem;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

header a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.3s;
}

header a:hover {
  opacity: 0.8;
}

/* الأزرار */
.btn {
  background: #e94560;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s, transform 0.1s;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  background: #c72a48;
}

.btn:active {
  transform: scale(0.98);
}

/* البطاقات */
.card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

.card h3, .card h4 {
  margin-bottom: 10px;
  color: #1a1a2e;
}

.card p {
  margin: 8px 0;
  color: #555;
}

/* شبكة الكتب (Grid) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* الصور داخل البطاقات */
.card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* الحقول والإدخالات */
input, select, textarea {
  width: 100%;
  padding: 12px;
  margin: 8px 0 16px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #e94560;
}

/* المودال */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* حالة الطلبات */
.status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
}

.status.pending {
  background: #ffeaa7;
  color: #b87c00;
}

.status.pending_review {
  background: #74b9ff;
  color: #fff;
}

.status.approved {
  background: #00b894;
  color: #fff;
}

.status.rejected {
  background: #d63031;
  color: #fff;
}

/* أزرار داخل البطاقات */
.card .btn {
  margin-top: 10px;
  margin-left: 10px;
}

/* تنسيق رسائل الخطأ والنجاح (اختياري) */
.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.alert.error {
  background: #ffebee;
  color: #c62828;
  border-right: 4px solid #c62828;
}
.alert.success {
  background: #e8f5e9;
  color: #2e7d32;
  border-right: 4px solid #2e7d32;
}

/* توافقية الشاشات الصغيرة */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 15px;
  }

  header {
    flex-direction: column;
    text-align: center;
  }

  header nav {
    justify-content: center;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 20px;
    max-width: 95%;
  }

  .card {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
    margin-bottom: 8px;
  }

  .card .btn {
    display: block;
    width: 100%;
    margin-left: 0;
  }

  header h2 {
    font-size: 1.3rem;
  }
}
/* زر الدعم العائم */
.support-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.support-btn {
  background-color: #25a36b;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s;
  font-size: 28px;
}

.support-btn:hover {
  transform: scale(1.05);
  background-color: #1d8a58;
}

.support-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  display: none;
  flex-direction: column;
  min-width: 160px;
  direction: rtl;
}

.support-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: background 0.2s;
  border-bottom: 1px solid #eee;
}

.support-menu a:last-child {
  border-bottom: none;
}

.support-menu a:hover {
  background: #f5f5f5;
}

.support-menu .telegram {
  color: #0088cc;
}
.support-menu .facebook {
  color: #1877f2;
}
