* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7f8;
    color: #263238;
    min-height: 100vh;
}


/* HEADER */

.top-header {
    background: #ffffff;
    border-bottom: 1px solid #dde5e8;

    min-height: 85px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 7%;
}

.top-header h1 {
    font-size: 24px;
    color: #173b3f;
}

.top-header p {
    color: #708083;
    margin-top: 4px;
}


/* TIMER */

.timer {
    background: #173b3f;
    color: white;

    padding: 10px 22px;
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    text-align: center;
}

.timer span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer strong {
    font-size: 24px;
    margin-top: 2px;
}

.timer.warning {
    background: #c2413b;
}


/* GENERAL */

.container {
    width: min(1180px, 92%);
    margin: 45px auto;
}

.hidden {
    display: none !important;
}


/* WELCOME */

.welcome-card {
    max-width: 900px;
    margin: auto;

    background: white;

    padding: 50px;

    border-radius: 20px;

    box-shadow: 0 8px 35px rgba(30, 55, 58, 0.08);

    text-align: center;
}

.level-badge {
    display: inline-block;

    background: #e2f0eb;
    color: #21665b;

    padding: 8px 15px;

    border-radius: 30px;

    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;

    margin-bottom: 20px;
}

.welcome-card h2 {
    color: #173b3f;
    font-size: 34px;
}

.description {
    color: #6d797c;
    margin: 12px 0 30px;
}


/* INFO */

.test-information {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;

    margin-bottom: 30px;
}

.info-card {
    background: #f6f9f8;

    padding: 22px;

    border-radius: 12px;
}

.info-card .number {
    display: block;

    color: #1f6d61;

    font-size: 30px;
    font-weight: bold;
}

.info-card .label {
    color: #6f7c7e;
    font-size: 13px;
}


/* MODULES */

.modules {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin: 30px 0;
}

.module-card {
    border: 2px solid #e3ebe9;

    padding: 25px;

    border-radius: 15px;

    text-align: left;
}

.module-card:hover {
    border-color: #74a99e;
}

.module-number {
    color: #287567;
    font-size: 12px;
    font-weight: bold;
}

.module-card h3 {
    margin: 8px 0;
    font-size: 23px;
}

.module-card p {
    color: #667577;
    margin: 5px 0;
}

.module-card small {
    display: block;
    color: #9a7443;
    margin-top: 9px;
}


/* INSTRUCTIONS */

.instructions {
    background: #f8faf9;

    padding: 25px;

    border-radius: 12px;

    text-align: left;

    margin-bottom: 30px;
}

.instructions h3 {
    margin-bottom: 12px;
}

.instructions ul {
    padding-left: 22px;
}

.instructions li {
    margin-bottom: 7px;
    color: #5d696c;
}


/* BUTTON */

button {
    font-family: inherit;
}

.primary-btn {
    background: #276f63;

    border: none;

    color: white;

    padding: 14px 28px;

    font-weight: bold;
    font-size: 15px;

    border-radius: 9px;

    cursor: pointer;

    transition: 0.2s;
}

.primary-btn:hover {
    background: #19594f;
    transform: translateY(-1px);
}

.secondary-btn {
    background: white;

    color: #315c58;

    border: 1px solid #a7bbb8;

    padding: 13px 22px;

    border-radius: 9px;

    cursor: pointer;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* TEST */

.test-screen {
    max-width: 1100px;
    margin: auto;
}

.test-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;
}

.module-label {
    color: #2a7769;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.test-top h2 {
    margin-top: 4px;
}

.progress-text {
    color: #68777a;
}


/* PROGRESS */

.progress-bar {
    background: #dce5e4;

    height: 7px;

    border-radius: 10px;

    overflow: hidden;

    margin-bottom: 25px;
}

#progressFill {
    height: 100%;
    width: 0;

    background: #378c7c;

    transition: width 0.3s;
}


/* LAYOUT */

.test-layout {
    display: grid;

    grid-template-columns: 220px 1fr;

    gap: 25px;
}


/* QUESTION PANEL */

.question-panel {
    background: white;

    border-radius: 15px;

    padding: 20px;

    height: fit-content;

    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.question-panel h3 {
    margin-bottom: 15px;
}

.question-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 8px;
}

.question-grid button {
    height: 38px;

    border-radius: 7px;

    border: 1px solid #d0dcda;

    background: white;

    cursor: pointer;
}

.question-grid button.current {
    background: #246c60;

    color: white;

    border-color: #246c60;
}

.question-grid button.answered {
    background: #d8ebe6;

    color: #15584e;

    border-color: #78ab9f;
}

.question-grid button.current.answered {
    background: #246c60;
    color: white;
}


/* LEGEND */

.legend {
    margin-top: 20px;

    border-top: 1px solid #e3e7e7;

    padding-top: 15px;

    font-size: 12px;

    color: #687578;
}

.legend div {
    margin: 7px 0;
}

.legend-box {
    width: 13px;
    height: 13px;

    display: inline-block;

    margin-right: 5px;

    border-radius: 3px;
}

.legend-box.answered {
    background: #d8ebe6;
}

.legend-box.current {
    background: #246c60;
}


/* QUESTION CARD */

.question-card {
    background: white;

    border-radius: 15px;

    padding: 35px;

    min-height: 460px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.category {
    display: inline-block;

    background: #eef4f2;

    color: #35685f;

    padding: 6px 10px;

    border-radius: 5px;

    font-size: 12px;

    font-weight: bold;

    margin-bottom: 20px;
}

#questionText {
    line-height: 1.55;
    margin-bottom: 25px;
    font-size: 21px;
}


/* ANSWERS */

.choices {
    display: grid;

    gap: 12px;
}

.choice {
    width: 100%;

    padding: 16px;

    border: 2px solid #e0e7e6;

    background: white;

    border-radius: 10px;

    cursor: pointer;

    text-align: left;

    font-size: 16px;

    transition: 0.15s;
}

.choice:hover {
    border-color: #76a79f;
    background: #f7faf9;
}

.choice.selected {
    border-color: #276f63;
    background: #e5f1ed;
}


/* GRID IN */

.grid-in {
    margin-top: 20px;
}

.grid-in label {
    display: block;

    margin-bottom: 8px;

    font-weight: bold;
}

.grid-in input {
    width: 100%;

    padding: 14px;

    border: 2px solid #d7e2e0;

    border-radius: 8px;

    font-size: 18px;

    outline: none;
}

.grid-in input:focus {
    border-color: #287568;
}


/* NAV */

.navigation {
    display: flex;

    justify-content: space-between;

    margin-top: 40px;
}

.submit-btn {
    display: block;

    margin: 25px 0 0 auto;

    background: #9b6534;

    color: white;

    border: none;

    padding: 13px 22px;

    border-radius: 8px;

    cursor: pointer;
}


/* RESULTS */

.result-card {
    max-width: 750px;

    margin: auto;

    background: white;

    padding: 50px;

    text-align: center;

    border-radius: 20px;

    box-shadow: 0 7px 25px rgba(0,0,0,0.07);
}

.result-icon,
.trophy {
    width: 70px;
    height: 70px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #dcefe8;

    color: #23695e;

    font-size: 35px;
    font-weight: bold;
}

.next-module-info {
    margin: 30px auto;

    max-width: 350px;

    background: #f3f7f6;

    padding: 20px;

    border-radius: 12px;
}

.next-module-info strong,
.next-module-info span {
    display: block;
}

.next-module-info span {
    color: #6c7779;
    margin-top: 6px;
}


/* SCORE */

.score-circle {
    width: 160px;
    height: 160px;

    border: 10px solid #d7eae4;

    border-radius: 50%;

    margin: 30px auto;

    display: flex;

    flex-direction: column;

    justify-content: center;
}

.score-circle span {
    font-size: 46px;

    font-weight: bold;

    color: #20695c;
}

.score-circle small {
    color: #768284;
}

.results-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;

    margin: 25px 0;
}

.results-grid div {
    background: #f3f7f6;

    padding: 18px;

    border-radius: 10px;
}

.results-grid strong,
.results-grid span {
    display: block;
}

.results-grid span {
    margin-top: 6px;

    font-size: 12px;

    color: #6c787a;
}


/* REVIEW */

.review-area {
    text-align: left;

    margin: 30px 0;
}

.review-area h3 {
    margin-bottom: 15px;
}

.review-item {
    border-left: 4px solid #d1dedd;

    background: #f7f9f9;

    padding: 15px;

    margin-bottom: 10px;

    border-radius: 4px 8px 8px 4px;
}

.review-item.correct {
    border-color: #3c9579;
}

.review-item.incorrect {
    border-color: #d36b61;
}

.review-item p {
    margin: 6px 0;
    line-height: 1.5;
}


/* FOOTER */

footer {
    text-align: center;

    color: #849092;

    font-size: 13px;

    padding: 25px;
}


/* MOBILE */

@media (max-width: 800px) {

    .test-layout {
        grid-template-columns: 1fr;
    }

    .question-panel {
        order: 2;
    }

    .question-card {
        order: 1;
    }

    .test-information {
        grid-template-columns: 1fr;
    }

    .modules {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        padding: 30px 20px;
    }

    .top-header {
        padding: 15px 4%;
    }

    .timer strong {
        font-size: 19px;
    }

}