:root {
  --color-dark: #ffffff;
  --color-light: #ffffff;
  --color-primary: #520b5f;
  --color-secondary: #520b5f;
  --color-accent: #691d59;
  --color-warning: #ca2719;
  --color-background: #1e1e1e;
  --shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  --transition: 0.3s ease-in-out;
  --radius: 1.25rem;
}

body {
  background-color: var(--color-dark);
  font-family: 'Arial', sans-serif;
  color: var(--color-light);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  margin: 0;
  padding: 0;
}

/* Header Section */
.image-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  padding: 1rem 30rem;
  border-top: 2px solid var(--color-accent);
  box-shadow: var(--shadow);
  margin-bottom: 6rem;
  margin-top: 8rem;
  position: relative;
  z-index: 1;
  text-align: center;
  color: white; /* تغيير هذا السطر */
  transform: translateY(20px);
}

.image-text p {
  color: white !important; /* إضافة !important للتأكد من تطبيق اللون */
  font-size: 2.2rem;
  font-weight: bold;
  text-align: center;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

.image-text .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 90%;
  max-width: 300px;
  margin: 50px 500px;

}



.image-text .filter-search {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.image-text input {
  display: none;
}

.image-text label {
  padding: 0PX 0PX;
  border: 2px solid var(--color-primary);
  color: white;
  border-radius: 50px;
  display: flex;
  align-items: center;
  /* توسيط عمودي */
  justify-content: center;
  /* توسيط أفقي */
  font-weight: bold;
  transition: var(--transition);
  text-transform: capitalize;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  /* توسيط النص داخل العنصر */
  height: 50px;
  /* تحديد ارتفاع العنصر */
  width: auto;
  /* يسمح بتوسيع العرض تلقائيًا */
}




/* Main Content Section */
.search-image .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 90%;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 3rem;
}

.search-image .person-img,
.search-image .result {
  width: 100%;
  max-width: 800px;
  background: var(--color-background);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.search-image .person-img:hover,
.search-image .result:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.search-image .person-img .img-area,
.search-image .result .img-area {
  position: relative;
  height: 400px;
  width: 100%;
  background: #333;
  margin-bottom: 1.5rem;
  border-radius: 0.9375rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.search-image .person-img .img-area i,
.search-image .result .img-area i {
  font-size: 4rem;
  color: var(--color-primary);
}

.search-image .person-img .img-area img,
.search-image .result .img-area img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* اجعل الصورة تغطي عرض المربع */
  height: 100%;
  /* اجعل الصورة تغطي ارتفاع المربع */
  object-fit: contain;
  /* اجعل الصورة تظهر بالكامل داخل المربع */
  object-position: center;
  /* اجعل الصورة تتمركز داخل المربع */

}

.search-image .person-img .select-image,
.search-image .result .text {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
  border-radius: 0.9375rem;
  background-color: var(--color-secondary);
  color: var(--color-light);
  font-weight: bold;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.search-image .person-img .select-image:hover,
.search-image .result .text:hover {
  background-color: var(--color-accent);
  transform: scale(1.02);
}

/* Search Button */
.search-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 2rem 0;
}

.search {
  background: var(--color-secondary);
  color: var(--color-light);
  padding: 1.2rem 3rem;
  display: flex;
  align-items: center;
  /* توسيط عمودي */
  justify-content: center;
  /* توسيط أفقي */
  text-align: center;
  /* توسيط النص داخل العنصر */
  height: 50px;
  /* تأكد من تحديد ارتفاع العنصر */
  justify-content: center;
  border-radius: 0.75rem;
  gap: 0.3rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.2rem;
  transition: var(--transition);
  border: none;
  max-width: 90%;
  width: 400px;
  text-align: center;
  margin: 10px auto;
}

.search:focus {
  outline: none;
}

.search:hover {
  background-color: var(--color-accent);
  transform: scale(1.05);
}

/* Loader and Overlay */
.con-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.625rem;
  background-color: var(--color-light);
  width: 200px;
  padding: 1.5rem 0;
  position: fixed;
  z-index: 120;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid var(--color-primary);
  border-top: 5px solid #8c11ca;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 111;
}

.hide {
  display: none;
}

/* Confirm Box */
.confirm-box {
  background-color: rgba(30, 30, 30, 0.95);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(108, 92, 231, 0.5);
  text-align: center;
  max-width: 350px;
  width: 90%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--color-primary);
  animation: fadeIn 0.3s ease-out;
  z-index: 130;
}

.confirm-text {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--color-light);
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.confirm-buttons button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  min-width: 90px;
}

.confirm-buttons .yes-btn {
  background-color: rgb(28, 155, 26);
  color: var(--color-light);
}

.confirm-buttons .no-btn {
  background-color: var(--color-warning);
  color: var(--color-light);
}

.confirm-buttons .yes-btn:hover,
.confirm-buttons .no-btn:hover {
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .image-text p {
    font-size: 1.8rem;
  }

  .search-image .person-img,
  .search-image .result {
    padding: 1.5rem;
  }

  .search-image .person-img .img-area,
  .search-image .result .img-area {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .image-text p {
    font-size: 1.5rem;
  }

  .image-text label {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .search {
    font-size: 1rem;
    padding: 1rem 2rem;
  }

  .confirm-box {
    padding: 1.5rem;
  }

  .confirm-buttons {
    flex-direction: column;
  }

  .confirm-buttons button {
    width: 100%;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -55%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}