* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100svh;
    overflow: hidden;
}

body {
    width: 100%;
    position: relative;
    background-image: url('../images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url('../images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

body[data-state="slot"]::before {
    opacity: 1;
}

.wheel-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2svh;
    position: relative;
    z-index: 1;
    transition: opacity 0.5s ease;
}

[data-role="game-screen"][data-state="hidden"] {
    opacity: 0;
    pointer-events: none;
}

[data-role="game-screen"][data-state="spinning"] {
    animation: wrapperShake 0.12s ease-in-out infinite;
}

@keyframes wrapperShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.wheel-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2svh;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-role="wheel-block"][data-state="hidden"] {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
}

.wheel-block[hidden] {
    display: none;
}

.slot-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.slot-main {
    --slot-frame-w: 1111;
    --slot-frame-h: 649;
    aspect-ratio: 1111 / 649;
    width: min(100cqw, calc(100cqh * var(--slot-frame-w) / var(--slot-frame-h)));
    height: min(100cqh, calc(100cqw * var(--slot-frame-h) / var(--slot-frame-w)));
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    container-type: size;
    transform: scale(0.9);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slot-header {
    position: absolute;
    top: 0;
    left: 40%;
    z-index: 3;
    width: 85%;
    height: 0;
    padding-bottom: 42%;
    margin: 0;
    pointer-events: none;
    transform: translate(-50%, -81%);
}

.slot-jackpot {
    position: absolute;
}

.slot-jackpot img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.slot-jackpot--grand {
    top: 41%;
    left: 6%;
    width: 26.5%;
}

.slot-jackpot--major {
    top: 41%;
    right: -17%;
    width: 26.5%;
}

.slot-jackpot--minor {
    top: 64%;
    left: 6%;
    width: 21%;
}

.slot-jackpot--mini {
    top: 64%;
    right: -17%;
    width: 20%;
}

.slot-jackpot__value {
    position: absolute;
    left: 50%;
    top: 63%;
    transform: translate(-50%, -50%);
    font-size: 3.6svh;
    white-space: nowrap;
    pointer-events: none;
    filter: drop-shadow(0 0.3svh 0 #930000) drop-shadow(0 0 2svh rgba(255, 220, 60, 0.8));
}

.slot-jackpot--minor .slot-jackpot__value,
.slot-jackpot--mini .slot-jackpot__value {
    top: 66%;
    font-size: 3.05svh;
}

.slot-header__logo {
    position: absolute;
    top: 2%;
    left: 50%;
    width: 96%;
    height: auto;
    display: block;
    transform: translateX(-50%);
    filter: drop-shadow(0 0.4svh 1svh rgba(0, 0, 0, 0.45));
}

.slot-body {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 24svh 26svh 12svh 0;
    overflow: hidden;
    container-type: size;
}

.slot-ui {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 2svh;
    width: 100%;
    padding: 3svh 4.5svh 3.5svh;
    pointer-events: none;
}

.slot-ui > * {
    pointer-events: auto;
}

.slot-hud {
    display: contents;
}

.slot-hud__credit {
    grid-column: 1;
    grid-row: 1;
}

.slot-hud__last-win {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    text-align: center;
}

.slot-hud__bet {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
}

.slot-hud__actions {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
}

.slot-controls {
    position: fixed;
    top: 44%;
    right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5.5svh;
    padding: 2svh 2svh 2svh 0;
    transform: translateY(-50%);
}

.slot-controls__btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.slot-controls__btn img {
    display: block;
    width: auto;
    height: auto;
    pointer-events: none;
}

.slot-controls__btn--auto img,
.slot-controls__btn--turbo img {
    height: 10.5svh;
}

.slot-controls__btn--spin img {
    height: 21svh;
}

.slot-controls__btn--auto:active,
.slot-controls__btn--turbo:active,
.slot-controls__btn--spin:not(:disabled):active {
    transform: scale(0.95);
}

.slot-controls__btn--spin:not(:disabled) {
    animation: slotSpinButtonIdle 1.4s ease-in-out infinite;
}

.slot-controls__btn--spin:disabled,
.slot-controls__btn--spin[data-state="disabled"] {
    cursor: not-allowed;
    opacity: 0.75;
    filter: grayscale(0.35);
    animation: none;
}

@keyframes slotSpinButtonIdle {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }

    70% {
        transform: scale(1.04);
        filter: brightness(1.08) drop-shadow(0 0 1.2svh rgba(255, 180, 30, 0.5));
    }
}

.slot-hud__group {
    display: flex;
    flex-direction: column;
    gap: 0.5svh;
    min-width: 0;
}

.slot-hud__label {
    color: rgba(255, 255, 255, 0.72);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2svh;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.slot-hud__value {
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 3.5svh;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    text-shadow: 0 0.2svh 0.5svh rgba(0, 0, 0, 0.65);
}

.slot-hud__bet {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 28svh;
    height: 7.5svh;
    border-radius: 999px;
    background: rgba(18, 6, 38, 0.72);
    overflow: hidden;
}

.slot-hud__bet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35svh;
    min-width: 10svh;
    padding: 0 1.5svh;
}

.slot-hud__bet .slot-hud__label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.5svh;
}

.slot-hud__bet .slot-hud__value {
    font-size: 3svh;
    line-height: 1;
}

.slot-hud__bet-btn {
    flex: 0 0 7.5svh;
    width: 7.5svh;
    height: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 3.2svh;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.slot-hud__bet-btn--minus {
    border-right: 0.12svh solid rgba(255, 255, 255, 0.14);
}

.slot-hud__bet-btn--plus {
    border-left: 0.12svh solid rgba(255, 255, 255, 0.14);
}

.slot-hud__bet-btn:active {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

.slot-hud__actions {
    display: flex;
    align-items: center;
    gap: 1svh;
    flex-shrink: 0;
}

.slot-hud__action-btn {
    width: 6svh;
    height: 6svh;
    padding: 0.8svh;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.slot-hud__action-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.slot-hud__action-btn:active {
    transform: scale(0.92);
    opacity: 0.85;
}

.slot-container[hidden] {
    display: none !important;
}

[data-role="slot-container"]:not([hidden]) {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 2;
}

[data-role="slot-container"][data-state="visible"] {
    opacity: 1;
}

[data-role="slot-container"][data-state="visible"] .slot-main {
    transform: scale(1);
}

.slot-grid {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: calc(100cqh * 12 / var(--slot-frame-h, 649));
    padding: calc(100cqh * 16 / var(--slot-frame-h, 649)) calc(100cqh * 30 / var(--slot-frame-h, 649));
    border-radius: calc(100cqh * 20 / var(--slot-frame-h, 649));
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 1svh 4svh rgba(0, 0, 0, 0.45), inset 0 0 3svh rgba(255, 200, 60, 0.12);
    overflow: hidden;
    transition:
        opacity 0.55s ease,
        transform 0.65s cubic-bezier(0.22, 0.85, 0.25, 1),
        filter 0.55s ease,
        gap 0.65s ease,
        padding 0.65s ease;
}

.slot-grid--bonus-leave {
    opacity: 0;
    transform: scale(0.93);
    filter: brightness(1.18) saturate(1.12);
    pointer-events: none;
}

.slot-grid--bonus-preparing {
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
}

.slot-grid--bonus-animate-in {
    opacity: 1;
    transform: scale(1);
    filter: none;
}

.slot-grid--bonus-animate-in .slot-reel--bonus {
    animation: slotBonusCellReveal 0.58s cubic-bezier(0.22, 0.85, 0.25, 1) backwards;
}

@keyframes slotBonusCellReveal {
    0% {
        opacity: 0;
        transform: scale(0.84);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(1) { animation-delay: 0.04s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(2) { animation-delay: 0.08s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(3) { animation-delay: 0.12s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(4) { animation-delay: 0.16s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(5) { animation-delay: 0.2s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(6) { animation-delay: 0.24s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(7) { animation-delay: 0.28s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(8) { animation-delay: 0.32s; }
.slot-grid--bonus-animate-in .slot-reel--bonus:nth-child(9) { animation-delay: 0.36s; }

.slot-grid--spin-prep .slot-reel__viewport {
    opacity: 0;
}

.slot-win-line {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.slot-win-line path {
    fill: none;
    stroke: #ffc616;
    stroke-width: 0.55svh;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 0.8svh rgba(255, 220, 60, 0.95))
        drop-shadow(0 0 1.6svh rgba(255, 150, 0, 0.65));
}

.slot-reel__cell--win img,
.slot-reel__cell--win .slot-reel__coin img {
    animation: slotWinSymbolPulse 0.75s ease-in-out infinite alternate;
}

@keyframes slotWinSymbolPulse {
    0% {
        filter: drop-shadow(0 0.4svh 0.8svh rgba(0, 0, 0, 0.45))
            drop-shadow(0 0 0.4svh rgba(255, 200, 60, 0.35));
    }
    100% {
        filter: drop-shadow(0 0.4svh 0.8svh rgba(0, 0, 0, 0.45))
            drop-shadow(0 0 2.2svh rgba(255, 220, 60, 1))
            drop-shadow(0 0 3.5svh rgba(255, 150, 0, 0.75));
    }
}

.slot-reel {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.slot-reel__viewport {
    overflow: hidden;
    width: 100%;
    flex: 1;
    min-height: 0;
    height: 100%;
    container-type: size;
    --reel-gap: calc(100cqh * 7.5 / 617);
    border-radius: calc(100cqh * 12 / var(--slot-frame-h, 649));
    transform: scaleY(-1);
    position: relative;
}

.slot-reel__track {
    display: flex;
    flex-direction: column;
    will-change: transform;
    gap: var(--reel-gap);
}

.slot-reel__cell {
    height: calc((100cqh - var(--reel-gap) * 2) / 3);
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: scaleY(-1);
}

.slot-reel__cell img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0.4svh 0.8svh rgba(0, 0, 0, 0.45));
}

.slot-reel__cell--coin {
    position: relative;
}

.slot-reel__coin {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-reel__coin img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slot-coin-value,
.slot-jackpot__value,
.win-modal__amount {
    display: inline-block;
    font-family: Impact, 'Arial Black', sans-serif;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    background: linear-gradient(180deg, #FFF70D 45.77%, #E39E09 53.22%, #FFC616 61.98%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    paint-order: stroke fill;
    -webkit-text-stroke: 0.1svh #930000;
}

.slot-coin-value {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: calc(100cqh * 48 / var(--slot-frame-h, 649));
    white-space: nowrap;
    pointer-events: none;
    filter: drop-shadow(0 0.3svh 0 #930000) drop-shadow(0 0 2svh rgba(255, 220, 60, 0.8));
}

.win-modal__amount {
    font-size: 10svh;
    filter: drop-shadow(0 0.6svh 0 #930000) drop-shadow(0 0 2svh rgba(255, 220, 60, 0.8));
    animation: amountPulse 0.8s ease-in-out infinite alternate;
}

.wheel-assembly {
    width: 60svh;
    position: relative;
    transform-origin: center center;
    will-change: transform;
}

.wheel-stage {
    width: 100%;
    transform-origin: center center;
}

.wheel-stage--pulse {
    animation: wheelStagePulse var(--wheel-pulse-duration, 480ms) ease-out;
}

@keyframes wheelStagePulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.07);
    }

    100% {
        transform: scale(1);
    }
}

.wheel-wr {
    position: relative;
}

.arrow {
    position: absolute;
    width: 10%;
    z-index: 5;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wheel-container {
    width: 100%;
}

.wheel {
    width: 100%;
    display: block;
    filter: drop-shadow(0 0 2svh rgba(0, 0, 0, 0.45));
}

.jocker {
    width: 25%;
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    filter: drop-shadow(0 0.4svh 0.8svh rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

[data-role="spin-button"] {
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    -webkit-text-stroke: 0.1svh black;
    font-size: 5svh;
    width: 30svh;
    aspect-ratio: 659 / 322;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../images/spin.webp');
    background-size: 100% 100%;
    background-color: transparent;
    border: none;
    outline: none;
    padding-top: 1.5svh;
    cursor: pointer;
    position: relative;
    z-index: 3;
    transition: transform 0.2s ease, filter 0.2s ease;
}

[data-role="spin-button"]:not(:disabled) {
    animation: spinButtonIdle 1.4s ease-in-out infinite;
}

@keyframes spinButtonIdle {
    0%, 100% {
        transform: scale(1) translateY(0);
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }

    70% {
        transform: scale(1.03) translateY(0);
        filter: brightness(1.08) drop-shadow(0 0 1.2svh rgba(255, 180, 30, 0.5));
    }
}

[data-role="spin-button"]:not(:disabled):active {
    transform: scale(0.97);
}

[data-role="spin-button"]:disabled,
[data-role="spin-button"][data-state="disabled"] {
    cursor: not-allowed;
    opacity: 0.75;
    filter: grayscale(0.35);
    animation: none;
}

[data-role="coin-rain"],
.win-modal__coin-rain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.falling-coin {
    position: absolute;
    top: -12svh;
    animation-name: coinFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    filter: drop-shadow(0 0.4svh 0.8svh rgba(0, 0, 0, 0.35));
}

@keyframes coinFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        transform: translateY(105svh) rotate(720deg) scale(0.85);
        opacity: 0.85;
    }
}

body > canvas {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 250 !important;
}

.win-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

[data-role="win-modal"][data-state="visible"] {
    pointer-events: auto;
}

.win-modal[hidden] {
    display: none;
}

.win-modal__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at center, rgba(80, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.82) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

[data-role="win-modal"][data-state="visible"] .win-modal__backdrop {
    opacity: 1;
}

.win-modal__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2svh;
    transform: scale(0.2);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

[data-role="win-modal"][data-state="visible"] .win-modal__content {
    transform: scale(1);
    opacity: 1;
}

.win-modal__banner {
    width: 55svh;
    animation: bannerPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
    filter: drop-shadow(0 1svh 3svh rgba(255, 200, 0, 0.6));
}

@keyframes bannerPop {
    0% {
        transform: scale(0.3) rotate(-8deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.win-modal__amount-wrap {
    animation: amountRise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
}

@keyframes amountRise {
    0% {
        transform: translateY(4svh) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes amountPulse {
    from {
        filter: drop-shadow(0 0.6svh 0 #930000) drop-shadow(0 0 1.5svh rgba(255, 220, 60, 0.6));
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0.8svh 0 #930000) drop-shadow(0 0 3svh rgba(255, 240, 100, 1));
        transform: scale(1.04);
    }
}

.final-screen {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(120, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.92) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.final-screen[hidden] {
    display: none;
}

[data-role="final-screen"][data-state="visible"] {
    opacity: 1;
}

.final-screen__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3svh;
    width: 65svh;
    min-width: 65svh;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

[data-role="final-screen"][data-state="visible"] .final-screen__inner {
    transform: scale(1);
    opacity: 1;
}

.final-screen__card {
    position: relative;
    width: 100%;
}

.final-screen__frame {
    width: 100%;
    display: block;
    filter: drop-shadow(0 1.5svh 4svh rgba(0, 0, 0, 0.55));
}

.final-screen__info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3.2svh;
    padding: 18% 14% 8%;
    text-align: center;
}

.final-screen__label,
.final-screen__spins {
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.15;
    paint-order: stroke fill;
    -webkit-text-stroke: 0.15svh #000;
    text-shadow: 0 0.2svh 0.6svh rgba(0, 0, 0, 0.65);
}

.final-screen__label {
    font-size: 4.2svh;
}

.final-screen__spins {
    font-size: 4.5svh;
}

.final-screen__amount {
    color: #fff;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 9svh;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    paint-order: stroke fill;
    -webkit-text-stroke: 0.35svh #000;
    text-shadow: 0 0.3svh 0.8svh rgba(0, 0, 0, 0.7);
}

[data-role="install-button"] {
    width: 39svh;
    aspect-ratio: 588 / 200;
    padding: 0;
    border: none;
    background-color: transparent;
    background-image: url('../images/final-btn.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 4.5svh;
    font-weight: bold;
    text-transform: uppercase;
    paint-order: stroke fill;
    -webkit-text-stroke: 0.12svh #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0.8svh 2svh rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease, filter 0.2s ease;
    animation: finalBtnPulse 1.4s ease-in-out infinite;
}

[data-role="install-button"]:active {
    transform: scale(0.97);
}

@keyframes finalBtnPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.04);
        filter: brightness(1.12) drop-shadow(0 0 2svh rgba(255, 200, 60, 0.55));
    }
}

@media (max-aspect-ratio: 1214/945) and (min-aspect-ratio: 9/16) {
    [data-role="slot-container"] .slot-grid {
        gap: calc(100cqh * 10 / var(--slot-frame-h, 649));
        padding: calc(100cqh * 13 / var(--slot-frame-h, 649)) calc(100cqh * 25 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-coin-value {
        font-size: calc(100cqh * 40 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-jackpot__value {
        font-size: calc(3.6svh / 1.2);
    }

    [data-role="slot-container"] .slot-jackpot--minor .slot-jackpot__value,
    [data-role="slot-container"] .slot-jackpot--mini .slot-jackpot__value {
        font-size: calc(3.05svh / 1.2);
    }
}

@media (max-aspect-ratio: 1037/945) and (min-aspect-ratio: 9/16) {
    [data-role="slot-container"] .slot-grid {
        gap: calc(100cqh * 8 / var(--slot-frame-h, 649));
        padding: calc(100cqh * 11 / var(--slot-frame-h, 649)) calc(100cqh * 22 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-coin-value {
        font-size: calc(100cqh * 34 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-jackpot__value {
        font-size: calc(3.6svh / 1.6);
    }

    [data-role="slot-container"] .slot-jackpot--minor .slot-jackpot__value,
    [data-role="slot-container"] .slot-jackpot--mini .slot-jackpot__value {
        font-size: calc(3.05svh / 1.6);
    }
}

@media (max-aspect-ratio: 850/945) and (min-aspect-ratio: 9/16) {
    [data-role="slot-container"] .slot-grid {
        gap: calc(100cqh * 6 / var(--slot-frame-h, 649));
        padding: calc(100cqh * 9 / var(--slot-frame-h, 649)) calc(100cqh * 18 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-coin-value {
        font-size: calc(100cqh * 28 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-jackpot__value {
        font-size: calc(3.6svh / 2);
    }

    [data-role="slot-container"] .slot-jackpot--minor .slot-jackpot__value,
    [data-role="slot-container"] .slot-jackpot--mini .slot-jackpot__value {
        font-size: calc(3.05svh / 2);
    }

    [data-role="slot-ui"] {
        gap: calc(2svh / 1.2);
        padding: calc(3svh / 1.2) calc(4.5svh / 1.2) calc(3.5svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__group {
        gap: calc(0.5svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__label {
        font-size: calc(2svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__value {
        font-size: calc(3.5svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__bet {
        min-width: calc(28svh / 1.2);
        height: calc(7.5svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__bet-info {
        min-width: calc(10svh / 1.2);
        padding: 0 calc(1.5svh / 1.2);
        gap: calc(0.35svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__bet .slot-hud__label {
        font-size: calc(1.5svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__bet .slot-hud__value {
        font-size: calc(3svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__bet-btn {
        flex: 0 0 calc(7.5svh / 1.2);
        width: calc(7.5svh / 1.2);
        font-size: calc(3.2svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__actions {
        gap: calc(1svh / 1.2);
    }

    [data-role="slot-ui"] .slot-hud__action-btn {
        width: calc(6svh / 1.2);
        height: calc(6svh / 1.2);
        padding: calc(0.8svh / 1.2);
    }

    [data-role="slot-container"] .slot-body {
        padding-bottom: calc(12svh / 1.2);
    }
}

@media (max-aspect-ratio: 9/16) {
    .wheel-assembly {
        width: 44svh;
    }

    [data-role="slot-container"]:not([hidden]) {
        flex-direction: column;
        justify-content: flex-start;
    }

    [data-role="slot-container"] .slot-body {
        width: 100%;
        padding: 38% 0 0;
        flex: 1;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        container-type: size;
        min-height: 0;
    }

    [data-role="slot-container"] .slot-main {
        min-width: 0;
    }

    [data-role="slot-container"] .slot-grid {
        width: 100%;
        gap: calc(100cqh * 8 / var(--slot-frame-h, 649));
        padding: calc(100cqh * 10 / var(--slot-frame-h, 649)) calc(100cqh * 18 / var(--slot-frame-h, 649));
    }

    [data-role="slot-container"] .slot-header {
        top: -13%;
        width: 100%;
        padding-bottom: 38%;
    }

    [data-role="slot-container"] .slot-header__logo {
        top: 29%;
        width: 75%;
    }

    [data-role="slot-container"] .slot-jackpot--grand {
        top: 55%;
        left: 12%;
        width: 26.5%;
    }

    [data-role="slot-container"] .slot-jackpot--major {
        top: 56%;
        right: -7%;
        width: 26.5%;
    }

    [data-role="slot-container"] .slot-jackpot--minor {
        top: 86%;
        left: 12%;
        width: 21%;
    }

    [data-role="slot-container"] .slot-jackpot--mini {
        top: 86%;
        right: -7%;
        width: 21%;
    }

    [data-role="slot-container"] .slot-jackpot__value {
        font-size: 2.5svh;
    }

    [data-role="slot-container"] .slot-jackpot--minor .slot-jackpot__value,
    [data-role="slot-container"] .slot-jackpot--mini .slot-jackpot__value {
        font-size: 2.2svh;
    }

    [data-role="slot-ui"] {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2.2%;
        width: 100%;
        padding: 0 3% 13.5%;
        pointer-events: auto;
    }

    .slot-hud {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 1svh;
    }

    .slot-hud__credit,
    .slot-hud__last-win,
    .slot-hud__bet,
    .slot-hud__actions {
        grid-column: auto;
        grid-row: auto;
        justify-self: auto;
    }

    .slot-hud__last-win {
        width: 100%;
        text-align: center;
    }

    [data-role="slot-ui"] .slot-hud__bet {
        width: 72%;
        min-width: 0;
    }

    .slot-controls {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 3%;
        padding: 0;
        width: 100%;
    }

    .slot-controls__btn--turbo {
        order: 1;
    }

    .slot-controls__btn--spin {
        order: 2;
    }

    .slot-controls__btn--auto {
        order: 3;
    }

    .slot-controls__btn--auto img,
    .slot-controls__btn--turbo img {
        height: 9svh;
    }

    .slot-controls__btn--spin img {
        height: 18svh;
    }

    .slot-hud__label {
        font-size: 1.65svh;
    }

    .slot-hud__value {
        font-size: 2.85svh;
    }

    .slot-hud__bet {
        height: 6.5svh;
    }

    .slot-hud__bet-btn {
        flex: 0 0 6.5svh;
        width: 6.5svh;
        font-size: 2.6svh;
    }

    .slot-hud__bet .slot-hud__label {
        font-size: 1.25svh;
    }

    .slot-hud__bet .slot-hud__value {
        font-size: 2.5svh;
    }

    .slot-hud__action-btn {
        width: 5svh;
        height: 5svh;
    }

    [data-role="slot-container"] .slot-coin-value {
        font-size: calc(100cqh * 32 / var(--slot-frame-h, 649));
    }

    .win-modal__banner {
        width: 45svh;
    }

    .final-screen__inner {
        gap: 4.5svh;
        width: 45svh;
        min-width: 45svh;
    }

    .final-screen__label {
        font-size: 3.2svh;
    }

    .final-screen__amount {
        font-size: 5svh;
    }

    .final-screen__spins {
        font-size: 3.5svh;
    }

    .final-screen__info {
        gap: 2.2svh;
    }

    [data-role="install-button"] {
        width: 35svh;
        font-size: 4svh;
    }
}

.slot-grid--bonus {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: calc(100cqh * 12 / var(--slot-frame-h, 649)) calc(100cqh * 36 / var(--slot-frame-h, 649)) calc(100cqh * 28 / var(--slot-frame-h, 649)) calc(100cqh * 36 / var(--slot-frame-h, 649));
}

.slot-grid--bonus .slot-reel__viewport {
    height: 100%;
    border-radius: calc(100cqh * 8 / var(--slot-frame-h, 649));
}

.slot-grid--bonus .slot-reel__track {
    gap: 0;
}

.slot-grid--bonus .slot-reel__cell--bonus {
    height: 100cqh;
}

.slot-reel--bonus .slot-reel__cell--bonus {
    background-image: url('../images/777bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: calc(100cqh * 8 / var(--slot-frame-h, 649));
}

.slot-reel--bonus.slot-reel--locked .slot-reel__viewport {
    overflow: visible;
}

.slot-grid--bonus .slot-reel__cell--coin .slot-coin-value {
    font-size: 4.8svh;
}

.slot-reel__cell--gold-coin .slot-reel__coin img {
    filter: drop-shadow(0 0 0.8svh rgba(255, 215, 0, 0.95))
        drop-shadow(0 0 1.6svh rgba(255, 180, 0, 0.75))
        saturate(1.35)
        brightness(1.15);
}

.slot-reel__cell--gold-coin .slot-coin-value {
    display: none;
}

.slot-reel__cell--collector {
    position: relative;
}

.slot-reel__collector {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-reel__collector img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0.4svh 0.8svh rgba(0, 0, 0, 0.45));
}

.slot-bonus-hud {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 14svh;
    z-index: 6;
    transform: translateX(-50%);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.85, 0.25, 1);
}

.slot-container--bonus .slot-bonus-hud:not([hidden]) {
    display: block;
}

.slot-bonus-hud[hidden] {
    display: none !important;
}

.slot-bonus-hud__total {
    display: none !important;
}

.slot-hud__value--bonus-reveal {
    animation: slotBonusHudReveal 0.85s ease-out;
}

@keyframes slotBonusHudReveal {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0.3svh 0 #930000) drop-shadow(0 0 2svh rgba(255, 220, 60, 0.8));
    }
    45% {
        transform: scale(1.18);
        filter: drop-shadow(0 0.3svh 0 #930000) drop-shadow(0 0 3svh rgba(255, 220, 60, 1));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0.3svh 0 #930000) drop-shadow(0 0 2svh rgba(255, 220, 60, 0.8));
    }
}

.slot-bonus-hud[data-state="visible"] {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.slot-bonus-hud[data-state="hidden"] {
    opacity: 0;
    transform: translateX(-50%) translateY(1.5svh);
}

.slot-bonus-hud__spins {
    display: inline-block;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 3.4svh;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff70d;
    -webkit-text-stroke: 0.12svh #930000;
    paint-order: stroke fill;
    filter: drop-shadow(0 0.4svh 0 #930000) drop-shadow(0 0 1.6svh rgba(255, 200, 60, 0.85));
}

.slot-bonus-fly-layer {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
}

.bonus-fly-item {
    position: fixed;
    z-index: 21;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, left, top, opacity;
    transition: left 0.75s cubic-bezier(0.22, 0.85, 0.25, 1),
        top 0.75s cubic-bezier(0.22, 0.85, 0.25, 1),
        transform 0.75s cubic-bezier(0.22, 0.85, 0.25, 1),
        opacity 0.35s ease;
}

.bonus-fly-item__value {
    position: static;
    transform: none;
    font-size: 4.8svh;
    white-space: nowrap;
}

@media (max-aspect-ratio: 9/16) {
    .slot-bonus-hud {
        bottom: 16svh;
    }

    .slot-bonus-hud__spins {
        font-size: 2.8svh;
    }
}

/* Loading screen */
body.is-loading {
    overflow: hidden;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1a0a2e;
    background-image: url('../images/bg.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen__logo {
    width: min(38svh, 70vw);
    margin: auto 0;
}

.loading-screen__bottom {
    width: min(80vw, 40svh);
    padding-bottom: 6svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2svh;
}

.loading-screen__text {
    margin: 0;
    color: #fff;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 2svh;
    letter-spacing: 0.25em;
    text-indent: 0.25em;
    text-shadow: 0 0.2svh 0.5svh rgba(0, 0, 0, 0.65);
}

.loading-screen__bar {
    width: 100%;
    height: 0.8svh;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1svh;
    overflow: hidden;
}

.loading-screen__bar-fill {
    height: 100%;
    width: 0%;
    background: #ffd54a;
    border-radius: 1svh;
    transition: width 0.2s linear;
}

@media (min-aspect-ratio: 17/10) {
    .loading-screen {
        background-size: 100% auto;
    }
}
