/* =================================================================
   == WHAT'S MY LEVEL? — INTEGRATED V42
   ================================================================= */

/* =================================================================
   == SCOPED RESET (replaces global reset for site integration)
   ================================================================= */

/* 1. Establish the app wrapper */
#content #esl-level-test {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    padding-left: 0;
}

/* 2. Protect the app's sizing geometry */
#content #esl-level-test *,
#content #esl-level-test *::before,
#content #esl-level-test *::after {
    box-sizing: border-box;
}

/* 3. Neutralise global bare-tag bleeding from style.css */
#content #esl-level-test p,
#content #esl-level-test h1,
#content #esl-level-test h2,
#content #esl-level-test h3,
#content #esl-level-test a,
#content #esl-level-test ul,
#content #esl-level-test li,
#content #esl-level-test span,
#content #esl-level-test button,
#content #esl-level-test img {
    line-height: normal;
    color: inherit;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    border: none;
    background: none;
    font-family: inherit;
}

/* =================================================================
   == PAGE WRAPPER (not needed — site layout handles this)
   ================================================================= */

/* =================================================================
   == SIDEBAR (not needed — site left menu replaces this)
   ================================================================= */

/* =================================================================
   == CONTAINER
   ================================================================= */

#content #esl-level-test .level-test-container{
    width: 100%;
    max-width: 650px;
    height: 760px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    overflow: hidden;
}

/* =================================================================
   == LEVEL BADGE (top corner)
   ================================================================= */

#content #esl-level-test .level-badge{
    position: absolute;
    top: 16px;
    right: 16px;
    background: #3F51B5;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 100;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#content #esl-level-test .level-badge--pulse{
    transform: scale(1.15);
}

/* =================================================================
   == TEST AREA
   ================================================================= */

#content #esl-level-test .test-area{
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

/* =================================================================
   == TITLE CARD
   ================================================================= */

#content #esl-level-test .title-card{
    text-align: center;
    padding: 40px 20px;
    margin: auto 0;
}

#content #esl-level-test .title-card h1{
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

#content #esl-level-test .title-card p{
    font-size: 20px;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.5;
}

#content #esl-level-test .title-card__dialect-prompt{
    font-size: 18px;
    color: #777;
    margin-bottom: 24px;
}

#content #esl-level-test .title-card__flags{
    display: flex;
    gap: 28px;
    justify-content: center;
}

#content #esl-level-test .flag-button{
    background: none;
    border: 3px solid transparent;
    border-radius: 14px;
    padding: 12px 20px;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#content #esl-level-test .flag-button__img{
    width: 56px;
    height: 56px;
    display: block;
    object-fit: contain;
}

#content #esl-level-test .flag-button:hover{
    border-color: #d0d0d0;
}

#content #esl-level-test .flag-button:active{
    opacity: 0.7;
}

#content #esl-level-test .flag-button--loading{
    opacity: 0.4;
    cursor: default;
}

/* =================================================================
   == QUESTION SCREEN
   ================================================================= */

#content #esl-level-test .question-screen{
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-top: 18%;
}

#content #esl-level-test .question-screen--visible{
    opacity: 1;
}

/* =================================================================
   == PROGRESS DOTS
   ================================================================= */

#content #esl-level-test .progress-dots{
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#content #esl-level-test .progress-dot{
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #555;
    background: transparent;
}

#content #esl-level-test .progress-dot--filled{
    background: #555;
}

#content #esl-level-test .question-counter{
    font-size: 19px;
    color: #999;
    text-align: center;
    margin-bottom: 36px;
}

#content #esl-level-test .question-prompt{
    font-size: 20px;
    color: #777;
    text-align: center;
    margin-bottom: 14px;
}

#content #esl-level-test .question-text{
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 110px;
}

/* =================================================================
   == OPTION BUTTONS
   ================================================================= */

#content #esl-level-test .options-container{
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

#content #esl-level-test .option-button{
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 22px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    color: #1a1a1a;
    line-height: 1.4;
}

/* Yes/No: fewer options, give them more room */
#content #esl-level-test .options-container--yes_no{
    gap: 18px;
    margin-top: 30px;
}

#content #esl-level-test .options-container--yes_no .option-button{
    padding: 24px 26px;
    font-size: 26px;
    text-align: center;
}

#content #esl-level-test .option-button:active{
    border-color: #999;
}

#content #esl-level-test .option-button:disabled{
    cursor: default;
}

#content #esl-level-test .option-button--correct{
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

#content #esl-level-test .option-button--incorrect{
    background: #fce4ec;
    border-color: #e53935;
    color: #c62828;
}

/* =================================================================
   == IMAGE QUESTIONS
   ================================================================= */

#content #esl-level-test .question-screen--image{
    padding-top: 8%;
}

#content #esl-level-test .question-screen--image .question-text{
    margin-bottom: 28px;
}

#content #esl-level-test .question-image{
    display: block;
    width: 85%;
    max-width: 380px;
    margin: 0 auto 20px auto;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 3 / 2;
}

/* Image: 2x2 grid layout */
#content #esl-level-test .options-container--image{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#content #esl-level-test .options-container--image .option-button{
    text-align: center;
    padding: 16px 12px;
    font-size: 20px;
}

/* Feedback thumbnail */
#content #esl-level-test .feedback-card__thumbnail{
    width: 150px;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 3 / 2;
    margin-bottom: 8px;
}

/* =================================================================
   == AUDIO QUESTIONS
   ================================================================= */

#content #esl-level-test .question-screen--audio{
    padding-top: 12%;
}

#content #esl-level-test .question-screen--audio .question-text{
    margin-bottom: 50px;
}

#content #esl-level-test .audio-question-container{
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 20px;
    position: relative;
}

#content #esl-level-test .audio-tooltip{
    position: absolute;
    top: 5%;
    left: 85px;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

#content #esl-level-test .audio-tooltip--visible{
    opacity: 1;
}

#content #esl-level-test .audio-play-button{
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding: 0 0 1px 2px;
    transition: opacity 0.2s ease;
}

#content #esl-level-test .audio-play-button:active{
    opacity: 0.7;
}

#content #esl-level-test .audio-play-button--disabled{
    opacity: 0.3;
    cursor: default;
}

#content #esl-level-test .audio-track{
    flex-grow: 1;
    height: 6px;
    background: #d0d0d0;
    border-radius: 3px;
    overflow: hidden;
}

#content #esl-level-test .audio-track__fill{
    height: 100%;
    width: 0%;
    background: #1a1a1a;
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* =================================================================
   == FLASH FEEDBACK
   ================================================================= */

@keyframes correctFlash {
    0%   { background-color: #ffffff; }
    25%  { background-color: #e8f5e9; }
    100% { background-color: #ffffff; }
}

@keyframes incorrectFlash {
    0%   { background-color: #ffffff; }
    25%  { background-color: #fce4ec; }
    100% { background-color: #ffffff; }
}

#content #esl-level-test .test-area--correct-flash{
    animation: correctFlash 1.5s ease;
}

#content #esl-level-test .test-area--incorrect-flash{
    animation: incorrectFlash 1.5s ease;
}

/* =================================================================
   == MATCHING
   ================================================================= */

#content #esl-level-test .matching-grid{
    display: flex;
    gap: 14px;
    width: 100%;
}

#content #esl-level-test .matching-col{
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    transition: opacity 0.3s ease;
}

#content #esl-level-test .matching-col--faded{
    opacity: 0.4;
}

#content #esl-level-test .matching-button{
    width: 100%;
    background: #f5f5f5;
    border: 2px solid #d0d0d0;
    border-radius: 14px;
    color: #1a1a1a;
    font-size: 20px;
    padding: 18px 12px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, opacity 0.4s;
    text-align: center;
}

#content #esl-level-test .matching-button--selected{
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}

#content #esl-level-test .matching-button--correct{
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

#content #esl-level-test .matching-button--incorrect{
    background: #fce4ec;
    border-color: #e53935;
    color: #c62828;
}

#content #esl-level-test .matching-button--fade{
    opacity: 0;
}

#content #esl-level-test .matching-button:disabled{
    cursor: default;
}

#content #esl-level-test .matching-hint{
    color: #999;
    font-size: 16px;
    font-style: italic;
    text-align: center;
    margin-top: 20px;
}

/* =================================================================
   == FEEDBACK: MATCHING PAIRS
   ================================================================= */

#content #esl-level-test .feedback-card__pairs{
    margin-bottom: 8px;
}

#content #esl-level-test .feedback-card__pair{
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

/* =================================================================
   == REORDERING
   ================================================================= */

#content #esl-level-test .reordering-build{
    min-height: 140px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 16px;
    margin-bottom: 24px;
    align-content: flex-start;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

#content #esl-level-test .reordering-placeholder{
    color: #adb5bd;
    font-size: 16px;
    font-style: italic;
    margin: 0;
    width: 100%;
    text-align: center;
    align-self: center;
}

#content #esl-level-test .reordering-bank{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-content: flex-start;
}

#content #esl-level-test .reordering-tile{
    background-color: #F2ECD8;
    border: none;
    border-radius: 8px;
    color: #2C1F0E;
    font-size: 20px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 14px 22px;
    cursor: pointer;
    box-shadow: 0 3px 0 #B8A882, 0 4px 6px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.1s, transform 0.1s;
}

#content #esl-level-test .reordering-tile:hover:not(:disabled){
    box-shadow: 0 4px 0 #B8A882, 0 5px 8px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

#content #esl-level-test .reordering-tile:active:not(:disabled){
    box-shadow: 0 1px 0 #B8A882, 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(2px);
}

#content #esl-level-test .reordering-tile--in-build{
    background-color: #EDE5CC;
    box-shadow: 0 2px 0 #B8A882, 0 3px 5px rgba(0, 0, 0, 0.14);
}

#content #esl-level-test .reordering-tile--correct{
    background-color: #D7F5C2;
    box-shadow: 0 2px 0 #5A9E3A, 0 3px 5px rgba(0, 0, 0, 0.12);
    color: #2A5E10;
}

#content #esl-level-test .reordering-tile--incorrect{
    background-color: #FFD6D6;
    box-shadow: 0 2px 0 #D07070, 0 3px 5px rgba(0, 0, 0, 0.12);
    color: #8B1A1A;
}

#content #esl-level-test .reordering-tile:disabled{
    cursor: default;
}

/* =================================================================
   == RESULT CARD
   ================================================================= */

#content #esl-level-test .result-card{
    text-align: center;
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    width: 100%;
}

#content #esl-level-test .result-label{
    font-size: 18px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

#content #esl-level-test .result-grade-badge{
    display: inline-block;
    font-size: 64px;
    font-weight: 800;
    color: #ffffff;
    padding: 12px 34px;
    border-radius: 16px;
    margin-bottom: 20px;
}

#content #esl-level-test .result-description{
    font-size: 20px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 28px;
}

#content #esl-level-test .result-traditional{
    font-size: 18px;
    color: #999;
    margin-bottom: 20px;
}

#content #esl-level-test .result-icons{
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: auto;
    margin-bottom: 28px;
}

#content #esl-level-test .result-icon-button{
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#content #esl-level-test .result-icon-button:hover{
    opacity: 0.7;
}

#content #esl-level-test .result-icon-button:active{
    opacity: 1;
}

#content #esl-level-test .result-icon-button img{
    width: 48px;
    height: 48px;
    display: block;
}

#content #esl-level-test .result-icon-button span{
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

#content #esl-level-test .result-icon-button .copied-label{
    color: #3F51B5;
}

#content #esl-level-test .result-footer{
    margin-top: auto;
    padding-top: 24px;
    font-size: 14px;
    color: #bbb;
}

#content #esl-level-test .result-footer__link{
    color: #bbb;
    text-decoration: underline;
}

#content #esl-level-test .result-footer__link:hover{
    color: #999;
    text-decoration: underline;
}

#content #esl-level-test .result-footer + .result-footer{
    margin-top: 4px;
    padding-top: 0;
}

#content #esl-level-test .result-buttons-top{
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 14px;
}

#content #esl-level-test .result-buttons-bottom{
    display: flex;
    gap: 14px;
    justify-content: center;
}

#content #esl-level-test .result-button{
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    font-size: 17px;
    font-weight: 400;
    padding: 12px 22px;
    border-radius: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#content #esl-level-test .result-button:active{
    opacity: 0.7;
}

/* =================================================================
   == FEEDBACK SCREEN (Check Answers)
   ================================================================= */

#content #esl-level-test .feedback-screen{
    width: 100%;
    padding-bottom: 24px;
    align-self: flex-start;
}

#content #esl-level-test .feedback-card{
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

#content #esl-level-test .feedback-card--correct{
    background: #e8f5e9;
}

#content #esl-level-test .feedback-card--incorrect{
    background: #fce4ec;
}

#content #esl-level-test .feedback-card__number{
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

#content #esl-level-test .feedback-card__prompt{
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

#content #esl-level-test .feedback-card__question{
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #1a1a1a;
}

#content #esl-level-test .feedback-card__choice{
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

#content #esl-level-test .feedback-card__choice--correct{
    color: #2e7d32;
}

#content #esl-level-test .feedback-card__choice--wrong{
    color: #c62828;
}

#content #esl-level-test .feedback-card__explanation{
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

#content #esl-level-test .feedback-back-button{
    display: block;
    margin: 24px auto 0;
}

/* =================================================================
   == SKILLS SCREEN (View My Skills)
   ================================================================= */

#content #esl-level-test .skills-screen{
    width: 100%;
    padding: 40px 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#content #esl-level-test .skills-heading{
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    color: #1a1a1a;
}

#content #esl-level-test .skills-card{
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

#content #esl-level-test .skills-card__label{
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    flex-shrink: 0;
}

#content #esl-level-test .skills-card__score{
    font-size: 16px;
    color: #777;
    text-align: right;
}

#content #esl-level-test .skills-back-button{
    display: block;
    margin: auto auto 0;
}

/* =================================================================
   == INFO SCREEN (CEFR Scale + Spectrum)
   ================================================================= */

#content #esl-level-test .info-screen{
    width: 100%;
    padding: 30px 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#content #esl-level-test .info-heading{
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
    color: #1a1a1a;
}

#content #esl-level-test .info-level-list{
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

#content #esl-level-test .info-level-row{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 12px;
    border-radius: 10px;
}

#content #esl-level-test .info-level-row--current{
    background: #f0f0f0;
    box-shadow: 0 0 0 2px #1a1a1a;
}

#content #esl-level-test .info-level-badge{
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 6px;
    min-width: 40px;
    text-align: center;
}

#content #esl-level-test .info-level-name{
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
}

#content #esl-level-test .info-description{
    font-size: 17px;
    color: #555;
    line-height: 1.5;
    text-align: center;
    padding: 0 10px;
    margin-bottom: 24px;
}

#content #esl-level-test .info-spectrum-section{
    margin-bottom: 24px;
}

#content #esl-level-test .info-spectrum-label{
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 14px;
}

#content #esl-level-test .info-spectrum-bar{
    display: flex;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#content #esl-level-test .info-spectrum-segment{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#content #esl-level-test .info-spectrum-segment-label{
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

#content #esl-level-test .info-spectrum-marker{
    position: absolute;
    top: -6px;
    bottom: -6px;
    width: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 2px #ffffff;
}

#content #esl-level-test .info-back-button{
    display: block;
    margin: 24px auto 0;
}

/* =================================================================
   == CERTIFICATE SCREEN
   ================================================================= */

#content #esl-level-test .certificate-screen{
    width: 100%;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

#content #esl-level-test .certificate-site{
    font-size: 17px;
    font-weight: 500;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

#content #esl-level-test .certificate-title{
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 18px;
}

#content #esl-level-test .certificate-badge{
    display: inline-block;
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    padding: 10px 28px;
    border-radius: 14px;
    margin-bottom: 10px;
}

#content #esl-level-test .certificate-traditional{
    font-size: 18px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

#content #esl-level-test .certificate-date{
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

#content #esl-level-test .certificate-spectrum{
    display: flex;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

#content #esl-level-test .certificate-spectrum-segment{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#content #esl-level-test .certificate-spectrum-label{
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

#content #esl-level-test .certificate-spectrum-marker{
    position: absolute;
    top: -5px;
    bottom: -5px;
    width: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 2px #ffffff;
}

#content #esl-level-test .certificate-skills-heading{
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-top: auto;
    margin-bottom: 12px;
}

#content #esl-level-test .certificate-skills{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

#content #esl-level-test .certificate-skill-card{
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

#content #esl-level-test .certificate-skill-label{
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

#content #esl-level-test .certificate-skill-score{
    font-size: 14px;
    color: #777;
}

#content #esl-level-test .certificate-back-button{
    display: block;
    margin: auto auto 0;
    padding-top: 16px;
}

#content #esl-level-test .certificate-print-button{
    display: block;
    margin: 8px auto 0;
}

/* =================================================================
   == NEXT STEPS SCREEN
   ================================================================= */

#content #esl-level-test .next-steps-screen{
    width: 100%;
    padding: 30px 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#content #esl-level-test .next-steps-heading{
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #1a1a1a;
}

#content #esl-level-test .next-steps-content{
    flex: 1;
}

#content #esl-level-test .next-steps-group{
    margin-bottom: 20px;
}

#content #esl-level-test .next-steps-group-title{
    font-size: 16px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

#content #esl-level-test .next-steps-link{
    display: block;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: #f5f5f5;
    border-radius: 10px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

#content #esl-level-test .next-steps-link:hover{
    background: #eee;
}

#content #esl-level-test .next-steps-link:active{
    background: #e0e0e0;
}

#content #esl-level-test .next-steps-back-button{
    display: block;
    margin: 24px auto 0;
}

/* =================================================================
   == CHALLENGE A FRIEND BUTTON
   ================================================================= */

#content #esl-level-test .challenge-button{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 340px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    font-size: 20px;
    font-weight: 600;
    padding: 16px 28px;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 28px;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

#content #esl-level-test .challenge-button:hover{
    opacity: 0.85;
}

#content #esl-level-test .challenge-button:active{
    opacity: 0.7;
    transform: scale(0.97);
}

#content #esl-level-test .challenge-button__icon{
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

#content #esl-level-test .challenge-button__confirmed{
    font-size: 18px;
    font-weight: 600;
}

#content #esl-level-test .challenge-button__url{
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
    word-break: break-all;
    margin-top: 4px;
}

/* =================================================================
   == SUB-TABLET (below 720px — no left menu, full-width app)
   ================================================================= */

@media (max-width: 719px) {

    #content #esl-level-test {
        justify-content: center;
    }

    #content #esl-level-test .level-test-container{
        max-width: 100%;
        height: auto;
        min-height: 600px;
        border-radius: 16px;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    #content #esl-level-test .certificate-print-button{
        display: none;
    }
}

/* =================================================================
   == MOBILE (480px and below)
   ================================================================= */

@media (max-width: 480px) {

    #content #esl-level-test .question-screen{
        padding-top: 10%;
    }

    #content #esl-level-test .question-counter{
        margin-bottom: 20px;
    }

    #content #esl-level-test .question-text{
        font-size: 24px;
        margin-bottom: 50px;
    }

    #content #esl-level-test .option-button{
        padding: 14px 20px;
        font-size: 20px;
    }

    #content #esl-level-test .result-icons{
        gap: 20px;
    }

    #content #esl-level-test .result-icon-button img{
        width: 42px;
        height: 42px;
    }

    #content #esl-level-test .certificate-screen{
        padding-top: 8px;
    }
	
	#content #esl-level-test .level-test-container{
    padding: 24px 12px;
	}
}

/* =================================================================
   == MOBILE (below 400px)
   ================================================================= */
   
@media (max-width: 399px) {

    #content #esl-level-test .result-icons{
        gap: 10px;
    }

    #content #esl-level-test .result-icon-button img{
        width: 36px;
        height: 36px;
    }
}

/* =================================================================
   == TABLET (720px and above — site left menu appears)
   ================================================================= */

@media (min-width: 720px) {

    #content #esl-level-test {
        padding-left: 30px;
    }
}

/* =================================================================
   == DESKTOP (900px and above)
   ================================================================= */

@media (min-width: 900px) {

    #content #esl-level-test {
        padding-left: 50px;
    }
}
