/* LUCKIT unified result */

.luckit-result-page .luckit-public-logo {
    color: #312e81;
}

.luckit-result-page .luckit-public-brand span {
    color: #9a3412;
}

.luckit-unified-result {
    position: relative;
    isolation: isolate;
    width: min(100%, 540px);
    margin: 12px auto 24px;
    color: #172033;
}

.luckit-unified-result[hidden] {
    display: none !important;
}

.luckit-unified-result.is-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    overflow-y: auto;
    width: auto;
    margin: 0;
    padding: 20px;
    place-items: center;
    background: transparent;
    backdrop-filter: none;
}

.luckit-unified-result__card {
    position: relative;
    z-index: 2;
    overflow: hidden;
    width: min(100%, 500px);
    padding: clamp(26px, 5vw, 42px);
    border: 3px solid #fbbf24;
    border-radius: 30px;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(253, 224, 71, .22),
            transparent 36%
        ),
        linear-gradient(155deg, #ffffff, #fffaf0);
    box-shadow:
        0 28px 75px rgba(30, 41, 59, .25),
        inset 0 0 0 6px rgba(255, 255, 255, .8);
    text-align: center;
}

.luckit-unified-result__rays {
    position: absolute;
    z-index: -1;
    inset: -45%;
    background:
        repeating-conic-gradient(
            from 0deg,
            rgba(251, 191, 36, .12) 0 10deg,
            transparent 10deg 22deg
        );
    animation: luckit-unified-rays 18s linear infinite;
}

.luckit-unified-result__mark {
    display: grid;
    width: 96px;
    min-height: 96px;
    margin: 0 auto 18px;
    padding: 12px;
    place-content: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde047, #fb923c);
    color: #4c1d95;
    box-shadow:
        0 12px 28px rgba(249, 115, 22, .3),
        0 0 0 5px rgba(251, 191, 36, .2);
    line-height: 1;
}

.luckit-unified-result.is-lose
.luckit-unified-result__mark {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #334155;
}

.luckit-unified-result__mark span {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.luckit-unified-result__mark strong {
    margin-top: 5px;
    font-size: 26px;
    font-weight: 950;
}

.luckit-unified-result__label {
    margin: 0 0 12px;
    color: #b45309;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.luckit-unified-result__image {
    display: block;
    width: min(58vw, 190px);
    height: min(58vw, 190px);
    margin: 0 auto 16px;
    object-fit: contain;
    filter: drop-shadow(0 14px 18px rgba(30, 41, 59, .18));
}

.luckit-unified-result__image[hidden] {
    display: none;
}

.luckit-unified-result__name {
    margin: 8px 0;
    color: #312e81;
    font-size: clamp(26px, 7vw, 39px);
    line-height: 1.2;
}

.luckit-unified-result__note,
.luckit-unified-result__meta {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

.luckit-unified-result__description {
    margin-top: 15px;
    padding: 13px;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    line-height: 1.7;
}

.luckit-unified-result__redemption {
    display: grid;
    gap: 5px;
    margin: 16px 0 0;
    padding: 13px;
    border: 1px solid #fbbf24;
    border-radius: 14px;
    background: #fffbeb;
    color: #7c2d12;
}

.luckit-unified-result__redemption strong {
    color: #b45309;
}

.luckit-unified-result__sound {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.luckit-unified-result__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 22px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #db2777, #f97316);
    color: #fff;
    box-shadow: 0 12px 26px rgba(219, 39, 119, .24);
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.luckit-unified-result__action:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.luckit-unified-result__confetti {
    position: absolute;
    z-index: 3;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.luckit-unified-result__confetti span {
    --x: 50%;
    --delay: 0s;
    --wave-delay: 0s;
    --color: #fbbf24;

    position: absolute;
    top: -20px;
    left: var(--x);
    width: 9px;
    height: 18px;
    border-radius: 3px;
    background: var(--color);
    opacity: 0;
    transform: rotate(18deg);
}

.luckit-unified-result.is-celebrating
.luckit-unified-result__confetti span {
    animation:
        luckit-unified-confetti 2.5s
        calc(var(--delay) + var(--wave-delay))
        ease-out both;
}

.luckit-unified-result__confetti span:nth-child(4n + 1) {
    --color: #ec4899;
}

.luckit-unified-result__confetti span:nth-child(4n + 2) {
    --color: #3b82f6;
}

.luckit-unified-result__confetti span:nth-child(4n + 3) {
    --color: #22c55e;
}

.luckit-unified-result__confetti span:nth-child(1) {
    --x: 5%;
    --delay: .05s;
}

.luckit-unified-result__confetti span:nth-child(2) {
    --x: 12%;
    --delay: .25s;
}

.luckit-unified-result__confetti span:nth-child(3) {
    --x: 20%;
    --delay: .1s;
}

.luckit-unified-result__confetti span:nth-child(4) {
    --x: 28%;
    --delay: .35s;
}

.luckit-unified-result__confetti span:nth-child(5) {
    --x: 36%;
    --delay: .18s;
}

.luckit-unified-result__confetti span:nth-child(6) {
    --x: 44%;
    --delay: .42s;
}

.luckit-unified-result__confetti span:nth-child(7) {
    --x: 52%;
    --delay: .08s;
}

.luckit-unified-result__confetti span:nth-child(8) {
    --x: 60%;
    --delay: .3s;
}

.luckit-unified-result__confetti span:nth-child(9) {
    --x: 68%;
    --delay: .14s;
}

.luckit-unified-result__confetti span:nth-child(10) {
    --x: 76%;
    --delay: .38s;
}

.luckit-unified-result__confetti span:nth-child(11) {
    --x: 84%;
    --delay: .2s;
}

.luckit-unified-result__confetti span:nth-child(12) {
    --x: 92%;
    --delay: .48s;
}

.luckit-unified-result__confetti span:nth-child(13) {
    --x: 16%;
    --delay: .55s;
}

.luckit-unified-result__confetti span:nth-child(14) {
    --x: 40%;
    --delay: .62s;
}

.luckit-unified-result__confetti span:nth-child(15) {
    --x: 64%;
    --delay: .58s;
}

.luckit-unified-result__confetti span:nth-child(16) {
    --x: 88%;
    --delay: .68s;
}

.luckit-unified-result__confetti
span:nth-child(n + 17) {
    --wave-delay: 1.75s;
}

.luckit-unified-result__confetti span:nth-child(17) {
    --x: 4%;
    --delay: .08s;
}

.luckit-unified-result__confetti span:nth-child(18) {
    --x: 11%;
    --delay: .42s;
}

.luckit-unified-result__confetti span:nth-child(19) {
    --x: 19%;
    --delay: .18s;
}

.luckit-unified-result__confetti span:nth-child(20) {
    --x: 27%;
    --delay: .68s;
}

.luckit-unified-result__confetti span:nth-child(21) {
    --x: 35%;
    --delay: .30s;
}

.luckit-unified-result__confetti span:nth-child(22) {
    --x: 43%;
    --delay: .82s;
}

.luckit-unified-result__confetti span:nth-child(23) {
    --x: 51%;
    --delay: .12s;
}

.luckit-unified-result__confetti span:nth-child(24) {
    --x: 59%;
    --delay: .54s;
}

.luckit-unified-result__confetti span:nth-child(25) {
    --x: 67%;
    --delay: .26s;
}

.luckit-unified-result__confetti span:nth-child(26) {
    --x: 75%;
    --delay: .74s;
}

.luckit-unified-result__confetti span:nth-child(27) {
    --x: 83%;
    --delay: .36s;
}

.luckit-unified-result__confetti span:nth-child(28) {
    --x: 94%;
    --delay: .94s;
}

.luckit-unified-result__confetti span:nth-child(29) {
    --x: 15%;
    --delay: .60s;
}

.luckit-unified-result__confetti span:nth-child(30) {
    --x: 39%;
    --delay: 1.06s;
}

.luckit-unified-result__confetti span:nth-child(31) {
    --x: 63%;
    --delay: .48s;
}

.luckit-unified-result__confetti span:nth-child(32) {
    --x: 89%;
    --delay: .88s;
}

@keyframes luckit-unified-confetti {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(0);
    }

    12% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(min(78vh, 650px)) rotate(620deg);
    }
}

@keyframes luckit-unified-rays {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .luckit-unified-result__rays {
        animation: none;
    }

    .luckit-unified-result__confetti span {
        animation: none !important;
    }
}

@media (max-width: 520px) {
    .luckit-unified-result.is-modal {
        padding: 12px;
    }

    .luckit-unified-result__card {
        padding: 25px 18px;
        border-radius: 24px;
    }

    .luckit-unified-result__mark {
        width: 82px;
        min-height: 82px;
    }

    .luckit-unified-result__image {
        width: 150px;
        height: 150px;
    }
}

/* No-prize result presentation */
.luckit-unified-result.is-lose
.luckit-unified-result__card {
    border-color: #cbd5e1;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(148, 163, 184, .14),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            #ffffff,
            #f8fafc
        );
    box-shadow:
        0 24px 65px rgba(51, 65, 85, .18);
}

.luckit-unified-result.is-lose
.luckit-unified-result__rays {
    background:
        repeating-conic-gradient(
            from 0deg,
            rgba(148, 163, 184, .08) 0 10deg,
            transparent 10deg 23deg
        );
    animation: none;
}

.luckit-unified-result.is-lose
.luckit-unified-result__mark {
    border-color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #e2e8f0,
            #cbd5e1
        );
    color: #334155;
    box-shadow:
        0 12px 26px rgba(71, 85, 105, .18),
        0 0 0 5px rgba(203, 213, 225, .25);
}

.luckit-unified-result.is-lose
.luckit-unified-result__mark strong {
    font-size: 24px;
    letter-spacing: .04em;
}

.luckit-unified-result.is-lose
.luckit-unified-result__label {
    color: #64748b;
}

.luckit-unified-result.is-lose
.luckit-unified-result__name {
    margin-top: 20px;
    color: #334155;
}

.luckit-unified-result.is-lose
.luckit-unified-result__description,
.luckit-unified-result.is-lose
.luckit-unified-result__note,
.luckit-unified-result.is-lose
.luckit-unified-result__meta {
    color: #64748b;
}
