@font-face {
    font-family: "Inter";
    src: url("../font/Inter.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "FatFrank";
    src: url("../font/FatFrank.otf");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Fred";
    src: url("../font/FredokaOne-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "monser";
    src: url("../font/Montserrat-ExtraBold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Post";
    src: url("../font/PostNoBillsJaffna-SemiBold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Lora";
    src: url("../font/Lora-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: "Inter";
    font-weight: bold;
    color: white;
    overflow: hidden;
    user-select: none;
}

body {
    margin: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

body.mode-intro {
    background: #12082a;
}

body.mode-game {
    background: #12082a;
}

.game-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: url("../images/background.webp");
    background-repeat: no-repeat;
    background-size: auto 130vh;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

body.mode-game .game-bg-layer,
body.transitioning-to-game .game-bg-layer {
    opacity: 1;
}

img,
video,
audio {
    pointer-events: none;
    user-select: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    z-index: 1000;
    backdrop-filter: blur(2px);
    background: #181a39a9;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    transform: scale(0.2);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.game-modal .modal-content {
    width: min(90vw, calc(55vh * 1128 / 831));
    aspect-ratio: 1128 / 831;
    height: auto;
    background: url("../images/modal.webp") center / 100% 100% no-repeat;
}

.game-modal__inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    text-align: center;
    padding: 10% 9% 9%;
    gap: 1.1vh;
    box-sizing: border-box;
}

.game-modal__title {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 5vh;
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffdc24 0%, #ffa022 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-modal__lead,
.game-modal__spins-label {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 3.6vh;
    line-height: 1.05;
    text-transform: uppercase;
    background: linear-gradient(180deg, #c2e2bf 0%, #00cfbe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-modal__number-wrap {
    position: relative;
    width: 78%;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-modal__number-bg {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.game-modal__number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 8.2vh;
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffdc24 16.35%, #ffa022 60.58%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-modal__hint {
    padding-top: 0.6vh;
    font-family: "Inter", sans-serif;
    font-weight: bold;
    font-size: 3.5vh;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
}

.big-win-screen {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(2vh, env(safe-area-inset-top, 0px)) max(2vw, env(safe-area-inset-right, 0px)) max(2vh, env(safe-area-inset-bottom, 0px)) max(2vw, env(safe-area-inset-left, 0px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.55s ease-out, visibility 0.55s ease-out;
}

body.big-win-visible .big-win-screen {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.big-win-screen__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 28, 0.62);
    backdrop-filter: blur(10px);
}

.big-win-screen__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: min(1.5vh, 2vw);
    width: min(92vw, 76vh);
    max-width: 100%;
    pointer-events: none;
}

.big-win-screen__title {
    width: min(90vw, calc(58vh * 1277 / 313));
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.big-win-screen__amount-ring {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.big-win-screen__amount {
    white-space: nowrap;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@keyframes introReveal {
    0% {
        opacity: 0;
        transform: scale(0.55);
    }

    65% {
        opacity: 1;
        transform: scale(1.06);
    }

    82% {
        transform: scale(0.97);
    }

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

@keyframes introHide {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.88);
    }
}

@keyframes slotToGame {
    0% {
        transform: translateX(0) scale(1);
    }

    100% {
        transform: translateX(0) scale(1.06);
    }
}

@keyframes gameBarIn {
    0% {
        opacity: 0;
        transform: translateY(14vh);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}

.intro-screen__bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url("../images/first-screen/background.webp") center / cover no-repeat;
    opacity: 1;
    transition: opacity 0.85s ease;
}

.intro-screen__logo {
    width: 50vh;
    margin-top: 8vh;
    padding-top: env(safe-area-inset-top, 0);
    flex-shrink: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    animation: introReveal 0.75s cubic-bezier(0.22, 1.2, 0.36, 1) 0.08s forwards;
}

.intro-screen__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 5vh;
    width: 100%;
    padding: 2vh 3vh 5vh;
    min-height: 0;
}

.mode-intro .intro-screen__body {
    flex-direction: row;
}

.mode-intro .game-side-panel {
    display: none;
}

.mode-intro .game-play-area {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-intro .slot-machine-wrap {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: introReveal 0.8s cubic-bezier(0.22, 1.2, 0.36, 1) 0.22s forwards;
    transform-origin: center center;
}

.mode-intro .slot-machine-wrap .logo {
    display: none;
}

.mode-intro .slot-machine {
    width: 64vh;
}

.mode-intro .slot-machine-background {
    height: 120%;
}

.mode-intro .icon {
    width: 74%;
}

.intro-spin-btn {
    flex-shrink: 0;
    width: 20vh;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    opacity: 0;
    animation: introReveal 0.85s cubic-bezier(0.22, 1.25, 0.42, 1) 0.42s forwards;
    transform-origin: center center;
}

.intro-spin-btn img {
    width: 100%;
    pointer-events: none;
}

.intro-spin-btn:disabled {
    cursor: default;
}

.intro-spin-btn:disabled .pointer {
    display: none;
}

body.transitioning-to-game .intro-screen__logo,
body.transitioning-to-game .intro-spin-btn {
    animation: introHide 0.45s ease forwards;
}

body.transitioning-to-game .intro-screen__bg {
    opacity: 0;
}

body.transitioning-to-game .slot-machine-wrap {
    animation: slotToGame 0.85s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

.mode-game .intro-screen__bg {
    opacity: 0;
    visibility: hidden;
}

.mode-game .intro-screen__logo,
.mode-game .intro-spin-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
}

.mode-game .intro-screen__body {
    flex-direction: column;
    padding: 0;
    gap: 0;
}

.game-side-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2vh;
    flex-shrink: 0;
}

.game-play-area {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-badge {
    position: relative;
    width: 27vh;
    flex-shrink: 0;
}

.game-badge__frame {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.game-badge__frame--mobile {
    display: none;
}

.game-badge__copy {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12% 10% 14%;
    font-family: "Inter", sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    pointer-events: none;
}

.game-badge__buy-title,
.game-badge__buy-sub {
    margin: 0;
    line-height: 1;
    color: #fce005;
    -webkit-text-stroke: 0.2vh #e85a00;
    paint-order: stroke fill;
}

.game-badge--orange .game-badge__copy {
    padding: 11% 9% 13%;
    gap: 0.35vh;
}

.game-badge--orange .game-badge__buy-title {
    font-size: 3.4vh;
}

.game-badge--orange .game-badge__buy-sub {
    font-size: 2.1vh;
    margin-top: 0.4vh;
}

.game-badge--orange .game-badge__buy-price {
    margin: 0;
    margin-top: 0.7vh;
    font-size: 4.3vh;
    line-height: 1;
    color: #ffffff;
    -webkit-text-stroke: 0.24vh #b7267f;
    paint-order: stroke fill;
}

.game-badge__copy--green {
    justify-content: flex-start;
    padding: 12% 8% 9%;
    gap: 0.5vh;
}

.game-badge__row {
    display: contents;
}

.game-badge__bet-label,
.game-badge__bet-line {
    margin: 0;
    line-height: 1.05;
    color: #ffffff;
    -webkit-text-stroke: 0.22vh #326b10;
    paint-order: stroke fill;
}

.game-badge--green .game-badge__bet-label {
    font-size: 4.2vh;
}

.game-badge--green .game-badge__bet-value {
    margin: 0.2vh 0 0.35vh;
    font-size: 5vh;
    line-height: 1;
    text-transform: uppercase;
    color: #ffffff;
    -webkit-text-stroke: 0.24vh #e85a00;
    paint-order: stroke fill;
}

.game-badge--green .game-badge__bet-line {
    font-size: 1.7vh;
    line-height: 1.08;
    max-width: 94%;
}

.game-badge--green .game-badge__switch {
    width: 78%;
    height: auto;
    margin-top: 0.45vh;
    display: block;
    pointer-events: none;
}

.main-content.is-game-ui {
    justify-content: space-between;
    --game-bottom-bar-max: min(100%, 72vh);
}

.main-content.is-game-ui .intro-screen {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: visible;
}

.main-content.is-game-ui .intro-screen__body {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12vh;
    padding: 1vh 3vh 0;
    box-sizing: border-box;
}

.main-content.is-game-ui .game-play-area {
    order: 2;
}

.main-content.is-game-ui .game-side-panel {
    order: 1;
}

.main-content.is-game-ui .game-side-panel {
    display: flex;
    flex: 0 0 auto;
}

.main-content.is-game-ui .game-play-area {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-content.is-game-ui .slot-machine-wrap {
    flex: 0 0 auto;
    width: auto;
    margin: 2vh 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
    transform: none;
    animation: none;
    opacity: 1;
    overflow: visible;
}

.main-content.is-game-ui .slot-machine-wrap .logo {
    display: block;
    position: absolute;
    top: -18%;
    left: 25%;
    right: auto;
    width: 52%;
    max-width: 100%;
    height: auto;
    z-index: 5;
    opacity: 0;
    animation: introReveal 0.7s cubic-bezier(0.22, 1.15, 0.36, 1) 0.15s forwards;
}

.main-content.is-game-ui .slot-machine {
    width: 70vh;
    height: 58vh;
}

.main-content.is-game-ui .slot-machine-background {
    height: 120%;
}

.main-content.is-game-ui .icon {
    width: 74%;
}

.game-ui {
    opacity: 0;
    transform: translateY(14vh);
}

.game-ui.game-ui--visible {
    animation: gameBarIn 0.75s cubic-bezier(0.22, 1.12, 0.36, 1) forwards;
}

.game-ui[hidden] {
    display: none !important;
}

.main-content.is-game-ui .game-ui:not([hidden]) {
    display: flex;
}

.slot-machine-wrap {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    margin-top: 8vh;
    margin-bottom: 0;
}

.final-content,
.end-card {
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.final-content.show,
.end-card.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

body.mode-endcard {
    overflow: hidden;
}

body.mode-endcard .game-bg-layer {
    opacity: 0;
}

.end-card__bg {
    position: absolute;
    inset: 0;
    background: url("../images/end-screen/bg-desktop.webp") center / cover no-repeat;
    opacity: 0;
    transition: opacity 0.65s ease;
}

.end-card.show .end-card__bg {
    opacity: 1;
}

.end-card__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 6vh;
    padding: 3vh 4vw;
    padding-top: calc(3vh + env(safe-area-inset-top, 0px));
    padding-bottom: calc(3vh + env(safe-area-inset-bottom, 0px));
}

.end-card__logo-wrap {
    display: block;
    flex-shrink: 0;
    opacity: 0;
    transform-origin: center center;
}

.end-card.show .end-card__logo-wrap {
    animation: introReveal 0.75s cubic-bezier(0.22, 1.2, 0.36, 1) 0.1s forwards;
}

.end-card__logo {
    width: 48vh;
    height: auto;
    display: block;
}

.end-card__offer {
    position: relative;
    width: 68vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform-origin: center center;
}

.end-card.show .end-card__offer {
    animation: introReveal 0.8s cubic-bezier(0.22, 1.2, 0.36, 1) 0.28s forwards;
}

.end-card__offer-frame {
    width: 100%;
    height: auto;
    display: block;
}

.end-card__offer-copy {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 7%;
}

.end-card__amount,
.end-card__spins,
.big-win-screen__amount {
    margin: 0;
    font-family: "FatFrank";
    font-weight: 50;
    text-transform: uppercase;
    line-height: 1.05;
    background: linear-gradient(to bottom, #FFFF00, #FFD101);
    -webkit-text-stroke: 0.18vh #000000aa;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0.25vh 0.4vh rgba(0, 0, 0, 0.35));
}

.end-card__amount,
.big-win-screen__amount {
    font-size: 8.5vh;
}

.end-card__spins {
    font-size: 5.2vh;
}

.end-card__cta {
    position: relative;
    flex-shrink: 0;
    width: 46vh;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: auto;
    opacity: 0;
    transform-origin: center center;
}

.end-card.show .end-card__cta {
    animation: introReveal 0.85s cubic-bezier(0.22, 1.25, 0.42, 1) 0.48s forwards;
}

.end-card__cta:active {
    transform: scale(0.96);
}

.end-card__cta-bg {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.end-card__cta-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "FatFrank";
    font-size: 4.8vh;
    font-weight: 50;
    text-transform: uppercase;
    color: #fff8d6;
    -webkit-text-stroke: 0.22vh #1a4d12;
    paint-order: stroke fill;
    pointer-events: none;
}

.slot-machine {
    width: 60vh;
    height: 52vh;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    overflow: visible;
    z-index: 10;
    position: relative;
}

.slot-reels-viewport {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: visible;
}

.slot-machine-background {
    position: absolute;
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 115%;
    aspect-ratio: 1074 / 844;
    z-index: -1;
}

.logo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%);
    width: 52%;
}

.spacer {
    width: 0.3%;
    min-height: 52vh;
    background: #a8a8a8;
    opacity: 0.6;
}

.col {
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    min-width: 0;
    isolation: isolate;
}

.col:has(.splash),
.col:has(.icon.scaling) {
    overflow: visible;
    z-index: 8;
    isolation: auto;
}

.col.col--reel-spin {
    overflow: hidden !important;
    z-index: 1;
}

.col-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.col-strip>div,
.symbol-cell {
    flex: 0 0 20%;
    height: 20%;
    width: 100%;
    min-height: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    z-index: 1;
}

.icon {
    width: 70%;
    height: auto;
    max-height: 95%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform, opacity;
    display: block;
    position: relative;
    z-index: 2;
}

.icon.scaling {
    animation: scale-pulse 0.45s ease-in-out;
    z-index: 12;
    position: relative;
    filter: drop-shadow(0 0 1.2vh rgba(255, 220, 80, 0.85));
}

.symbol-cell.splash,
.col-strip>div.splash {
    z-index: 14;
    overflow: visible;
}

.splash::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 240%;
    width: 240%;
    max-width: none;
    aspect-ratio: 238 / 195;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    animation: splash 0.55s ease-out;
    z-index: 3;
    pointer-events: none;
}

.bottom-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5vh;
    padding: 1.2vh 2vh;
    padding-bottom: calc(1.2vh + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    z-index: 50;
}

.main-content.is-game-ui .bottom-bar {
    display: grid;
    grid-template-columns: auto auto var(--game-panel-win-w) auto;
    grid-template-areas: "menu stats win spin";
    align-items: center;
    gap: 1.5vh 3vh;
    width: 100%;
    max-width: var(--game-bottom-bar-max);
    margin-inline: auto;
    box-sizing: border-box;
    padding: 1.2vh 2.5vh;
    padding-bottom: calc(1.2vh + env(safe-area-inset-bottom, 0px));
    --game-panel-win-w: 28vh;
}

.main-content.is-game-ui .bottom-bar__menu {
    grid-area: menu;
}

.main-content.is-game-ui .bottom-bar__stats {
    grid-area: stats;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5vh;
    font-size: 2.4vh;
    line-height: 1.15;
}

.main-content.is-game-ui .bottom-bar__stat {
    display: flex;
    align-items: center;
    gap: 0.5vh;
    white-space: nowrap;
}

.main-content.is-game-ui .panel-win {
    grid-area: win;
    justify-self: center;
    align-self: center;
    flex: none;
    width: var(--game-panel-win-w);
    min-width: var(--game-panel-win-w);
    max-width: var(--game-panel-win-w);
    min-height: 2.6vh;
    padding: 0;
    text-align: center;
    overflow: visible;
    font-size: 2.4vh;
    line-height: 1.2;
    position: relative;
    box-sizing: border-box;
}

.main-content.is-game-ui .panel-win [data-role="spin_hint"],
.main-content.is-game-ui .panel-win [data-role="win_panel"] {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    white-space: nowrap;
    text-align: center;
    margin: 0;
}

.main-content.is-game-ui .panel-win [data-role="win_panel"] {
    font-variant-numeric: tabular-nums;
}

.main-content.is-game-ui .panel-win [data-role="win"] {
    display: inline-block;
    min-width: 4.5ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.main-content.is-game-ui .bottom-bar__spin-row {
    grid-area: spin;
}

.main-content.is-game-ui .bottom-bar__toolbar {
    display: none;
}

.bottom-bar__toolbar {
    align-items: center;
    justify-content: center;
    gap: 3vw;
    width: 100%;
}

.bottom-bar__toolbar-slot {
    width: 11vw;
    height: 11vw;
    flex-shrink: 0;
}

.menu-btn,
.bet-adjust-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 0;
}

.menu-btn img {
    height: 5.5vh;
    width: auto;
    object-fit: contain;
}

.panel-win {
    flex: 1;
    min-width: 0;
    padding: 0 1vh;
    font-size: 2.6vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35vh;
    line-height: 1.15;
}

#winContainer,
[data-role="win_panel"] {
    display: none;
}

.yellow-text {
    color: #F5AE31;
}

.panel-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vh;
    flex-shrink: 0;
}

.bet-adjust-btn img {
    width: 5.5vh;
    height: auto;
    object-fit: contain;
}

#spinButton,
[data-role="spin"] {
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    width: 9vh;
    position: relative;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

#spinButton img,
[data-role="spin"] img {
    width: 100%;
}

#spinButton:disabled,
[data-role="spin"]:disabled {
    opacity: 0.5;
    cursor: unset;
}

.spin-btn-bg-anim {
    animation: btn-spin 0.3s ease-out forwards;
}

.pointer {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 78%;
    height: auto;
    display: block;
    pointer-events: none;
    /* Fingertip (points top-left in the sprite) */
    transform-origin: 14% 16%;
    transform: translate(-14%, -16%) rotate(-10deg);
    animation: button-pointing 1.1s ease-in-out infinite;
}

#spinButton:disabled .pointer,
[data-role="spin"]:disabled .pointer {
    display: none;
}

.panel-balance,
.bottom-bar__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5vh;
    flex-shrink: 0;
    font-size: 2.4vh;
    white-space: nowrap;
    line-height: 1.15;
}

.balance-row,
.bet-row,
.bottom-bar__stat {
    display: flex;
    gap: 0.5vh;
}

.scale-down-animation {
    animation: scaleDownFade 0.5s ease-in-out forwards;
    transform-origin: center center;
}

.scale-up-animation {
    animation: scaleUpFade 0.5s ease-in-out forwards;
    transform-origin: center center;
}

.falling-object {
    position: absolute;
    width: 10vmin;
    top: -150px;
    z-index: 1;
    transform-origin: center center;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.falling-objects {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1000;
}

.middle-bomb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 19%;
    aspect-ratio: 1.05 / 1;
    background-image: url("../images/slot9.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: transform 0.5s ease-out;
    opacity: 0;
    z-index: 30;
    pointer-events: none;
}

.boom {
    animation: boom 0.7s ease-in forwards;
}

.bomb-scale {
    animation: bomb-scale 1.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.slot-blur {
    animation: slot-blur 0.5s ease-out forwards;
}

.remove-slot-blur {
    animation: remove-slot-blur 0.4s ease-out forwards;
}

.bomb-mult {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8vh;
    letter-spacing: 0.5vh;
    font-family: "FatFrank";
    color: transparent;
    color: #ffd700;
    line-height: 1;
    -webkit-text-stroke: 0.1vh #000000aa;
    transition: opacity 0.4s;
    opacity: 0;
    z-index: 31;
    pointer-events: none;
}

.bomb-mult-add {
    animation: bomb-mult-add 0.7s forwards;
}

@keyframes bomb-mult-add {
    0% {
        top: 50%;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        top: 110%;
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.4);
    }
}

@keyframes remove-slot-blur {
    0% {
        filter: blur(0.4vh) brightness(0.9);
    }

    100% {
        filter: blur(0) brightness(1);
    }
}

@keyframes slot-blur {
    0% {
        filter: blur(0) brightness(1);
    }

    100% {
        filter: blur(0.4vh) brightness(0.9);
    }
}

@keyframes bomb-scale {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    35%,
    62.5% {
        transform: translate(-50%, -50%) scale(2.5);
    }

    65% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(10deg);
    }

    70% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(-10deg);
    }

    75% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(10deg);
    }

    80% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(-10deg);
    }

    85% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(10deg);
    }

    90% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(-10deg);
    }

    95% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(10deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5) rotateZ(0deg);
    }
}

@keyframes multiplierPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes boom {
    0% {
        background-image: url("../images/boom/1.webp");
        transform: translate(-50%, -50%) scale(2.5);
    }

    5% {
        background-image: url("../images/boom/2.webp");
        transform: translate(-50%, -50%) scale(2.684);
    }

    10% {
        background-image: url("../images/boom/3.webp");
        transform: translate(-50%, -50%) scale(2.868);
    }

    15% {
        background-image: url("../images/boom/4.webp");
        transform: translate(-50%, -50%) scale(3.052);
    }

    20% {
        background-image: url("../images/boom/5.webp");
        transform: translate(-50%, -50%) scale(3.236);
    }

    25% {
        background-image: url("../images/boom/6.webp");
        transform: translate(-50%, -50%) scale(3.42);
    }

    30% {
        background-image: url("../images/boom/7.webp");
        transform: translate(-50%, -50%) scale(3.604);
    }

    35% {
        background-image: url("../images/boom/8.webp");
        transform: translate(-50%, -50%) scale(3.788);
    }

    40% {
        background-image: url("../images/boom/9.webp");
        transform: translate(-50%, -50%) scale(3.972);
    }

    45% {
        background-image: url("../images/boom/10.webp");
        transform: translate(-50%, -50%) scale(4.156);
    }

    50% {
        background-image: url("../images/boom/11.webp");
        transform: translate(-50%, -50%) scale(4.34);
    }

    55% {
        background-image: url("../images/boom/12.webp");
        transform: translate(-50%, -50%) scale(4.524);
    }

    60% {
        background-image: url("../images/boom/13.webp");
        transform: translate(-50%, -50%) scale(4.708);
    }

    65% {
        background-image: url("../images/boom/14.webp");
        transform: translate(-50%, -50%) scale(4.892);
    }

    70% {
        background-image: url("../images/boom/15.webp");
        transform: translate(-50%, -50%) scale(5.076);
    }

    75% {
        background-image: url("../images/boom/16.webp");
        transform: translate(-50%, -50%) scale(5.26);
        opacity: 1;
    }

    80% {
        background-image: url("../images/boom/17.webp");
        transform: translate(-50%, -50%) scale(5.444);
        opacity: 0.25;
    }

    85% {
        background-image: url("../images/boom/18.webp");
        transform: translate(-50%, -50%) scale(5.628);
        opacity: 0.5;
    }

    90% {
        background-image: url("../images/boom/19.webp");
        transform: translate(-50%, -50%) scale(5.812);
        opacity: 0.75;
    }

    95%,
    100% {
        background-image: url("../images/boom/20.webp");
        transform: translate(-50%, -50%) scale(6);
        opacity: 0;
    }
}

@keyframes splash {
    0% {
        background-image: url("../images/splash/1.webp");
    }

    8.33% {
        background-image: url("../images/splash/2.webp");
    }

    16.66% {
        background-image: url("../images/splash/3.webp");
    }

    25% {
        background-image: url("../images/splash/4.webp");
    }

    33.33% {
        background-image: url("../images/splash/5.webp");
    }

    41.66% {
        background-image: url("../images/splash/6.webp");
    }

    50% {
        background-image: url("../images/splash/7.webp");
    }

    58.33% {
        background-image: url("../images/splash/8.webp");
    }

    66.66% {
        background-image: url("../images/splash/9.webp");
    }

    75% {
        background-image: url("../images/splash/10.webp");
    }

    83.33% {
        background-image: url("../images/splash/11.webp");
    }

    91.66% {
        background-image: url("../images/splash/12.webp");
    }

    100% {
        background-image: url("../images/splash/1.webp");
    }
}

@keyframes button-pointing {
    0%,
    100% {
        transform: translate(-14%, -16%) rotate(-12deg) scale(1);
    }

    50% {
        transform: translate(-14%, -16%) rotate(4deg) scale(1.12);
    }
}

@keyframes scaleDownFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes scaleUpFade {
    0% {
        transform: scale(1.3);
        opacity: 0;
    }

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

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(calc(100vh + 150px)) rotate(360deg);
    }
}

@keyframes scale-pulse {

    0%,
    50%,
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 1vh gold);
    }

    25% {
        transform: translateY(5%) scale(1.05);
        filter: drop-shadow(0 0 3vh gold);
    }

    75% {
        transform: translateY(-5%) scale(1.05);
        filter: drop-shadow(0 0 3vh gold);
    }
}

@keyframes btn-spin {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(0.8) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes finish-pulse {

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

    50% {
        transform: scale(0.9);
    }
}

@media (min-aspect-ratio: 1.5 / 1) {
    .main-content.is-game-ui {
        --game-bottom-bar-max: min(100%, 82vh);
    }

    body.mode-intro .intro-screen__logo {
        width: 44vh;
        margin-top: 6vh;
    }

    body.mode-intro .intro-screen__body {
        gap: 6vh;
        padding-bottom: 4vh;
    }

    body.mode-intro .slot-machine {
        width: 72vh;
    }

    body.mode-intro .slot-machine-background {
        height: 122%;
    }

    body.mode-intro .intro-spin-btn {
        width: 24vh;
    }

    .main-content.is-game-ui .game-side-panel {
        gap: 2.5vh;
    }

    .game-badge {
        width: 23vh;
    }

    .main-content.is-game-ui .slot-machine-wrap {
        margin-top: 3vh;
    }

    .main-content.is-game-ui .slot-machine {
        width: 78vh;
        height: auto;
    }

    .main-content.is-game-ui .slot-machine-background {
        height: 122%;
    }

    .slot-machine-wrap {
        margin-top: 10vh;
    }

    .slot-machine {
        width: 75vh;
        height: auto;
    }

    .main-content.is-game-ui .intro-screen__body {
        gap: 14vh;
        padding: 1vh 4vh 0;
    }

    .main-content.is-game-ui .bottom-bar {
        gap: 2vh 4vh;
        padding: 1.5vh 3vh;
        padding-bottom: calc(1.5vh + env(safe-area-inset-bottom, 0px));
    }

    .main-content.is-game-ui .bottom-bar__stats {
        font-size: 2.8vh;
    }

    .main-content.is-game-ui .panel-win {
        font-size: 3vh;
    }

    #spinButton,
    [data-role="spin"] {
        width: 10.8vh;
    }

    .bet-adjust-btn img {
        width: 6.5vh;
    }

    .menu-btn img {
        height: 6.5vh;
    }

    .end-card__logo {
        width: 54vh;
    }

    .end-card__offer {
        width: 74vh;
    }

    .end-card__amount,
    .big-win-screen__amount {
        font-size: 9.5vh;
    }

    .end-card__spins {
        font-size: 5.8vh;
    }

    .end-card__cta {
        width: 52vh;
    }

    .end-card__cta-label {
        font-size: 5.4vh;
    }

    .game-modal .modal-content {
        width: min(62vw, calc(55vh * 1128 / 831));
    }

    .big-win-screen {
        padding: 2vh 4vh;
    }

    .big-win-screen__panel {
        width: min(68vw, 80vh);
        gap: 2vh;
    }

    .big-win-screen__title {
        width: min(64vw, calc(50vh * 1277 / 313));
    }
}

@media (max-aspect-ratio: 0.7 / 1) {
    .main-content.is-game-ui {
        --game-bottom-bar-max: min(100%, 94vw);
    }

    body {
        background-size: auto 100vh;
    }

    body.mode-game .game-bg-layer,
    body.transitioning-to-game .game-bg-layer {
        background-image: url("../images/background-mobile.webp");
        background-size: cover;
        background-position: center;
    }

    body.mode-intro .intro-screen__logo {
        width: 62vw;
        margin-top: 10vw;
    }

    body.mode-intro .intro-screen__body {
        padding: 2vw 2vw 6vw;
        flex-direction: column;
        justify-content: center;
        gap: 12vw;
    }

    body.mode-intro .slot-machine {
        width: 76vw;
    }

    body.mode-intro .slot-machine-background {
        height: 118%;
    }

    body.mode-intro .intro-spin-btn {
        width: 22vw;
    }

    .end-card__bg {
        background-image: url("../images/end-screen/bg-mobile.webp");
    }

    .main-content.is-game-ui .intro-screen__body {
        flex-direction: column;
        gap: 8vw;
        padding: 1vw 2vw 0;
    }

    .main-content.is-game-ui .game-play-area {
        order: 1;
        width: 100%;
    }

    .main-content.is-game-ui .game-side-panel {
        order: 2;
        flex-direction: row;
        gap: 2.5vw;
        width: 100%;
        justify-content: center;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__frame--desktop {
        display: none;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__frame--mobile {
        display: block;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__frame--desktop {
        display: none;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__frame--mobile {
        display: block;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__copy--green {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        padding: 8% 5% 7%;
        gap: 0.35vw;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__row {
        display: flex;
        width: 100%;
        box-sizing: border-box;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__row--head {
        flex-direction: row;
        align-items: baseline;
        justify-content: center;
        gap: 0.6vw;
        flex: 0 0 auto;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__row--desc {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2vw;
        flex: 1 1 auto;
        min-height: 0;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__switch {
        flex: 0 0 auto;
        width: 62%;
        margin: 0;
    }

    .game-badge {
        width: 34vw;
    }

    .game-badge--orange .game-badge__buy-title {
        font-size: 4.6vw;
    }

    .game-badge--orange .game-badge__buy-sub {
        font-size: 2.8vw;
    }

    .game-badge--orange .game-badge__buy-price {
        font-size: 5.4vw;
    }

    .game-badge--green .game-badge__bet-label {
        font-size: 4.5vw;
    }

    .game-badge--green .game-badge__bet-value {
        font-size: 5vw;
        -webkit-text-stroke: 0.1vh #b7267f;
    }

    .game-badge--green .game-badge__bet-line {
        font-size: 2.35vw;
    }

    .main-content.is-game-ui .game-play-area {
        justify-content: center;
        padding-right: 0;
        width: 100%;
    }

    .main-content.is-game-ui .slot-machine-wrap {
        margin-top: 1vh;
    }

    .main-content.is-game-ui .slot-machine {
        width: 82vw;
        height: auto;
    }

    .main-content.is-game-ui .slot-machine-background {
        height: 118%;
    }

    .game-modal .modal-content {
        width: min(94vw, calc(52vh * 1128 / 831));
    }

    .game-modal__title {
        font-size: 6.5vw;
    }

    .game-modal__lead,
    .game-modal__spins-label {
        font-size: 4.8vw;
    }

    .game-modal__number {
        font-size: 11vw;
    }

    .game-modal__hint {
        font-size: 2.2vw;
    }

    .slot-machine {
        width: 98vw;
        height: 55vw;
    }

    .spacer {
        min-height: 55vw;
    }

    .game-badge--orange .game-badge__copy {
        gap: 0.25vw;
    }

    .main-content.is-game-ui .bottom-bar {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: 2.5vw;
        padding: 2vw 3vw;
        padding-bottom: calc(2.5vw + env(safe-area-inset-bottom, 0px));
    }

    .main-content.is-game-ui .bottom-bar__menu {
        display: none;
    }

    .main-content.is-game-ui .bottom-bar__stats {
        order: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        font-size: 3.2vw;
        gap: 2vw;
    }

    .main-content.is-game-ui .bottom-bar__stat {
        flex: 1;
        justify-content: center;
    }

    .main-content.is-game-ui .panel-win {
        order: 2;
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 0;
        font-size: 3.6vw;
        padding: 0;
        text-align: center;
    }

    .main-content.is-game-ui .panel-win [data-role="spin_hint"],
    .main-content.is-game-ui .panel-win [data-role="win_panel"] {
        position: static;
        transform: none;
        width: auto;
    }

    .main-content.is-game-ui .bottom-bar__spin-row {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .main-content.is-game-ui .panel-buttons {
        justify-content: center;
        gap: 2vw;
    }

    .bottom-bar__toolbar-slot {
        width: 12vw;
        height: 12vw;
    }

    #spinButton,
    [data-role="spin"] {
        width: 15vw;
    }

    .bet-adjust-btn img {
        width: 11vw;
    }

    .menu-btn img {
        height: 11vw;
    }

    .end-card__inner {
        gap: 4vw;
        padding: 4vw 3vw;
        padding-top: calc(4vw + env(safe-area-inset-top, 0px));
        padding-bottom: calc(4vw + env(safe-area-inset-bottom, 0px));
    }

    .end-card__logo {
        width: 72vw;
    }

    .end-card__offer {
        width: 88vw;
    }

    .end-card__amount,
    .big-win-screen__amount {
        font-size: 11vw;
    }

    .end-card__spins {
        font-size: 6.8vw;
    }

    .end-card__cta {
        width: 72vw;
    }

    .end-card__cta-label {
        font-size: 6.5vw;
    }

    @keyframes remove-slot-blur {
        0% {
            filter: blur(0.3vw) brightness(0.9);
        }

        100% {
            filter: blur(0) brightness(1);
        }
    }

    @keyframes slot-blur {
        0% {
            filter: blur(0) brightness(1);
        }

        100% {
            filter: blur(0.3vw) brightness(0.9);
        }
    }

    .big-win-screen {
        padding: max(1.5vh, env(safe-area-inset-top, 0px)) 3vw max(2vh, env(safe-area-inset-bottom, 0px)) 3vw;
    }

    .big-win-screen__panel {
        width: min(94vw, 54vh);
        gap: 2.5vw;
    }

    .big-win-screen__title {
        width: min(94vw, calc(48vh * 1277 / 313));
    }
}

@media (max-aspect-ratio: 1.35 / 1) and (min-aspect-ratio: 0.7 / 1) {
    .main-content.is-game-ui {
        --game-bottom-bar-max: min(88vw, 54vh);
    }

    .mode-intro .intro-screen__body {
        flex-direction: column;
    }

    .mode-intro .slot-machine-background {
        max-width: 90vw;
    }

    .main-content.is-game-ui {
        max-width: 100vw;
        overflow-x: hidden;
        overflow-y: visible;
        box-sizing: border-box;
    }

    .main-content.is-game-ui .intro-screen {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .main-content.is-game-ui .intro-screen__body {
        flex: 1 1 0;
        min-height: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: min(2vh, 3vw);
        width: 100%;
        max-width: 100vw;
        padding: 0.5vh 3vw 0.5vh;
        box-sizing: border-box;
        overflow: visible;
    }

    .main-content.is-game-ui .game-play-area {
        order: 1;
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: visible;
    }

    .main-content.is-game-ui .slot-machine-wrap {
        margin-top: 0;
        width: 100%;
        max-width: min(88vw, 54vh);
        flex-shrink: 1;
        min-height: 0;
    }

    .main-content.is-game-ui .slot-machine-wrap .logo {
        top: -12%;
        width: 46%;
    }

    .main-content.is-game-ui .slot-machine {
        --col-slot-w: min(82vw, 48vh);
        width: var(--col-slot-w);
        height: calc(var(--col-slot-w) * 844 / 1074);
        max-width: 100%;
        max-height: 42vh;
    }

    .main-content.is-game-ui .slot-machine-background {
        height: 114%;
    }

    .main-content.is-game-ui .spacer {
        min-height: 0;
        height: 100%;
    }

    .main-content.is-game-ui .game-side-panel {
        order: 2;
        flex: 0 0 auto;
        flex-shrink: 0;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2.5vw;
        width: 100%;
        max-width: min(88vw, 54vh);
        box-sizing: border-box;
    }

    .main-content.is-game-ui .game-badge--orange,
    .main-content.is-game-ui .game-badge--green {
        flex: 0 0 19vw;
        width: 19vw;
        max-width: 19vw;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__frame--desktop {
        display: none;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__frame--mobile {
        display: block;
        width: 100%;
        height: auto;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__frame--desktop {
        display: none;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__frame--mobile {
        display: block;
        width: 100%;
        height: auto;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__copy {
        padding: 10% 8% 11%;
        gap: 0.12vw;
        justify-content: center;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__buy-title {
        font-size: 3vw;
        -webkit-text-stroke: 0.14vw #e85a00;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__buy-sub {
        font-size: 2.5vw;
        margin-top: 0.1vw;
        -webkit-text-stroke: 0.1vw #e85a00;
    }

    .main-content.is-game-ui .game-badge--orange .game-badge__buy-price {
        font-size: 3vw;
        margin-top: 0.2vw;
        -webkit-text-stroke: 0.14vw #b7267f;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__copy--green {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        padding: 8% 5% 7%;
        gap: 0.2vw;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__row {
        display: flex;
        width: 100%;
        box-sizing: border-box;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__row--head {
        flex-direction: row;
        align-items: baseline;
        justify-content: center;
        gap: 0.35vw;
        flex: 0 0 auto;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__row--desc {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.1vw;
        flex: 1 1 auto;
        min-height: 0;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__bet-label {
        font-size: 3vw;
        line-height: 1;
        margin: 0;
        -webkit-text-stroke: 0.1vw #326b10;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__bet-value {
        font-size: 3.2vw;
        margin: 0;
        line-height: 1;
        -webkit-text-stroke: 0.11vw #000000;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__bet-line {
        font-size: 1.4vw;
        line-height: 1.05;
        max-width: 100%;
        margin: 0;
        -webkit-text-stroke: 0.08vw #326b10;
    }

    .main-content.is-game-ui .game-badge--green .game-badge__switch {
        flex: 0 0 auto;
        width: 40%;
        margin: 0;
    }

    .main-content.is-game-ui .bottom-bar {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        flex-shrink: 0;
        gap: min(1.5vh, 2vw);
        padding: 1.5vw 3vw;
        padding-bottom: calc(1.5vw + env(safe-area-inset-bottom, 0px));
    }

    .main-content.is-game-ui .bottom-bar__menu {
        display: none;
    }

    .main-content.is-game-ui .bottom-bar__stats {
        order: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        font-size: min(2.8vw, 1.5vh);
        gap: 1.5vw;
    }

    .main-content.is-game-ui .bottom-bar__stat {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .main-content.is-game-ui .panel-win {
        order: 2;
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 0;
        font-size: min(3.2vw, 1.7vh);
        padding: 0;
        text-align: center;
    }

    .main-content.is-game-ui .panel-win [data-role="spin_hint"],
    .main-content.is-game-ui .panel-win [data-role="win_panel"] {
        position: static;
        transform: none;
        width: auto;
    }

    .main-content.is-game-ui .bottom-bar__spin-row {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .main-content.is-game-ui .panel-buttons {
        justify-content: center;
        gap: 1.5vw;
    }

    .main-content.is-game-ui [data-role="spin"] {
        width: min(16vw, 10vh);
    }

    .main-content.is-game-ui .bet-adjust-btn img {
        width: min(10vw, 7vh);
    }

    .game-modal .modal-content {
        width: min(72vw, calc(58vh * 1128 / 831));
    }

    .game-modal__title {
        font-size: 4.2vw;
    }

    .game-modal__lead,
    .game-modal__spins-label {
        font-size: 3.2vw;
    }

    .game-modal__number {
        font-size: 7.5vw;
    }

    .game-modal__hint {
        font-size: 1.8vw;
    }

    .big-win-screen {
        padding: max(1.5vh, env(safe-area-inset-top, 0px)) 2.5vw max(2vh, env(safe-area-inset-bottom, 0px)) 2.5vw;
    }

    .big-win-screen__panel {
        width: min(78vw, 56vh);
        gap: 2vw;
    }

    .big-win-screen__title {
        width: min(76vw, calc(46vh * 1277 / 313));
    }
}

/* Taller screens in column range (closer to 0.7) */
@media (max-aspect-ratio: 0.95 / 1) and (min-aspect-ratio: 0.7 / 1) {
    .main-content.is-game-ui .slot-machine {
        --col-slot-w: min(78vw, 44vh);
        width: var(--col-slot-w);
        height: calc(var(--col-slot-w) * 844 / 1074);
        max-height: 38vh;
    }

    .main-content.is-game-ui {
        --game-bottom-bar-max: min(84vw, 50vh);
    }

    .main-content.is-game-ui .slot-machine-wrap,
    .main-content.is-game-ui .game-side-panel {
        max-width: min(84vw, 50vh);
    }

    .main-content.is-game-ui .intro-screen__body {
        gap: min(1.5vh, 2.5vw);
    }
}

@media (max-aspect-ratio: 0.5 / 1) {
    body.mode-intro .intro-screen__logo {
        width: 62vw;
        margin-top: 4vw;
    }

    body.mode-intro .intro-screen__body {
        gap: 10vw;
        padding-bottom: 5vw;
    }

    body.mode-intro .slot-machine {
        width: 82vw;
    }

    body.mode-intro .intro-spin-btn {
        width: 24vw;
    }

    .game-badge {
        width: 36vw;
    }

    .main-content.is-game-ui .intro-screen__body {
        gap: 9vw;
    }

    .main-content.is-game-ui .slot-machine {
        width: 86vw;
        height: auto;
    }

    .main-content.is-game-ui .bottom-bar {
        gap: 2vw;
        padding: 1.5vw 2.5vw;
        padding-bottom: calc(2vw + env(safe-area-inset-bottom, 0px));
    }

    .main-content.is-game-ui .panel-win {
        font-size: 5.5vw;
    }

    .main-content.is-game-ui .bottom-bar__stats {
        font-size: 5vw;
    }

    .bottom-bar__toolbar-slot {
        width: 13vw;
        height: 13vw;
    }

    .game-modal__inner {
        gap: 1vw;
    }

    .game-modal .modal-content {
        width: min(96vw, calc(48vh * 1128 / 831));
    }

    .game-modal__title {
        font-size: 7vw;
    }

    .game-modal__lead,
    .game-modal__spins-label {
        font-size: 5.2vw;
    }

    .game-modal__number {
        font-size: 8vw;
    }

    .game-modal__hint {
        font-size: 3.4vw;
    }

    .big-win-screen {
        padding: max(1.2vh, env(safe-area-inset-top, 0px)) 2vw max(1.5vh, env(safe-area-inset-bottom, 0px)) 2vw;
    }

    .big-win-screen__panel {
        width: 80vw;
        gap: 3vw;
    }

    .big-win-screen__title {
        width: 80vw;
    }

    .end-card__amount,
    .big-win-screen__amount {
        font-size: 12vw;
    }

    .end-card__inner {
        gap: 3vw;
    }

    .end-card__logo {
        width: 78vw;
    }

    .end-card__offer {
        width: 92vw;
    }

    .end-card__spins {
        font-size: 7.2vw;
    }

    .end-card__cta {
        width: 76vw;
    }
}

/* 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: #12082a;
    background-image: url(../images/background.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(38vh, 70vw);
    margin: auto 0;
}

.loading-screen__bottom {
    width: min(80vw, 40vh);
    padding-bottom: 6vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vh;
}

.loading-screen__text {
    margin: 0;
    color: #fff;
    font-family: "FatFrank", system-ui, sans-serif;
    font-size: 2vh;
    letter-spacing: 0.25em;
    text-indent: 0.25em;
}

.loading-screen__bar {
    width: 100%;
    height: 0.8vh;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1vh;
    overflow: hidden;
}

.loading-screen__bar-fill {
    height: 100%;
    width: 0%;
    background: #ff9f1a;
    border-radius: 1vh;
    transition: width 0.2s linear;
}