.bf-modern-assessment {
    display: flex;
    max-width: 1100px;
    margin: 40px auto;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar */
.bf-assessment-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    padding: 20px;
}

.bf-sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.bf-sidebar-header p {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

.bf-progress-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bf-progress-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    opacity: 0.5;
    transition: 0.3s;
}

.bf-progress-item.active {
    opacity: 1;
}

.bf-progress-item.completed {
    opacity: 0.8;
}

.step-num {
    width: 24px;
    height: 24px;
    background: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.active .step-num {
    background: #4b26a6;
    color: #fff;
}

.completed .step-num {
    background: #28a745;
    color: #fff;
}

.step-info {
    flex: 1;
    min-width: 0;
}

.step-info strong {
    display: block;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.bf-assessment-main {
    flex: 1;
    padding: 30px;
}

.bf-section-header {
    /* margin-bottom: 25px; */
}

.bf-section-header h3 {
    background: #4b26a6;
    color: #fff;
    padding: 12px 20px;
    margin: 0;
    font-size: 17px;
}

.bf-header-options {
    background: #f0f0f0;
    padding: 10px 0;
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    color: #555;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.bf-header-options span {
    width: 70px;
    text-align: center;
    display: inline-block;
}

.bf-question-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.bf-question-text {
    flex: 1;
    font-size: 14px;
    color: #444;
    padding-right: 20px;
    line-height: 1.4;
}

.bf-options-grid {
    display: flex;
    justify-content: flex-end;
    width: 210px;
    padding-right: 0;
}

.bf-opt {
    width: 70px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.bf-opt input {
    display: none;
}

.bf-opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 3px;
    transition: 0.2s;
    background: #fff;
}

.bf-opt input:checked + span {
    background: #4b26a6;
    border-color: #4b26a6;
}

.bf-opt input:checked + span::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    line-height: 1;
    margin-top: -1px;
}

/* Footer Section Layout */
.bf-footer-section {
    /* margin-top: 30px; */
    padding-top: 20px;
    /* border-top: 1px solid #eee; */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

/* Footer Nav */
.bf-footer-nav {
    display: flex;
    justify-content: flex-end;
}

.bf-nav-buttons {
    display: flex;
    gap: 12px;
}

.bf-btn-primary, .bf-btn-secondary {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.bf-btn-primary {
    background: #b54b66;
    color: #fff;
}

.bf-btn-primary:hover {
    background: #a03d57;
}

.bf-btn-secondary {
    background: transparent;
    border: 1px solid #b54b66;
    color: #b54b66;
}

.bf-btn-secondary:hover {
    background: #fdf2f4;
}

/* Disclaimer Text */
.bf-disclaimer-text {
    flex: 1;
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1;
    background: #f9f6f7;
    /* border-left: 3px solid #b54b66; */
    padding: 12px 15px;
    border-radius: 4px;
}

.bf-disclaimer-text p {
    margin: 0;
}

/* Results Area */
.bf-results-container {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 30px 40px;
}

#bf-final-message {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .bf-modern-assessment {
        flex-direction: column;
    }

    .bf-assessment-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 15px;
    }

    .bf-progress-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .bf-progress-list::-webkit-scrollbar {
        display: none;
    }

    .bf-progress-item {
        margin-bottom: 0;
        margin-right: 15px;
    }

    .bf-progress-item .step-info {
        display: none; /* Only show numbers on mobile */
    }

    .bf-progress-item.active .step-info, .bf-progress-item.completed .step-num {
        /* Optional: show active step title if needed or keep it simple */
    }

    .bf-assessment-main {
        padding: 20px;
    }

    .bf-header-options {
        padding-right: 0;
    }

    .bf-options-grid {
        width: 150px;
        gap: 0;
        padding-right: 0;
    }

    .bf-opt {
        width: 60px;
    }

    .bf-header-options span {
        width: 60px;
    }

    .bf-options-grid {
        width: 180px;
    }

    .bf-footer-nav {
        flex-direction: column;
        gap: 10px;
    }

    .bf-nav-buttons {
        width: 100%;
        flex-direction: column;
    }

    .bf-nav-buttons button {
        width: 100%;
    }

    .bf-disclaimer-text {
        font-size: 11px;
        padding: 10px;
    }

    .bf-results-container {
        padding: 20px;
    }

    .bf-stat-card {
        padding: 20px 10px;
    }

    .bf-stat-value {
        font-size: 36px;
    }

    .bf-footer-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        border-top: none;
        padding-top: 0;
    }

    .bf-results-actions {
        display: flex;
        justify-content: center;
    }
}

/* Stats Icons in Review */
.bf-results-container {
    padding: 40px;
    background: #f8fbff;
    border-radius: 12px;
    margin-bottom: 20px;
}

.bf-stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 0;
}

.bf-stat-card {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    padding: 30px 10px;
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.bf-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

.bf-stat-value {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1;
}

.bf-stat-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yes-card .bf-stat-value { color: #28a745; }
.partially-card .bf-stat-value { color: #ffc107; }
.no-card .bf-stat-value { color: #dc3545; }

.bf-results-actions {
    display: flex;
    justify-content: flex-end;
}

.bf-results-actions {
    display: flex;
    justify-content: flex-end;
    /* margin-top: 10px; */
}

@media (max-width: 600px) {
    .bf-results-container {
        padding: 20px;
    }

    .bf-stats-grid {
        flex-direction: column;
        gap: 15px;
    }

    .bf-stat-card {
        padding: 20px 10px;
    }

    .bf-stat-value {
        font-size: 36px;
    }
}

/* Loading and AI Results Styles */
.bf-loading-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
}

.bf-loading-content {
    text-align: center;
    max-width: 400px;
}

.bf-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4b26a6;
    border-radius: 50%;
    animation: bf-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes bf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#bf-loading-message {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.bf-loading-progress {
    margin-top: 30px;
}

.bf-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.bf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4b26a6, #b54b66);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.bf-progress-text {
    font-size: 12px;
    color: #777;
    margin: 0;
    font-weight: 500;
}

.bf-ai-results-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bf-results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #4b26a6;
}

.bf-results-header h2 {
    color: #4b26a6;
    font-size: 24px;
    margin: 0 0 5px;
    font-weight: 700;
}

.bf-results-header p {
    color: #777;
    margin: 0;
    font-size: 14px;
}

.bf-ai-response-content {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    line-height: 1.7;
    border-left: 4px solid #4b26a6;
}

.bf-ai-response-content h3 {
    color: #4b26a6;
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.bf-ai-response-content h3:first-child {
    margin-top: 0;
}

.bf-ai-response-content p {
    color: #555;
    margin: 0 0 12px;
    font-size: 14px;
}

.bf-ai-response-content ul, .bf-ai-response-content ol {
    color: #555;
    margin: 10px 0 15px 20px;
    font-size: 14px;
}

.bf-ai-response-content li {
    margin-bottom: 8px;
}

.bf-ai-response-content strong {
    color: #333;
    font-weight: 600;
}

/* Error state */
.bf-error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.bf-error-message strong {
    display: block;
    margin-bottom: 5px;
}
