@font-face {
    font-family: XmaxRoboto;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(fonts/roboto-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: XmaxRoboto;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(fonts/roboto-cyrillic.woff2) format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
}
[hidden] {
    display: none !important;
}

html, body {
    overflow-x: clip; /* the rotating wheel's box is wider than the screen at some angles */
}
body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: XmaxRoboto, Roboto, sans-serif;
    color: #F5F5F5;
    background:
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        radial-gradient(circle 600px at 90% 240px, #1B3567, #0A1B3C);
    background-color: #0A1B3C;
}

.header {
    width: 100%;
    padding: 20px 32px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        linear-gradient(to bottom, #0A1B3C, #1B3567);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.header img {
    display: block;
    height: 32px;
    width: auto;
    margin: 0 auto;
}

.content {
    width: 91.666%;
    margin: 0 auto;
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}
.title span, .subtitle span {
    display: block;
}
.accent {
    color: #60D669;
}
.subtitle {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}
.gold {
    color: #F5C542;
}

.wheel-box {
    direction: ltr;
    position: relative;
    margin-top: 20px;
    width: 100%;
    max-width: max(240px, calc(100dvh - 330px));
    aspect-ratio: 1;
}
.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(245, 197, 66, 0.3);
    will-change: transform;
}
.bulbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.bulb {
    position: absolute;
    width: 9%;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(circle closest-side, #fff 0, #fff 18%, #FFF6CC 22%, rgba(255, 213, 79, 0.7) 30%, rgba(255, 179, 0, 0.25) 60%, rgba(255, 152, 0, 0));
    will-change: opacity;
}
.wheel svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.pointer {
    position: absolute;
    left: 50%;
    top: -2%;
    width: 13%;
    transform: translateX(-50%);
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7));
}

.spin-ring, .spin-gold, .spin-button {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    aspect-ratio: 1;
    border-radius: 50%;
}
.spin-ring {
    width: 22.5%;
    background: #3bc58e;
    pointer-events: none;
    animation: wheelRing 1.6s ease-out infinite;
}
.spin-gold {
    width: 22.5%;
    background: linear-gradient(145deg, #FFF6C2, #E3A92B 35%, #8A5A12 65%, #F2C445 85%, #9C6814);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}
.spin-button {
    width: 20%;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: pointer;
    color: inherit;
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
    background: radial-gradient(circle at 50% 30%, #6EF09A, #22A355 45%, #0B6B2E 80%, #053D19);
    box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.6), 0 0 14px rgba(59, 197, 142, 0.55);
}
.spin-button.long {
    font-size: 16px;
}
.spin-button:disabled {
    cursor: default;
}
.spin-button.is-off {
    filter: grayscale(1);
}
.spin-gloss {
    position: absolute;
    left: 15%;
    right: 15%;
    top: 6%;
    height: 42%;
    border-radius: 9999px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.spin-label {
    position: relative;
}

.payments {
    direction: ltr;
    margin-top: 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    opacity: 0.9;
}
.payments div {
    flex: 1;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.payments div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}
.payments img {
    width: auto;
}
.payments .visa, .payments .applepay, .payments .googlepay {
    filter: brightness(0) invert(1);
}
/* the Apple Pay / Google Pay files have empty margins, so their heights differ to make the logos look the same size (~15px) */
.payments .visa {
    height: 15px;
}
.payments .mastercard {
    height: 20px;
}
.payments .applepay {
    height: 26px;
}
.payments .googlepay {
    height: 30px;
}

.popup {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    animation: wheelFade 0.3s ease-out;
}
.sheet {
    width: 100%;
    border-radius: 36px 36px 0 0;
    background: #15284F;
    padding: 36px 28px 60px;
    text-align: center;
    animation: wheelSheet 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.sheet-title {
    font-size: 24px;
    font-weight: 700;
}
.pop {
    animation: wheelPop 0.5s 0.25s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.win-prize {
    font-size: 30px;
    font-weight: 700;
    color: #60D669;
}
.win-note {
    font-size: 12px;
    font-weight: 600;
}
.miss-text {
    font-size: 14px;
    font-weight: 600;
}

/* ::before draws the gradient border (border-image can't be rounded) */
.glass-panel {
    position: relative;
    width: 100%;
    padding: 16px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(75, 99, 127, 0.4), rgba(101, 150, 150, 0.4));
    box-shadow: inset 0 4px 10px rgba(255, 255, 255, 0.25);
}
.glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(238, 238, 238, 0.17), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.green-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 6px 4px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(to right, #3a9f3d, #3bc58e);
    color: #F5F5F5;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.is-spinning .bulb {
    animation: wheelBlink 0.6s ease-in-out infinite;
}
.flash {
    animation: wheelFlash 0.6s ease-in-out 4;
}

@keyframes wheelFade {
    from { opacity: 0; }
}
@keyframes wheelSheet {
    from { translate: 0 100%; }
}
@keyframes wheelPop {
    from { opacity: 0; scale: 0.5; }
}
@keyframes wheelBlink {
    50% { opacity: 0.25; }
}
@keyframes wheelFlash {
    50% { opacity: 0.55; }
}
@keyframes wheelRing {
    from { opacity: 0.6; scale: 1; }
    to { opacity: 0; scale: 1.45; }
}
@media (prefers-reduced-motion: reduce) {
    .popup, .sheet, .pop, .bulb, .flash, .spin-ring {
        animation: none !important;
    }
}

@media (min-width: 768px) {
    .content {
        width: 420px;
        padding: 28px 0;
        justify-content: flex-start;
    }
    .title {
        font-size: 30px;
    }
    .subtitle {
        font-size: 16px;
    }
    .wheel-box {
        margin-top: 28px;
        max-width: none;
    }
    .spin-button {
        font-size: 24px;
    }
    .spin-button.long {
        font-size: 20px;
    }
    .payments {
        margin-top: 32px;
    }
    .popup {
        justify-content: center;
    }
    .sheet {
        width: 375px;
        border-radius: 8px;
        padding: 36px 28px;
    }
}
@media (min-width: 1024px) {
    .content {
        width: 480px;
    }
}
