:root {
    color-scheme: dark;
    --bg: #06111e;
    --panel: rgba(18, 24, 51, 0.78);
    --panel-strong: rgba(12, 18, 38, 0.92);
    --stroke: rgba(255, 255, 255, 0.16);
    --muted: #c8d5e6;
    --soft: #93aeca;
    --cyan: #1fb5f2;
    --aqua: #7ae4e6;
    --gold: #f5c96b;
    --ink: #07111f;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: radial-gradient(circle at 12% 4%, rgba(31, 181, 242, 0.22), transparent 28rem),
        radial-gradient(circle at 91% 17%, rgba(122, 228, 230, 0.18), transparent 28rem),
        linear-gradient(135deg, #07111f 0%, #101a38 48%, #08333f 100%);
    color: #fff;
    font-family: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
}

button {
    border: 0;
}

h1,
h2,
p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
}

li {
    list-style: none;
}

.promo-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 2rem);
}

.ambient {
    position: fixed;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.55;
}

.ambient-one {
    width: 34rem;
    height: 34rem;
    left: -15rem;
    top: -12rem;
    background: rgba(31, 181, 242, 0.14);
}

.ambient-two {
    width: 30rem;
    height: 30rem;
    right: -12rem;
    bottom: -10rem;
    background: rgba(245, 201, 107, 0.09);
}

.stage-card {
    position: relative;
    z-index: 1;
    width: min(100%, 118rem);
    min-height: calc(100vh - clamp(2rem, 6vw, 4rem));
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 1.6rem);
    border: 1px solid var(--stroke);
    border-radius: clamp(1.2rem, 3vw, 2.2rem);
    background: linear-gradient(145deg, rgba(20, 23, 54, 0.86), rgba(12, 20, 43, 0.76));
    box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.28);
}

.brand-header {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto minmax(12rem, 1fr);
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    margin-bottom: clamp(1.2rem, 3vw, 2.2rem);
}

.brand-mark {
    grid-column: 2;
    display: grid;
    place-items: center;
    width: min(38rem, 44vw);
    padding: clamp(0.8rem, 1.7vw, 1.3rem) clamp(1.6rem, 4vw, 3rem);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: clamp(1.2rem, 2vw, 1.8rem);
    background: #f7fbff;
    box-shadow: 0 0.7rem 2.2rem rgba(0, 0, 0, 0.2);
}

.brand-mark img {
    display: block;
    width: 100%;
    max-height: 5.2rem;
    object-fit: contain;
}

.brand-copy {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    gap: 0.2rem;
    align-self: end;
}

.brand-copy span,
.eyebrow,
.kicker,
.pill {
    color: var(--accent, var(--cyan));
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-copy span {
    font-size: clamp(0.82rem, 1.3vw, 1rem);
}

.brand-copy strong {
    color: var(--cyan);
    font-size: clamp(1.4rem, 2.3vw, 2rem);
    font-weight: 800;
}

.brand-copy small {
    color: var(--soft);
    font-weight: 700;
}

.progress-card {
    grid-column: 3;
    min-width: min(100%, 25rem);
    padding: 1rem 1.3rem;
    border: 1px solid var(--stroke);
    border-radius: 1.4rem;
    background: rgba(0, 0, 0, 0.14);
}

.progress-card span {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 800;
}

.progress-track {
    height: 0.65rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--aqua), var(--cyan));
}

.home-grid,
.quiz-view,
.result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
    gap: clamp(1rem, 2vw, 2rem);
}

.hero-copy {
    align-self: center;
}

.hero-copy h1,
.section-heading h1,
.question-card h1,
.result-hero h1 {
    font-size: clamp(2.6rem, 5.1vw, 5rem);
    line-height: 1.03;
    letter-spacing: -0.028em;
    font-weight: 800;
}

.hero-copy h1 span {
    color: var(--cyan);
}

.hero-copy > p:not(.kicker),
.section-heading > p,
.question-card > p,
.glass-card > p,
.result-hero p {
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    line-height: 1.65;
}

.hero-copy > p:not(.kicker) {
    max-width: 55rem;
    margin-top: 1.2rem;
}

.kicker {
    margin-bottom: 1rem;
}

.chip-list,
.project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.chip-list span,
.project-list span {
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
    background: rgba(16, 23, 43, 0.78);
    color: #fff;
    font-weight: 700;
}

.chip-list span {
    padding: 0.7rem 1rem;
}

.project-list span {
    padding: 0.72rem 1rem;
    width: min(100%, 22rem);
}

.qr-guide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.qr-guide h2 {
    font-size: clamp(1.25rem, 2vw, 1.85rem);
}

.qr-guide code {
    grid-column: 1 / -1;
    display: block;
    overflow: hidden;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    background: rgba(0, 0, 0, 0.22);
    color: var(--muted);
    font: 0.86rem/1.4 "Cascadia Mono", Consolas, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qr-box {
    display: grid;
    place-items: center;
    width: clamp(7rem, 11vw, 9.5rem);
    aspect-ratio: 1;
    padding: 0.6rem;
    border-radius: 1.2rem;
    background: #fff;
}

.qr-box img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.actions,
.bottom-actions,
.cta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 2rem;
}

.primary-action,
.ghost-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0.85rem 1.45rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.primary-action {
    min-width: 12rem;
    background: linear-gradient(135deg, var(--aqua), var(--cyan));
    color: var(--ink);
}

.ghost-action {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(16, 23, 43, 0.66);
    color: #fff;
}

.primary-action:hover,
.ghost-action:hover {
    transform: translateY(-1px);
}

.primary-action:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.info-stack,
.context-stack {
    display: grid;
    gap: clamp(1rem, 2vw, 1.4rem);
}

.glass-card,
.question-card,
.info-node,
.result-hero,
.cta-panel {
    border: 1px solid var(--stroke);
    border-radius: clamp(1.2rem, 2vw, 1.8rem);
    background: rgba(10, 17, 36, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.glass-card,
.question-card,
.info-node,
.result-hero {
    padding: clamp(1rem, 2vw, 1.6rem);
}

.glass-card h2,
.info-node h2,
.selected-card h2 {
    margin-top: 0.65rem;
    font-size: clamp(1.45rem, 2.6vw, 2.4rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.018em;
}

.glass-card p:not(.eyebrow),
.info-node p,
.info-node li {
    margin-top: 0.8rem;
    color: var(--muted);
    line-height: 1.55;
}

.intro-view {
    display: grid;
    gap: 1.5rem;
}

.section-heading {
    max-width: 75rem;
}

.info-node-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.info-node > span {
    display: grid;
    place-items: center;
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 999px;
    background: #f7fbff;
    color: var(--ink);
    font-weight: 900;
}

.info-node ul {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

.info-node li,
.highlight-list li,
.clean-list li {
    position: relative;
    padding-left: 1.2rem;
}

.info-node li::before,
.highlight-list li::before,
.clean-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--accent, var(--cyan));
}

.quiz-view {
    grid-template-rows: 1fr auto;
}

.question-card {
    display: grid;
    align-content: start;
}

.question-card h1 {
    margin-top: 1rem;
    font-size: clamp(2rem, 3.4vw, 3.8rem);
}

.question-card > p:not(.pill) {
    margin-top: 0.9rem;
}

.pill {
    justify-self: start;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(31, 181, 242, 0.14);
}

.choice-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.4rem;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.2rem;
    background: rgba(14, 24, 45, 0.92);
    color: #fff;
    text-align: left;
}

.choice strong {
    display: block;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 1.18;
}

.choice small {
    display: block;
    margin-top: 0.35rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.choice i {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: var(--ink);
    font-style: normal;
    font-weight: 900;
}

.choice-selected {
    border-color: var(--aqua);
    background: rgba(16, 35, 63, 0.96);
}

.choice-selected i {
    background: var(--aqua);
}

.highlight-list,
.clean-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.1rem;
}

.highlight-list li,
.clean-list li {
    color: #fff;
    font-weight: 700;
    line-height: 1.45;
}

.quiz-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
}

.result-view {
    display: grid;
    gap: 1.1rem;
}

.result-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
}

.avatar {
    display: grid;
    place-items: center;
    width: clamp(7rem, 13vw, 10.5rem);
    height: clamp(7rem, 13vw, 10.5rem);
    overflow: hidden;
    border: 0.22rem solid var(--accent, var(--cyan));
    border-radius: 999px;
    background: #f7fbff;
    box-shadow: 0 0.9rem 2.6rem rgba(0, 0, 0, 0.22);
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-hero h2 {
    margin-top: 0.7rem;
    color: var(--accent, var(--cyan));
    font-size: clamp(1.1rem, 2vw, 1.7rem);
}

.score {
    display: inline-flex;
    margin-top: 1rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    font-weight: 900;
}

.cta-panel {
    padding: 1rem;
}

.privacy-note {
    color: var(--soft);
    font-size: 0.9rem;
    line-height: 1.55;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 1000;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    background: #311016;
    color: #fff;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

.loading-progress {
    position: relative;
    display: block;
    width: 6rem;
    height: 6rem;
    margin: 22vh auto 1rem;
}

.loading-progress circle {
    fill: none;
    stroke-width: 0.55rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:first-child {
    stroke: rgba(255, 255, 255, 0.2);
}

.loading-progress circle:last-child {
    stroke: var(--aqua);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
}

.loading-progress-text {
    text-align: center;
    color: var(--muted);
    font-weight: 800;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Učitavanje");
}

@media (max-width: 1050px) {
    .brand-header,
    .home-grid,
    .quiz-view,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .brand-mark,
    .brand-copy,
    .progress-card {
        grid-column: auto;
        grid-row: auto;
    }

    .brand-mark {
        justify-self: center;
        width: min(32rem, 80vw);
    }

    .brand-copy,
    .progress-card {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .promo-shell {
        padding: 0;
    }

    .stage-card {
        min-height: 100vh;
        border-width: 0;
        border-radius: 0;
    }

    .info-node-grid,
    .result-hero,
    .qr-guide {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .section-heading h1,
    .question-card h1,
    .result-hero h1 {
        letter-spacing: -0.02em;
    }

    .choice {
        grid-template-columns: minmax(0, 1fr) 2rem;
        padding: 0.85rem;
    }

    .choice small {
        display: none;
    }

    .bottom-actions,
    .cta-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-action,
    .ghost-action {
        width: 100%;
    }
}
