* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f2;
    color: #27322f;
}

.top-header {
    min-height: 90px;
    padding: 18px 6%;
    background: #ffffff;
    border-bottom: 1px solid #d9dfdb;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-header h1 {
    margin: 0;
    font-size: 25px;
    color: #304b43;
}

.top-header p {
    margin: 5px 0 0;
    color: #75817c;
}

.container {
    width: min(1180px, 92%);
    margin: 35px auto;
}

.card {
    background: #ffffff;
    border: 1px solid #dce2de;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(31, 48, 42, 0.07);
}

.start-screen {
    padding: 50px;
    text-align: center;
}

.level-badge {
    display: inline-block;
    padding: 8px 15px;
    background: #e6efea;
    color: #31594c;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.start-screen h2,
.result-screen h2 {
    margin: 20px 0 10px;
    color: #263e37;
}

.intro {
    max-width: 650px;
    margin: 0 auto 35px;
    line-height: 1.7;
    color: #69756f;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.info-card {
    padding: 25px;
    background: #f7f9f7;
    border: 1px solid #dce4df;
    border-radius: 14px;
}

.info-card h3 {
    margin-top: 0;
    color: #49645b;
}

.info-card strong {
    display: block;
    font-size: 21px;
    color: #263d36;
}

.info-card p {
    color: #78827e;
}

.instructions {
    max-width: 730px;
    margin: 30px auto;
    padding: 20px 30px;
    text-align: left;
    background: #fafbf9;
    border-radius: 12px;
}

.instructions li {
    margin: 9px 0;
    line-height: 1.5;
}

button {
    font: inherit;
    cursor: pointer;
}

.primary-btn,
.secondary-btn {
    padding: 12px 25px;
    border-radius: 9px;
    font-weight: bold;
}

.primary-btn {
    border: none;
    background: #476d60;
    color: white;
}

.primary-btn:hover {
    background: #38594e;
}

.secondary-btn {
    border: 1px solid #becac5;
    background: #ffffff;
    color: #40564f;
}

.secondary-btn:hover {
    background: #f2f5f3;
}

.timer {
    text-align: right;
    padding: 8px 15px;
    border: 1px solid #dce2df;
    border-radius: 10px;
}

.timer span {
    display: block;
    font-size: 11px;
    color: #73807b;
}

.timer strong {
    font-size: 23px;
    color: #334e45;
}

.module-bar {
    margin-bottom: 18px;
    padding: 17px 23px;
    border: 1px solid #dbe2de;
    border-radius: 12px;
    background: #ffffff;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-bar span,
.module-bar strong {
    display: block;
}

.module-bar span {
    margin-bottom: 4px;
    color: #77827e;
    font-size: 12px;
    font-weight: bold;
}

.difficulty {
    padding: 8px 15px;
    border-radius: 18px;
    color: #426257;
    background: #eaf1ed;
    font-weight: bold;
}

.test-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}

.question-panel {
    padding: 20px;
    height: fit-content;
    background: #ffffff;
    border: 1px solid #dce2de;
    border-radius: 14px;
}

.question-panel h3 {
    margin-top: 0;
}

.question-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}

.nav-number {
    width: 31px;
    height: 31px;
    border: 1px solid #ccd5d1;
    background: white;
    border-radius: 6px;
    color: #4e5e58;
}

.nav-number.current {
    color: white;
    border-color: #476d60;
    background: #476d60;
}

.nav-number.answered {
    color: #315747;
    background: #dcebe3;
    border-color: #a9c9b9;
}

.question-card {
    min-height: 550px;
    padding: 35px;
}

.question-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#questionNumber {
    color: #70807a;
    font-weight: bold;
}

.skill-badge {
    padding: 6px 11px;
    background: #edf2ef;
    color: #60716a;
    border-radius: 6px;
    font-size: 12px;
}

.passage {
    margin: 25px 0;
    padding: 22px;
    border-left: 4px solid #78988c;
    border-radius: 0 9px 9px 0;
    background: #f7f9f7;
    line-height: 1.75;
    color: #394841;
}

#questionText {
    margin: 25px 0 20px;
    font-size: 19px;
    line-height: 1.5;
}

.answers {
    display: grid;
    gap: 11px;
}

.answer {
    width: 100%;
    padding: 15px 18px;
    text-align: left;
    border: 1px solid #ccd5d1;
    border-radius: 9px;
    background: white;
    color: #303d38;
}

.answer:hover {
    background: #f5f8f6;
    border-color: #819a90;
}

.answer.selected {
    background: #e5efea;
    border: 2px solid #507666;
}

.answer-letter {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    width: 29px;
    height: 29px;
    margin-right: 10px;

    border-radius: 50%;
    background: #edf1ef;

    font-weight: bold;
}

.navigation {
    margin-top: 35px;

    display: flex;
    justify-content: space-between;
}

.result-screen {
    max-width: 750px;
    padding: 50px;
    margin: auto;
    text-align: center;
}

.score-circle {
    width: 130px;
    height: 130px;
    margin: 30px auto;

    border: 9px solid #dfeae5;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #35594c;
}

.score-circle.large {
    width: 160px;
    height: 160px;
}

.score-circle strong {
    font-size: 25px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.result-grid div {
    padding: 20px;
    background: #f6f8f6;
    border-radius: 10px;
}

.result-grid span,
.result-grid strong {
    display: block;
}

.result-grid span {
    color: #75817c;
    margin-bottom: 7px;
}

.result-grid strong {
    font-size: 21px;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.review-item {
    padding: 25px;
    margin-bottom: 15px;

    background: white;
    border: 1px solid #dce2de;
    border-radius: 12px;
}

.review-item.correct {
    border-left: 5px solid #55a271;
}

.review-item.incorrect {
    border-left: 5px solid #c96565;
}

.review-item h3 {
    margin-top: 0;
}

.review-item p {
    line-height: 1.6;
}

.correct-text {
    color: #34704b;
}

.wrong-text {
    color: #a64545;
}

footer {
    padding: 35px;
    text-align: center;
    color: #87918d;
    font-size: 13px;
}

.hidden {
    display: none !important;
}

@media (max-width: 800px) {

    .test-grid,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .test-layout {
        grid-template-columns: 1fr;
    }

    .question-panel {
        order: 2;
    }

    .question-nav {
        grid-template-columns: repeat(9, 1fr);
    }

    .start-screen,
    .question-card,
    .result-screen {
        padding: 25px;
    }

    .top-header {
        padding: 15px 4%;
    }
}