.elg-millionaire {
    --elg-ml-bg: #07112f;
    --elg-ml-panel: rgba(8, 18, 48, .92);
    --elg-ml-panel-2: rgba(13, 24, 62, .94);
    --elg-ml-gold: #f8c75d;
    --elg-ml-gold-2: #d99827;
    --elg-ml-orange: #ff9f1c;
    --elg-ml-blue: #193b8f;
    --elg-ml-blue-2: #0c1d56;
    --elg-ml-green: #1fc879;
    --elg-ml-red: #ef4444;
    --elg-ml-text: #f8fafc;
    --elg-ml-muted: #b7c4e0;
    max-width: 1120px;
    margin: 24px auto;
    padding: 18px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(248, 199, 93, .55);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 8%, rgba(73, 92, 184, .36), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(248, 199, 93, .18), transparent 24%),
        linear-gradient(145deg, #050a1c 0%, #08173e 48%, #20113d 100%);
    color: var(--elg-ml-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-shadow: 0 24px 70px rgba(2, 6, 23, .38), inset 0 0 0 1px rgba(255, 255, 255, .05);
    box-sizing: border-box;
}

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

.elg-millionaire [hidden] {
    display: none !important;
}

.elg-ml-glow {
    position: absolute;
    inset: -45%;
    background:
        conic-gradient(from 28deg, transparent 0deg, rgba(248, 199, 93, .08) 36deg, transparent 72deg, rgba(58, 97, 255, .12) 130deg, transparent 210deg, rgba(248, 199, 93, .08) 286deg, transparent 360deg);
    animation: elg-ml-rotate 18s linear infinite;
    pointer-events: none;
}

.elg-ml-topbar,
.elg-ml-layout {
    position: relative;
    z-index: 1;
}

.elg-ml-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 199, 93, .28);
    border-radius: 8px;
    background: rgba(4, 10, 30, .64);
}

.elg-ml-title-wrap {
    min-width: 0;
}

.elg-ml-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--elg-ml-gold);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.elg-ml-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.38rem;
    font-weight: 900;
    line-height: 1.18;
    text-shadow: 0 2px 18px rgba(248, 199, 93, .28);
}

.elg-ml-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.elg-ml-pill,
.elg-ml-timer,
.elg-ml-icon-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(248, 199, 93, .42);
    background: linear-gradient(180deg, rgba(25, 59, 143, .92), rgba(8, 18, 48, .92));
    color: #ffffff;
    font-size: .9rem;
    font-weight: 900;
}

.elg-ml-pill,
.elg-ml-timer {
    padding: 8px 13px;
    border-radius: 999px;
    white-space: nowrap;
}

.elg-ml-timer {
    min-width: 78px;
    gap: 5px;
}

.elg-ml-timer-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--elg-ml-green);
    box-shadow: 0 0 12px rgba(31, 200, 121, .95);
}

.elg-ml-timer.is-low {
    border-color: rgba(239, 68, 68, .85);
    color: #fee2e2;
}

.elg-ml-timer.is-low .elg-ml-timer-dot {
    background: var(--elg-ml-red);
    box-shadow: 0 0 12px rgba(239, 68, 68, .95);
}

.elg-ml-icon-btn {
    width: 38px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .12s ease, filter .2s ease, border-color .2s ease;
}

.elg-ml-icon-btn:hover,
.elg-ml-icon-btn:focus-visible {
    border-color: var(--elg-ml-gold);
    filter: brightness(1.08);
    outline: none;
}

.elg-ml-icon-btn:active {
    transform: scale(.96);
}

.elg-ml-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.elg-ml-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 16px;
}

.elg-ml-stage,
.elg-ml-ladder {
    border: 1px solid rgba(248, 199, 93, .32);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(6, 15, 44, .88), rgba(7, 10, 31, .95));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.elg-ml-stage {
    min-height: 520px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.elg-ml-lifelines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.elg-ml-lifeline,
.elg-ml-primary {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: .92rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .12s ease, filter .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.elg-ml-lifeline {
    min-width: 116px;
    padding: 10px 16px;
    border: 1px solid rgba(248, 199, 93, .55);
    background: linear-gradient(180deg, #172c77, #0b1745);
    color: #fff8e1;
    box-shadow: 0 0 18px rgba(38, 79, 190, .25);
}

.elg-ml-lifeline:hover:not(:disabled),
.elg-ml-lifeline:focus-visible:not(:disabled),
.elg-ml-primary:hover,
.elg-ml-primary:focus-visible {
    filter: brightness(1.08);
    outline: none;
}

.elg-ml-lifeline:active:not(:disabled),
.elg-ml-primary:active {
    transform: scale(.97);
}

.elg-ml-lifeline:disabled,
.elg-ml-lifeline.is-used {
    cursor: default;
    opacity: .42;
    box-shadow: none;
}

.elg-ml-primary {
    min-width: 160px;
    padding: 12px 24px;
    background: linear-gradient(180deg, #ffe19a, var(--elg-ml-gold-2));
    color: #190b02;
    box-shadow: 0 12px 28px rgba(217, 152, 39, .28), inset 0 1px 0 rgba(255, 255, 255, .65);
}

.elg-ml-start,
.elg-ml-end {
    min-height: 400px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.elg-ml-emblem {
    width: 132px;
    height: 132px;
    display: grid;
    place-items: center;
    border: 3px solid rgba(248, 199, 93, .9);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(248, 199, 93, .24) 0 32%, rgba(25, 59, 143, .86) 33% 58%, rgba(8, 18, 48, .96) 59% 100%);
    color: var(--elg-ml-gold);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 26px rgba(248, 199, 93, .72);
    box-shadow: 0 0 36px rgba(248, 199, 93, .28), inset 0 0 28px rgba(255, 255, 255, .08);
}

.elg-ml-start-prize {
    min-height: 24px;
    margin: 0;
    color: var(--elg-ml-muted);
    font-size: 1rem;
    font-weight: 700;
}

.elg-ml-play {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.elg-ml-question-wrap {
    position: relative;
    padding: 20px 22px;
    border: 1px solid rgba(248, 199, 93, .55);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(248, 199, 93, .18), transparent 12%, transparent 88%, rgba(248, 199, 93, .18)),
        linear-gradient(180deg, rgba(25, 59, 143, .88), rgba(7, 17, 51, .96));
    text-align: center;
    box-shadow: 0 14px 38px rgba(2, 6, 23, .28), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.elg-ml-question-number {
    margin-bottom: 8px;
    color: var(--elg-ml-gold);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.elg-ml-question {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.38;
}

.elg-ml-message {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #ffe9b0;
    font-size: .98rem;
    font-weight: 800;
    text-align: center;
}

.elg-ml-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.elg-ml-answer {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding: 12px 18px;
    border: 1px solid rgba(248, 199, 93, .72);
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(26, 63, 154, .96), rgba(7, 16, 48, .98));
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
    font: inherit;
    cursor: pointer;
    text-align: left;
    transition: transform .12s ease, filter .2s ease, background .2s ease, opacity .2s ease;
}

.elg-ml-answer::before {
    content: "";
    position: absolute;
    inset: 2px;
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
    border: 1px solid rgba(255, 255, 255, .08);
    pointer-events: none;
}

.elg-ml-answer:hover:not(:disabled),
.elg-ml-answer:focus-visible:not(:disabled) {
    filter: brightness(1.12);
    outline: none;
}

.elg-ml-answer:active:not(:disabled) {
    transform: scale(.985);
}

.elg-ml-answer-letter {
    width: 32px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .24);
    color: var(--elg-ml-orange);
    font-size: 1.02rem;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(255, 159, 28, .5);
}

.elg-ml-answer-text {
    min-width: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.elg-ml-answer.is-selected {
    background: linear-gradient(180deg, #ffd166, #d97706);
    color: #150b01;
    animation: elg-ml-wait .72s ease-in-out infinite alternate;
}

.elg-ml-answer.is-selected .elg-ml-answer-text,
.elg-ml-answer.is-selected .elg-ml-answer-letter {
    color: #150b01;
    text-shadow: none;
}

.elg-ml-answer.is-correct {
    background: linear-gradient(180deg, #43e58d, #138f54);
    border-color: rgba(210, 255, 231, .9);
    animation: elg-ml-correct .58s ease both;
}

.elg-ml-answer.is-wrong {
    background: linear-gradient(180deg, #ff6b6b, #b91c1c);
    border-color: rgba(254, 202, 202, .9);
    animation: elg-ml-wrong .44s ease both;
}

.elg-ml-answer.is-eliminated {
    cursor: default;
    opacity: .26;
    filter: grayscale(.6);
}

.elg-ml-answer:disabled {
    cursor: default;
}

.elg-ml-ladder {
    padding: 12px;
    align-self: stretch;
}

.elg-ml-ladder-title {
    margin: 0 0 10px;
    color: var(--elg-ml-gold);
    font-size: .88rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.elg-ml-prize-list {
    max-height: 560px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    overflow: auto;
}

.elg-ml-prize {
    min-height: 32px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: rgba(12, 29, 86, .72);
    color: #dbe7ff;
    font-size: .88rem;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.elg-ml-prize-level {
    color: #9fb1d8;
    font-size: .78rem;
    font-weight: 900;
    text-align: right;
}

.elg-ml-prize-amount {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.elg-ml-prize.is-safe {
    border-color: rgba(248, 199, 93, .5);
    color: #fff1bd;
}

.elg-ml-prize.is-current {
    transform: translateX(-4px);
    border-color: rgba(255, 225, 154, .95);
    background: linear-gradient(90deg, #f8c75d, #d99827);
    color: #160a01;
    box-shadow: 0 0 22px rgba(248, 199, 93, .42);
    animation: elg-ml-step .55s ease both;
}

.elg-ml-prize.is-current .elg-ml-prize-level {
    color: #160a01;
}

.elg-ml-prize.is-won {
    border-color: rgba(31, 200, 121, .6);
    color: #cafbe1;
}

.elg-ml-end-label {
    color: var(--elg-ml-gold);
    font-size: .9rem;
    font-weight: 900;
    text-transform: uppercase;
}

.elg-ml-end-amount {
    max-width: 100%;
    padding: 14px 24px;
    border: 1px solid rgba(248, 199, 93, .72);
    border-radius: 999px;
    background: rgba(8, 18, 48, .86);
    color: #ffe19a;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    overflow-wrap: anywhere;
    box-shadow: 0 0 28px rgba(248, 199, 93, .24);
}

.elg-ml-end-message {
    max-width: 560px;
    margin: 0;
    color: var(--elg-ml-muted);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.elg-millionaire:fullscreen,
.elg-millionaire.is-fullscreen {
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: auto;
}

.elg-millionaire:fullscreen .elg-ml-stage,
.elg-millionaire.is-fullscreen .elg-ml-stage {
    min-height: calc(100vh - 150px);
}

@media (max-width: 880px) {
    .elg-millionaire {
        margin: 18px auto;
        padding: 12px;
    }

    .elg-ml-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .elg-ml-status {
        width: 100%;
        justify-content: space-between;
    }

    .elg-ml-layout {
        grid-template-columns: 1fr;
    }

    .elg-ml-ladder {
        order: -1;
    }

    .elg-ml-prize-list {
        max-height: none;
        display: flex;
        flex-direction: row-reverse;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .elg-ml-prize {
        min-width: 132px;
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .elg-ml-prize.is-current {
        transform: translateY(-2px);
    }
}

@media (max-width: 640px) {
    .elg-millionaire {
        margin: 14px auto;
        padding: 10px;
    }

    .elg-ml-title {
        font-size: 1.18rem;
    }

    .elg-ml-stage {
        min-height: 500px;
        padding: 12px;
    }

    .elg-ml-lifelines {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .elg-ml-lifeline {
        min-width: 0;
        min-height: 42px;
        padding: 8px 7px;
        font-size: .82rem;
    }

    .elg-ml-emblem {
        width: 104px;
        height: 104px;
        font-size: 3.2rem;
    }

    .elg-ml-question-wrap {
        padding: 16px 14px;
    }

    .elg-ml-question {
        min-height: 74px;
        font-size: 1.08rem;
    }

    .elg-ml-answers {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .elg-ml-answer {
        min-height: 58px;
        padding: 11px 16px;
        clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
    }

    .elg-ml-answer::before {
        clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
    }

    .elg-ml-answer-text {
        font-size: .96rem;
    }

    .elg-ml-end-amount {
        font-size: 1.46rem;
    }
}

@media (max-width: 420px) {
    .elg-ml-status {
        gap: 6px;
    }

    .elg-ml-pill,
    .elg-ml-timer {
        min-height: 36px;
        padding: 7px 10px;
        font-size: .82rem;
    }

    .elg-ml-icon-btn {
        width: 36px;
        min-height: 36px;
    }

    .elg-ml-lifelines {
        grid-template-columns: 1fr;
    }

    .elg-ml-lifeline {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .elg-ml-glow,
    .elg-ml-answer,
    .elg-ml-prize,
    .elg-ml-answer.is-selected,
    .elg-ml-answer.is-correct,
    .elg-ml-answer.is-wrong,
    .elg-ml-prize.is-current {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes elg-ml-rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes elg-ml-wait {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.18);
    }
}

@keyframes elg-ml-correct {
    0% {
        transform: scale(.99);
    }

    55% {
        transform: scale(1.025);
    }

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

@keyframes elg-ml-wrong {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

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

@keyframes elg-ml-step {
    from {
        filter: brightness(1.28);
    }

    to {
        filter: brightness(1);
    }
}
