/*--------------------------------------------------------------
# PhyFa PhysX Styles - v1.5.3 (Final Fixes)
--------------------------------------------------------------*/

/* --- General & Font Application --- */
.phyfa-container h1, .phyfa-container h2, .phyfa-container h3, .phyfa-container h4,
.phyfa-modal-content h1, .phyfa-modal-content h2, .phyfa-modal-content h3 {
    font-family: var(--phyfa-font-primary, 'YekanBakhFaNum', sans-serif) !important;
    font-weight: 800;
    color: var(--phyfa-text-light, #fffcf2);
    text-align: center;
}
.phyfa-container, .phyfa-modal-content p, .phyfa-form label, .phyfa-option-text,
.phyfa-score-text span, .phyfa-history-date, .phyfa-detail-text, .phyfa-detail-answers p {
    font-family: var(--phyfa-font-primary, 'YekanBakhFaNum', sans-serif);
}

/* --- Main Containers --- */
.phyfa-container.phyfa-physx-quiz-container,
.phyfa-container.phyfa-physx-history-container,
.phyfa-container.phyfa-physx-analytics-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0;
    color: var(--phyfa-text-light, #fffcf2);
}

/* --- Forms & Filters --- */
.phyfa-form {
    border-radius: 15px;
    @supports (corner-shape: squircle) {
    border-radius: 100px;
    corner-shape: squircle;

  }
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid #403d39;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
#phyfa-physx-select-form,
#phyfa-physx-history-filter-form .phyfa-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    align-items: end;
}
.phyfa-form-group { margin-bottom: 0; }
.phyfa-form-group label { display: block; color: var(--phyfa-text-light, #fffcf2); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; margin-right: 1rem; }
.phyfa-form select { width: 100%; background: #1b181c; color: var(--phyfa-text-light, #fffcf2); border: 2px solid #403d39; border-radius: 10px; @supports (corner-shape: squircle) { border-radius: 80px;  corner-shape: squircle;} padding: 0.7rem 1rem; font-size: 1rem; outline: none; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); font-family: inherit; box-sizing: border-box; }
.phyfa-form select:disabled { opacity: 0.5; cursor: not-allowed; }
.phyfa-form select:focus { border-color: var(--phyfa-primary-color, #e65717); box-shadow: 0 0 0 3px rgba(230, 87, 23, 0.15); }
.phyfa-form select:hover:not(:disabled) { border-color: #f89b29; }
.phyfa-form select option { background: #1e1f1e; color: #fffcf2; }

/* --- Buttons --- */
.phyfa-button { background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%); color: #fffcf2; border: none; border-radius: 10px; @supports (corner-shape: squircle) {border-radius: 100px; corner-shape: squircle;} padding: 0.8rem 1.8rem; font-size: 1rem; font-weight: 600; gap: 0.5rem; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-family: inherit; min-height: 48px; box-sizing: border-box; }
.phyfa-button::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; }
.phyfa-button:hover::before { left: 100%; }
.phyfa-button:hover:not(:disabled) { transform: translateY(-3px); }
.phyfa-button:disabled { opacity: 0.6; cursor: not-allowed; }
#phyfa-load-questions , #phyfa-load-questions-v2 { width: 100%; margin-bottom: 1rem; text-align: center;}
.phyfa-button.phyfa-submit, .phyfa-button.phyfa-submit-video-quiz { margin-top: 1.5rem; width: 100%; }
.phyfa-button.phyfa-button-loading { pointer-events: none; }


/* --- Quiz Questions --- */
.phyfa-questions { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 2.5rem; }
.phyfa-question { background: var(--phyfa-background-darker, #1e1f1e); border-radius: 15px; padding: 1.5rem 2rem; border: 1px solid #333; margin-bottom: 1rem;}
.phyfa-question-title { 
    font-size: 1.4em; 
    margin: 0 0 1.5rem 0;
    color: var(--phyfa-primary-color, #e65717); 
    padding: 0 0 1rem 0;
    position: relative;
}
.phyfa-question-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--phyfa-primary-color, #e65717), transparent);
}

.phyfa-question-image { text-align: center; margin: 1.5rem 0; }
.phyfa-question-image img { max-width: 90%; height: auto; border-radius: 10px; border: 1px solid #333; }
.phyfa-question-text { margin-bottom: 1.5rem; line-height: 1.8; color: var(--phyfa-text-light, #fffcf2); font-size: 1.1em; }
.phyfa-options { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .phyfa-options { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .phyfa-question { padding: 1rem; margin-bottom: 0.5rem; } /* FIX: Reduced padding on mobile */
    .phyfa-form {
    border-radius: 15px;
    @supports (corner-shape: squircle) {
    border-radius: 100px;
    corner-shape: squircle;
   }
    padding: 1rem;
    margin-bottom: 1.5rem;
 
}
}
.phyfa-option { padding: 1rem 1.2rem; border-radius: 10px; background: linear-gradient(135deg, #2a2929 0%, #1e1f1e 100%); transition: all 0.3s ease; display: flex; align-items: center; cursor: pointer; border: 2px solid #444; }
.phyfa-option:hover { border-color: #f89b29; transform: translateY(-2px); }
.phyfa-option input[type="radio"] { margin-left: 1rem; transform: scale(1.3); accent-color: var(--phyfa-primary-color, #e65717); cursor: pointer; }
.phyfa-option-content { display: flex; align-items: center; gap: 1rem; }
.phyfa-option-image img { max-width: 100px; border-radius: 5px; }
.phyfa-option-text { color: var(--phyfa-text-light, #fffcf2); flex-grow: 1; font-size: 1em; }
.phyfa-question.phyfa-highlight { border-color: var(--phyfa-error-color, #dc3232); }
.phyfa-question.phyfa-highlight .phyfa-question-title { color: var(--phyfa-error-color, #dc3232); border-bottom-color: var(--phyfa-error-color, #dc3232); }

/* --- History & Analytics --- */
.phyfa-section-title { font-size: 1.8em; margin-bottom: 2rem; text-align: center; }
.phyfa-history-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.phyfa-history-card { background: var(--phyfa-background-darker, #1e1f1e); border-radius: 15px; border: 1px solid #333; color: var(--phyfa-text-light, #fffcf2); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.phyfa-history-card:hover { transform: translateY(-5px); border-color: var(--phyfa-primary-color, #e65717); }
.phyfa-history-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: var(--phyfa-primary-color, #e65717); }
.phyfa-quiz-number { position: absolute; top: 10px; left: 15px; font-size: 0.9em; color: #aaa; }
.phyfa-history-card-header, .phyfa-history-card-body, .phyfa-history-card-footer { padding: 1.2rem; }
.phyfa-history-card-header { padding-bottom: 0.5rem; }
.phyfa-history-card-header h3 { margin: 0 0 5px; font-size: 1.2em; }
.phyfa-history-card-header .phyfa-history-date { font-size: 0.85em; color: #999; }
.phyfa-history-card-body { flex-grow: 1; }
.phyfa-score-text { font-size: 1em; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.phyfa-score-text strong { color: var(--phyfa-primary-color, #e65717); font-size: 1.1em; display: inline-flex; align-items: center; gap: 4px; }
.phyfa-score-bar { background: #333; border-radius: 5px; height: 8px; overflow: hidden; }
.phyfa-score-fill { background: var(--phyfa-primary-color, #e65717); height: 100%; border-radius: 5px; transition: width 0.6s ease-in-out; }
.phyfa-history-card-footer { text-align: center; margin-top: auto; border-top: 1px solid #333; }
.phyfa-details-button { background: transparent; border: 2px solid #555; padding: 0.6rem 1.2rem; }
.phyfa-details-button:hover { background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%); border-color: transparent; }
.phyfa-video-history-thumbnail-link { display: block; aspect-ratio: 16/9; overflow: hidden; }
.phyfa-video-history-thumbnail-link img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.phyfa-video-history-card:hover .phyfa-video-history-thumbnail-link img { transform: scale(1.05); }

/* --- Tabs --- */
.phyfa-physx-history-container .phyfa-tabs-nav { display: flex; border-bottom: 2px solid #333; margin-bottom: 2rem; }
.phyfa-physx-history-container .phyfa-tab-link { padding: 10px 20px; cursor: pointer; background: none; border: 2px solid transparent; border-bottom: none; color: #999; font-family: inherit; font-weight: 600; font-size: 1em; position: relative; transition: all 0.3s ease; border-radius: 8px 8px 0 0; margin-bottom: -2px; }
.phyfa-physx-history-container .phyfa-tab-link:hover { color: #fffcf2; background-color: rgba(255, 255, 255, 0.05); }
.phyfa-physx-history-container .phyfa-tab-link.active { color: #fffcf2; border-color: #333; border-bottom-color: transparent; background-color: transparent; position: relative; }
.phyfa-physx-history-container .phyfa-tab-link.active::after { content: ''; position: absolute; bottom: -2px; left: 10%; width: 80%; height: 2px; background-color: var(--phyfa-primary-color, #e65717); }
.phyfa-tab-pane { display: none; }
.phyfa-tab-pane.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Details Modal --- */
.phyfa-modal-large .phyfa-modal-content { max-width: 90%; width: 1000px; }
.phyfa-modal-large .phyfa-modal-body { max-height: 75vh; overflow-y: auto; padding: 15px 15px 15px 5px; text-align: right; scrollbar-width: none; }
.phyfa-modal-large .phyfa-modal-body::-webkit-scrollbar { display: none; }
#phyfa-history-details-modal .phyfa-details-container { display: flex; flex-direction: column; gap: 20px; } /* FIX: Gap between items */
#phyfa-history-details-modal .phyfa-detail-item { padding: 20px; background: #2a2929; border-radius: 8px; border-right: 5px solid #555; transition: border-color 0.3s ease; }
#phyfa-history-details-modal .phyfa-detail-item.phyfa-correct { border-right-color: var(--phyfa-success-color, #28a745); }
#phyfa-history-details-modal .phyfa-detail-item.phyfa-incorrect { border-right-color: var(--phyfa-error-color, #dc3545); }
#phyfa-history-details-modal .phyfa-detail-explanation { margin-top: 1.5rem; padding: 20px; background: #1b1a1b; border-radius: 8px; border-right: 4px solid var(--phyfa-primary-color, #e65717); }
#phyfa-history-details-modal .phyfa-detail-image.explanation-image img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid #444; margin-top: 10px; display: block; margin: 0 auto;
 } /* FIX: Style for explanation image */
#phyfa-history-details-modal .phyfa-detail-answers p i, #phyfa-history-details-modal .phyfa-detail-title i, #phyfa-history-details-modal .phyfa-detail-explanation h5 i { margin-left: 8px; color: var(--phyfa-primary-color, #e65717); font-size: 0.9em; vertical-align: middle; } /* FIX: Icon styles */
/* FIX: Gradient Separator */
#phyfa-message-text .phyfa-point-icon-png.phyfa-orb-icon {
    width: 1.08em;
    height: 1.08em;
    vertical-align: -0.15em;
    margin: 0 3px;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.phyfa-detail-separator { padding: 10px 0; }
.phyfa-detail-separator > div { height: 1px; background: linear-gradient(to right, transparent, var(--phyfa-primary-color, #e65717), transparent); }
@media (max-width: 768px) {
    .phyfa-modal-large .phyfa-modal-body { padding: 5px; } /* FIX: Reduced padding on mobile */
}
/* --- Loading & Empty States --- */
.phyfa-loading, .phyfa-empty-state p { display: flex; justify-content: center; align-items: center; min-height: 200px; text-align: center; width: 100%; font-weight: bold; color: var(--phyfa-primary-color, #e65717); font-size: 1.1em; }
.phyfa-empty-state { background-color: rgba(42,41,41,0.5); border-radius: 12px; border: 1px dashed #444; }
.phyfa-empty-state p { color: #aaa; font-weight: normal; }

/* --- Analytics Styles --- */
.phyfa-physx-analytics-container .phyfa-section-title { display: block; }
#phyfa-analytics-filters { margin-bottom: 2.5rem; }
.phyfa-analytics-card { background: var(--phyfa-background-darker, #1e1f1e); border-radius: 15px; padding: 30px; border: 1px solid #333; display: grid; grid-template-areas: "summary chart" "message chart"; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.phyfa-analytics-summary { grid-area: summary; display: flex; flex-direction: column; gap: 15px; }
.phyfa-summary-item { background: linear-gradient(135deg, #2a2929 0%, #1e1f1e 100%); padding: 15px 20px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 1.1em; color: #aaa; border: 1px solid #444; }
.phyfa-summary-item strong { font-size: 1.6em; font-weight: 700; color: #fffcf2; }
.phyfa-summary-item strong.correct { color: var(--phyfa-success-color); }
.phyfa-summary-item strong.incorrect { color: var(--phyfa-error-color); }
.phyfa-analytics-chart-container { grid-area: chart; position: relative; height: 300px; }
.phyfa-analytics-message { grid-area: message; background: #2a2929; padding: 20px; border-radius: 10px; border-right: 4px solid var(--phyfa-primary-color); line-height: 1.7; font-size: 1.05em; }
.phyfa-analytics-message.phyfa-message-level-1 { border-color: var(--phyfa-error-color); }
.phyfa-analytics-message.phyfa-message-level-2 { border-color: #ffc107; }
.phyfa-analytics-message.phyfa-message-level-3 { border-color: var(--phyfa-primary-color); }
.phyfa-analytics-message.phyfa-message-level-4 { border-color: var(--phyfa-success-color); }
.phyfa-analytics-message.phyfa-message-level-5 { border-color: #00e0ff; }
.phyfa-analytics-sw-card { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
@media (min-width: 768px) { .phyfa-analytics-sw-card { grid-template-columns: 1fr 1fr; } }
.phyfa-sw-item { background: #2a2929; border-radius: 10px; padding: 20px; display: flex; align-items: center; gap: 20px; border: 1px solid #444; }
.phyfa-sw-icon { font-size: 2.5em; line-height: 1; }
.phyfa-sw-text h4 { margin: 0 0 5px 0; font-size: 1.1em; font-weight: 600; }
.phyfa-sw-text p { margin: 0; font-size: 1em; color: #aaa; }
.phyfa-sw-text p span { font-weight: bold; }
.phyfa-sw-item.strength .phyfa-sw-text p span { color: var(--phyfa-success-color); }
.phyfa-sw-item.weakness .phyfa-sw-text p span { color: var(--phyfa-error-color); }
@media (max-width: 992px) { .phyfa-analytics-card { grid-template-areas: "chart" "summary" "message"; grid-template-columns: 1fr; } .phyfa-analytics-chart-container { height: 250px; } }

/* --- Pagination & Misc Buttons --- */
.phyfa-pagination-wrapper { margin-top: 40px; }
.phyfa-pagination { text-align: center; direction: ltr; }
.phyfa-pagination .page-numbers { display: inline-block; padding: 8px 15px; margin: 0 4px; border-radius: 5px; background-color: #2a2929; color: #aaa; border: 1px solid #444; text-decoration: none; transition: all 0.2s ease-in-out; }
.phyfa-pagination .page-numbers:not(.current):hover { background-color: var(--phyfa-primary-color, #e65717); color: #fffcf2; border-color: var(--phyfa-primary-color, #e65717); }
.phyfa-pagination .page-numbers.current { background-color: var(--phyfa-primary-color, #e65717); color: #fffcf2; border-color: var(--phyfa-primary-color, #e65717); cursor: default; }
.phyfa-modal-action-button, .phyfa-modal-close-button { width: 100%; box-sizing: border-box; }
.phyfa-button-secondary { background: transparent; border: 2px solid var(--phyfa-primary-color, #e65717); color: var(--phyfa-primary-color, #e65717) !important; }
.phyfa-button-secondary:hover { background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%); color: #fffcf2 !important; }
.phyfa-video-history-card h3 a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
.phyfa-video-history-card:hover h3 a { color: var(--phyfa-primary-color, #e65717); }
.phyfa-button.phyfa-related-video-button { background: transparent; border: 2px solid var(--phyfa-primary-color, #e65717); color: var(--phyfa-primary-color, #e65717) !important; margin-top: 15px !important; display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phyfa-button.phyfa-related-video-button:hover { background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%); color: #fffcf2 !important; }

/* --- Misc Buttons & Final Fixes --- */
.phyfa-modal-action-button, .phyfa-modal-close-button { width: 100%; box-sizing: border-box; }
.phyfa-button-secondary { background: transparent; border: 2px solid var(--phyfa-primary-color, #e65717); color: var(--phyfa-primary-color, #e65717) !important; }
.phyfa-button-secondary:hover { background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%); color: #fffcf2 !important; }

/* FIX: Button for showing past attempt results */
.phyfa-video-quiz-done-container { margin-top: 30px; padding: 25px; background: var(--phyfa-background-darker, #1e1e1e); border-radius: var(--phyfa-border-radius-large, 12px); border: 1px solid var(--phyfa-background-light, #333); text-align: center; }
.phyfa-video-quiz-done-container p { font-size: 1.1em; color: #ccc; margin: 0 0 20px 0; }
.phyfa-video-quiz-done-container .phyfa-button { background: linear-gradient(135deg, #3a3939 0%, #2e2f2e 100%); border: 2px solid #555; }
.phyfa-video-quiz-done-container .phyfa-button:hover { background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%); border-color: transparent; }

/* --- Notification Bar Styles --- */
.phyfa-notification-bar {
    background: linear-gradient(135deg, #2a2929 0%, #1e1f1e 100%);
    border: 1px solid var(--phyfa-primary-color, #e65717);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 5px 15px rgba(230, 87, 23, 0.1);
}

.phyfa-notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phyfa-notification-content i {
    font-size: 1.8rem;
    color: var(--phyfa-primary-color, #e65717);
}

.phyfa-notification-content p {
    margin: 0;
    font-size: 1.05em;
    color: var(--phyfa-text-light, #fffcf2);
}

.phyfa-notification-content p strong {
    color: var(--phyfa-primary-color, #e65717);
    font-weight: 700;
}

.phyfa-notification-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Responsive adjustments for notification bar */
@media (max-width: 768px) {
    .phyfa-notification-bar {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
    }
     .phyfa-notification-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr; /* Stack buttons on smaller screens */
        gap: 0rem !important;
}
}

/*--------------------------------------------------------------
# PhyFa PhysX Styles v2.0 - NEW ADDITIONS ONLY
--------------------------------------------------------------*/

/* ===== v2.0: Quiz Mode Selector ===== */
.phyfa-quiz-mode-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 12px;
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;

  }
   /* border: 1px solid #403d39;*/
}

.phyfa-quiz-mode-selector label {
    flex: 1;
    max-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: #2a2929;
    border: 2px solid #403d39;
    border-radius: 8px;
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    cursor: pointer;
    transition: all 0.3s ease;
}

.phyfa-quiz-mode-selector label:hover:not(.phyfa-disabled) {
    border-color: var(--phyfa-primary-color, #e65717);
    transform: translateY(-2px);
}

.phyfa-quiz-mode-selector label.phyfa-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.phyfa-quiz-mode-selector input[type="radio"] {
    margin-left: 0.5rem;
    accent-color: var(--phyfa-primary-color, #e65717);
}

.phyfa-quiz-mode-selector input[type="radio"]:checked + span {
    color: var(--phyfa-primary-color, #e65717);
    font-weight: 700;
}

/* ===== v2.0: Advanced Form Layout ===== */
.phyfa-advanced-form .phyfa-form-section {
    /*margin-bottom: 2rem;*/
    border-radius: 12px;
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    /*border: 1px solid #403d39;*/
}

.phyfa-advanced-form .phyfa-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

/* ===== v2.0: Selected Checkpoints Tags ===== */
.phyfa-selected-checkpoints-wrapper {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #1e1f1e;
    border-radius: 12px;
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    border: 2px solid var(--phyfa-primary-color, #e65717);
}

.phyfa-section-subtitle {
    font-size: 1.1em;
    margin-bottom: 1rem;
    color: var(--phyfa-primary-color, #e65717);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phyfa-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 50px;
}

.phyfa-checkpoint-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%);
    color: #fffcf2;
    border-radius: 20px;
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.phyfa-checkpoint-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(230, 87, 23, 0.4);
}

.phyfa-tag-remove {
    background: none;
    border: none;
    color: #fffcf2;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.phyfa-tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

.phyfa-empty-message {
    color: #999;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 1rem;
}

/* ===== v2.0: Question Count Slider ===== */
.phyfa-question-count-section input[type="range"] {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #e65717 0%, #e65717 var(--value, 33%), #333 var(--value, 33%), #333 100%);
    border-radius: 5px;
    @supports (corner-shape: squircle) {
    border-radius: 60px;
    corner-shape: squircle;
    }
    outline: none;
    -webkit-appearance: none;
}

.phyfa-question-count-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--phyfa-primary-color, #e65717);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fffcf2;
}

.phyfa-question-count-section input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--phyfa-primary-color, #e65717);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fffcf2;
}

.phyfa-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85em;
    color: #aaa;
}

.phyfa-count-value {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--phyfa-primary-color, #e65717);
}

/* ===== v2.0: Info Boxes ===== */
.phyfa-info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(230, 87, 23, 0.1);
    border: 1px solid rgba(230, 87, 23, 0.3);
    border-radius: 8px;
    @supports (corner-shape: squircle) {
    border-radius: 100px;
    corner-shape: squircle;
    }
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95em;
}

.phyfa-info-box.phyfa-premium-limit {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    
}

.phyfa-info-box i {
    font-size: 1.2em;
    color: var(--phyfa-primary-color, #e65717);
}

.phyfa-info-box p {
    margin: 0;
}

.phyfa-info-box a {
    color: var(--phyfa-primary-color, #e65717);
    text-decoration: none;
    font-weight: 600;
}

/* ===== v2.0: Question Actions (Skip, Note) ===== */
.phyfa-question-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #403d39;
}

.phyfa-button-skip,
.phyfa-button-note {
    flex: 1;
    background: transparent;
    border: 2px solid #403d39;
    padding: 0.7rem 1rem;
}

.phyfa-button-skip:hover,
.phyfa-button-note:hover {
    background: linear-gradient(135deg, #555 0%, #444 100%);
}

.phyfa-button-skip.active {
    background: linear-gradient(135deg, #dc2f02 0%, #9a031e 100%);
    border-color: #dc2f02;
}

/* ===== v2.0: Note Section ===== */
.phyfa-note-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    @supports (corner-shape: squircle) {
    border-radius: 60px;
    corner-shape: squircle;
    }
    border-left: 4px solid var(--phyfa-primary-color, #e65717);
}

.phyfa-note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #444;
    border-radius: 6px;
    @supports (corner-shape: squircle) {
    border-radius: 40px;
    corner-shape: squircle;
    }
    color: #fffcf2;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    margin-bottom: 1rem;
}

.phyfa-note-textarea:focus {
    outline: none;
    border-color: var(--phyfa-primary-color, #e65717);
    box-shadow: 0 0 0 3px rgba(230, 87, 23, 0.15);
}

.phyfa-note-history {
    margin-top: 1.5rem;
}

.phyfa-note-history-title {
    font-weight: 600;
    color: #aaa;
    margin-bottom: 0.75rem;
    font-size: 0.9em;
}

.phyfa-note-history-item {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #403d39;
}

.phyfa-note-time {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 0.25rem;
}

.phyfa-note-text {
    color: #ccc;
    font-size: 0.9em;
}

/* ===== v2.0: Print Button ===== */
.phyfa-quiz-submit-wrapper {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.phyfa-button-print {
    flex: 0 0 auto;
    background: transparent;
    border: 2px solid var(--phyfa-primary-color, #e65717);
    color: var(--phyfa-primary-color, #e65717);
}

.phyfa-button-print:hover {
    background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%);
    color: #fffcf2;
    border-color: transparent;
}

/* ===== v2.0: Review Mode Badge ===== */
.phyfa-history-card.phyfa-review-card {
    border-color: #f89b29;
}

.phyfa-review-badge {
    position: absolute;
    top: 40px;
    left: 15px;
    background: linear-gradient(135deg, #f89b29 0%, #f77f00 100%);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    @supports (corner-shape: squircle) {
    border-radius: 100px;
    corner-shape: squircle;
    }
    font-size: 0.75em;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(248, 155, 41, 0.4);
}

/* ===== v2.0: Standard Score Display ===== */
.phyfa-standard-score {
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px dashed #444;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.phyfa-standard-score strong {
    color: var(--phyfa-primary-color, #e65717);
    font-size: 1.1em;
}

.phyfa-standard-score-display {
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    background: rgba(230, 87, 23, 0.1);
    border-radius: 8px;
    @supports (corner-shape: squircle) {
    border-radius: 60px;
    corner-shape: squircle;
    }
    font-size: 1.1em;
}

.phyfa-standard-score-display strong {
    font-size: 1.5em;
    color: var(--phyfa-primary-color, #e65717);
}

/* ===== v2.0: Unanswered Info ===== */
.phyfa-unanswered-info {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(220, 47, 2, 0.1);
    border-radius: 6px;
    font-size: 0.85em;
    color: #dc2f02;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== v2.0: Date Filters ===== */
.phyfa-filter-grid input[type="date"] {
    width: 100%;
    background: linear-gradient(135deg, #2a2929 0%, #1e1f1e 100%);
    color: var(--phyfa-text-light, #fffcf2);
    border: 2px solid #403d39;
    border-radius: 10px;
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}

.phyfa-filter-grid input[type="date"]:focus {
    border-color: var(--phyfa-primary-color, #e65717);
    outline: none;
}

/* ===== v2.0: Tab Locked State ===== */
.phyfa-tab-link.phyfa-tab-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== v2.0: Detail Modal Note Section ===== */
.phyfa-detail-note-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #403d39;
}

.phyfa-view-note-btn {
    width: 100%;
}

.phyfa-note-editor {
    margin-top: 1rem;
}

/* ===== v2.0: Skipped Question Styling ===== */
.phyfa-detail-item.phyfa-skipped {
    border-right-color: #999;
}

.phyfa-skip-mark {
    color: #999;
    font-size: 1.2em;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .phyfa-quiz-mode-selector {
        flex-direction: column;
    }
    
    .phyfa-quiz-mode-selector label {
        max-width: 100%;
    }
    
    .phyfa-advanced-form .phyfa-form-row {
        grid-template-columns: 1fr;
    }
    
    .phyfa-question-actions {
        flex-direction: column;
    }
    
    .phyfa-quiz-submit-wrapper {
        flex-direction: column;
    }
    
    #phyfa-add-checkpoint{
        width: 100%;
    }
    
    .phyfa-checkpoint-tag{
        width: 100%;
        justify-content: space-between;
    }
    
    .phyfa-button-print {
        flex: 1;
    }
}

/* اضافه کردن به CSS */
.phyfa-modal-content.phyfa-warning-mode {
    border-left: 5px solid #ffc107 !important; /* رنگ زرد هشدار */
    background: #2a2929; /* رنگ پس‌زمینه تیره */
}

/* برای اطمینان از اینکه افکت نئونی سبز حذف می‌شود اگر کلاس warning باشد */
.phyfa-modal-content.phyfa-warning-mode.success {
    box-shadow: none !important;
    border-color: #ffc107 !important;
}

.phyfa-modal-content.phyfa-warning-mode p {
    color: #fff;
}