.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.quiz-question {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quiz-question.answered {
    border-color: #2271b1;
}

.question-number {
    position: relative;
    margin-bottom: 20px;
    padding: 10px 0;
}

/* .question-number::before {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background-color: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
} */

.question-number::after {
    content: '';
    display: block;
    width: calc((100% / var(--total-questions)) * (var(--current-question) + 1));
    height: 100%;
    background-color: #2271b1;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #2271b1;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0;
}

.question-text {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.title_question {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 15px;
    line-height: 1.4;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.answer-item:hover,
.answer-item.hover {
    background-color: #f0f6fc;
    border-color: #2271b1;
}

.answer-item.selected {
    background-color: #f0f6fc;
    border-color: #2271b1;
}

.answer-item.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #2271b1;
    border-radius: 2px;
}

.answer-item input[type="radio"],
.answer-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.answer-item label {
    flex: 1;
    cursor: pointer;
    font-size: 16px;
    color: #2c3338;
    user-select: none;
}

.quiz-form button[type="submit"] {
    display: block;
    width: 100%;
    max-width: 200px;
    /* margin: 30px auto 0; */
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #fff;
    background-color: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-form button[type="submit"]:hover {
    background-color: #135e96;
}

.quiz-form button[type="submit"]:disabled {
    background-color: #a7aaad;
    cursor: not-allowed;
    color: #ffff;
}
.quiz-form-quizzes button[type="submit"] {
    display: block;
    width: 100%;
    max-width: 200px;
    /* margin: 30px auto 0; */
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #fff;
    background-color: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.quiz-form-quizzes button[type="submit"]:hover {
    background-color: #135e96;
}

.quiz-form-quizzes button[type="submit"]:disabled {
    background-color: #a7aaad;
    cursor: not-allowed;
    color: #ffff;
}
@media (max-width: 600px) {
    .quiz-container {
        padding: 10px;
    }
    
    .quiz-question {
        padding: 15px;
    }
    
    .title_question {
        font-size: 16px;
    }
    
    .answer-item label {
        font-size: 14px;
    }
}

/* Kết quả bài test */
.quiz-result {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.quiz-score {
    background: #f0f6fc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.quiz-score p {
    margin: 10px 0;
    font-size: 18px;
    font-weight: 500;
}

.question-result {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-result.correct {
    border-left: 4px solid #46b450;
}

.question-result.incorrect {
    border-left: 4px solid #dc3232;
}

.answers-list {
    margin: 15px 0;
}

.answer-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
}

.answer-item.user-selected {
    background-color: #f0f6fc;
}

.answer-item.correct-answer {
    background-color: #edfaef;
}

.answer-marker {
    margin-right: 10px;
    min-width: 20px;
}

.correct-feedback {
    color: #46b450;
    font-weight: 500;
}

.incorrect-feedback {
    color: #dc3232;
    font-weight: 500;
}

.quiz-actions {
    margin-top: 30px;
    text-align: center;
}

.quiz-actions button {
    margin: 0 10px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #2271b1;
    background-color: #fff;
    border: 1px solid #2271b1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-actions button:hover {
    background-color: #f0f6fc;
    transform: translateY(-1px);
}

@media print {
    .quiz-actions {
        display: none;
    }
}

/* Style cho PDF */
.quiz-result {
    font-family: Arial, sans-serif;
}

.quiz-score {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.question-result {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.answer-item {
    margin: 5px 0;
    padding: 8px;
}

.answer-item.user-selected {
    background-color: #e9ecef;
}

.quiz-test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.quiz-progress {
    margin-bottom: 20px;
}

.number-question {
    text-align: center;
    margin-top: 5px;
    font-weight: bold;
    color: #666;
}

.quiz-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.list_question_ans {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list_question_ans li {
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.list_question_ans li:hover {
    background: #f5f5f5;
    border-color: #2196F3;
}

.list_question_ans li.active {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #1976D2;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.quiz-navigation button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #2271b1;
    background-color: #fff;
    border: 1px solid #2271b1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-navigation button:hover:not(:disabled) {
    background-color: #f0f6fc;
    transform: translateY(-1px);
}

.quiz-navigation button:disabled {
    color: #a7aaad;
    border-color: #dcdcde;
    background-color: #f6f7f7;
    cursor: not-allowed;
    transform: none;
}

.quiz-navigation button i {
    font-size: 14px;
}

#loadingSpinner {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.final-score {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.final-score h3 {
    margin: 0;
    color: #2196F3;
    font-size: 24px;
}

.quiz-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 4px;
    margin: 20px 0;
}

.quiz-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cải thiện style cho PDF */
.quiz-result {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.quiz-score {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question-result {
    background: #fff;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.answer-item {
    padding: 10px 15px;
    margin: 8px 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.answer-item.user-selected {
    background: #e8f4ff;
    border-color: #2271b1;
}

.answer-marker {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    margin-right: 10px;
    background: #f8f9fa;
    border-radius: 50%;
}

.answer-text {
    font-size: 15px;
}

/* Đảm bảo khoảng cách giữa các phần tử */
h2, h3 {
    margin: 20px 0;
    line-height: 1.4;
}

p {
    margin: 10px 0;
}

.quiz-password-form {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.quiz-password-form h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.quiz-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 3px;
}

.password-input {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.password-input input[type="password"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.password-input .button {
    padding: 8px 20px;
    font-size: 16px;
} 
.password-instructions,.password-status{
    color: #262626;
    text-align: center;
    font-weight: 700;
}
.multiple-quizzes-container button[type="submit"],
.multiple-quizzes-container button[type="button"]
{
    display: block;
    width: 100%;
    max-width: 200px;
    /* margin: 30px auto 0; */
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #fff;
    background-color: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
@media(max-width:767px){
    .password-input {
        display: flex;
        gap: 10px;
        margin-top: 15px;
        align-items: center;
        flex-direction: column;
    }
}