:root {
    --ldt-primary: #1B4B3E;
    --ldt-primary-hover: #14382e;
    --ldt-bg: #ffffff;
    --ldt-text: #1f2937;
    --ldt-muted: #6b7280;
    --ldt-border: #e5e7eb;
    --ldt-success: #10b981;
    --ldt-error: #ef4444;
    --ldt-warning: #f59e0b;
}

.ldt-limit-msg { 
    background: #fffbeb; border: 1px solid #f59e0b; color: #92400e; 
    padding: 6px; border-radius: 12px; margin-bottom: 20px; font-weight: bold; text-align: center;
}

.ldt-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: var(--ldt-bg);
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    font-family: 'IRANYekan', 'Tahoma', 'Segoe UI', sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    color: var(--ldt-text);
}

/* LTR adjustments for English content - Only for questions/options */
.ldt-ltr .ldt-question-slide { text-align: left !important; direction: ltr !important; }
.ldt-ltr .ldt-question-slide h3 { text-align: left !important; direction: ltr !important; margin-bottom: 25px !important; }
.ldt-ltr .ldt-options-list { text-align: left !important; direction: ltr !important; }
.ldt-ltr .ldt-option-label { 
    direction: ltr !important;
    text-align: left !important; 
    padding: 18px 25px !important;
    flex-direction: row !important;
}
.ldt-ltr .ldt-option-label input { 
    margin-left: 0 !important; 
    margin-right: 15px !important; 
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.ldt-ltr .ldt-summary-item { direction: ltr !important; text-align: left !important; border-right: none !important; border-left: 8px solid #e5e7eb !important; }
.ldt-ltr .ldt-summary-item.correct { border-left: 8px solid var(--ldt-success) !important; }
.ldt-ltr .ldt-summary-item.incorrect { border-left: 8px solid var(--ldt-error) !important; }
.ldt-ltr .ldt-q-hint { direction: ltr !important; text-align: left !important; border-right: none !important; border-left: 4px solid var(--ldt-warning) !important; }

.ldt-intro { text-align: center; }
.ldt-intro h2 { font-size: 2.2rem; color: var(--ldt-primary); margin-bottom: 20px; font-weight: 800; }
.ldt-intro .ldt-description { margin-bottom: 30px; color: var(--ldt-muted); font-size: 1.1rem; }

.ldt-btn {
    display: inline-block;
    background: var(--ldt-primary);
    color: white;
    padding: 14px 45px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    font-family: 'IRANYekan', sans-serif;
}
.ldt-btn:hover { background: var(--ldt-primary-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(27, 75, 62, 0.4); }

.ldt-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ldt-border);
}
.ldt-timer { font-size: 1.3rem; font-weight: bold; color: var(--ldt-error); display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.ldt-progress { font-size: 1rem; color: var(--ldt-muted); font-weight: 500; }

.ldt-question-slide { display: none; animation: fadeIn 0.4s ease-out; }
.ldt-question-slide.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.ldt-q-title { font-size: 1.4rem; font-weight: bold; margin-bottom: 25px; display: block; color: var(--ldt-primary); }
.ldt-options { display: grid; gap: 15px; }
.ldt-option-label {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    border: 2px solid var(--ldt-border);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.05rem;
}
.ldt-option-label:hover { border-color: var(--ldt-primary); background: #f0fdf4; }
.ldt-option-label input { margin-left: 15px; width: 20px; height: 20px; cursor: pointer; accent-color: var(--ldt-primary); }
.ldt-option-label.selected { border-color: var(--ldt-primary); background: #f0fdf4; font-weight: bold; box-shadow: 0 4px 10px rgba(27, 75, 62, 0.1); }

.ldt-nav { display: flex; justify-content: space-between; margin-top: 40px; }
.ldt-btn-outline { background: transparent; border: 2px solid var(--ldt-border); color: var(--ldt-muted); }
.ldt-btn-outline:hover { border-color: var(--ldt-primary); color: var(--ldt-primary); background: #f0fdf4; }

/* Results Styles */
.ldt-results { text-align: center; }
.ldt-result-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border: 5px solid var(--ldt-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--ldt-primary);
    background: #f0fdf4;
}
.ldt-level-badge {
    font-size: 16px;
    font-weight: 800;
    padding: 10px 35px;
    background: var(--ldt-primary);
    color: white;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(27, 75, 62, 0.2);
}

.ldt-summary { margin-top: 50px; text-align: right; }
.ldt-summary-item { padding: 25px; border-radius: 15px; border: 1px solid var(--ldt-border); margin-bottom: 20px; }
.ldt-summary-item.correct { border-right: 8px solid var(--ldt-success); background: #f0fdf4; }
.ldt-summary-item.incorrect { border-right: 8px solid var(--ldt-error); background: #fef2f2; }
.ldt-summary-q { font-weight: bold; display: block; margin-bottom: 12px; font-size: 1.15rem; color: #374151; }
.ldt-user-ans { display: block; font-size: 1rem; color: #4b5563; }
.ldt-correct-ans { display: block; color: var(--ldt-success); font-weight: bold; margin-top: 8px; }
.ldt-q-hint { 
    display: block; margin-top: 12px; padding: 12px; background: #fffbeb; 
    border-right: 4px solid var(--ldt-warning); font-size: 0.95rem; border-radius: 4px;
}

/* Related Training Card Styles */
.ldt-related-section { border-top: 2px solid #eee; margin-top: 30px; }
.ldt-related-title { font-size: 1.5rem; font-weight: 800; color: var(--ldt-primary); margin-bottom: 25px; text-align: center; }

.ldt-cards-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 10px 5px 30px;
    width: 100%;
}
.ldt-course-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    flex: 0 0 320px; border: 1px solid #e5e7eb;
    display: flex; flex-direction: column;
}
.ldt-card-img { width: 100%; height: auto; display: block; }
.ldt-card-body { padding: 25px; text-align: center; display: flex; flex-direction: column; flex-grow: 1; }
.ldt-card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; color: #1f2937; display: block; line-height: 1.5; flex-grow: 1; }
.ldt-card-btn {
    display: inline-block; background: var(--ldt-primary); color: #fff;
    padding: 12px 30px; border-radius: 12px; text-decoration: none;
    font-weight: 600; transition: all 0.2s; width: 100%;
}
.ldt-card-btn:hover { background: var(--ldt-primary-hover); }
.ldt-suggestion-text { font-size: 1.2rem; font-weight: bold; margin-bottom: 15px; display: block; }

.ldt-show-answers {
    display: block;
    margin: 0 auto 20px;
    color: var(--ldt-primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    width: fit-content;
    border-bottom: 1px solid var(--ldt-primary);
    line-height: 1.2;
    transition: all 0.2s;
    font-family: 'IRANYekan', sans-serif;
}
.ldt-show-answers:hover { color: var(--ldt-primary-hover); border-bottom-color: var(--ldt-primary-hover); opacity: 0.8; }

.ldt-score-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 15px;
}

.ldt-back-to-top {
    display: inline-block;
    padding: 12px 25px;
    background: #f3f4f6;
    color: var(--ldt-primary);
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
    .ldt-cards-container {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px;
        margin: 0 -15px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .ldt-course-card {
        flex: 0 0 80%;
        max-width: 300px;
        scroll-snap-align: center;
        border-radius: 15px;
    }
    .ldt-card-body { padding: 15px; }
    .ldt-card-title { font-size: 1.05rem; margin-bottom: 12px; }
    .ldt-card-btn { padding: 8px 15px; font-size: 0.9rem; border-radius: 10px; }
    .ldt-related-title { font-size: 1.25rem; margin-bottom: 15px; }
    .ldt-cards-container::-webkit-scrollbar { display: none; }
    .ldt-cards-container { -ms-overflow-style: none; scrollbar-width: none; }

    .ldt-container { padding: 20px; margin: 15px; border-radius: 15px; }
    .ldt-test-header { flex-direction: column; gap: 12px; }
    .ldt-intro h2 { font-size: 1.8rem; }
    .ldt-nav { flex-direction: column-reverse; gap: 15px; }
    .ldt-btn { width: 100%; }
}

/* Quick Nav Styles */
.ldt-quick-nav { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--ldt-border); }
.ldt-nav-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 15px; }
.ldt-nav-item { 
    width: 35px; height: 35px; border: 2px solid var(--ldt-border); border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: bold;
    cursor: pointer; transition: all 0.2s; color: var(--ldt-muted);
}
.ldt-nav-item.answered { border-color: var(--ldt-primary); background: #f0fdf4; color: var(--ldt-primary); }
.ldt-nav-item.current { background: var(--ldt-primary); color: white; border-color: var(--ldt-primary); box-shadow: 0 0 8px rgba(27,75,62,0.4); }

/* Form Step */
.ldt-form-step { max-width: 400px; margin: 0 auto; text-align: right; }
.ldt-form-group { margin-bottom: 20px; }
.ldt-form-group label { display: block; font-weight: bold; margin-bottom: 8px; }
.ldt-form-group input { width: 100%; padding: 12px; border: 2px solid var(--ldt-border); border-radius: 10px; font-family: 'IRANYekan', sans-serif; }
.ldt-form-group input:focus { border-color: var(--ldt-primary); outline: none; }
.ldt-error-msg { color: var(--ldt-error); font-size: 0.9rem; margin-top: 5px; display: none; }

/* Hide theme post info and headers */
/* Hide theme header and footer for a focused test experience */
header, footer, #header, #footer, .header, .footer, .stm-footer, .stm-header, 
.title_bar, .footer_copyright, .page_title_v2, .top_nav, .banner { 
    display: none !important; 
}
body { background: #f3f4f6 !important; padding: 0 !important; margin: 0 !important; }
.ldt-container { margin-top: -30px !important; margin-bottom: 50px !important; }

.stm_post_info, .post_info, .entry-header { display: none !important; }

/* Preloader Styles */
.ldt-loading-step { text-align: center; padding: 50px 0; }
.ldt-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--ldt-border);
    border-top: 5px solid var(--ldt-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: ldt-spin 1s linear infinite;
}
@keyframes ldt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.ldt-loading-text { font-size: 1.2rem; color: var(--ldt-primary); font-weight: bold; }

/* Eitaa Button Styles */
.ldt-eitaa-btn {
    display: inline-block !important;
    background: #EF7F1A !important;
    color: #ffffff !important;
    padding: 14px 40px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    margin-top: 20px !important;
    transition: all 0.3s ease !important;
    font-size: 1.1rem !important;
    font-family: 'IRANYekan', 'Tahoma', sans-serif !important;
    border: none !important;
    text-align: center !important;
    box-shadow: 0 4px 15px rgba(239, 127, 26, 0.3) !important;
    cursor: pointer !important;
}

.ldt-eitaa-btn:hover {
    background: #d46d12 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 127, 26, 0.4) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.ldt-eitaa-btn:active {
    transform: translateY(0) !important;
}
