/* ===== صفحة التسجيل ===== */

/* تحسينات إضافية لصفحة التسجيل */
.register-card {
    max-width: 950px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(10px);
}

.register-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.03) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

/* تعديل تخطيط الحاوية عند إزالة الصورة */
.auth-container {
    grid-template-columns: 1fr !important;
    justify-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.register-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
}

/* أقسام النموذج */
.register-form > .form-section {
    background: linear-gradient(135deg, var(--white) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(106, 13, 173, 0.08),
        0 4px 12px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

/* القسم الأول (المعلومات الشخصية) - يأخذ العمود الأول */
.register-form > .form-section:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
}

/* القسم الثاني (الموقع) - يأخذ العمود الثاني */
.register-form > .form-section:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
}

/* القسم الثالث (كلمة المرور) - يأخذ العمود الأول */
.register-form > .form-section:nth-of-type(3) {
    grid-column: 1;
    grid-row: 2;
}

/* القسم الرابع (رمز الإحالة) - يأخذ العمود الثاني في نفس صف كلمة المرور */
.register-form > .form-section:nth-of-type(4) {
    grid-column: 2;
    grid-row: 2;
}

/* القسم الخامس (الصور والوثائق) - يأخذ العمود الكامل */
.register-form > .form-section:nth-of-type(5) {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* قسم الشروط والأحكام يأخذ العمود الكامل */
.register-form > .terms-group {
    grid-column: 1 / -1;
    grid-row: 4;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary-purple) 50%, var(--gold) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.form-section:hover {
    box-shadow: 
        0 16px 48px rgba(255, 215, 0, 0.2),
        0 8px 24px rgba(106, 13, 173, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: var(--gold-dark);
    transform: translateY(-4px);
    background: var(--white);
}

.form-section:hover::before {
    transform: scaleX(1);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-purple-dark);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--gold) 0%, var(--primary-purple) 50%, var(--gold) 100%) 1;
    position: relative;
    text-shadow: 0 2px 4px rgba(106, 13, 173, 0.1);
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-purple) 100%);
    border-radius: 2px;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

.section-title i {
    color: var(--white);
    font-size: 1.4rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold) 0%, var(--primary-purple) 100%);
    border-radius: 14px;
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.3),
        0 2px 6px rgba(106, 13, 173, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.section-title i::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-section:hover .section-title i {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 
        0 8px 24px rgba(255, 215, 0, 0.4),
        0 4px 12px rgba(106, 13, 173, 0.3);
}

.form-section:hover .section-title i::before {
    width: 100px;
    height: 100px;
}

/* الحقول المطلوبة */
.required {
    color: var(--error);
    font-weight: bold;
    margin-right: 0.25rem;
    font-size: 1.1em;
    vertical-align: middle;
}

/* تحسين التسميات */
.form-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-purple-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.form-section:hover .form-label {
    color: var(--primary-purple);
}

/* معلومات إضافية */
.input-info {
    margin-top: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--gold-lighter) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 1px solid var(--gold);
    border-radius: 12px;
    color: var(--primary-purple);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.input-info:hover {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
    transform: translateX(5px);
}

.input-info i {
    color: var(--info);
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* قوة كلمة المرور */
.password-strength {
    margin-top: 0.75rem;
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(106, 13, 173, 0.2) 100%);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--error);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.85rem;
    color: var(--primary-purple);
    text-align: right;
}

.strength-text.weak {
    color: var(--error);
}

.strength-text.medium {
    color: var(--warning);
}

.strength-text.strong {
    color: var(--success);
}

/* الشروط والأحكام */
.register-form > .terms-group {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--gold-lighter) 0%, rgba(255, 215, 0, 0.12) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--gold);
    box-shadow: 
        0 6px 20px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.terms-group::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.terms-group:hover {
    box-shadow: 
        0 12px 32px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    border-color: var(--gold-dark);
}

.terms-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary-purple);
}

.terms-link {
    color: var(--primary-purple);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--primary-purple-dark);
}

/* تحسينات النص */
.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* رسائل الخطأ */
.input-error {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.5rem;
}

.input-error:empty {
    display: none;
}

.input-error::before {
    content: '⚠';
    font-size: 1rem;
}

/* تحسينات الأزرار */
.register-form > .btn-full,
.register-form > button.btn-full {
    grid-column: 1 / -1;
    grid-row: 5;
    width: 100%;
    padding: 1.4rem 3rem;
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--primary-purple-dark);
    border: 3px solid var(--gold);
    box-shadow: 
        0 10px 30px rgba(255, 215, 0, 0.35),
        0 4px 12px rgba(106, 13, 173, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-full::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn-full span {
    position: relative;
    z-index: 1;
}

.btn-full:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 16px 40px rgba(255, 215, 0, 0.45),
        0 8px 20px rgba(106, 13, 173, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: var(--gold-dark);
}

.btn-full:hover::before {
    width: 400px;
    height: 400px;
}

.btn-full:active {
    transform: translateY(-2px) scale(1);
    box-shadow: 
        0 8px 20px rgba(255, 215, 0, 0.3),
        0 4px 10px rgba(106, 13, 173, 0.2);
}

.btn-full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

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

/* تحسينات الحقول */
.form-input,
.form-textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--gold);
    box-shadow: 
        0 0 0 4px rgba(255, 215, 0, 0.15),
        0 4px 12px rgba(106, 13, 173, 0.1);
    outline: none;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.98);
}

.input-icon {
    transition: all 0.3s ease;
}

.form-input:focus ~ .input-icon,
.form-input:focus + .input-icon {
    color: var(--gold);
    transform: scale(1.15);
}

.input-group {
    position: relative;
}

.input-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary-purple) 100%);
    transition: width 0.3s ease;
}

.form-input:focus ~ .input-group::after,
.form-input:focus + .input-group::after {
    width: 100%;
}

/* تحسينات التجاوب */
/* شاشات متوسطة (تابلت) */
@media (max-width: 992px) {
    .register-card {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .auth-container {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }
    
    .register-form {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    
    .register-form > .form-section:nth-of-type(1),
    .register-form > .form-section:nth-of-type(2),
    .register-form > .form-section:nth-of-type(3),
    .register-form > .form-section:nth-of-type(4) {
        grid-column: 1;
        grid-row: auto;
    }
    
    .register-form > .form-section:nth-of-type(5) {
        grid-column: 1;
        grid-row: auto;
    }
    
    .register-form > .terms-group {
        grid-column: 1;
        grid-row: auto;
    }
    
    .register-form > .btn-full,
    .register-form > button.btn-full {
        grid-column: 1;
        grid-row: auto;
    }
    
    .form-section {
        padding: 2.5rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
}

/* شاشات صغيرة (موبايل كبير) */
@media (max-width: 768px) {
    .register-card {
        padding: 2rem 1.5rem;
        margin: 0.75rem;
        border-radius: 20px;
    }

    .auth-container {
        padding: 1.5rem 0.75rem;
    }

    .register-form {
        gap: 1.5rem;
    }

    .form-section,
    .register-form > .form-section {
        padding: 2rem 1.75rem;
        border-radius: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 2rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .section-title i {
        font-size: 1.2rem;
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .form-label {
        font-size: 1rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.875rem 2.75rem 0.875rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .input-icon {
        font-size: 1rem;
        right: 0.875rem;
    }
    
    .terms-group {
        padding: 2rem 1.75rem;
        border-radius: 18px;
    }
    
    .terms-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .btn-full {
        padding: 1.2rem 2.5rem;
        font-size: 1.1rem;
        border-radius: 16px;
    }

    .input-info {
        padding: 0.875rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    .file-upload-label {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        min-height: 55px;
    }
    
    .file-preview {
        padding: 0.875rem;
    }
}

/* شاشات صغيرة جداً (موبايل عادي) */
@media (max-width: 576px) {
    .register-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: 18px;
    }

    .auth-container {
        padding: 1rem 0.5rem;
    }
    
    .auth-header {
        margin-bottom: 2rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-subtitle {
        font-size: 0.95rem;
    }

    .register-form {
        gap: 1.25rem;
    }

    .form-section,
    .register-form > .form-section {
        padding: 1.75rem 1.5rem;
        border-radius: 18px;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.75rem;
        gap: 0.75rem;
        padding-bottom: 1rem;
        flex-wrap: wrap;
    }
    
    .section-title i {
        font-size: 1.1rem;
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }
    
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.625rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .input-icon {
        font-size: 0.95rem;
        right: 0.75rem;
    }
    
    .password-toggle {
        left: 0.75rem;
        padding: 0.4rem;
    }
    
    .terms-group {
        padding: 1.75rem 1.5rem;
        border-radius: 16px;
    }

    .terms-text {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .btn-full {
        padding: 1.1rem 2rem;
        font-size: 1.05rem;
        border-radius: 14px;
        letter-spacing: 0.5px;
    }

    .input-info {
        padding: 0.75rem;
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .file-upload-label {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-height: 50px;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-upload-label i {
        font-size: 1.1rem;
    }
    
    .file-preview {
        padding: 0.75rem;
    }
    
    .file-preview .file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .input-error {
        font-size: 0.8rem;
    }
    
    .input-hint {
        font-size: 0.8rem;
    }
}

/* شاشات صغيرة جداً جداً (موبايل صغير) */
@media (max-width: 400px) {
    .register-card {
        padding: 1.25rem 0.75rem;
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .auth-container {
        padding: 0.75rem 0.25rem;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }

    .register-form {
        gap: 1rem;
    }

    .form-section,
    .register-form > .form-section {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
        margin-bottom: 1.25rem;
    }

    .section-title {
        font-size: 1.05rem;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }
    
    .section-title i {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.7rem 2.25rem 0.7rem 0.7rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .input-icon {
        font-size: 0.9rem;
        right: 0.7rem;
    }
    
    .password-toggle {
        left: 0.7rem;
        padding: 0.35rem;
    }

    .btn-full {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    
    .terms-group {
        padding: 1.5rem 1.25rem;
    }
    
    .terms-text {
        font-size: 0.85rem;
    }
    
    .input-info {
        padding: 0.65rem;
        font-size: 0.8rem;
    }
    
    .file-upload-label {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 45px;
    }
}

/* تحسينات للشاشات الكبيرة جداً */
@media (min-width: 1400px) {
    .register-card {
        max-width: 1100px;
    }
    
    .register-form {
        gap: 2.5rem;
    }
    
    .form-section {
        padding: 3.5rem;
    }
}

/* تحسينات للوضع الأفقي في الموبايل */
@media (max-width: 992px) and (orientation: landscape) {
    .auth-container {
        padding: 1rem;
    }
    
    .register-form {
        gap: 1.25rem;
    }
    
    .form-section {
        padding: 1.75rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
}

/* تحسينات إضافية */
.auth-header {
    margin-bottom: 3rem;
    text-align: center;
}

.auth-title {
    background: linear-gradient(135deg, var(--primary-purple-dark) 0%, var(--primary-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    word-wrap: break-word;
}

.auth-subtitle {
    margin-top: 1rem;
    color: var(--primary-purple);
    font-size: 1.05rem;
    word-wrap: break-word;
}

/* تحسينات للتجاوب في العنوان */
@media (max-width: 576px) {
    .auth-header {
        margin-bottom: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 400px) {
    .auth-title {
        font-size: 1.3rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
    }
}

/* تحسينات التنبيهات */
.alert {
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.15);
    animation: slideDown 0.3s ease-out;
    margin-bottom: 2rem;
    will-change: opacity;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* منع الاهتزاز أثناء التمرير */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* تحسين الأداء أثناء التمرير */
.register-form,
.form-section,
.auth-card {
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* تقليل التأثيرات أثناء التمرير */
@media (prefers-reduced-motion: no-preference) {
    .form-section {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .form-input:focus,
    .form-textarea:focus {
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
}

/* ===== أنماط رفع الملفات ===== */
.file-upload-wrapper {
    margin-top: 0.5rem;
}

.file-upload-input {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    border: 2px dashed var(--gold);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gold-lighter) 0%, rgba(255, 215, 0, 0.08) 100%);
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    min-height: 60px;
}

.file-upload-label:hover {
    border-color: var(--gold-dark);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.12) 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.2),
        0 2px 6px rgba(106, 13, 173, 0.1);
}

.file-upload-label:active {
    transform: translateY(0);
}

.file-upload-label i {
    font-size: 1.3rem;
    color: var(--gold-dark);
    transition: all 0.3s ease;
}

.file-upload-label:hover i {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary-purple);
}

.file-upload-text {
    flex: 1;
    text-align: center;
}

.file-preview {
    margin-top: 1rem;
    display: none;
    padding: 1rem;
    background: linear-gradient(135deg, var(--white) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 2px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

.file-preview.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.file-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.file-preview .file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}

.file-preview .file-name {
    font-size: 0.9rem;
    color: var(--primary-purple);
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview .file-remove {
    background: var(--error);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.file-preview .file-remove:hover {
    background: #E53E3E;
    transform: scale(1.05);
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-dark);
    font-style: italic;
}

/* تحسينات رفع الملفات في الشاشات الصغيرة */
@media (max-width: 768px) {
    .file-upload-label {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        min-height: 55px;
    }
    
    .file-upload-label i {
        font-size: 1.2rem;
    }
    
    .file-preview {
        padding: 0.875rem;
    }
    
    .file-preview img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 576px) {
    .file-upload-label {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-height: 50px;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-upload-label i {
        font-size: 1.1rem;
    }
    
    .file-preview {
        padding: 0.75rem;
    }
    
    .file-preview .file-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-preview .file-remove {
        width: 100%;
        text-align: center;
    }
}

/* تحسينات إضافية للتجاوب */
@media (max-width: 576px) {
    /* تحسين عرض الحقول في الموبايل */
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* تحسين عرض الأيقونات */
    .input-icon {
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* تحسين عرض أزرار كلمة المرور */
    .password-toggle {
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* تحسين عرض الشروط */
    .checkbox-label {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .terms-text {
        flex: 1;
        min-width: 100%;
    }
    
    /* تحسين عرض التنبيهات */
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    .alert i {
        font-size: 1rem;
    }
}

/* تحسينات إضافية للوضع الليلي (إن وُجد) */
@media (prefers-color-scheme: dark) {
    .form-section {
        background: linear-gradient(135deg, rgba(106, 13, 173, 0.1) 0%, rgba(126, 34, 206, 0.05) 100%);
        border-color: var(--gold);
    }
    
    .section-title {
        color: var(--primary-purple-dark);
    }
    
    .input-info {
        background: linear-gradient(135deg, var(--gold-lighter) 0%, rgba(255, 215, 0, 0.15) 100%);
        border-color: var(--gold);
        color: var(--primary-purple);
    }
    
    .terms-group {
        background: linear-gradient(135deg, var(--gold-lighter) 0%, rgba(255, 215, 0, 0.15) 100%);
        border-color: var(--gold);
    }
    
    .terms-text {
        color: var(--primary-purple);
    }
    
    .register-card {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    }
}

/* تحسينات للشاشات التي تدعم اللمس */
@media (hover: none) and (pointer: coarse) {
    .form-input,
    .form-textarea {
        font-size: 16px; /* منع التكبير التلقائي في iOS */
    }
    
    .btn-full {
        min-height: 48px; /* حجم مناسب للمس */
    }
    
    .password-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .file-upload-label {
        min-height: 48px;
    }
    
    .checkbox-label {
        min-height: 44px;
        padding: 0.5rem 0;
    }
}

/* تحسينات للطباعة */
@media print {
    .register-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn-full,
    .file-upload-label,
    .password-toggle {
        display: none;
    }
}

/* تحسينات للأجهزة عالية الدقة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .section-title i {
        box-shadow: 
            0 2px 6px rgba(255, 215, 0, 0.3),
            0 1px 3px rgba(106, 13, 173, 0.2);
    }
}

/* تحسينات للوصولية */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* منع الاهتزاز أثناء التفاعل */
.form-input:focus,
.form-textarea:focus,
.btn-full:active {
    transform: none !important;
}

/* تحسين التمرير السلس */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 20px;
    }
    
    .form-section {
        scroll-margin-top: 20px;
    }
}
