
/* إعادة تعيين الهوامش والتباعد */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'Cairo', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    perspective: 1000px;
     position: relative;
}

 .alert {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-align: center;
    background-color: #f44336;
    color: white;
}
.alert p {
    margin: 0; /* لإزالة أي تباعد افتراضي للفقرة */
}

.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: linear-gradient(45deg, #243452, #1e2839);
}

.background-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00aaff80, #0a0e1600);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(30px) brightness(0.9);
    animation: shapeMove 15s ease infinite alternate;
}

@keyframes shapeMove {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        border-radius: 30% 70% 60% 40% / 40% 60% 30% 70%;
    }
}

.login-container {
    position: relative;
    width: 500px;
    padding: 40px;
    height:500px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1;
    backdrop-filter: blur(20px);
    margin-top: 8px;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
          transform: translateY(0px);
        opacity: 1;
    }
}

/* تصميم الهيدر */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background-color: transparent;
    width: 100%;
    max-width: 500px;
    transition: margin-top 0.3s ease;
    margin-bottom: 8px;
}

.logo-container {
    display: flex;
    align-items: center;
     flex-direction: var(--logo-container-direction); /* اتجاه العناصر في الحاوية */
}

.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    user-select: none; /* منع التحديد والسحب */
}

.site-name {
    margin-inline-start: var(--site-name-margin); /* تغيير الهامش ليكون على اليمين */
    font-size: 2em;
    font-weight: 700;
    color: #fff;
}

.logo {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center; /* لتوسيط العناصر عموديًا */
    align-items: center; /* لتوسيط العناصر أفقيًا */
   width: 100%;
}

.login-container .logo-container .site-name {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-inline-start: var(--login-site-name-margin);
}

.login-form .form-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.login-type-group {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.login-type-group label {
    cursor: pointer;
    font-size: 1rem;
    color: #eee;
    display: flex;
    align-items: center;
}

.login-type-group input[type="radio"] {
   margin-inline-start: 5px; /* تغيير الهامش ليكون على اليمين */
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-bottom: 2px solid #777;
    outline: none;
    transition: border-color 0.3s ease;
    font-size: 1rem;
    color: #eee;
    background-color: transparent;
    text-align: var(--input-text-align);
}

.input-group input:focus {
    border-bottom: 2px solid #fff;
}

.input-group input::placeholder {
    color: #777;
    font-size: 0.9rem;
      text-align: var(--input-text-align);
}

.input-group .focus-border {
    position: absolute;
    bottom: 0;
     inset-inline-start: 0; /* تغيير اليسار إلى اليمين */
    width: 0;
    height: 2px;
    background: linear-gradient(to var(--focus-border-direction), transparent, #fff);
    transition: width 0.3s ease, transform 0.3s ease, opacity 0.2s ease;
   transform-origin: var(--focus-border-transform-origin); /* تغيير الأصل إلى اليمين */
    opacity: 0;
    transition-delay: 0.1s;
}

.input-group input:focus + .focus-border {
    width: 100%;
    transform: translateX(0);
    opacity: 1;
}

.input-group input:not(:focus) + .focus-border {
  transform: translateX(var(--focus-border-translate)); /* تغيير الهامش إلى 100% */
    opacity: 0;
    transition-delay: 0.1s;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #eee;
     flex-direction: var(--remember-forgot-direction);
}

 .remember-forgot label {
   display: flex;
   align-items: center;
}

 .remember-forgot label input {
    margin-inline-start: 5px; /* تغيير الهامش ليكون على اليمين */
}
.remember-forgot a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.remember-forgot a:hover {
    color: #ddd;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #454f65;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-btn:hover {
    background-color: #666f7e;
    transform: scale(1.02);
}
/* تصميم قائمة تغيير اللغة المخصصة */
.language-switcher-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-inline-start: 10px; /* المسافة من اليسار (10 بكسل) */
   
}
.language-switcher {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.language-switcher .selected-language {
/*background-color: rgba(255, 255, 255, 0.05);*/
color: #fff;
 padding: 8px 8px;
font-size: 1.5rem;
display: flex;
align-items: center;
border-radius: 5px;
text-decoration: none;
gap: 5px
}

.language-switcher .language-options {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 10;
    display: none;
    white-space: nowrap;
    transform-origin: top var(--language-options-transform-origin);
    transform: scaleY(0) translateX(var(--language-options-translate));
    transition: transform 0.2s ease-in-out;
}
.language-switcher .language-options.show {
    display: block;
    transform: scaleY(1) translateX(0);
}
.language-switcher .language-options li a {
    padding: 1px 20px;
    font-size: 0.9rem;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: var(--language-options-text-align);
}                   
.language-switcher .language-options li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .login-container {
        width: 90%;
    }
}

/* استعلام وسائط للشاشات الكبيرة (عرض الشاشة أكبر من 1200 بكسل) */
@media (min-width: 1200px) {
    .header-container {
        margin-top: 0px;
    }
}

/* استعلام وسائط للشاشات الكبيرة جدًا (عرض الشاشة أكبر من 1800 بكسل) */
@media (min-width: 1800px) {
    .header-container {
        margin-top: 10px;
    }
}