:root {
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);
    --panel: rgba(140, 136, 130, 0.82);
    --progress-track: rgba(255, 255, 255, 0.22);
    --progress-fill: #5eb43f;
    --accent: #43ff61;
    --cta: #ff2020;
    --font: "Manrope", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: #10120f;
}

button,
input {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.quiz-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(92, 107, 74, 0.18), transparent 28%),
        radial-gradient(circle at right 10% top 20%, rgba(182, 164, 127, 0.14), transparent 24%),
        linear-gradient(180deg, #151712 0%, #10120f 100%);
}

.page-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.page-backdrop__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 95%);
}

.page-backdrop__orb {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    opacity: 0.8;
}

.page-backdrop__orb--lime {
    top: 8%;
    left: -8%;
    width: 320px;
    height: 320px;
    background: rgba(102, 184, 73, 0.26);
}

.page-backdrop__orb--sand {
    right: -4%;
    top: 18%;
    width: 360px;
    height: 360px;
    background: rgba(171, 139, 94, 0.18);
}

.page-backdrop__orb--stone {
    bottom: -10%;
    left: 18%;
    width: 460px;
    height: 460px;
    background: rgba(121, 131, 149, 0.16);
}

.quiz-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 78px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-shell__intro {
    width: min(932px, calc(100vw - 32px));
    margin-bottom: 22px;
}

.quiz-shell__headline {
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    color: #ffffff;
    font-size: 32px;
    line-height: 1.3;
    font-weight: 700;
}

.quiz-shell__headline span {
    color: var(--accent);
}

.quiz-card {
    position: relative;
    width: min(932px, calc(100vw - 32px));
    min-height: 386px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
}

.quiz-card__bg,
.quiz-card__gradient {
    position: absolute;
    inset: 0;
}

.quiz-card__bg {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: background-image 0.2s ease;
}

.quiz-card__gradient {
    background:
        linear-gradient(160deg, rgba(0, 0, 0, 0.67) 11.439%, rgba(0, 0, 0, 0) 64.477%),
        linear-gradient(0deg, rgba(10, 12, 9, 0.2), rgba(10, 12, 9, 0.2));
}

.quiz-step,
.quiz-progress {
    position: relative;
    z-index: 1;
}

.quiz-step {
    display: none;
    padding: 24px 24px 0;
}

.quiz-step.is-active {
    display: block;
}

.quiz-step__counter {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
}

.quiz-step__title {
    max-width: 840px;
    margin: 0;
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
}

.quiz-options {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.quiz-options--grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quiz-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-height: 136px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: var(--panel);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(10.5px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quiz-option:hover {
    transform: translateY(-2px);
}

.quiz-option.is-selected {
    border-color: rgba(72, 255, 101, 0.92);
    box-shadow: 0 0 0 3px rgba(72, 255, 101, 0.12);
}

.quiz-option__image {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.quiz-option__image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.quiz-option__label {
    text-align: center;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.quiz-step__lead {
    display: grid;
    gap: 2px;
    margin-top: 48px;
}

.quiz-step__lead strong {
    color: #48ff65;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.quiz-step__lead span {
    max-width: 470px;
    font-size: 18px;
    line-height: 1.4;
}

.quiz-form {
    margin-top: 14px;
}

.quiz-form__label {
    display: block;
    margin-bottom: 9px;
    font-size: 18px;
    line-height: 1.4;
}

.quiz-form__row {
    display: grid;
    grid-template-columns: minmax(0, 369px) 308px;
    gap: 24px;
    max-width: 701px;
}

.quiz-form__input,
.quiz-form__submit {
    height: 60px;
    border-radius: 8px;
}

.quiz-form__input {
    border: 1px solid #d6d6d6;
    background: #ffffff;
    padding: 0 16px;
    color: #6d6d6d;
    font-size: 24px;
    outline: none;
}

.quiz-form__submit {
    border: 0;
    background: var(--cta);
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
}

.quiz-form__submit:disabled {
    opacity: 0.85;
    cursor: default;
}

.quiz-form__error,
.quiz-form__success {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.4;
}

.quiz-form__error {
    color: #ffb6b6;
}

.quiz-form__success {
    color: #8ef3a0;
}

.quiz-progress {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 24px;
}

.quiz-progress__text {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
    line-height: 1.5;
}

.quiz-progress__line {
    display: block;
    height: 4px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--progress-track);
}

.quiz-progress__value {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--progress-fill);
    transition: width 0.24s ease;
}

@media (max-width: 760px) {
    .quiz-shell {
        padding: 64px 16px 12px;
    }

    .quiz-shell__intro {
        width: min(393px, calc(100vw - 32px));
        margin-bottom: 18px;
    }

    .quiz-shell__headline {
        font-size: 18px;
        line-height: 1.35;
    }

    .quiz-card {
        width: min(393px, calc(100vw - 32px));
        min-height: 539px;
        border-radius: 24px;
    }

    .quiz-card__gradient {
        background:
            linear-gradient(158.5deg, rgba(0, 0, 0, 0) 11.439%, rgba(0, 0, 0, 0.67) 64.477%),
            linear-gradient(0deg, rgba(10, 12, 9, 0.25), rgba(10, 12, 9, 0.25));
    }

    .quiz-step {
        padding: 23px 23px 0;
    }

    .quiz-step__counter {
        margin-bottom: 12px;
        font-size: 18px;
    }

    .quiz-step__title {
        max-width: 279px;
        font-size: 24px;
        line-height: 1.2;
    }

    .quiz-options--grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quiz-option {
        align-items: stretch;
        min-height: 154px;
    }

    .quiz-option__label {
        font-size: 14px;
        font-weight: 500;
    }

    .quiz-step__lead {
        gap: 4px;
        margin-top: 14px;
    }

    .quiz-step__lead strong,
    .quiz-step__lead span,
    .quiz-form__label {
        font-size: 18px;
    }

    .quiz-step__lead span {
        max-width: 288px;
    }

    .quiz-form {
        margin-top: 30px;
    }

    .quiz-form__row {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: none;
    }

    .quiz-progress {
        right: 23px;
        bottom: 27px;
        left: 23px;
    }

    .quiz-progress__text {
        font-size: 18px;
    }
}

