/* --- Reset & Inherit Fonts --- */
#rst-exam-wrapper {
    font-family: inherit !important; 
    background-color: #201b13 !important;
    color: #ffffff !important;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    font-size: 14px !important;
}

#rst-exam-wrapper * { 
    box-sizing: border-box; 
    font-family: inherit !important;
}

/* --- Views --- */
.rst-view { display: none; padding: 40px; animation: fadeIn 0.5s; }
.rst-view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Buttons --- */
.rst-btn {
    background-color: #ba8a4a !important;
    color: #201b13 !important;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px !important;
    font-weight: normal !important;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit !important;
    display: inline-block;
    text-decoration: none;
}
.rst-btn:hover {
    background-color: #d8ae75 !important;
    transform: translateY(-2px);
}

#btn-prev-q {
    background: transparent !important;
    color: #ffffff !important; 
    font-size: 13px !important;
    padding: 0;
    border: none !important;
    cursor: pointer;
    font-family: inherit !important;
}
#btn-prev-q:hover { color: #d8ae75 !important; background: transparent !important; }

/* --- Header --- */
.rst-exam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.rst-header-content h3 {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: normal !important;
    margin-bottom: 10px;
    font-family: inherit !important;
}

.rst-subtitle {
    font-size: 13px;
    color: #ccc !important;
    margin-top: 5px;
    opacity: 0.8;
}

.rst-timer-box {
    background: transparent !important;
    color: #d8ae75 !important;
    padding: 0;
    font-weight: normal;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    font-family: inherit !important;
    min-width: auto;
}
.rst-timer-alert { color: #e74c3c !important; animation: pulse 1s infinite; }

/* --- Questions & Options --- */
.rst-question-slide { display: none; }
.rst-question-slide.active { display: block; animation: slideIn 0.4s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.rst-q-text {
    font-size: 14px !important;
    color: #ffffff !important;
    margin-bottom: 25px;
    font-weight: normal !important;
    font-family: inherit !important;
    text-align: justify !important;
    line-height: 1.9;
}
.rst-q-num-badge { 
    background-color: #d8ae75;
    color: #201b13 !important;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    font-family: inherit !important;
    margin-left: 10px;
    float: right;
}

.rst-options-grid { display: grid; gap: 15px; }

.rst-opt-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    background-color: #201b13;
    position: relative;
    text-align: justify;
}

.rst-opt-text { text-align: justify; width: 100%; font-size: 14px !important; color: #fff; }

.rst-opt-label input[type="radio"], .rst-opt-radio { 
    position: absolute !important; opacity: 0 !important; width: 0 !important; height: 0 !important;
    margin: 0 !important; padding: 0 !important; pointer-events: none !important; z-index: -1 !important;
} 

.rst-opt-marker {
    width: 20px; height: 20px;
    border: 2px solid #ba8a4a;
    background-color: #fff;
    border-radius: 50%;
    margin-left: 15px;
    position: relative;
    flex-shrink: 0;
    display: inline-block;
}

.rst-opt-label.checked { border-color: #ba8a4a !important; background-color: #201b13; }
.rst-opt-label.checked .rst-opt-marker { background-color: #ba8a4a !important; box-shadow: 0 0 0 2px #201b13 inset; }
.rst-opt-label:hover { background-color: #feeed4 !important; border-color: #ba8a4a !important; }
.rst-opt-label:hover span, .rst-opt-label:hover .rst-opt-text { color: #201b13 !important; }

.rst-exam-controls { margin-top: 30px; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; }

/* --- Forms --- */
.rst-input-group label { color: #d8ae75 !important; font-size: 14px !important; margin-bottom: 5px; display: block; font-family: inherit !important;}
.rst-input-group input, .rst-input-group select {
    background: #2a241b;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    font-family: inherit !important;
    font-size: 14px !important;
}
.rst-input-group input:focus { border-color: #ba8a4a; outline: none; }

/* --- Step 0 --- */
.rst-card-center { text-align: center; max-width: 700px; margin: 0 auto; }
.rst-btn-group { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }

/* --- RESULTS STYLES --- */

/* تیتر نئون مینیمال */
.rst-score-title {
    font-size: 15px !important; /* کمی بزرگتر برای خوانایی */
    font-weight: normal !important;
    line-height: 1.8 !important;
    margin-bottom: 20px !important; /* کاهش فاصله تا نمودار */
    color: #be9967 !important;
    text-shadow: 0 0 5px rgba(190, 153, 103, 0.3), 0 0 10px rgba(190, 153, 103, 0.2); /* افکت نئون ملایم */
    letter-spacing: 0.5px;
}

.rst-radar-wrapper {
    margin-bottom: 30px; /* فاصله بعد از نمودار */
}

/* باکس هشدار سرعت - جدید */
.rst-speed-alert {
    background: rgba(231, 76, 60, 0.1); /* پس زمینه قرمز خیلی ملایم */
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: justify;
    font-size: 13px;
    line-height: 1.8;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.rst-speed-alert strong {
    font-weight: bold;
    white-space: nowrap;
}

/* Analysis Boxes */
.rst-analysis-box { display: grid; gap: 20px; }
.rst-anl-card { border-radius: 10px; padding: 25px; border: 1px solid; text-align: justify; line-height: 2; font-size: 14px; }
.rst-anl-card h4 { margin: 0 0 15px 0; font-size: 14px; font-family: inherit !important; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 10px; }

.rst-card-life { background: #251e18; border-color: #ba8a4a; }
.rst-card-life h4 { color: #d8ae75 !important; }
.rst-card-life h4::before { content: '🏠 '; }

.rst-card-business { background: #1e2518; border-color: #27ae60; }
.rst-card-business h4 { color: #2ecc71 !important; }
.rst-card-business h4::before { content: '💼 '; }

.rst-card-improve { background: #252018; border-color: #e67e22; }
.rst-card-improve h4 { color: #f39c12 !important; }
.rst-card-improve h4::before { content: '🚀 '; }

.rst-footer-actions { margin-top: 40px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

.rst-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 100; display: none; justify-content: center; align-items: center; }
.rst-modal-box { background: #201b13; border: 1px solid #ba8a4a; padding: 30px; border-radius: 10px; text-align: center; max-width: 400px; width: 90%; }
.rst-modal-btns { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

.rst-loader { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(32, 27, 19, 0.95) !important; color: #ba8a4a !important; z-index: 200; flex-direction: column; justify-content: center; align-items: center; }
.rst-spinner { border-color: #444; border-top-color: #ba8a4a; width: 40px; height: 40px; border-width: 4px; border-style: solid; border-radius: 50%; animation: spin 1s linear infinite;}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 600px) {
    .rst-footer-actions { flex-direction: column; }
    .rst-exam-header { flex-direction: column; align-items: center !important; text-align: center !important; }
    .rst-header-content { width: 100%; margin-bottom: 20px; text-align: center !important; }
    .rst-header-content h3, .rst-header-content p, .rst-subtitle { text-align: center !important; display: block !important; margin-left: auto; margin-right: auto; }
    .rst-timer-box { align-self: center !important; justify-content: center; width: 100%; }
    /* تنظیم فاصله لیبل‌ها در موبایل */
    #rst-radar-chart { width: 100%; height: auto; }
}

@media print {
    #rst-exam-wrapper { background: #fff !important; color: #000 !important; box-shadow: none; }
    #rst-exam-wrapper * { color: #000 !important; }
    .rst-btn, .rst-footer-actions { display: none !important; }
}