/* ==============================================
   PAGANI LUXURY - إنشاء حساب
   تصميم فاتح وناعم | بدون أسود
   ============================================== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght=400;500;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    direction: rtl;
}

.app-container {
    width: 100%;
    max-width: 450px;
    background: #FFFFFF;
    min-height: 100vh;
    position: relative;
    padding-bottom: 30px;
}

/* ==============================================
   1. صورة الغلاف العلوية
   ============================================== */
.register-cover {
    width: 100%;
    height: 220px; /* زيادة الطول قليلاً لإعطاء مساحة تنفس للتصميم */
    position: relative;
    overflow: hidden;
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.5) 100%
    );
}

/* مؤشر الخطوات الدائري المطور */
.steps-indicator {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 5;
}

.step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    border: 2px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-dot.active {
    background: #7B6FD4;
    border-color: #7B6FD4;
    box-shadow: 0 0 15px rgba(123, 111, 212, 0.5);
    transform: scale(1.05);
}

.step-line {
    width: 45px;
    height: 2px;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.step-line.active {
    background: #7B6FD4;
}

/* العنوان على الصورة */
.cover-title {
    position: absolute;
    bottom: 40px; /* رفع العنوان ليتناسب مع النزول السالب لكارت الفورم */
    right: 20px;
    z-index: 5;
}

.cover-title h1 {
    font-size: 1.65rem;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 4px;
}

.cover-title span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

/* ==============================================
   2. المحتوى الرئيسي
   ============================================== */
.register-content {
    padding: 0 16px;
    margin-top: -30px; /* سحب ذكي وناعم للكارت فوق الغلاف */
    position: relative;
    z-index: 10;
}

/* ==============================================
   3. كارت الفورم البريميوم
   ============================================== */
.form-card {
    background: #FFFFFF;
    border-radius: 26px;
    padding: 22px 20px;
    box-shadow: 0 12px 35px rgba(123, 111, 212, 0.08);
    border: 1.5px solid #F0EEFF;
    display: flex;
    flex-direction: column;
    gap: 16px; /* توزيع متناسق للمسافات الداخلية */
}

/* ==============================================
   4. مجموعات الإدخال وحركات الـ Focus
   ============================================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #777;
    margin-right: 4px;
}

.input-group label i {
    color: #7B6FD4;
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #EEEDF8;
    border-radius: 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    color: #555;
    background: #FAFAFA;
    outline: none;
    transition: all 0.25s ease;
}

.form-input:focus {
    border-color: #7B6FD4;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(123, 111, 212, 0.05);
}

.form-input::placeholder {
    color: #CCC;
}

/* PIN input */
.pin-input {
    text-align: center;
    letter-spacing: 6px;
    font-size: 1.25rem;
    font-weight: 800;
}

/* ==============================================
   5. رقم الهاتف
   ============================================== */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-code {
    background: #F0EEFF;
    color: #7B6FD4;
    padding: 13px 16px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    white-space: nowrap;
    border: 1.5px solid transparent;
}

.phone-input-wrapper .form-input {
    flex: 1;
}

/* ==============================================
   6. كلمة المرور
   ============================================== */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-left: 44px; /* تأمين مساحة أيقونة العين تماماً */
}

.toggle-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #BBB;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    padding: 4px;
}

.toggle-icon:hover {
    color: #7B6FD4;
}

/* ==============================================
   7. كابتشا (تصميم منسق ومحاذي)
   ============================================== */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FAFAFA;
    border: 1.5px solid #EEEDF8;
    border-radius: 14px;
    padding: 4px 6px 4px 12px; /* ضبط مسافات حواف المدخل */
}

.captcha-code {
    background: #F0EEFF;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1.1rem;
    color: #7B6FD4;
    letter-spacing: 4px;
    text-align: center;
    min-width: 95px;
    user-select: none;
}

.captcha-box .form-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 4px;
    box-shadow: none !important;
}

/* ==============================================
   8. أزرار التنقل
   ============================================== */
.next-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #7B6FD4, #9B8EC4);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(123, 111, 212, 0.25);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.next-btn:active {
    transform: scale(0.98);
}

/* ==============================================
   9. الخطوة 2 (الحماية والأمان)
   ============================================== */
.security-intro {
    text-align: center;
    padding: 8px 0 4px;
}

.security-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #F0EEFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.6rem;
    color: #7B6FD4;
    box-shadow: 0 4px 12px rgba(123, 111, 212, 0.1);
}

.security-intro h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #555;
    margin-bottom: 6px;
}

.security-intro p {
    font-size: 0.78rem;
    color: #999;
    line-height: 1.6;
    padding: 0 10px;
}

/* أزرار الخطوة الثانية */
.step-buttons {
    display: flex;
    gap: 12px;
}

.back-btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: 1.5px solid #EEEDF8;
    background: #FAFAFA;
    color: #888;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.back-btn:active {
    transform: scale(0.98);
    background: #EEEEFF;
}

.submit-btn {
    flex: 2;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #7B6FD4, #9B8EC4);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 8px 20px rgba(123, 111, 212, 0.25);
    transition: transform 0.2s ease;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ==============================================
   10. رابط تسجيل الدخول السفلي
   ============================================== */
.login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid #F0EEFF;
    font-size: 0.85rem;
    color: #999;
}

.login-link a {
    color: #7B6FD4;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.login-link a:hover {
    opacity: 0.8;
}

/* ==============================================
   🌟 تجميل وتنسيق قسم القوانين وطريقة الإنشاء الفخم 🌟
   ============================================== */
.pagani-info-box {
    margin-top: 10px;
    background: #F9F8FF; /* خلفية بنفسجية فائقة النعومة متناسقة مع الهوية */
    border: 1px solid #EAE6FF;
    border-radius: 20px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
}

.title-steps {
    color: #43A047; /* لون أخضر ناعم ومريح للخطوات */
    border-bottom: 1.5px solid rgba(67, 160, 71, 0.15);
}

.title-rules {
    color: #E65100; /* لون برتقالي فخم وواضح للتحذيرات والقوانين */
    border-bottom: 1.5px solid rgba(230, 81, 0, 0.15);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-list li {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #666677; /* رمادي مريح جداً للقراءة وليس أسود */
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.step-circle {
    background: #E8F5E9;
    color: #43A047;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    border: 1px solid rgba(67, 160, 71, 0.2);
}

.rule-icon {
    color: #E53935; /* أيقونة حظر حمراء ناعمة وجذابة */
    font-size: 0.9rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.info-list li span strong {
    color: #333344; /* تمييز نصوص العناوين الفرعية بدون حدة اللون الأسود */
    font-weight: 700;
}

/* ==============================================
   12. شاشة التحميل الذكية (Loading Overlay)
   ============================================== */
#loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.92);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #F0EEFF;
    border-top-color: #7B6FD4;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading p {
    color: #888;
    font-weight: 700;
    font-size: 0.88rem;
}
