/**
 * تصميم عصري واحترافي لنموذج الاستبيان مع نجوم التقييم
 * Modern Professional Survey Design with Star Rating
 */

/* استيراد خط Cairo العربي وأيقونات Font Awesome */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* إعادة تعيين الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* الإعدادات العامة */
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
    position: relative;
}

/* خلفية عصرية متحركة */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* حاوي الاستبيان */
.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* رأس الاستبيان */
.survey-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);

}

.survey-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.survey-header p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
}



/* حاوي الأسئلة الموحد */
.questions-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);

}

/* السؤال الفردي */
.question-item {
    margin-bottom: 35px;
    padding-bottom: 30px;

    position: relative;
}

.question-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* رأس السؤال */
.question-header {
    margin-bottom: 20px;
}

/* رقم السؤال */
.question-number {
    color: #1e3c72;
    font-weight: 700;
    font-size: 1.2rem;
    margin-left: 8px;
}

/* نص السؤال */
.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    flex: 1;
}

/* علامة الإجبارية */
.required-mark {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 5px;
}

/* حاوي النجوم */
.stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* النجوم */
.star-rating {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.star:hover,
.star.active {
    color: #ffd700;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.star:hover::before,
.star.active::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}



/* حقول النص */
.form-control {
    width: 100%;
    padding: 15px 20px;

    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 100px;
}

.form-control:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
    background: #fff;
}

/* زر الإرسال */
.submit-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;

}

.btn-submit {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(30, 60, 114, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::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 ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(30, 60, 114, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(0px);
}

/* رسالة الشكر */
.thank-you-message {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);

    position: relative;
}

.thank-you-message::before {
    content: '🎉';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.thank-you-message h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    margin-top: 10px;
}

.thank-you-message p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-item {
    animation: fadeInUp 0.6s ease-out;
}

.question-item:nth-child(1) { animation-delay: 0.1s; }
.question-item:nth-child(2) { animation-delay: 0.2s; }
.question-item:nth-child(3) { animation-delay: 0.3s; }
.question-item:nth-child(4) { animation-delay: 0.4s; }
.question-item:nth-child(5) { animation-delay: 0.5s; }

/* حالات الخطأ */
.question-item.error {

    padding-left: 20px;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 10px;
}

.question-item.error .question-text {
    color: #e74c3c;
}

/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .survey-container {
        padding: 15px;
    }
    
    .survey-header,
    .questions-container {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .survey-header h1 {
        font-size: 2rem;
    }
    

    
    .star {
        font-size: 1.8rem;
    }
    

    
    .btn-submit {
        padding: 15px 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .survey-header h1 {
        font-size: 1.7rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .star {
        font-size: 1.6rem;
    }

    .stars-container {
        gap: 5px;
    }
}

/* تحسينات إضافية للنجوم */
.star-rating input[type="radio"]:checked + .star {
    color: #ffd700;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.star-rating input[type="radio"]:checked + .star::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

/* تأثير التحديد للنجوم */
.star-rating .star.selected {
    color: #ffd700;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.star-rating .star.selected::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}
