@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@500;600;700;800&display=swap');

.urs-registration-wrapper {
    direction: rtl;
    text-align: right;
    max-width: 960px;
    margin: 40px auto;
    font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Progress */
.urs-progress-container {
    margin-bottom: 32px;
}
.urs-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.urs-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}
.urs-steps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}
.urs-step-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.3s;
}
.urs-step-label.active {
    color: #4f46e5;
}
.urs-step-label.done {
    color: #16a34a;
}
.urs-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all 0.3s;
    flex-shrink: 0;
}
.urs-step-label.active .urs-step-num {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.urs-step-label.done .urs-step-num {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}

/* Steps */
.urs-step {
    display: none;
}
.urs-step.active {
    display: block;
    animation: ursSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.urs-step.slide-out-right {
    animation: ursSlideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.urs-step.slide-out-left {
    animation: ursSlideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes ursSlideIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes ursSlideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-24px); }
}
@keyframes ursSlideOutLeft {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(24px); }
}

.step-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 24px;
    line-height: 1.3;
}

/* Form fields */
.input-row {
    margin-bottom: 16px;
}
.input-row input,
.input-row select,
.urs-step input[type="text"],
.urs-step input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}
.urs-step input:hover {
    background: #fff;
    border-color: #cbd5e1;
}
.urs-step input:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}
.urs-step input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}
.urs-step select {
    width: 100%;
    padding: 13px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    appearance: auto;
    -webkit-appearance: menulist;
    min-height: 48px;
    transition: border-color 0.25s, background 0.25s;
}
.urs-step select:hover {
    background: #fff;
    border-color: #cbd5e1;
}
.urs-step select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    background: #fff;
}
.urs-field-error {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: ursFieldErrorIn 0.2s ease;
}
@keyframes ursFieldErrorIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Error summary */
.urs-error-summary {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: ursFadeIn 0.25s ease;
}
@keyframes ursFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Loading overlay */
.urs-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: ursFadeIn 0.2s ease;
}
.urs-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ursSpin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 16px;
}
@keyframes ursSpin {
    to { transform: rotate(360deg); }
}
.urs-loading-text {
    font-size: 15px;
    font-weight: 700;
    color: #475569;
}
/* Password hint */
.urs-pass-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
    margin-bottom: 4px;
}
/* Password reveal */
.urs-pwd-wrap {
    position: relative;
}
.urs-pwd-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.urs-pwd-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.urs-pwd-wrap input {
    padding-right: 44px !important;
}
.urs-pwd-wrap input::-ms-reveal,
.urs-pwd-wrap input::-ms-clear {
    display: none;
}
.urs-username-status {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.urs-turnstile-wrap {
    margin-bottom: 16px;
}
.urs-turnstile-wrap > div {
    margin: 0 auto;
}

/* Terms */
.terms-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    max-height: 280px;
    overflow-y: auto;
}
.terms-box p {
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
    margin: 0 0 14px;
}
.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #6366f1;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}
.download-link:hover {
    border-color: #6366f1;
    background: #eef2ff;
}
.accept-terms {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    padding: 6px 0;
    font-weight: 600;
}
.accept-terms input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #6366f1;
    cursor: pointer;
    border-radius: 6px;
}

/* Referrer */
.urs-yesno-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.urs-yesno-label {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s;
    background: #f8fafc;
    user-select: none;
}
.urs-yesno-label:hover {
    border-color: #cbd5e1;
    background: #fff;
}
.urs-yesno-label.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4f46e5;
    box-shadow: 0 2px 12px rgba(99,102,241,0.15);
}
.urs-yesno-label input {
    display: none;
}
.urs-referrer-search {
    display: none;
    margin-top: 10px;
}
.urs-referrer-search.visible {
    display: block;
}
.urs-search-wrap-field {
    position: relative;
}
.urs-search-wrap-field .urs-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.4;
    pointer-events: none;
}
.urs-search-wrap-field input {
    width: 100%;
    padding: 14px 44px 14px 16px !important;
}
#referrer-status {
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}
#referrer-preview {
    display: none;
    margin-top: 20px;
}
.user-preview-card {
    background: linear-gradient(135deg, #f0f4ff, #eef2ff);
    border: 1.5px solid #c7d2fe;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.08);
    animation: ursSlideUp 0.35s ease;
    overflow: hidden;
    padding: 0;
}
@keyframes ursSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ref-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 12px;
}
.ref-avatar-section {
    margin-bottom: 10px;
}
.ref-avatar-ring {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    box-shadow: 0 3px 12px rgba(99,102,241,0.2);
}
.ref-avatar-ring .ref-avatar-wrap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
}
.ref-avatar-ring .ref-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.ref-name {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 2px;
}
.ref-username-line {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 10px;
}
.ref-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}
.ref-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.ref-meta-item .ref-id {
    color: #6366f1;
    font-weight: 700;
}
.ref-meta-item #ref-user-rank {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 700;
}
.ref-meta-divider {
    color: #cbd5e1;
    font-size: 14px;
}

/* Card activation */
#card-status {
    font-size: 13px;
    margin-top: 6px;
}

/* Profile picture */
.profile-pic-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.pic-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition: border-color 0.25s;
}
.pic-preview:hover {
    border-color: #6366f1;
}
.pic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pic-preview img[src=""],
.pic-preview img:not([src]) {
    display: block;
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    opacity: 0.4;
}
#profile_pic_input {
    display: none;
}
.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.25s;
}
.upload-label:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}
.upload-hint {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

/* Navigation */
.step-navigation {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1.5px solid #f1f5f9;
}
.step-navigation button,
.step-navigation a.urs-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}
.btn-prev {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid transparent;
}
.btn-prev:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    letter-spacing: 0.3px;
}
.btn-next:hover,
.btn-submit:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}
.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
}
.btn-next:disabled,
.btn-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Alerts & Messages */
.urs-registration-wrapper .urs-alert {
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
}
.urs-alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}
.urs-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.urs-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.urs-btn-link {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.25s;
}
.urs-btn-link:hover {
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
    transform: translateY(-1px);
    color: #fff;
}
.urs-registration-wrapper .urs-success-box {
    padding: 28px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 20px;
    color: #166534;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
}

/* Country wrap */
.urs-country-wrap {
    margin-bottom: 16px;
}
.urs-country-wrap select {
    width: 100%;
    padding: 13px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    appearance: auto;
    -webkit-appearance: menulist;
    min-height: 48px;
    transition: border-color 0.25s, background 0.25s;
}
.urs-country-wrap select:hover {
    background: #fff;
    border-color: #cbd5e1;
}
.urs-country-wrap select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    background: #fff;
}
.urs-country-hint {
    font-size: 12px;
    color: #16a34a;
    margin-top: 6px;
    font-weight: 600;
}
/* Section dividers */
.urs-section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 16px;
    padding: 0;
}
.urs-section-divider::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: linear-gradient(to left, #e2e8f0, transparent);
}
.urs-section-icon {
    font-size: 18px;
    line-height: 1;
}
.urs-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #475569;
    white-space: nowrap;
}
/* Referrer info in step 2 */
.urs-referrer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
}
.urs-referrer-info-label {
    font-weight: 600;
    color: #166534;
}
.urs-referrer-info-value {
    font-weight: 700;
    color: #15803d;
}

/* Activation box */
.urs-activation-box {
    margin-top: 24px;
    background: #fff;
    border: 2px solid #e0e7ff;
    border-radius: 24px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(99,102,241,0.08);
}
.urs-activation-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}
.urs-activation-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.6;
}
.urs-activation-field {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.urs-activation-field input {
    width: 180px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    text-align: right;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #f8fafc;
}
.urs-activation-field input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    background: #fff;
}
.urs-activation-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.urs-activation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}
.urs-activation-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .urs-registration-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    .step-title {
        font-size: 20px;
    }
    .step-navigation {
        flex-direction: column;
    }
.urs-registration-wrapper {
        margin: 16px auto;
    }
    .urs-steps-labels {
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }
}
