/* user-profile.css */
html,
body,
*,
*::before,
*::after {
  font-family: "Tajawal", "Changa", "Marhey", "Cairo", sans-serif;
}
/* html,
body {
  background: var(--main-bg);
  color: var(--main-color);
  transition: background 0.8s ease, color 0.3s ease;
  background-attachment: fixed;
  padding: 0.2rem;
} */

::-webkit-scrollbar {
  display: none;
}
.fixed-header-slider {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--theme-bg-color); /* اللون حسب الثيم */
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-content {
  margin-top: 90px; /* ارتفاع السلايدر */
  padding-bottom: 50px;
}
.span{
  color: var(--highlight-color);
}
body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
a,
li,
label,
strong,
em {
  color: var(--main-color);
  /* margin: 0.5rem; */
}
.text-theme {
  color: var(--main-color);
  text-decoration: none;
}
select.btn {
  appearance: none; /* يمسح الشكل الافتراضي */
  -webkit-appearance: none;
  -moz-appearance: none;

  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: bold;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 240px;
}

.select-wrapper::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--button-text);
  pointer-events: none;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  margin: 10px auto;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  color: var(--button-text); /* <-- هنا النقطة */
  background: var(--button-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.floating-btn {
  position: fixed;
  bottom: 5px;
  right: 20px;
  padding: 10px 20px;
  font-size: 14px;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 12px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;

  /* خلي بالك من التحريك من المركز */
  transform-origin: top center;

  animation: pulse-glow 2.5s infinite, pendulum-swing 2.5s infinite ease-in-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
  }
}
@keyframes pendulum-swing {
  0% {
    transform: rotate(6deg);
  }
  50% {
    transform: rotate(-6deg);
  }
  100% {
    transform: rotate(6deg);
  }
}
.button-wrapper {
  position: fixed;
  bottom: 20px;
  left: 50%;
  width: 100%;
  max-width: 800px;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  padding-right: 1rem;
}
/* =========================== BIO ============================ */

.info {
  flex: 1;
  min-width: 200px;
}

.name-row {
  /* display: flex; */
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.name-row h2 {
  font-size: 1.3rem;
  margin: 0;
}

.follow-buttons {
  display: flex;
  gap: 0.5rem;
}

.bio {
  margin: 0.2rem 0;
  font-size: 0.95rem;
  color: var(--main-color);
  /* white-space: pre-wrap; */
  line-height: 1.8;
  text-align: right;
  /* padding-right: 8px; */
}
.bio {
  opacity: 0.2;
  transition: opacity 1.0s ease-in-out;
}
.bio.ready {
  opacity: 1;
}

.followers-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.flat {
  background: transparent;
  border: 1px solid var(--main-color);
  color: var(--main-color);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .profile-card {
    flex-direction: column;
    text-align: right;
  }

  .name-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .followers-line {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================affirmation-slider-container=========================== */

.affirmation-container-card {
  background: var(--main-bg);
  color: var(--main-color);
  border-radius: 20px;
  max-width: 800px;
  margin: 1rem auto;
  /* padding: 1rem 2rem; */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeUp 1.5s ease;
  /* opacity: 0; */
  transform: translateY(20px);
  animation-fill-mode: forwards;
}
.affirmation-container {
  background: var(--button-bg);
  color: var(--button-text);
  position: fixed;
  /* margin: 30px auto; */
  max-width: 500px;
  overflow: hidden;
  height: auto;
  position: relative;
  display: flex;
  text-align: right;
  align-items: center;
  justify-content: center;
  /* bottom: 20px;
  right: 20px; */
  padding: 5px 12px 2px 12px;
  /* background: #ff4081; */
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.8rem;
  /* font-weight: bold; */
  text-decoration: none;
  cursor: pointer;
  z-index: 1000;

  transform-origin: top center;

  animation: pulse-glow 2.5s infinite, pendulum-swing 2.5s infinite ease-in-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* تأثير الإضاءة */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
  }
}

/* حركة بندولية خفيفة */
@keyframes pendulum-swing {
  0% {
    transform: rotate(6deg);
  }
  50% {
    transform: rotate(-6deg);
  }
  100% {
    transform: rotate(6deg);
  }
}
/* ✅ كل الأنيميشنات العامة للفيد-إن-أب */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ✅ استخدام مشترك لأي عنصر فيه fadeUp */
.fade-up {
  opacity: 0;
  transform: translateY(var(--fade-from, 20px));
  animation: fadeUp var(--fade-duration, 1s) ease-out forwards;
  animation-delay: var(--fade-delay, 0s);
}

/* ✅ أنيميشن تسلسلي للكلام سطر ورا سطر */
.animated-text p {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease-out forwards;
}

.animated-text p:nth-child(1) { animation-delay: 0s; }
.animated-text p:nth-child(2) { animation-delay: 0.4s; }
.animated-text p:nth-child(3) { animation-delay: 0.8s; }
.animated-text p:nth-child(4) { animation-delay: 1.2s; }

/* ✅ سكاشن فيها fade بشكل عام */
.section {
  margin-bottom: 3rem;
  text-align: center;
  --fade-from: 20px;
  --fade-duration: 1.2s;
}
.section.fade-up {
  /* يتم وراثة القيم من الـ --vars */
}

/* ✅ صور داخلة بانيميشن */
.img.fade-up {
  --fade-from: 50px;
  --fade-duration: 1.5s;
}

/* ✅ عناصر تظهر عند السحب scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* ✅ كروت بتدخل واحدة واحدة */
.card.fade-up {
  --fade-from: 20px;
  --fade-duration: 0.6s;
}
.card:nth-child(2) { --fade-delay: 0.2s; }
.card:nth-child(3) { --fade-delay: 0.4s; }
.card:nth-child(4) { --fade-delay: 0.6s; }
.card:nth-child(5) { --fade-delay: 0.8s; }

/* لتوسيط كل المحتوى في الصفحة */
#public-profile .hero-image-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center; /* توسيط أفقي */
  justify-content: center; /* توسيط رأسي لو في ارتفاع محدد */
  text-align: center;
  width: 100%;
}

/* الصورة */
#public-profile .hero-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover; /* تخلي الصورة ما تتمددش */
  display: block;
  margin: 0 auto;
}

#public-profile .info {
  width: 100%;
  max-width: 100%;   /* زي البوستر */
  margin: 0 auto;
  padding: .6rem 1rem;
  text-align: center;
}

/* للموبايل نفس الوضع */
@media (max-width: 768px) {
  #public-profile .hero-image-wrapper {
    flex-direction: column;
  }
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin-left: 10px;
}

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

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

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

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider::before {
  transform: translateX(22px);
}

/* كروت */
.card {
  background: var(--main-bg);
  color: var(--main-color);
  border-radius: 20px;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeUp 1.5s ease forwards;
  /* opacity: 0;
  transform: translateY(20px);
  animation-fill-mode: forwards; */
}

/* شبكة اللينكات */
.links-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.link-card {
  background: var(--button-bg);
  color: var(--button-text);
  display: flex;
  align-items: center;
  /* justify-content: flex-start; */
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  padding: 0rem 0.5rem;
  margin-bottom: 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.link-card:hover {
  background-color: #eaeaea;
}

.link-card .icon {
  font-size: 1.5rem;
  margin-right: 1rem;
}

.link-card .text {
  font-size: 1rem;
  font-weight: bold;
  margin: 10px 10px 5px 10px;
  /* font-size: 1.1rem; */
  /* font-weight: bold; */
  /* margin-top: 14px; */
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeout {
  from { opacity: 1; }
  to { opacity: 0; }
}

#delete-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e53935; /* أحمر */
  /* color: white; */
  border: none;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

#delete-avatar:hover {
  background-color: #c62828; /* أحمر أغمق عند الـ hover */
}
/* .profile-pic-container {
  position: relative;
  display: inline-block;
} */

#delete-avatar {
  position: absolute;
  top: 20px;
  left: 80px;
}
.custom-file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
}

#custom-upload-btn {
  padding: 6px 15px;
  border-radius: 8px;
  background-color: #28a745;
  border: none;
  /* color: white; */
  cursor: pointer;
  font-weight: bold;
}

#file-name {
  font-size: 0.9rem;
  color: #555;
}
.referral-box {
  /* background: #f8f8f8; */
  border-radius: 12px;
  /* padding: 1.5rem; */
  /* margin-top: 2rem; */
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
}

.referral-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
  line-height: 2.2;
}

/* أنيميشن الخلفية المتحركة */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: large;
  font-weight: bold;
  /* border: 2px solid #f3f3f3; */
  /* border-top: 2px solid 000000; */
  /* border-radius: 50%; */
  /* width: 16px; */
  /* height: 16px; */
  /* animation: spin 1s linear infinite; */
  /* display: inline-block; */
  /* vertical-align: middle; */
  /* margin-right: 10px; */
}

.link-icon {
  width: 2rem;
  /* height: 2rem; */
  object-fit: cover;
  margin: 0.2rem 1.0rem 0.2rem 1.0rem ;
}

.product-price {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 1.3rem;
  font-weight: bold;
}

.product-price .current-price {
  color: var(--highlight-text);
}

.product-price .old-price {
  text-decoration: line-through;
  color: #e60023; 
  font-size: 1.0rem;
}

.discount-msg {
  color: var(--highlight-color);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* عشان نخفي الصفحه العامه لغاية تحديد بوستر ولا عادي ١٣-١٢-٢٥ */
#poster-view,
#normal-view {
  display: none;
}

body.has-poster #poster-view {
  display: block;
}

body.no-poster #normal-view {
  display: block;
}

/* اخفي النص فقط أثناء الأنيمي */
[data-anim="typewriter"]:not(.tw-ready) {
  opacity: 0;
  visibility: hidden;
}

[data-anim="typewriter"].tw-ready {
  opacity: 1;
  visibility: visible;
}

.preview-area hr {
  border: none;
  border-bottom: 1px solid #444;
  margin: 10px 0;
  width: 100%;
}

.bio-end-message {
  background: var(--main-bg);
  box-shadow: 0 1px 2px 0 var(--highlight-color);
  border-radius: 12px;
  text-align: center;
  padding: 1.8rem 1rem 1.5rem;
  margin: 4rem auto;
  /* opacity: 0.7; */
  font-size: 0.9rem;
  width: 80%;
}

.bio-end-message p {
  margin: 0;
  font-weight: 600;
}

.bio-end-message span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
}

.page-end-spacer {
  width: 100%;
  height: var(--page-end-space, 200px);
  pointer-events: none;
}

.link-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;  
}

.link-more-btn {
  position: absolute;
  top: 17%;
  /* transform: translateY(-50%); */
  /* right: 12px; */
  
  background: transparent;
  /* backdrop-filter: blur(6px); */
  border: none;
  border-radius: 8px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  color: #fff;

  z-index: 30;
  cursor: pointer;
}

.link-share-menu {
  position: absolute;
  top: 50%;
  right: 52px;
  transform: translateY(-50%);

  background: rgba(0,0,0,0.85);
  border-radius: 10px;
  padding: 6px;

  display: none;
  flex-direction: column;
  gap: 4px;

  z-index: 40;
}

.link-share-menu.show {
  display: block;
}

.link-share-menu button {
  background: none;
  border: none;
  color: #fff;
  text-align: right;
  cursor: pointer;
  padding: 6px 10px;
}
/* @media (hover: hover) {
  .link-more-btn {
    opacity: 0;
  }

  .link-card-wrapper:hover .link-more-btn {
    opacity: 1;
  }
} */
