/**
 * تصميم صفحة تسجيل الدخول البنفسجية
 * تصميم مستوحى من الصورة المرفقة
 */

/* إعادة تعيين عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
}

/* متغيرات CSS */
:root {
  --primary-dark: #1a4b7c;
  --primary-medium: #2a6eaa;
  --primary-light: #3a8dca;
  --accent-color: #5fb8ff;
  --accent-light: #a0d8ff;
  --text-color: #ffffff;
  --error-color: #ff6b6b;
  --success-color: #66d9a8;
  --card-bg: rgba(26, 75, 124, 0.6);
  --input-bg: rgba(255, 255, 255, 0.15);
  --input-border: rgba(255, 255, 255, 0.3);
  --button-gradient: linear-gradient(to right, #1a4b7c, #3a8dca);
  --transition-speed: 0.3s;
}

/* تنسيق الجسم */
body.purple-login {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  direction: rtl;
  overflow: hidden;
  position: relative;
  font-family: 'Tajawal', sans-serif;
}

/* خلفية متموجة */
.wave-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background-image: url('../images/wave-bg.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
}

/* الدوائر المتحركة في الخلفية */
.circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: 0.3;
  filter: blur(30px);
  z-index: 0;
  animation: float 15s infinite ease-in-out;
}

.circle-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  background: radial-gradient(circle, rgba(182, 109, 255, 0.6) 0%, transparent 70%);
  filter: blur(40px);
}

.circle-2 {
  width: 400px;
  height: 400px;
  bottom: 10%;
  right: 10%;
  animation-delay: 5s;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.5) 0%, transparent 70%);
  filter: blur(50px);
  animation-duration: 20s;
}

.circle-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  right: 20%;
  animation-delay: 10s;
  background: radial-gradient(circle, rgba(210, 145, 255, 0.4) 0%, transparent 70%);
  filter: blur(35px);
  animation-duration: 18s;
}

/* إضافة دائرة رابعة */
.circle-4 {
  width: 250px;
  height: 250px;
  bottom: 30%;
  left: 20%;
  animation-delay: 7s;
  background: radial-gradient(circle, rgba(138, 99, 210, 0.5) 0%, transparent 70%);
  filter: blur(45px);
  animation-duration: 22s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(-20px, 20px) scale(1.1);
    opacity: 0.4;
  }
  50% {
    transform: translate(20px, -20px) scale(0.9);
    opacity: 0.5;
  }
  75% {
    transform: translate(20px, 20px) scale(1.05);
    opacity: 0.35;
  }
}

/* حاوية النموذج */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  padding: 40px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
              0 0 20px rgba(26, 75, 124, 0.3),
              inset 0 0 15px rgba(255, 255, 255, 0.05);
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* إزالة التأثيرات الحركية */
  transform: none !important;
  animation: none !important;
}

/* زر الإغلاق */
.close-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s ease;
  z-index: 2;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* شعار الشركة */
.company-logo {
  margin-bottom: 30px;
  text-align: center;
}

.logo-image {
  max-width: 350px;
  height: auto;
  filter: brightness(1.2) drop-shadow(0 8px 20px rgba(255, 255, 255, 0.4));
  transition: all 0.5s ease;
  animation: logo-float 6s infinite ease-in-out;
  transform-origin: center center;
}

@keyframes logo-float {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
    filter: brightness(1.2) drop-shadow(0 8px 20px rgba(255, 255, 255, 0.4));
  }
  25% {
    transform: translateY(-5px) scale(1.02) rotate(1deg);
    filter: brightness(1.3) drop-shadow(0 12px 25px rgba(255, 255, 255, 0.5));
  }
  50% {
    transform: translateY(0) scale(1.05) rotate(0deg);
    filter: brightness(1.4) drop-shadow(0 15px 30px rgba(255, 255, 255, 0.6));
  }
  75% {
    transform: translateY(-5px) scale(1.02) rotate(-1deg);
    filter: brightness(1.3) drop-shadow(0 12px 25px rgba(255, 255, 255, 0.5));
  }
}

/* عنوان النموذج */
.login-title {
  font-size: 38px;
  color: #ffffff;
  margin-bottom: 35px;
  font-weight: 800;
  position: relative;
  display: inline-block;
  text-shadow: 0 2px 15px rgba(95, 184, 255, 0.7);
  letter-spacing: 2px;
  padding: 0 15px;
  /* إزالة التأثيرات الحركية */
  transform: none !important;
  animation: none !important;
  /* تحسينات إضافية */
  background: linear-gradient(to bottom, #ffffff, #a0d8ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
  padding-bottom: 10px;
}

.login-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
  border-radius: 3px;
  /* إزالة التأثيرات الحركية */
  animation: none !important;
  width: 100%;
  box-shadow: 0 0 20px rgba(95, 184, 255, 0.8);
}

/* مجموعة الحقول */
.input-group {
  position: relative;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

/* حقول الإدخال */
.login-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(95, 184, 255, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.login-input:focus::placeholder {
  opacity: 0.8;
  transform: translateX(5px);
}

.input-group {
  position: relative;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

/* أيقونات الحقول */
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.login-input:focus + .input-icon {
  color: var(--accent-color);
  transform: translateY(-50%) scale(1.2);
  filter: drop-shadow(0 2px 4px rgba(95, 184, 255, 0.4));
  animation: icon-glow 1.5s infinite alternate;
}

@keyframes icon-glow {
  0% {
    filter: drop-shadow(0 2px 4px rgba(95, 184, 255, 0.4));
  }
  100% {
    filter: drop-shadow(0 2px 8px rgba(95, 184, 255, 0.7));
  }
}

/* مجموعة التذكر */
.remember-me {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 25px;
  color: var(--text-color);
  font-size: 14px;
}

/* تنسيق خانة الاختيار */
.checkbox-container {
  display: flex;
  align-items: center;
}

.login-checkbox {
  margin-left: 10px;
  appearance: none;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-checkbox:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.login-checkbox:checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(95, 184, 255, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: checkbox-pop 0.3s forwards;
}

@keyframes checkbox-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.login-checkbox:checked::before {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: check-appear 0.3s forwards;
}

@keyframes check-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* رسائل الخطأ والنجاح */
.message {
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.error-message {
  background: rgba(255, 107, 107, 0.2);
  color: var(--error-color);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.success-message {
  background: rgba(102, 217, 168, 0.2);
  color: var(--success-color);
  border: 1px solid rgba(102, 217, 168, 0.3);
}

/* زر تسجيل الدخول */
.login-button {
  width: 100%;
  padding: 16px;
  background: var(--button-gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(26, 75, 124, 0.4),
              0 0 0 0 rgba(95, 184, 255, 0.5),
              inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, #3a8dca, #1a4b7c);
  z-index: -1;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.login-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
  z-index: -1;
  opacity: 0.5;
}

.login-button:hover::before {
  opacity: 1;
}

.login-button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 25px rgba(26, 75, 124, 0.5),
              0 0 0 5px rgba(95, 184, 255, 0.2),
              inset 0 0 0 0.5px rgba(255, 255, 255, 0.4);
}

.login-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 3px 10px rgba(26, 75, 124, 0.4),
              0 0 0 2px rgba(95, 184, 255, 0.1),
              inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
}

/* أيقونة الزر */
.button-icon {
  margin-right: 10px;
  transition: all 0.4s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  animation: icon-pulse 2s infinite alternate;
}

.login-button:hover .button-icon {
  transform: translateX(-3px) scale(1.2);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

@keyframes icon-pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

/* تأثير التموج للزر */
.ripple {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(160, 216, 255, 0.5) 50%, rgba(95, 184, 255, 0.2) 100%);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.8s cubic-bezier(0.11, 0.65, 0.33, 1);
  pointer-events: none;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    transform: scale(5);
    opacity: 0;
  }
}

/* تصميم متجاوب */
@media (max-width: 480px) {
  .login-card {
    max-width: 90%;
    padding: 30px 20px;
  }

  .login-title {
    font-size: 24px;
  }

  .login-input {
    padding: 12px 12px 12px 40px;
    font-size: 14px;
  }

  .input-icon {
    font-size: 16px;
  }
}
