@font-face {
    font-family: 'HONORSansArabicUI-DB';
    src: url('../Fonts/HONORSansArabicUI-DB.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    /* font-display: swap; */
}

/* General styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'HONORSansArabicUI-DB', sans-serif;
    display: flex;
    min-height: 100vh;
    background: #ffffff;
    overflow-x: hidden;
}

/* Logo styling */
.logo {
    position: fixed;
    top: 30px;
    right: 235px;
    z-index: 100;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Layout */
.left-side {
    flex: 1;
    display: flex;
    background: #94A8B1;
    justify-content: flex-start; /* تغيير من center إلى flex-start */
    align-items: center; /* للحفاظ على الانتظام العمودي */
    padding-left: 0; /* إزالة أي بادنج من اليسار */
}

.left-side img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* بدلاً من cover للحفاظ على النسب */
    image-rendering: -webkit-optimize-contrast; /* تحسين العرض */
    image-rendering: crisp-edges;
    margin-left: 2%; /* التأكد من عدم وجود هوامش على اليسار */
    margin-right: auto; /* دفع الصورة لليسار */
}

.right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
    position: relative;
}

/* Switch buttons */
.switch-buttons {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin-bottom: 50px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.switch-buttons button {
    flex: 1;
    padding: 12px;
    border: 1PX solid #34C435;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #ffffff;
    color: #333;
   
}

#loginButton{
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.switch-buttons .active {
    background: #34C435;
    color: white;
}

.switch-buttons button:hover {
    background: #34C435;
    color: white;
}

/* Form styling */
.register-form {
    width: 100%;
    max-width: 500px;
}

/* Input fields - General */
.input-group {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: transparent;
    direction: rtl;
}

.input-group input:focus {
    border-color: #34C435;
    box-shadow: 0 0 0 2px rgba(72, 255, 0, 0.2);
}

.input-group label {
    position: absolute;
    right: 15px;
    top: 15px;
    transition: all 0.3s ease;
    color: #999;
    pointer-events: none;
    background: transparent;
    padding: 0 5px;
    font-size: 16px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 12px;
    color: #34C435;
    background: #fff;
}

/* Password field - Desktop */
.password-toggle {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    z-index: 2;
}

.eye-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s;
}

/* Phone input - Desktop */
.phone-input .iti {
    width: 100%;
    direction: ltr;
}

/* Hide labels when input has value */
#password:not(:placeholder-shown) + .floating-label {
    display: block;
}


#password:focus + .floating-label {
    color: #52E964;
}

.phone-input .iti__selected-flag {
    padding: 0 10px;
    z-index: 2;
}

/* Button */
button[type="submit"] {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    background: #46e246;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background: #52E964;
}

/* Loading spinner */
.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #52E964;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* خلفية نصف شفافة */
    backdrop-filter: blur(5px); /* تأثير التشويش */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* لضمان ظهور الطبقة فوق كل شيء */
}

.overlay-message {
    font-size: clamp(2rem, 8vw, 10rem); /* حجم النص متجاوب */
    font-weight: bold;
    color: #ffffff; /* لون النص أبيض ليكون واضحًا */
    transform: rotate(-25deg); /* تدوير النص بزاوية */
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* ظل للنص */
    animation: blink 2s infinite; /* تأثير وميض */
    background: linear-gradient(45deg, #ff0000, #ff6600, #ffff00, #00ff00, #0066ff, #6600ff, #ff0066);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: blink 2s infinite, gradientShift 3s ease infinite;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تأثير وميض للـ overlay-message */
@keyframes blink {
    0%, 50% { 
        opacity: 1; 
        transform: rotate(-25deg) scale(1);
    }
    25%, 75% { 
        opacity: 0.7; 
        transform: rotate(-25deg) scale(1.05);
    }
    100% { 
        opacity: 1; 
        transform: rotate(-25deg) scale(1);
    }
}

/* تأثير تغيير الألوان */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

 /* إضافة أنماط التحقق من الصحة */
 .validation-message {
    display: none;
    font-size: 12px;
    margin-top: 5px;
    color: #ff4444;
    text-align: right;
}

.validation-message.valid {
    color: #00C851;
}

.password-requirements {
    display: none;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    border: 1px solid #ddd;
}

.password-requirements p {
    margin: 5px 0;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.password-requirements p:before {
    content: "✖";
    margin-left: 5px;
    color: #ff4444;
}

.password-requirements p.valid:before {
    content: "✔";
    color: #00C851;
}

.phone-validation {
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .overlay-message {
        font-size: clamp(2.5rem, 7vw, 6rem);
        transform: rotate(-20deg);
        padding: 18px;
    }
    
    body {
        flex-direction: column;
    }
    
    .left-side {
        display: none;
    }
    
    .right-side {
        padding: 80px 20px 20px;
        width: 100%;
        max-width: 100%;
    }
    
    .logo {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .logo img {
        height: 50px; /* تصغير حجم الشعار قليلاً للهواتف */
    }
}

@media (max-width: 576px) {
    .overlay-message {
        font-size: clamp(1.5rem, 6vw, 3rem);
        transform: rotate(-15deg);
        padding: 15px;
        margin: 10px;
    }
    
    .input-group {
        display: flex;
        flex-direction: column;
    }
    
    .input-group label {
        position: static !important;
        margin-bottom: 8px;
        font-size: 14px;
        color: #333;
        transform: none !important;
        padding: 0 !important;
        order: -1;
    }
    
    .input-group input {
        padding: 12px;
        order: 1;
    }
    
    .input-group input:focus + label,
    .input-group input:not(:placeholder-shown) + label {
        position: static !important;
        font-size: 14px;
        color: #333;
        background: transparent;
        transform: none !important;
    }
    
    /* Password container in mobile */
    .password-container {
        display: flex;
        flex-direction: column;
    }
    
    .password-container label {
        order: -1;
        margin-bottom: 8px;
        position: static !important;
    }
    
    .password-container input {
        order: 1;
    }
    
    .password-toggle {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Phone input in mobile */
    .phone-input {
        display: flex;
        flex-direction: column;
    }
    
    
    .phone-input .iti {
        order: 1;
    }
    
    .switch-buttons {
        margin-bottom: 20px;
    }
    
    .switch-buttons button {
        padding: 10px;
        font-size: 14px;
    }
    
    button[type="submit"] {
        padding: 12px;
    }
}