/* Reset */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: 'Cairo', sans-serif;
}

/* الألوان */
:root {
   --dark-blue: rgb(31, 64, 105);
   --orange: rgb(253, 166, 33);
   --white: rgb(255, 255, 255);
   --black: rgb(0, 0, 0);
   --glass: rgba(255, 255, 255, 0.08);
   --shadow: rgba(0, 0, 0, 0.25);
}

/* الخلفية */
body {
   background: linear-gradient(135deg, var(--dark-blue), var(--orange));
   min-height: 100vh;
   display: flex;
   justify-content: center;
   align-items: center;
   overflow: hidden;
   position: relative;
}

/* تأثيرات الخلفية المتحركة */
body::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background:
      radial-gradient(circle at 20% 80%, rgba(253, 166, 33, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(31, 64, 105, 0.15) 0%, transparent 50%);
   animation: backgroundShift 15s ease-in-out infinite alternate;
   z-index: -1;
}

@keyframes backgroundShift {
   0% {
      transform: translateX(-5%) translateY(-5%);
   }

   100% {
      transform: translateX(5%) translateY(5%);
   }
}

/* الحاوية الرئيسية */
.container {
   display: flex;
   width: 90%;
   max-width: 1100px;
   border-radius: 25px;
   overflow: hidden;
   background: rgba(255, 255, 255, 0.1);
   /* خلفية زجاجية */
   backdrop-filter: blur(15px);
   /* تأثير الضبابية */
   -webkit-backdrop-filter: blur(15px);
   /* للتوافق مع Safari */
   border: 1px solid rgba(255, 255, 255, 0.2);
   box-shadow:
      0 20px 50px var(--shadow),
      0 0 0 1px rgba(255, 255, 255, 0.1);
   animation: containerFade 0.8s ease-out forwards;
}

/* أنيميشن الحاوية */
@keyframes containerFade {
   0% {
      opacity: 0;
      transform: scale(0.95) translateY(20px);
   }

   100% {
      opacity: 1;
      transform: scale(1) translateY(0);
   }
}

/* الأقسام الداخلية */
.section {
   flex: 1;
   /* كل قسم يأخذ 50% */
   display: flex;
   justify-content: center;
   align-items: center;
   padding: 25px;
   background: transparent;
}

/* الكارد الداخلي - موحد للجهتين */
.inner-card {
   width: 100%;
   height: 100%;
   /* ارتفاع متساوي */
   max-width: 1000px;
   background: rgba(31, 64, 105, 0.85);
   border-radius: 20px;
   padding: 35px 25px;
   color: var(--white);
   box-shadow: 0 8px 25px var(--shadow);
   display: flex;
   flex-direction: column;
   justify-content: center;
   animation: cardSlide 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
   opacity: 0;
   transform: translateX(-30px);
}

/* أنيميشن الكارد الأيسر */
.left-section .inner-card {
   animation-name: cardSlideLeft;
}

/* أنيميشن الكارد الأيمن */
.right-section .inner-card {
   animation-name: cardSlideRight;
}

@keyframes cardSlideLeft {
   0% {
      opacity: 0;
      transform: translateX(-30px);
   }

   100% {
      opacity: 1;
      transform: translateX(0);
   }
}

@keyframes cardSlideRight {
   0% {
      opacity: 0;
      transform: translateX(30px);
   }

   100% {
      opacity: 1;
      transform: translateX(0);
   }
}

/* Login form */
.brand {
   text-align: center;
   margin-bottom: 25px;
}

.brand h1 {
   color: var(--orange);
   font-size: 26px;
   margin-bottom: 8px;
   animation: textGlow 2s ease-in-out infinite alternate;
}

/* الرسائل المنبثقة */
.msg {
   position: fixed;
   top: 20px;
   right: 20px;
   background: #fff;
   border-radius: 10px;
   padding: 12px 20px;
   font-weight: 600;
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
   z-index: 9999;
   display: none;
   transition: 0.3s ease;
}

.msg.success {
   border-left: 6px solid #2ecc71;
   color: #2ecc71;
}

.msg.error {
   border-left: 6px solid #e74c3c;
   color: #e74c3c;
}


@keyframes textGlow {
   0% {
      text-shadow: 0 0 5px rgba(253, 166, 33, 0.5);
   }

   100% {
      text-shadow: 0 0 15px rgba(253, 166, 33, 0.8);
   }
}

.brand p {
   color: var(--white);
   font-size: 15px;
   margin-top: 5px;
}

.form-group {
   margin-bottom: 18px;
   opacity: 0;
   transform: translateY(20px);
   animation: slideFade 0.8s forwards;
}

.form-group:nth-child(1) {
   animation-delay: 0.3s;
}

.form-group:nth-child(2) {
   animation-delay: 0.5s;
}

@keyframes slideFade {
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.input-with-icon {
   position: relative;
}

.input-with-icon i {
   position: absolute;
   top: 50%;
   left: 15px;
   transform: translateY(-50%);
   color: var(--orange);
   transition: 0.3s;
}

.input-with-icon input {
   width: 100%;
   padding: 12px 45px;
   border-radius: 40px;
   border: 2px solid rgba(255, 255, 255, 0.2);
   background: rgba(255, 255, 255, 0.1);
   color: var(--white);
   font-size: 16px;
   transition: 0.3s;
}

/* Placeholder باللون الأبيض */
.input-with-icon input::placeholder {
   color: rgba(255, 255, 255, 0.7);
   opacity: 1;
   /* للتأكد من أن اللون يظهر */
}

.input-with-icon input:focus {
   border-color: var(--orange);
   outline: none;
   background: rgba(255, 255, 255, 0.2);
   box-shadow: 0 0 10px rgba(253, 166, 33, 0.3);
}

.input-with-icon input:focus::placeholder {
   color: rgba(255, 255, 255, 0.9);
}

/* Toggle password */
.toggle-password {
   position: absolute;
   right: 15px;
   top: 50%;
   transform: translateY(-50%);
   cursor: pointer;
   color: var(--orange);
   transition: transform 0.3s;
}

/*
.toggle-password:hover {
   transform: translateY(-50%) scale(1.1);
} */

/* زر تسجيل الدخول */
.btn {
   width: 100%;
   padding: 14px;
   border: none;
   border-radius: 40px;
   background: var(--orange);
   color: var(--white);
   font-size: 16px;
   font-weight: 600;
   cursor: pointer;
   margin-top: 15px;
   transition: all 0.3s;
   position: relative;
   overflow: hidden;
}

.btn::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
   transition: left 0.5s;
}

.btn:hover {
   background: var(--dark-blue);
   transform: scale(1.05);
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover::before {
   left: 100%;
}

/* Right side features */
.right-section h2 {
   text-align: center;
   font-size: 22px;
   color: var(--orange);
   margin-bottom: 15px;
   animation: textGlow 2s ease-in-out infinite alternate;
}

.right-section p {
   text-align: center;
   font-size: 15px;
   color: #fff;
   margin-bottom: 20px;
}

.features {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 12px;
}

.feature {
   background: rgba(253, 166, 33, 0.8);
   border-radius: 15px;
   padding: 12px;
   text-align: center;
   transition: all 0.3s;
   position: relative;
   overflow: hidden;
}

.feature::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
   transform: translateX(-100%);
   transition: transform 0.6s;
}

.feature:hover::before {
   transform: translateX(100%);
}

.feature:hover {
   transform: translateY(-5px) scale(1.03);
   background: rgba(253, 166, 33, 1);
   box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature i {
   font-size: 24px;
   color: var(--white);
   width: 45px;
   height: 45px;
   line-height: 45px;
   border-radius: 50%;
   display: inline-block;
   background: var(--black);
   margin-bottom: 8px;
   transition: transform 0.3s;
}

.feature:hover i {
   transform: rotateY(180deg);
}

.feature h3 {
   color: var(--white);
   font-size: 15px;
   margin-bottom: 3px;
}

.feature p {
   color: #fff;
   font-size: 13px;
}

/* Responsive */
@media (max-width: 950px) {
   .container {
      flex-direction: column;
      max-width: 450px;
   }

   /* إخفاء القسم الأيمن عند الشاشات الصغيرة */
   .right-section {
      display: none;
   }

   .left-section {
      width: 100%;
   }

   .section {
      padding: 20px;
   }

   .inner-card {
      height: auto;
      max-width: 100%;
   }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {
   .container {
      width: 95%;
      border-radius: 20px;
   }

   .section {
      padding: 15px;
   }

   .inner-card {
      padding: 25px 20px;
   }

   .brand h1 {
      font-size: 22px;
   }

   .input-with-icon input {
      padding: 10px 40px;
      font-size: 14px;
   }

   .btn {
      padding: 12px;
      font-size: 15px;
   }
}