/* --- 1. تنظیمات پایه و فونت --- */
@font-face {
    font-family: 'Vazirmatn';
    src: url('Vazirmatn.ttf') format('truetype');
}

#survey-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 24px;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #2c3e50;
    position: relative;
    overflow: hidden;
}

#survey-header h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 20px;
    color: #1a2a6c;
}

/* --- 2. نوار پیشرفت --- */
.progress-container {
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-bottom: 30px;
}

.progress-bar {
    width: 0%; /* با جاوااسکریپت تغییر می‌کند */
    height: 100%;
    background: linear-gradient(90deg, #1a2a6c, #b21f1f);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 3. مراحل و انیمیشن --- */
.os-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.os-step.active {
    display: block;
}

/* --- 4. فیلد‌های ورودی --- */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    color: #1a2a6c;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.6);
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.input-group input:focus {
    background: #fff;
    box-shadow: 0 0 15px rgba(26,42,108,0.15);
    border-color: #1a2a6c;
}

/* --- 5. دکمه‌ها --- */
.os-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: #1a2a6c;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(26, 42, 108, 0.2);
}

.os-btn:hover {
    background: #121c4a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 42, 108, 0.3);
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.prev-btn { 
    background: rgba(127, 140, 141, 0.8); 
    flex: 0.4;
}

.next-btn, .submit-btn {
    flex: 1;
}

/* --- 6. استایل مدرن سوالات تک‌مرحله‌ای (جدید) --- */
.q-card-single {
    text-align: center;
    margin-bottom: 20px;
}

.q-text-large {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #1a2a6c;
    line-height: 1.6;
}

.modern-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-card {
    cursor: pointer;
    width: 100%;
    display: block;
}

.radio-card input {
    display: none; /* مخفی کردن دکمه رادیویی پیش‌فرض */
}

.card-content {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.emoji-large {
    font-size: 45px; /* ایموجی درشت */
    margin-left: 20px;
}

.label-text {
    font-size: 19px; /* متن درشت */
    font-weight: bold;
}

/* حالت انتخاب شده سوال */
.radio-card input:checked + .card-content {
    background: #1a2a6c;
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(26, 42, 108, 0.3);
    border-color: #1a2a6c;
}

.radio-card:hover .card-content {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(26, 42, 108, 0.2);
}

/* --- 7. لودینگ و خطا --- */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    display: none;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.error-msg { 
    color: #e74c3c; 
    font-size: 14px; 
    margin-top: 15px; 
    text-align: center;
    font-weight: bold;
    min-height: 20px;
}

/* --- 8. پایان نظرسنجی --- */
.success-content { 
    text-align: center; 
    padding: 40px 0; 
}

.success-icon {
    font-size: 80px;
    color: #27ae60;
    margin-bottom: 25px;
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp { from { transform: scale(0); } to { transform: scale(1); } }

/* --- 9. اسکرول‌بار --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
::-webkit-scrollbar-thumb { background: #1a2a6c; border-radius: 10px; }
