/* ===== صفحة التسجيل ===== */

/* الصفحة الرئيسية */
.main-content {
    min-height: calc(100vh - 140px);
    background: linear-gradient(135deg, var(--white-off) 0%, var(--white) 100%);
    padding: 2rem 0;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="register-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(126,34,206,0.05)"/><circle cx="10" cy="10" r="0.5" fill="rgba(255,215,0,0.05)"/><circle cx="40" cy="15" r="0.5" fill="rgba(126,34,206,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23register-pattern)"/></svg>');
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* رأس الصفحة */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #7E22CE 0%, #4B0082 100%);
    border-radius: 20px;
    border: 3px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="header-stars" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="rgba(255,215,0,0.2)"/><circle cx="5" cy="5" r="0.5" fill="rgba(255,215,0,0.2)"/><circle cx="25" cy="8" r="0.5" fill="rgba(255,215,0,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23header-stars)"/></svg>');
    opacity: 0.4;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.page-description {
    font-size: 1.2rem;
    color: var(--white);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* حاوية النموذج */
.form-container {
    background: var(--white);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--gold);
    position: relative;
    backdrop-filter: blur(10px);
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.02) 0%, rgba(255, 215, 0, 0.02) 100%);
    border-radius: 25px;
    z-index: -1;
}

/* رأس النموذج */
.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-purple-dark);
    margin-bottom: 1rem;
    position: relative;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 2px;
}

.form-subtitle {
    color: var(--gray-dark);
    font-size: 1rem;
    line-height: 1.6;
}

/* النموذج */
.registration-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-purple-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-light);
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gold);
}

/* مجموعات النموذج */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-purple-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--gold);
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 15px;
    font-size: 1rem;
    background: var(--white);
    color: var(--black);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.form-group input::placeholder {
    color: var(--gray);
}

/* القوائم المنسدلة القابلة للبحث */
.searchable-dropdown {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 15px;
    font-size: 1rem;
    background: var(--white);
    color: var(--black);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* رفع الملفات */
.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed var(--gray-light);
    border-radius: 15px;
    background: var(--white);
    color: var(--gray-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.file-upload-label:hover {
    border-color: var(--gold);
    background: var(--gold-light);
    color: var(--primary-purple-dark);
}

.file-upload-label i {
    color: var(--gold);
    font-size: 1.2rem;
}

/* رسائل الخطأ */
.error-message {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message::before {
    content: '⚠';
    font-size: 0.8rem;
}

/* رسائل المعلومات */
.info-message {
    color: var(--primary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(126, 34, 206, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    border-right: 3px solid var(--primary);
}

.info-message i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* رسائل التشخيص */
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1e40af;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-info i {
    color: #3b82f6;
    margin-top: 0.1rem;
}

/* رسائل النجاح */
.success-message {
    color: var(--success);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message::before {
    content: '✓';
    font-size: 0.8rem;
}

/* الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
    border: 2px solid var(--primary-purple);
    box-shadow: 0 4px 15px rgba(126, 34, 206, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark) 0%, var(--primary-purple) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(126, 34, 206, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-purple);
    border: 2px solid var(--gold);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-secondary:hover {
    background: var(--gold-light);
    color: var(--primary-purple-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.btn-full {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* أزرار النموذج */
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
}

/* التجاوب */
@media (max-width: 768px) {
    .registration-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
    }
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    animation: fadeInUp 0.6s ease-out;
}

.page-header {
    animation: fadeInUp 0.8s ease-out;
}

/* تأثيرات خاصة */
.form-container::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

/* تحسينات إضافية */
.form-group input:valid {
    border-color: var(--success);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

/* تأثيرات التحويم للعناصر */
.form-group:hover label i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.file-upload:hover .file-upload-label {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* تنسيقات الـ Checkboxes */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkbox-group input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gray-dark);
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    color: var(--primary-purple-dark);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-light);
    border-radius: 4px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-custom i {
    color: var(--white);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-label .checkbox-custom {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-label .checkbox-custom i {
    opacity: 1;
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-label {
    color: var(--primary-purple-dark);
    font-weight: 600;
}

.checkbox-text {
    flex: 1;
}

.terms-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: var(--gold-dark);
    border-bottom-color: var(--gold-dark);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.optional-text {
    color: var(--gray);
    font-size: 0.85rem;
    font-style: italic;
}

/* تأثيرات خاصة للـ checkboxes */
.checkbox-group:hover .checkbox-custom {
    border-color: var(--gold);
    transform: scale(1.05);
}

.checkbox-group input[type="checkbox"]:focus + .checkbox-label .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
}

/* تنسيقات الشروط والأحكام الجديدة */
.terms-section {
    grid-column: 1 / -1;
    margin-top: 2rem;
}

.terms-container {
    background: linear-gradient(135deg, var(--white-off) 0%, var(--white) 100%);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--gold-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.terms-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="terms-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(126,34,206,0.03)"/><circle cx="10" cy="10" r="0.5" fill="rgba(255,215,0,0.03)"/><circle cx="30" cy="15" r="0.5" fill="rgba(126,34,206,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23terms-pattern)"/></svg>');
    opacity: 0.5;
}

.terms-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.terms-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px rgba(126, 34, 206, 0.3);
    border: 3px solid var(--gold);
}

.terms-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.terms-section .section-title {
    color: var(--primary-purple-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

.terms-section .section-title::before {
    display: none;
}

.terms-subtitle {
    color: var(--gray-dark);
    font-size: 1rem;
    margin: 0;
}

.terms-content {
    position: relative;
    z-index: 1;
}

.terms-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid var(--gray-light);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.terms-card:hover {
    border-color: var(--gold);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.1);
}

.terms-card.agreed {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05) 0%, var(--white) 100%);
    box-shadow: 0 5px 20px rgba(72, 187, 120, 0.2);
}

.terms-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.terms-checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    width: 100%;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    overflow: hidden;
}

.custom-checkbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-checkbox i {
    color: var(--white);
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.custom-checkbox.checked {
    border-color: var(--gold);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.custom-checkbox.checked::before {
    opacity: 1;
}

.custom-checkbox.checked i {
    opacity: 1;
    transform: scale(1.1);
}

.terms-text {
    flex: 1;
}

.terms-main-text {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-purple-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.terms-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.terms-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.terms-link:hover {
    background: var(--gold);
    color: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.terms-link i {
    font-size: 0.8rem;
}

.terms-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(245, 101, 101, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.terms-error i {
    color: var(--error);
}

.terms-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--gold-light);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
    border-color: var(--gold);
}

.benefit-item i {
    color: var(--gold);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.benefit-item span {
    color: var(--primary-purple-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

/* تأثيرات الحركة */
@keyframes termsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.terms-card.agreed {
    animation: termsPulse 0.6s ease-in-out;
}

/* التجاوب */
@media (max-width: 768px) {
    .terms-container {
        padding: 1.5rem;
    }
    
    .terms-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .terms-link {
        justify-content: center;
    }
    
    .terms-benefits {
        grid-template-columns: 1fr;
    }
    
    .terms-checkbox-label {
        gap: 0.75rem;
    }
    
    .custom-checkbox {
        width: 20px;
        height: 20px;
    }
}