.screen {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.screen[hidden] {
    display: none;
}

.language-screen,
.home-screen {
    background-image: url("../assets/intro/intro-background.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.question-screen {
    background-image: url("../assets/question/question-background.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-text-light);
}

.question-heading,
.question-footer {
    margin: 0;
    color: var(--color-text-light);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.24em;
    text-align: center;
    text-shadow: 0 0 0.75cqh rgba(0, 0, 0, 0.9);
}

.question-heading {
    position: absolute;
    left: 50%;
    top: 9.8cqh;
    width: 86%;
    transform: translateX(-50%);
    font-size: clamp(0.44rem, 1.45cqh, 0.92rem);
}

.question-footer-group {
    position: absolute;
    left: 50%;
    bottom: 2.3cqh;
    width: 86%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6cqh;
}

.question-logo {
    width: 34cqw;
    height: auto;
    display: block;
}

.question-footer {
    width: 100%;
    font-size: clamp(0.38rem, 1.15cqh, 0.7rem);
}

.question-footer-accent {
    color: var(--color-button-glow);
}

.question-timer {
    position: absolute;
    top: 13.05cqh;
    left: 50%;
    width: 31.4cqw;
    aspect-ratio: 376 / 201;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
}

.question-timer-frame {
    position: absolute;
    inset: 0;
    background-image: url("../assets/question/timer-frame.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.question-timer-value {
    position: relative;
    top: 0.05cqh;
    width: 27%;
    height: 58%;
    display: grid;
    place-items: center;
    color: var(--color-text-light);
    font-size: clamp(0.64rem, 3.55cqh, 2.1rem);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 1.1cqh rgba(0, 0, 0, 0.65);
}

.question-progress {
    position: absolute;
    top: 22.85cqh;
    left: 50%;
    width: 58.6cqw;
    height: 1.45cqh;
    transform: translateX(-50%);
    padding: 0.25cqh;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0.45cqh rgba(255, 255, 255, 0.7),
        0 0 1.25cqh rgba(53, 214, 138, 0.35);
}

.question-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #39df72 0%, #67f49b 100%);
    box-shadow:
        0 0 0.55cqh rgba(53, 214, 138, 0.95),
        0 0 1.45cqh rgba(53, 214, 138, 0.58);
}

.question-box {
    position: absolute;
    top: 25.35cqh;
    left: 50%;
    width: 84.6cqw;
    height: 12.8cqh;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.15cqh 7.8cqw 2cqh;
    background-image: url("../assets/question/question-frame.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.question-text {
    width: 100%;
    margin: 0;
    padding: 0.35cqh 0;
    color: var(--color-text-light);
    font-size: clamp(1rem, 3cqh, 2rem);
    font-weight: 600;
    line-height: 1.08;
    text-align: center;
    overflow-wrap: anywhere;
    text-shadow: 0 0 0.9cqh rgba(0, 0, 0, 0.7);
}

.question-text-accent {
    color: var(--color-button-glow);
}

.answer-list {
    position: absolute;
    top: 40.4cqh;
    left: 50%;
    width: 84.6cqw;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.25cqh;
}

.answer-button {
    position: relative;
    width: 100%;
    min-height: 8.75cqh;
    display: flex;
    align-items: center;
    gap: 2.15cqw;
    padding: 1.45cqh 5.7cqw 1.45cqh 4.3cqw;
    color: var(--color-text-light);
    background-image: url("../assets/question/answer-frame.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.answer-button:active {
    transform: scale(0.99);
    filter: brightness(1.08);
}

.answer-button:disabled {
    cursor: default;
}

.answer-button--flash {
    animation: answer-flash var(--answer-flash-duration, 300ms) ease-in-out;
}

@keyframes answer-flash {
    50% {
        filter:
            brightness(1.22)
            drop-shadow(0 0 0.8cqh rgba(53, 214, 138, 0.95))
            drop-shadow(0 0 1.8cqh rgba(53, 214, 138, 0.65));
    }
}

.answer-letter {
    flex: 0 0 9.6cqw;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding-bottom: 0.35cqh;
    background-image: url("../assets/question/answer-letter-frame.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-text-light);
    font-size: clamp(0.52rem, 2.95cqh, 1.65rem);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 0.65cqh rgba(0, 0, 0, 0.7);
}

.answer-text {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--color-text-light);
    font-size: clamp(0.42rem, 1.65cqh, 1.05rem);
    font-weight: 400;
    line-height: 1.08;
    text-align: left;
    overflow-wrap: anywhere;
    text-shadow: 0 0 0.65cqh rgba(0, 0, 0, 0.72);
}

@media (orientation: landscape) {
    .question-heading {
        top: 8.9cqh;
    }

    .question-timer {
        top: 10.8cqh;
        width: 31.4cqw;
    }

    .question-progress {
        top: 20.7cqh;
    }

    .question-box {
        top: 23.5cqh;
        height: 10.8cqh;
        padding-top: 1.65cqh;
        padding-bottom: 1.5cqh;
    }

    .answer-list {
        top: 36.4cqh;
        gap: 1.1cqh;
    }

    .answer-button {
        min-height: 7.3cqh;
        padding-top: 0.95cqh;
        padding-bottom: 0.95cqh;
    }

    .answer-text {
        line-height: 1.03;
    }
}

.language-buttons {
    position: absolute;
    left: 50%;
    bottom: var(--language-buttons-bottom);
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--language-buttons-gap);
}

.framed-button {
    position: relative;
    width: var(--language-button-width);
    aspect-ratio: var(--language-button-aspect);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.framed-button:active {
    transform: scale(0.985);
}

.framed-button-frame {
    position: absolute;
    inset: 0;
    background-image: url("../assets/intro/button-language-frame.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;

    filter:
        drop-shadow(0 0 0.6cqh rgba(53, 214, 138, 0.6))
        drop-shadow(0 0 1.4cqh rgba(53, 214, 138, 0.4))
        drop-shadow(0 0 2.6cqh rgba(20, 92, 52, 0.35));
}

.framed-button:active .framed-button-frame {
    filter:
        drop-shadow(0 0 0.8cqh rgba(53, 214, 138, 0.75))
        drop-shadow(0 0 1.8cqh rgba(53, 214, 138, 0.5))
        drop-shadow(0 0 3cqh rgba(20, 92, 52, 0.4));
}

.framed-button-label {
    position: relative;
    color: var(--color-text-light);
    font-size: clamp(1rem, 4.4cqh, 1.6rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-align: center;
}

.framed-button-arrow {
    position: absolute;
    right: 9%;
    top: 50%;
    width: clamp(9px, 1.6cqh, 20px);
    height: clamp(9px, 1.6cqh, 20px);
    border-top: clamp(2px, 0.5cqh, 4px) solid var(--color-text-light);
    border-right: clamp(2px, 0.5cqh, 4px) solid var(--color-text-light);
    transform: translateY(-50%) rotate(45deg);
}

.home-message {
    position: absolute;
    left: 50%;
    width: 76%;
    transform: translateX(-50%);
    margin: 0;
    color: var(--color-text-light);
    font-size: clamp(0.5rem, 0.95cqh, 0.7rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-align: center;
    text-shadow: 0 0 0.7cqh rgba(0, 0, 0, 0.95);
}

.home-message-accent {
    color: var(--color-button-glow);
}

.home-message-top {
    top: 15.2cqh;
}

.home-action {
    position: absolute;
    left: 50%;
    bottom: 13cqh;
    transform: translateX(-50%);
    width: 100%;
}

.home-message-bottom {
    bottom: 3.4cqh;
    color: var(--color-button-glow);
    font-size: clamp(0.5rem, 1cqh, 0.65rem);
    font-weight: 400;
    text-shadow: 0 0 0.8cqh rgba(53, 214, 138, 0.55);
}

.feedback-screen {
    color: var(--color-text-light);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.feedback-screen [hidden] {
    display: none;
}

.correct-screen {
    background-image: url("../assets/correct/correct-background.webp");
}

.incorrect-screen {
    background-image: url("../assets/incorrect/incorrect-background.webp");
}

.result-screen {
    color: var(--color-text-light);
    background-image: url("../assets/question/question-background.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.result-box {
    position: absolute;
    top: 35cqh;
    left: 50%;
    width: 84.6cqw;
    height: 19cqh;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2cqh;
    padding: 2.2cqh 7.8cqw;
    background-image: url("../assets/question/question-frame.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

.result-heading,
.result-score {
    width: 100%;
    margin: 0;
    color: var(--color-text-light);
    line-height: 1;
    text-shadow: 0 0 0.9cqh rgba(0, 0, 0, 0.72);
}

.result-heading {
    font-size: clamp(0.76rem, 2.2cqh, 1.4rem);
    font-weight: 600;
}

.result-score {
    font-size: clamp(1.05rem, 3.7cqh, 2.35rem);
    font-weight: 800;
}

.result-action {
    position: absolute;
    top: 59cqh;
    left: 50%;
    width: 100%;
    transform: translateX(-50%);
}

.result-action .framed-button-label {
    max-width: 66%;
    font-size: clamp(0.68rem, 2.25cqh, 1rem);
    line-height: 1;
}

.feedback-institutional,
.feedback-answer,
.feedback-encouragement {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 82%;
    margin: 0;
    text-align: center;
    text-shadow: 0 0 0.8cqh rgba(0, 0, 0, 0.9);
}

.feedback-institutional {
    font-size: clamp(0.42rem, 1.05cqh, 0.72rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.16em;
}

.feedback-institutional-top {
    top: 12.6cqh;
}

.feedback-institutional-bottom {
    bottom: 2.6cqh;
}

.feedback-answer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: clamp(1.2rem, 4.7cqh, 3.15rem);
    font-weight: 800;
    line-height: 0.93;
}

.feedback-answer-correct {
    top: 64.2cqh;
    height: 17.5cqh;
}

.feedback-answer-incorrect {
    top: 65.2cqh;
    height: 15.8cqh;
}

.feedback-accent-correct,
.feedback-accent-incorrect,
.feedback-answer-correct span {
    color: #63ed86;
}

.feedback-answer-incorrect span {
    color: #ff4545;
}

.feedback-encouragement {
    top: 80.6cqh;
    height: 6.8cqh;
    display: grid;
    place-items: center;
    color: var(--color-text-light);
    font-size: clamp(0.8rem, 2.65cqh, 1.75rem);
    font-weight: 700;
    line-height: 1;
}
