/* --- Global Styles & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700&display=swap');

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    /* ✨ تدرج أزرق أعمق وأكثر حيوية ✨ */
    background: linear-gradient(135deg, #1A73E8, #303F9F, #1C2331);
    background-size: 400% 400%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    color: #fff;
    /* إبقاء overflow: hidden هنا لضمان تمركز نموذج تسجيل الدخول دائمًا في المنتصف */
    overflow: auto;
    animation: gradientBG 25s ease infinite;
}

/* حركة الخلفية الأبطأ */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* حركة الظهور الناعمة */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Main Wrapper --- */
.auth-wrapper {
    width: 100%;
    max-width: 450px; /* زيادة بسيطة في العرض */
    padding: 20px;
    text-align: center;
}

/* --- Header Section (Logo, Title, Features) --- */
.auth-header {
    margin-bottom: 30px;
    animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.logo-container {
    width: 85px;
    height: 85px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}
.logo-container:hover {
    transform: scale(1.18) rotate(-15deg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.logo-container img {
    max-width: 55px;
    max-height: 55px;
}

.auth-header h1 {
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 3px 6px rgba(0,0,0,0.4); /* ظل أقوى للنص */
}

.auth-header .tagline { font-size: 17px; opacity: 0.95; margin-bottom: 30px; }
.features { display: flex; justify-content: space-around; }
.feature-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.feature-item i { font-size: 26px; transition: transform 0.3s ease; }
.feature-item:hover i { transform: scale(1.3); }
.feature-item span { font-size: 15px; font-weight: 500; }

/* --- Glassmorphism Form Box --- */
.form-box {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px); /* زيادة قوة التغبيش */
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px; /* زوايا أكثر دائرية */
    padding: 30px 40px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

/* Tabs */
.tabs { display: flex; margin-bottom: 25px; border-bottom: 2px solid rgba(255, 255, 255, 0.3); }
.tab { flex: 1; }
.tab a { display: block; padding-bottom: 12px; text-decoration: none; color: rgba(255, 255, 255, 0.8); font-weight: 500; font-size: 17px; transition: all 0.3s ease; border-bottom: 3px solid transparent; }
.tab.active a { color: #fff; font-weight: 700; border-bottom-color: #fff; }

/* Form Elements */
.input-group { position: relative; margin-bottom: 20px; }
.input-icon { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: #4A90E2; /* لون أيقونات الحقول باللون الأزرق */ }
.form-input { 
    width: 100%; 
    padding: 15px 48px 15px 15px; /* زيادة الـ padding */
    border: none; 
    border-radius: 12px; 
    background-color: #f3f5f9; 
    font-family: 'Cairo', sans-serif; 
    font-size: 16px; 
    box-sizing: border-box; 
    color: #333; 
    transition: all 0.3s ease; 
}
.form-input::placeholder { color: #888; }
.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 5px rgba(26, 115, 232, 0.6);
    transform: scale(1.01);
}

/* Button */
.btn-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background-color: #4285F4; /* أزرق قوقل أكثر وضوحًا */
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.btn-submit:hover {
    background-color: #1A73E8;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(26, 115, 232, 0.7);
}
.btn-submit:active {
    transform: translateY(-1px);
}

/* --- Register Page Specifics --- */
.user-type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 10px 0 20px 0; }
.user-type-option input[type="radio"] { display: none; }
.user-type-option label { 
    display: block; 
    padding: 20px 10px; 
    border: 2px solid rgba(255, 255, 255, 0.4); 
    border-radius: 15px; 
    cursor: pointer; 
    background-color: rgba(255, 255, 255, 0.1); 
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.user-type-option label i { font-size: 28px; margin-bottom: 8px; display: block; }
.user-type-option label strong { font-size: 16px; display: block; }
.user-type-option label span { font-size: 13px; opacity: 0.9; }

.user-type-option input[type="radio"]:not(:checked) + label:hover {
    transform: translateY(-8px);
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.user-type-option input[type="radio"]:checked + label {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: #fff;
    transform: scale(1.05);
}
.terms { font-size: 13px; color: rgba(255, 255, 255, 0.9); margin-top: 25px; }
.terms a { color: #fff; font-weight: 500; text-decoration: underline; }

/* Error/Success Messages */
.error-msg, .success-msg { 
    padding: 15px; 
    border-radius: 10px; 
    margin-bottom: 20px; 
    font-size: 15px; 
    font-weight: 600;
}
.error-msg { background-color: #e74c3c; color: #fff; }
.success-msg { background-color: #2ecc71; color: #fff; }

@media (max-width: 500px) {
    .auth-wrapper {
        width: 100%;
        padding: 10px;
    }
    .form-box {
        padding: 20px;
    }
    .auth-header h1 {
        font-size: 30px;
    }
    .user-type-selector {
        grid-template-columns: 1fr;
    }
}
/* --- ✨✨ Styles for Static Pages (Terms & Privacy) ✨✨ --- */

.static-page-wrapper {
    width: 100%;
    max-width: 800px; /* عرض أكبر لتسهيل القراءة */
    padding: 20px;
    text-align: right; /* محاذاة النص لليمين */
}

.static-content-box {
    background: rgba(255, 255, 255, 0.95); /* خلفية شبه بيضاء لسهولة القراءة القصوى */
    color: #333; /* لون نص داكن للتباين */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    max-height: 80vh; /* تحديد أقصى ارتفاع للصندوق */
    overflow-y: auto; /* ✨ تفعيل السكرول العمودي داخل الصندوق فقط ✨ */
}

/* تخصيص شكل شريط السكرول */
.static-content-box::-webkit-scrollbar {
    width: 8px;
}
.static-content-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.static-content-box::-webkit-scrollbar-thumb {
    background-color: #4285F4;
    border-radius: 10px;
}

.static-content-box h2 {
    font-size: 28px;
    color: #1A73E8;
    margin-top: 0;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.static-content-box h3 {
    font-size: 20px;
    color: #153A68;
    margin-top: 25px;
}

.static-content-box p, .static-content-box li {
    font-size: 15px;
    line-height: 1.9;
    color: #4A5568;
}

.back-link-container {
    text-align: center;
    margin-top: 30px;
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
    opacity: 0;
}
.back-link {
    display: inline-block;
    padding: 12px 30px;
    background-color: #fff;
    color: #4285F4;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.back-link:hover {
    background-color: #f1f1f1;
    transform: translateY(-3px);
}