:root {
    --bg: #f1f2f6;
    --card: #ffffff;
    --brown: #d3c7ae;
    --brown-soft: #efe9dd;
    --cta: #27508c;
    --cta-hover: #1d3f73;
    --ink: #23262e;
    --muted: #6b7180;
    --line: #e6e3da;
    --error: #c0392b;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(35, 38, 46, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Roboto", system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    margin: 0;
    padding: 24px 12px 96px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

.quiz-box {
    background: var(--card);
    padding: 48px;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-width: 540px;
    width: 100%;
}

/* ---------- Typography ---------- */
.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--brown);
    padding: 8px 15px;
    border-radius: 999px;
    margin-bottom: 18px;
}

h1 {
    font-size: 31px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 16px;
}

#introText {
    font-size: 19px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 30px;
}

h2#qTitle {
    font-size: 25px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 22px;
}

h4 {
    font-size: 23px;
    font-weight: 700;
    margin: 0 0 10px;
    text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 19px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.1s ease;
}

.btn-primary {
    background: var(--cta);
    color: #fff;
    box-shadow: 0 8px 18px rgba(39, 80, 140, 0.25);
    margin-top: 30px;
}

.btn-primary:hover {
    background: var(--cta-hover);
}

.btn-primary:active {
    transform: translateY(1px);
}

.arrow {
    animation: moveLeftRight 1s infinite alternate;
}

#quizInfo {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

/* ---------- Options ---------- */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.35s ease;
}

.options button.selected {
    background: var(--brown-soft);
    border-color: var(--brown);
}

.options button {
    width: 100%;
    text-align: left;
    padding: 19px 22px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 18px;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease,
        transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

@media (min-width: 1000px) {
    .options button:hover {
        border-color: var(--brown);
        background: var(--brown-soft);
    }
}

.options button:active {
    transform: translateY(1px);
}

.options button:focus-visible {
    outline: 3px solid rgba(39, 80, 140, 0.35);
    outline-offset: 2px;
}

.opt-title {
    display: block;
    font-weight: 500;
}

.opt-sub {
    display: block;
    margin-top: 5px;
    font-size: 15px;
    font-weight: 400;
    color: var(--muted);
}

/* ---------- Progress ---------- */
.progress {
    margin-bottom: 24px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 9px;
}

.progress-track {
    height: 9px;
    background: #f6f6f6;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--cta);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ---------- Form ---------- */
#userInfo {
    text-align: center;
}

.result-description {
    font-size: 17px;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 auto 24px;
    max-width: 92%;
}

#userForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#userForm input[type="text"],
#userForm input[type="email"],
#userForm input[type="tel"] {
    padding: 16px 18px;
    font-size: 18px;
    font-family: inherit;
    border-radius: var(--radius);
    border: 1.5px solid var(--line);
    width: 100%;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.2s ease;
}

#userForm input:focus {
    outline: none;
    border-color: var(--cta);
}

#userForm input.input-invalid {
    border-color: var(--error);
    background: #fdf3f2;
}

.field-error {
    color: var(--error);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.35;
    margin: 0 2px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    line-height: 1.45;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
    padding: 4px 0;
}

.checkbox input {
    width: 22px;
    height: 22px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--cta);
    cursor: pointer;
}

/* ---------- Result ---------- */
#end {
    text-align: center;
}

.result {
    text-align: left;
    margin-top: 14px;
}

.result-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--cta);
    margin: 15px 0 4px;
}

.result-badge {
    display: inline-block;
    background: var(--cta);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 15px;
    border-radius: 999px;
    margin-top: 15px;
}

.result-desc {
    font-size: 19px;
    line-height: 1.55;
    color: var(--ink);
    margin: 18px 0 0;
}

.result-price {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid var(--brown);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 19px;
    color: var(--ink);
}

.result-price small {
    display: block;
    font-weight: 400;
    font-size: 14px;
    color: var(--muted);
    margin-top: 5px;
}

.result-clinic {
    margin-top: 20px;
    font-size: 16px;
    color: var(--muted);
    line-height: 1.5;
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
    padding: 19px;
    background: var(--cta);
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(39, 80, 140, 0.28);
    transition: background-color 0.25s ease;
    animation: zoomPulse 2.4s ease-in-out infinite;
}

.cta-btn:hover {
    background: var(--cta-hover);
}

/* ---------- Loader ---------- */
#loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    font-size: 19px;
    color: var(--muted);
    padding: 24px 0;
}

.spinner {
    width: 52px;
    height: 52px;
    border: 5px solid var(--brown-soft);
    border-top-color: var(--cta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ---------- Footer ---------- */
#footer {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: 100%;
    max-width: 640px;
    padding: 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: #a3a7b2;
    text-align: center;
}

#footer a,
.checkbox a {
    color: #a3a7b2;
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* ---------- Animations ---------- */
@keyframes moveLeftRight {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(4px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes zoomPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    .arrow,
    .cta-btn,
    .options,
    .spinner {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .quiz-box {
        padding: 32px 22px;
        border-radius: 16px;
    }

    h1 {
        font-size: 26px;
    }

    h2#qTitle {
        font-size: 21px;
    }

    .options button {
        font-size: 17px;
    }

    #introText {
        font-size: 18px;
    }

    /* A disclaimer a kvíz ALÁ kerül, nem mellé */
    #footer {
        position: static;
        transform: none;
        margin: 30px auto 0;
        max-width: 540px;
    }

    body {
        padding-bottom: 24px;
    }
}