﻿/* ===== الخطوط والأساسيات ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(-45deg, #1a0a0a, #2d0a0a, #1a0a2e, #0d0d2b);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    color: aliceblue;
}

/* خلفية متحركة */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* جزيئات متوهجة في الخلفية */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(139, 0, 0, 0.1) 0%, transparent 50%), radial-gradient(circle at 70% 60%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
    animation: particleFloat 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes particleFloat {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== الحاوية الرئيسية ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 750px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 45px 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: containerFloat 3s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ===== الرأس والشعارات ===== */
.header {
    text-align: center;
    padding-bottom: 25px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

    .header::after {
        content: '✦';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        color: #d4af37;
        font-size: 20px;
        background: rgba(26, 10, 10, 0.9);
        padding: 0 15px;
    }

.logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    gap: 20px;
}

.university-logo, .faculty-logo {
    flex: 1;
    text-align: center;
}

    .university-logo h2 {
        font-size: 24px;
        font-weight: 900;
        background: linear-gradient(135deg, #ffd700, #d4af37, #ffd700);
        background-size: 200% 200%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: goldShine 3s ease-in-out infinite;
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
        letter-spacing: 2px;
    }

@keyframes goldShine {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.university-logo p, .faculty-logo p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 300;
}

.faculty-logo h2 {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b, #c0392b, #ff6b6b);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: redShine 3s ease-in-out infinite;

}

@keyframes redShine {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* فصل بين الشعارات */
.logos .divider {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.program-title {
    margin-top: 20px;
}

    .program-title h1 {
        font-size: 28px;
        font-weight: 900;
        color: #ffffff;
        text-shadow: 0 0 40px rgba(139, 0, 0, 0.3);
        letter-spacing: 1px;
    }

        .program-title h1 span {
            background: linear-gradient(135deg, #d4af37, #f9e076);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

    .program-title p {
        color: rgba(255, 255, 255, 0.4);
        font-size: 14px;
        margin-top: 5px;
        letter-spacing: 4px;
    }

/* ===== النموذج ===== */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        color: rgba(255, 255, 255, 0.8);
        font-weight: 600;
        font-size: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .form-group label .label-icon {
            font-size: 18px;
        }

    .form-group input[type="text"] {
        padding: 14px 20px;
        background: rgba(255, 255, 255, 0.06);
        border: 2px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        font-size: 16px;
        color: #ffffff;
        transition: all 0.4s ease;
        outline: none;
    }

        .form-group input[type="text"]::placeholder {
            color: rgba(255, 255, 255, 0.25);
        }

        .form-group input[type="text"]:focus {
            border-color: #d4af37;
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
            transform: scale(1.01);
        }

    .form-group input[type="file"] {
        padding: 14px 20px;
        background: rgba(255, 255, 255, 0.04);
        border: 2px dashed rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        color: rgba(255, 255, 255, 0.6);
        cursor: pointer;
        transition: all 0.4s ease;
        position: relative;
    }

        .form-group input[type="file"]:hover {
            border-color: #d4af37;
            background: rgba(255, 255, 255, 0.06);
        }

        .form-group input[type="file"]::file-selector-button {
            padding: 8px 20px;
            background: rgba(212, 175, 55, 0.2);
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 10px;
            color: #d4af37;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-left: 15px;
        }

            .form-group input[type="file"]::file-selector-button:hover {
                background: rgba(212, 175, 55, 0.3);
                transform: scale(1.05);
            }

    .form-group small {
        color: rgba(255, 255, 255, 0.3);
        font-size: 12px;
    }

/* ===== زر الإرسال ===== */
.submit-btn {
    padding: 18px;
    background: linear-gradient(135deg, #8B0000, #a00000, #8B0000);
    background-size: 200% 200%;
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    letter-spacing: 2px;
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: btnGlow 4s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 50px rgba(139, 0, 0, 0.4);
}

.submit-btn:active {
    transform: scale(0.95);
}

.submit-btn .btn-icon {
    margin-left: 10px;
}

/* ===== روابط العرض ===== */
.view-link {
    text-align: center;
    margin-top: 28px;
}

    .view-link a {
        color: rgba(255, 255, 255, 0.4);
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        transition: all 0.3s ease;
        padding: 10px 25px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        display: inline-block;
    }

        .view-link a:hover {
            color: #d4af37;
            border-color: rgba(212, 175, 55, 0.2);
            background: rgba(212, 175, 55, 0.05);
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

/* ===== التجاوب مع الشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .container {
        padding: 25px 20px;
        border-radius: 25px;
    }

    .logos {
        flex-direction: column;
        gap: 5px;
    }

        .logos .divider {
            width: 80%;
            height: 2px;
        }

    .university-logo h2, .faculty-logo h2 {
        font-size: 18px;
    }

    .program-title h1 {
        font-size: 20px;
    }
    /* تحسينات للعرض */
    .card {
        border-radius: 15px;
        overflow: hidden;
    }

    .card-header {
        padding: 20px;
    }

    .btn {
        border-radius: 25px;
        padding: 10px 25px;
    }

    .form-control {
        border-radius: 10px;
        padding: 12px;
    }

        .form-control:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
        }

    /* تنسيق رمز التحقق */
    .display-4 {
        font-size: 2.5rem;
        direction: ltr;
        background: linear-gradient(45deg, #0d6efd, #0dcaf0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* تحسينات للشاشات الصغيرة */
    @media (max-width: 768px) {
        .container {
            padding: 10px;
        }

        .display-4 {
            font-size: 1.8rem;
            letter-spacing: 4px !important;
        }
    }

    /* إضافة بعض التحسينات للجمال */
    .shadow {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }

    .border-radius-lg {
        border-radius: 15px;
    }
    /* تعديل ليشمل كل أنواع الإدخال */
    .form-group input[type="text"],
    .form-group input[type="tel"], /* ✅ إضافة هذا السطر */
    .form-group input[type="number"],
    .form-group input[type="email"] {
        width: 100%;
        padding: 14px 20px;
        background: rgba(255, 255, 255, 0.06);
        border: 2px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        font-size: 16px;
        color: #ffffff;
        transition: all 0.4s ease;
        outline: none;
        direction: ltr; /* للأرقام من اليسار لليمين */
        font-family: 'Cairo', 'Segoe UI', sans-serif;
    }

        .form-group input[type="text"]::placeholder,
        .form-group input[type="tel"]::placeholder {
            color: rgba(255, 255, 255, 0.25);
        }

        .form-group input[type="text"]:focus,
        .form-group input[type="tel"]:focus {
            border-color: #d4af37;
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
            transform: scale(1.01);
        }
    /* ===== رسائل التحقق والخطأ ===== */
    .field-validation-error {
        color: #ff6b6b !important; /* لون أحمر زاهي */
        font-size: 14px;
        font-weight: 600;
        display: block;
        margin-top: 5px;
        padding: 8px 14px;
        background: rgba(255, 0, 0, 0.15);
        border-radius: 10px;
        border-right: 3px solid #ff6b6b;
        animation: shakeError 0.5s ease;
    }

    /* رسائل التحقق العامة */
    .validation-summary-errors {
        background: rgba(255, 0, 0, 0.12);
        border: 2px solid rgba(255, 0, 0, 0.3);
        border-radius: 16px;
        padding: 15px 20px;
        margin-bottom: 20px;
        color: #ff6b6b;
    }

        .validation-summary-errors ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .validation-summary-errors li {
            padding: 5px 0;
            font-weight: 600;
        }

    /* تأثير اهتزاز للخطأ */
    @keyframes shakeError {
        0%, 100% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-8px);
        }

        75% {
            transform: translateX(8px);
        }
    }

    /* تلوين الحقل عند وجود خطأ */
    .form-group input.input-validation-error {
        border-color: #ff6b6b !important;
        background: rgba(255, 0, 0, 0.08) !important;
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.15) !important;
    }

    /* رسالة النجاح */
    .success-message {
        background: rgba(46, 204, 113, 0.15);
        border: 2px solid rgba(46, 204, 113, 0.3);
        border-radius: 16px;
        padding: 15px 20px;
        margin-bottom: 25px;
        color: #2ecc71;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 12px;
        animation: fadeInSuccess 0.5s ease;
    }

    @keyframes fadeInSuccess {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* جعل النص في رسائل الخطأ أكثر وضوحاً */
    .text-danger {
        color: #ff6b6b !important;
        font-weight: 700;
    }

    /* تنسيق النص المساعد (small) */
    .form-group small {
        color: rgba(255, 255, 255, 0.4);
        font-size: 12px;
        display: block;
        margin-top: 4px;
    }

    /* تنسيق رسائل الخطأ في الـ Div */
    .error-message {
        background: rgba(255, 0, 0, 0.1);
        border: 1px solid rgba(255, 0, 0, 0.2);
        border-radius: 10px;
        padding: 10px 15px;
        color: #ff6b6b;
        font-size: 14px;
        margin-top: 10px;
    }
    /* ✅ تنسيق الهيدر */
    .header {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 20px 25px 25px;
        border-radius: 16px;
        margin-bottom: 25px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    }

    /* ✅ تنسيق الشعارات */
    .logos {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 25px;
        flex-wrap: wrap;
        color: white;
    }

    .logo-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 18px 8px 15px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: transform 0.3s ease;
        border-radius: 10px;
    }

        .logo-item:hover {
            transform: translateY(-2px);
        }

        /* ✅ التحكم في حجم الصور - 50px */
        .logo-item .logo-image {
            width: 60px;
            height: 60px;
            object-fit: contain;
            border-radius: 10px;
            flex-shrink: 0;
            background: white;
            padding: 4px;
            border-radius: 10px;
        }

        .logo-item .logo-text {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            line-height: 1.2;
            
        }

            .logo-item .logo-text h2 {
                margin: 0;
                font-size: 17px;
                color: #2c3e50;
                font-weight: 700;
            }

            .logo-item .logo-text p {
                margin: 0;
                font-size: 10px;
                color: #7f8c8d;
                font-weight: 600;
                letter-spacing: 0.5px;
            }

    /* ✅ الفاصل بين الشعارات */
    .divider {
        width: 2px;
        height: 45px;
        background: linear-gradient(to bottom, transparent, #bdc3c7, transparent);
        flex-shrink: 0;
    }

    /* ✅ عنوان البرنامج */
    .program-title {
        text-align: center;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 2px solid rgba(52, 73, 94, 0.08);
    }

        .program-title h1 {
            font-size: 28px;
            color: #2c3e50;
            margin: 0;
        }

            .program-title h1 span {
                background: linear-gradient(135deg, #2c3e50, #3498db);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                background-clip: text;
            }

        .program-title p {
            margin: 5px 0 0;
            color: #7f8c8d;
            font-size: 15px;
            font-weight: 600;
        }

}
