/* Kviz */
body { min-height: 100svh; display: flex; flex-direction: column; }

/* ---------- Gornja traka ---------- */
.q-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px var(--gutter); }
.q-bar img { width: 74px; }
.q-step { justify-self: end; white-space: nowrap; color: var(--faint); font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.back-btn { display: inline-flex; align-items: center; gap: 9px; justify-self: start; min-height: 44px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; cursor: pointer; visibility: hidden; }
.back-btn.visible { visibility: visible; }
.back-btn:hover { color: var(--y); }
.q-track { height: 4px; background: var(--bg-3); }
.q-track span { display: block; height: 100%; background: var(--y); transform: scaleX(0); transform-origin: left; transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.3, 1); }

/* ---------- Kartice ---------- */
.quiz-wrapper { flex: 1; display: flex; flex-direction: column; }
.card { display: none; flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: clamp(24px, 4vw, 60px) var(--gutter) clamp(34px, 5vw, 70px); }
.card.active { display: flex; flex-direction: column; justify-content: center; animation: q-in 0.35s ease both; }
@keyframes q-in { from { opacity: 0; transform: translateY(14px); } }
.card-title { font-size: clamp(1.6rem, 4vw, 2.9rem); max-width: 24ch; margin: 0 auto clamp(24px, 3.4vw, 44px); text-align: center; }
.card-header-label { color: var(--y); font-weight: 700; text-align: center; margin-bottom: 10px; }

.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; }
.option-btn { display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 18px 26px; border: 2px solid transparent; border-radius: 8px; background: var(--bg-3); text-align: left; font-size: 1.08rem; font-weight: 600; line-height: 1.35; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background 0.16s ease, border-color 0.16s ease; }
.option-btn:hover { border-color: var(--y); background: #292c30; }
.option-btn.selected { background: var(--y); color: var(--ink); border-color: var(--y); }
.two-col .option-btn { flex-direction: column; justify-content: center; text-align: center; min-height: 190px; font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 800; font-size: 1.4rem; }
.opt-icon { font-size: 2.6rem; color: var(--y); line-height: 1; }
.option-btn.selected .opt-icon { color: var(--ink); }

/* ---------- Tip tijela ---------- */
#card-5 .options-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.body-type-btn { display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; padding: 20px 10px 0; border: 2px solid transparent; border-radius: 8px; background: linear-gradient(180deg, #2a2d31, var(--bg-2)); cursor: pointer; overflow: hidden; touch-action: manipulation; transition: border-color 0.16s ease; }
.body-type-btn span { width: calc(100% + 24px); padding: 14px 6px; background: var(--bg-3); font-weight: 700; font-size: 1.08rem; text-align: center; }
.body-type-btn .bt-img { height: clamp(180px, 30vh, 310px); width: auto; object-fit: contain; pointer-events: none; }
.body-type-btn:hover { border-color: var(--y); }
.body-type-btn.selected { border-color: var(--y); }
.body-type-btn:hover span, .body-type-btn.selected span { background: var(--y); color: var(--ink); }

/* ---------- Ime ---------- */
#card-6 .q-form, #card-14 .q-form { width: min(100%, 560px); margin: 0 auto; }
.input-group { position: relative; margin-bottom: 14px; }
.input-group > i { position: absolute; left: 22px; top: 34px; transform: translateY(-50%); color: var(--faint); }
.input-group input { width: 100%; height: 68px; padding: 0 22px 0 56px; border: 2px solid var(--line); border-radius: 8px; background: var(--bg-2); color: #fff; font: 600 1.1rem var(--body); }
.input-group input::placeholder { color: var(--faint); font-weight: 500; }
.input-group input:focus { outline: 0; border-color: var(--y); }
#card-6 .btn { width: 100%; }

/* ---------- Učitavanje ---------- */
.loader-wrap { display: flex; flex-direction: column; align-items: center; }
.loader-dial { position: relative; width: clamp(190px, 26vw, 250px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 30px; }
.spinner { position: absolute; inset: 0; border: 6px solid var(--bg-3); border-top-color: var(--y); border-radius: 50%; animation: q-spin 1s linear infinite; }
@keyframes q-spin { to { transform: rotate(360deg); } }
.loader-percent { font-family: var(--display); font-variation-settings: 'wdth' 116; font-weight: 800; font-size: clamp(2.8rem, 6vw, 4rem); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.loader-label { font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 2.4vw, 1.5rem); text-align: center; margin-bottom: 24px; overflow-wrap: anywhere; }
.loader-steps { list-style: none; display: grid; gap: 12px; }
.loader-steps li { display: flex; gap: 14px; align-items: center; color: var(--faint); font-weight: 600; transition: color 0.3s ease; }
.loader-steps li::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-3); flex: none; transition: background 0.3s ease; }
.loader-steps li.done { color: #fff; }
.loader-steps li.done::before { background: var(--y); }

/* ---------- Kraj kviza ---------- */
.stack-btns { display: grid; gap: 14px; width: min(100%, 560px); margin: 0 auto; }
#card-14 .btn { width: 100%; min-height: 72px; font-size: 1.2rem; }
.q-form-lead { color: var(--muted); text-align: center; margin: 0 auto 18px; max-width: 44ch; }
.q-form-note { color: var(--faint); font-size: 0.88rem; text-align: center; margin-top: 14px; }
.q-form-hint { color: var(--faint); font-size: 0.82rem; text-align: left; margin: -4px 0 12px 4px; }

/* ---------- Rezultat (tip tijela) ---------- */
#card-rezultat .card-title mark { background: none; color: var(--y); }
.result { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 56px); align-items: center; width: min(100%, 900px); margin: 0 auto; }
.result-img { justify-self: center; height: clamp(240px, 42vh, 420px); width: auto; max-width: 100%; object-fit: contain; border-radius: 8px; background: linear-gradient(180deg, #2a2d31, var(--bg-2)); padding: 18px 18px 0; }
.result-text { color: var(--muted); font-size: 1.12rem; line-height: 1.6; margin-bottom: 26px; }
.result .btn { width: 100%; min-height: 68px; font-size: 1.15rem; }

/* ---------- Početni ekran ---------- */
#card-1 { max-width: none; padding: 0; position: relative; overflow: hidden; }
#card-1.active { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: stretch; justify-content: normal; }
.intro { align-self: center; padding: clamp(28px, 4vw, 60px) 0 clamp(34px, 5vw, 70px) max(var(--gutter), calc((100vw - 1320px) / 2)); position: relative; z-index: 1; }
.intro .card-title { text-align: left; margin: 0 0 24px; max-width: 17ch; font-size: clamp(1.9rem, 4.5vw, 4.1rem); line-height: 1.03; }
.intro .card-text { color: var(--muted); font-size: 1.14rem; max-width: 50ch; margin-bottom: 34px; }
.intro .btn { min-width: 310px; min-height: 68px; font-size: 1.18rem; }
.intro-img { position: relative; min-height: min(680px, calc(100svh - 140px)); }
.intro-img .claws { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); height: 72%; width: auto; max-width: none; }
.intro-img img:last-child { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 94%; width: auto; max-width: none; }

@media (max-width: 760px) {
    .q-bar { padding: 10px 18px; }
    .q-bar img { width: 62px; }
    .card { padding: 22px 18px 34px; }
    .card.active { justify-content: flex-start; }
    .options-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
    .options-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .option-btn { min-height: 66px; padding: 14px 20px; font-size: 1.02rem; }
    .two-col .option-btn { min-height: 160px; font-size: 1.15rem; }
    #card-5 .options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .body-type-btn .bt-img { height: 21vh; min-height: 120px; }
    .body-type-btn { padding-top: 12px; }
    .body-type-btn span { padding: 11px 6px; font-size: 1rem; }
    #card-11.active, #card-14.active, #card-spreman.active { justify-content: center; }
    .result { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .result-img { height: 30vh; min-height: 180px; }
    .result-text { font-size: 1.02rem; margin-bottom: 18px; text-align: center; }
    #card-1 { padding: 0; }
    #card-1.active { display: flex; flex-direction: column; }
    .intro { align-self: auto; padding: 16px 18px 0; }
    .intro .card-title { font-size: clamp(1.75rem, 7.6vw, 2.3rem); margin-bottom: 14px; }
    .intro .card-text { font-size: 1rem; margin-bottom: 20px; }
    .intro .btn { width: 100%; min-width: 0; }
    .intro-img { flex: 1; min-height: 250px; margin-top: 12px; }
    .intro-img img:last-child { height: 100%; }
    .intro-img .claws { height: 88%; top: -4%; }
}
.q-suggest { color: #f2b632; font-size: 0.92rem; line-height: 1.6; }
.q-suggest b { color: #fff; }
.q-suggest button { font: 600 0.85rem var(--body); border-radius: 6px; padding: 4px 10px; margin: 2px 4px 0 0; cursor: pointer; border: 1px solid var(--line); background: var(--bg-2); color: #fff; }
.q-suggest .q-suggest-yes { background: #f2b632; color: #141414; border-color: #f2b632; }
