* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #16324f;
    --blue: #246b83;
    --teal: #2a9d8f;
    --light-teal: #e9f6f4;
    --cream: #f7f5ef;
    --white: #ffffff;
    --text: #263640;
    --muted: #687780;
    --border: #d9e1e5;
    --red: #d9534f;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
}

.top-header {
    background: var(--navy);
    color: white;
    padding: 24px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.top-header h1 {
    margin-top: 8px;
    font-size: 26px;
}

.top-header p {
    color: #cddce6;
    margin-top: 5px;
}

.level-badge {
    display: inline-block;
    color: #8de0d4;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.timer-box {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 12px 22px;
    text-align: center;
}

.timer-box span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #c8d6df;
    margin-bottom: 3px;
}

.timer-box strong {
    font-size: 25px;
    letter-spacing: 2px;
}

.container {
    width: 92%;
    max-width: 1000px;
    margin: 35px auto;
}

.start-screen {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 45px;
    text-align: center;
}

.start-icon {
    width: 70px;
    height: 70px;
    background: var(--teal);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.start-screen h2 {
    color: var(--navy);
    font-size: 30px;
}

.intro {
    max-width: 650px;
    margin: 12px auto 30px;
    line-height: 1.7;
    color: var(--muted);
}

.test-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 650px;
    margin: 0 auto 30px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.test-info div {
    padding: 20px;
    border-right: 1px solid var(--border);
}

.test-info div:last-child {
    border-right: none;
}

.test-info strong {
    display: block;
    color: var(--teal);
    font-size: 25px;
}

.test-info span {
    color: var(--muted);
    font-size: 12px;
}

.task-list {
    text-align: left;
    max-width: 700px;
    margin: 0 auto 30px;
}

.task-list div {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 14px 5px;
}

.task-list span {
    width: 45px;
    color: var(--teal);
    font-weight: bold;
}

.task-list p {
    flex: 1;
}

.primary-btn,
.secondary-btn,
.submit-btn {
    border: none;
    padding: 14px 24px;
    border-radius: 7px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.primary-btn {
    background: var(--teal);
    color: white;
}

.primary-btn:hover {
    background: #218579;
}

.secondary-btn {
    background: white;
    border: 1px solid var(--border);
    color: var(--navy);
}

.submit-btn {
    background: var(--navy);
    color: white;
}

.progress-card {
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 7px;
}

.progress-info span {
    color: var(--teal);
    font-weight: bold;
}

.progress-track {
    width: 100%;
    height: 7px;
    background: #dfe6e8;
    border-radius: 20px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    width: 5%;
    background: var(--teal);
    transition: width 0.3s;
}

.question-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 35px;
    min-height: 430px;
}

.question-number {
    color: var(--teal);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.question-card h2 {
    color: var(--navy);
    margin: 10px 0;
    font-size: 22px;
}

.instruction {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.passage {
    background: #f5f8f8;
    border-left: 4px solid var(--teal);
    padding: 20px;
    line-height: 1.8;
    margin-bottom: 22px;
}

.options {
    display: grid;
    gap: 10px;
}

.option {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 7px;
    cursor: pointer;
    background: white;
}

.option:hover {
    border-color: var(--teal);
    background: var(--light-teal);
}

.option input {
    accent-color: var(--teal);
    width: 18px;
    height: 18px;
}

.order-list {
    display: grid;
    gap: 10px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f6f8f8;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.order-text {
    flex: 1;
    line-height: 1.5;
}

.order-controls button {
    border: none;
    background: var(--navy);
    color: white;
    width: 34px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
}

.inline-select {
    padding: 6px 10px;
    border: 2px solid var(--teal);
    border-radius: 5px;
    color: var(--navy);
    font-weight: bold;
    background: white;
}

.blank-passage {
    font-size: 17px;
    line-height: 2.5;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    background: var(--light-teal);
    border-radius: 8px;
    margin-bottom: 25px;
}

.word {
    background: white;
    border: 1px solid var(--teal);
    color: var(--navy);
    padding: 9px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: grab;
}

.drop-zone {
    display: inline-block;
    min-width: 110px;
    min-height: 35px;
    padding: 3px 10px;
    vertical-align: middle;
    border: 2px dashed #92a7ad;
    background: white;
    border-radius: 5px;
    text-align: center;
    line-height: 27px;
}

.drop-zone.filled {
    border-style: solid;
    border-color: var(--teal);
    background: var(--light-teal);
    font-weight: bold;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.result-screen {
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.result-icon {
    margin: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    font-size: 32px;
    line-height: 60px;
}

.result-label {
    color: var(--teal);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 18px 0 7px;
}

.result-screen h2 {
    color: var(--navy);
}

.score-circle {
    width: 150px;
    height: 150px;
    border: 10px solid var(--light-teal);
    border-top-color: var(--teal);
    border-radius: 50%;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.score-circle strong {
    font-size: 35px;
    color: var(--navy);
}

.score-circle span {
    color: var(--muted);
    font-size: 12px;
}

#scoreText {
    margin: 15px;
    color: var(--muted);
}

.result-grid {
    max-width: 500px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.result-grid div {
    border-right: 1px solid var(--border);
}

.result-grid div:last-child {
    border: none;
}

.result-grid strong {
    display: block;
    font-size: 25px;
    color: var(--navy);
}

.result-grid span {
    font-size: 12px;
    color: var(--muted);
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    padding: 25px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 650px) {

    .top-header {
        flex-direction: column;
        text-align: center;
    }

    .start-screen,
    .question-card {
        padding: 25px 18px;
    }

    .test-info {
        grid-template-columns: 1fr;
    }

    .test-info div {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .result-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .result-grid div {
        border: none;
    }
}