/* =========================================== */
/* صفحة الملف الشخصي - تصميم أنثوي/رجالي فخم   */
/* =========================================== */

.profile-page{
  /* 🎨 ألوان (الافتراضي بناتي) */
  --accent-pink: #f8e6ec;
  --accent-pink-light: #fff9fb;
  --accent-pink-soft: #fff3f6;

  /* 📝 نصوص */
  --text-dark: #2f2a2f;
  --text-soft: #5f555f;
  --text-light: #9c8f9c;

  /* 🧱 خلفيات */
  --bg-page: #fffafb;
  --bg-card: #ffffff;

  /* 📦 زوايا */
  --border-radius-lg: 1.6rem;
  --border-radius-md: 1rem;

  /* 🌫 ظل */
  --shadow-soft: 0 4px 15px -6px rgba(220, 120, 150, 0.08);

  /* ✅ بوردرات ناعمة */
  --border-soft: rgba(248, 230, 236, 0.55);
  --border-softer: rgba(248, 230, 236, 0.35);

  font-family: 'Tajawal','Cairo',sans-serif;
}

/* ===== ثيم الذكور (نظيف أبيض فخم) ===== */
.profile-page.theme-male{
  --bg-page: #ffffff;
  --bg-card: #ffffff;

  --accent-pink: #eef2f7;
  --accent-pink-light: #f8fafc;
  --accent-pink-soft: #f1f5f9;

  --border-soft: rgba(180, 190, 205, 0.35);
  --border-softer: rgba(180, 190, 205, 0.2);

  --text-dark: #1e1e1e;
  --text-soft: #555;
  --text-light: #888;
}

/* ===== الحاوية الرئيسية ===== */
.profile-page .profile-wrapper{
  background: var(--bg-page);
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 80px);
  position: relative;
  overflow: hidden;
}

/* زخرفة خفيفة */
.profile-page .profile-wrapper::before{
  content:'🌸';
  position:absolute;
  top:2%;
  left:2%;
  font-size:12rem;
  opacity:.02;
  transform:rotate(-5deg);
  pointer-events:none;
  color:var(--accent-pink);
}
.profile-page .profile-wrapper::after{
  content:'💫';
  position:absolute;
  bottom:2%;
  right:2%;
  font-size:12rem;
  opacity:.02;
  transform:rotate(5deg);
  pointer-events:none;
  color:var(--accent-pink);
}

/* ===== البطاقة الرئيسية ===== */
.profile-page .profile-container{
  max-width:1200px;
  margin:0 auto;
  background:var(--bg-card);
  border-radius:var(--border-radius-lg);
  padding:2rem;
  box-shadow:var(--shadow-soft);
  border:1px solid var(--border-soft);
  position:relative;
  z-index:2;
}

/* عنوان فوق */
.profile-page .profile-title{
  margin: 0 0 1.2rem 0;
  font-size: 1.9rem;
  font-weight: 900;
  color: #1f1b1f;
}

/* ===== قواعد موحّدة للبوردر ===== */
.profile-page .profile-sidebar,
.profile-page .action-btn,
.profile-page .dropdown-menu,
.profile-page .gift-image,
.profile-page .album-item,
.profile-page .info-card,
.profile-page .info-row,
.profile-page .like-btn,
.profile-page .stat-item,
.profile-page .message-btn{
  border:1px solid var(--border-soft);
}

/* ===== المحتوى الرئيسي ===== */
.profile-page .profile-content{
  display:flex;
  gap:2rem;
  flex-wrap:wrap;
  margin-top:1rem;
}

/* ===== الشريط الجانبي ===== */
.profile-page .profile-sidebar{
  flex:0 0 280px;
  max-width:100%;
  padding:1.5rem;
  background:#fff;
  border-radius:1.8rem;
  text-align:center;
}

.profile-page .profile-avatar{
  width:140px;
  height:140px;
  border-radius:50%;
  object-fit:cover;
  margin:0 auto 1rem;
  display:block;
  border:4px solid var(--accent-pink-light);
  box-shadow:0 3px 10px rgba(0,0,0,.02);
  cursor:pointer;
  transition:transform .2s ease;
}
.profile-page .profile-avatar:hover{ transform:scale(1.02); }

.profile-page .avatar-placeholder{
  width:140px;
  height:140px;
  border-radius:50%;
  background:var(--accent-pink-light);
  margin:0 auto 1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:3rem;
  color:var(--text-dark);
  border:4px solid #fff;
}

/* زر راسلني: (القيمة النهائية) */
.profile-page .message-btn{
  display:block;
  width: 92% !important;
  background:#fff;
  color: var(--text-dark);
  padding: .65rem 1rem !important;
  border-radius: 999px !important;
  font-size: .95rem !important;
  font-weight:700;
  text-decoration:none;
  transition:all .2s ease;
  text-align:center;
  margin: .8rem auto 1rem !important;
}
.profile-page .message-btn:hover{
  background:var(--accent-pink-light);
  transform:translateY(-2px);
}

/* أزرار التفاعل: (القيمة النهائية) */
.profile-page .action-buttons{
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: .8rem !important;
  flex-wrap:wrap;
  margin: .6rem 0 1rem !important;
}

/* توحيد حجم زر المفضلة: (القيمة النهائية) */
.profile-page .favorite-btn{
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  border: 0;
  background: linear-gradient(135deg,#ff7eb3,#ff758c);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .2s ease;
}
.profile-page .favorite-btn:hover{ transform: translateY(-2px); }

/* توحيد حجم أيقونة الهدية: (القيمة النهائية) */
.profile-page .gift-icon{
  width: 54px !important;
  height: 54px !important;
  object-fit: contain;
  cursor:pointer;
  border: none;
  background: transparent;
  padding: 12px !important;
  border-radius: 50% !important;
  transition: transform .2s ease;
  display: inline-block !important;
}
.profile-page .gift-icon:hover{ transform: translateY(-2px); }

/* ===== الإحصائيات ===== */
.profile-page .stats-row{
  display:flex;
  justify-content: center !important;
  gap: .6rem !important;
  margin: .2rem 0 0 !important;
}

.profile-page .like-btn,
.profile-page .stat-item{
  display:flex;
  align-items:center;
  gap:.35rem;
  padding: .28rem .75rem !important;
  border-radius: 999px !important;
  background:#fff;
  color:var(--text-soft);
  font-size: .85rem !important;
  line-height: 1 !important;
  cursor:pointer;
  transition:all .2s ease;
}
.profile-page .like-btn:hover,
.profile-page .stat-item:hover{
  background:var(--accent-pink-light);
}
.profile-page .like-icon{
  font-size: 1rem !important;
}

/* فاصل */
.profile-page .divider{
  text-align:center;
  margin: 1rem 0;
}
.profile-page .divider img{
  max-width: 90px;
  opacity: .35;
}

/* ===== ألبوم الصور ===== */
.profile-page .album-section{ margin-top: 1rem; }
.profile-page .album-title{
  font-weight:800;
  color:#1f1b1f;
  margin-bottom:.7rem;
  font-size:.95rem;
  text-align:center;
}
.profile-page .album-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:.6rem;
}
.profile-page .album-image{
  width:100%;
  height: 92px;
  object-fit:cover;
  border-radius: 1rem;
  cursor:pointer;
  transition: transform .2s ease;
  border:1px solid var(--border-soft);
}
.profile-page .album-image:hover{ transform: scale(1.03); }
.profile-page .album-placeholder{ opacity: .55; }

/* ===== التفاصيل ===== */
.profile-page .profile-details{
  flex:1;
  min-width:300px;
}

/* كروتين */
.profile-page .info-cards{
  display:flex;
  gap:1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.profile-page .info-card{
  flex:1;
  min-width: 260px;
  background:#fff;
  border-radius: 1.5rem;
  padding: 1.2rem;
}
.profile-page .info-card-title{
  color:#1f1b1f;
  font-weight:900;
  display:block;
  margin-bottom:.5rem;
  font-size:1rem;
}
.profile-page .info-card-text{
  color:var(--text-soft);
  line-height:1.7;
  font-size:.95rem;
  margin:0;
}

/* صفوف البيانات */
.profile-page .info-grid{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.profile-page .info-row{
  background:#fff;
  border-radius: 1.2rem;
  padding: .6rem 1rem;
  display:flex;
  align-items:center;
  justify-content:flex-start; /* قربنا الاسم والقيمة */
  gap:.6rem;
  transition: all .2s ease;
}
.profile-page .info-row:hover{
  background: var(--accent-pink-light);
}
.profile-page .info-label{
  font-weight:900;
  color:#1f1b1f;
  font-size:.92rem;
  line-height:1.2;
  margin:0;
}
.profile-page .info-value{
  margin-right:auto; /* RTL: تروح يسار بدون فراغ مبالغ */
  color:var(--text-soft);
  font-weight:600;
  font-size:.9rem;
  background: var(--accent-pink-light);
  padding: .22rem .75rem;
  border-radius: 2rem;
  border: 1px solid var(--border-softer);
  line-height:1.2;
  margin-top:0;
  margin-bottom:0;
}

/* ===== نافذة الصورة ===== */
.profile-page .image-popup{
  display:none;
  position:fixed;
  top:0; left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,.5);
  z-index:99999;
  justify-content:center;
  align-items:center;
  backdrop-filter:blur(3px);
}
.profile-page .popup-close{
  position:absolute;
  top:30px;
  right:40px;
  font-size:2.2rem;
  color:#fff;
  cursor:pointer;
  width:45px;
  height:45px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.1);
  border-radius:50%;
  transition:all .2s ease;
}
.profile-page .popup-close:hover{
  background:rgba(255,255,255,.2);
  transform:scale(1.1);
}
.profile-page .popup-image{
  max-width:90%;
  max-height:90%;
  border-radius:1rem;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
}

/* ===== اختيار الهدايا ===== */
.profile-page .gift-selector{
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 99998;
  padding: 2rem 1rem;
}
.profile-page .gift-selector-header{
  max-width: 560px;
  margin: 0 auto;
  background:#fff;
  border-radius: 1.2rem 1.2rem 0 0;
  padding: .8rem 1rem;
  display:flex;
  justify-content: space-between;
  align-items:center;
  border:1px solid var(--border-soft);
  border-bottom: 0;
}
.profile-page .gift-selector-close{
  font-size: 2rem;
  line-height: 1;
  cursor:pointer;
  color:#666;
}
.profile-page #giftSelector .gift-grid{
  max-width: 560px;
  margin: 0 auto;
  background:#fff;
  border:1px solid var(--border-soft);
  border-top: 0;
  border-radius: 0 0 1.2rem 1.2rem;
  padding: 1rem;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.profile-page #giftSelector .gift-item{
  text-align:center;
}
.profile-page #giftSelector .gift-item img{
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 1rem;
  border:1px solid var(--border-soft);
  padding: .35rem;
  background:#fff;
  cursor:pointer;
  transition: transform .2s ease;
}
.profile-page #giftSelector .gift-item img:hover{
  transform: translateY(-2px);
  background: var(--accent-pink-light);
}

/* ===== التجاوب ===== */
@media (max-width: 968px){
  .profile-page .profile-content{ flex-direction: column; }
  .profile-page .profile-sidebar{ width:100%; }
}
@media (max-width: 480px){
  .profile-page .info-row{
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
  }
  .profile-page .info-value{
    width:100%;
    text-align:center;
    margin-right:0;
  }
}
/* ✅ خلي نافذة الصورة Overlay فوق كل شي */
#image-popup.image-popup{
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55) !important;
  backdrop-filter: blur(3px);
  padding: 24px;
}

/* الصورة نفسها */
#image-popup .popup-image{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* زر الإغلاق */
#image-popup .popup-close{
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
  color: #ffffff;              /* لون X أبيض */
  cursor: pointer;
  background: #000000;         /* خلفية سوداء واضحة */
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: all .2s ease;
}

#image-popup .popup-close:hover{
  background: #111;            /* أغمق شوي عند الهوفر */
  transform: scale(1.05);
}

