html{
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100vw;
    height: 100%;
    min-height: 100dvh;
}

body{
    margin: 0;
    min-height: 100dvh;
    height: 100%;
    font-family: "Staatliches", sans-serif;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

#container{
    max-width: 500px;
    margin: 0 auto;
    min-height: 100%;
}

section.content {
    position: relative;
    z-index: 1;
}

.bg-gradient {
    background: linear-gradient(
        182deg, #00DCFF 0%, #FF1C9E 97.25%);
}
.logo-header{
    margin-right: auto;
    margin-left: auto;
    left: 0;
    right: 0;
    z-index: 2;
    /* final visual position: 30% from top of screen */
    top: 30%;
    /* start hidden above the screen - will be animated */
    transform: translateY(-110vh);
    transform-origin: center center;
}
/* first step*/
.first-step{
    position: relative;
    min-height: 100dvh;
    height: 100%;
    overflow: hidden;
}

.absolute-image{
    position: absolute;
}
.first-step-image{
    top:0;
    transform-origin: center center;
    /* start hidden above the screen */
    transform: translateY(-110vh) scale(1);
    opacity: 0;
    transition: opacity 1s ease;
}
.first-step.animate .first-step-image {
    opacity: 1;
    animation: first-step-image-fall 2.6s cubic-bezier(0.4, 0, 0.2, 1) forwards,
               first-step-image-shake 1.5s cubic-bezier(0.45, 0, 0.55, 1) forwards;
    animation-delay: 0s, 2.6s;
}
/* Different fall speeds; shake starts when each image's fall ends */
.first-step.animate .banana-image {
    animation-duration: 2.34s, 1.5s;
    animation-delay: 0.13s, 2.47s;
}
.first-step.animate .bear-image {
    animation-duration: 2.86s, 1.5s;
    animation-delay: 0s, 2.86s;
}
.first-step.animate .blue-image {
    animation-duration: 3.12s, 1.5s;
    animation-delay: 0.195s, 3.315s;
}
.first-step.animate .heart-image {
    animation-duration: 2.47s, 1.5s;
    animation-delay: 0.065s, 2.535s;
}
.first-step.animate .sliva-image {
    animation-duration: 2.99s, 1.5s;
    animation-delay: 0.26s, 3.25s;
}
.first-step.animate .vino-image {
    animation-duration: 2.73s, 1.5s;
    animation-delay: 0.104s, 2.834s;
}
.first-step.animate .square-image {
    animation-duration: 2.21s, 1.5s;
    animation-delay: 0.156s, 2.366s;
}
.first-step.animate .lolipop-image {
    animation-duration: 3.25s, 1.5s;
    animation-delay: 0.325s, 3.575s;
}

@keyframes first-step-image-fall {
    0% {
        transform: translateY(-110vh) scale(1);
    }
    60% {
        transform: translateY(80vh) scale(1.03);
    }
    100% {
        transform: translateY(90vh) scale(1.05);
    }
}

@keyframes first-step-image-shake {
    0% {
        transform: translateY(90vh) scale(1.05);
    }
    5% {
        transform: translateY(90.35vh) scale(1.052);
    }
    10% {
        transform: translateY(90.7vh) scale(1.055);
    }
    15% {
        transform: translateY(91.1vh) scale(1.058);
    }
    20% {
        transform: translateY(91.5vh) scale(1.062);
    }
    25% {
        transform: translateY(92vh) scale(1.065);
    }
    30% {
        transform: translateY(91.5vh) scale(1.068);
    }
    35% {
        transform: translateY(90.7vh) scale(1.07);
    }
    40% {
        transform: translateY(89.7vh) scale(1.072);
    }
    45% {
        transform: translateY(88.5vh) scale(1.075);
    }
    50% {
        transform: translateY(87.5vh) scale(1.078);
    }
    55% {
        transform: translateY(87.5vh) scale(1.08);
    }
    60% {
        transform: translateY(87.9vh) scale(1.082);
    }
    65% {
        transform: translateY(88.5vh) scale(1.084);
    }
    70% {
        transform: translateY(89vh) scale(1.086);
    }
    75% {
        transform: translateY(89.4vh) scale(1.088);
    }
    80% {
        transform: translateY(89.7vh) scale(1.09);
    }
    85% {
        transform: translateY(89.9vh) scale(1.092);
    }
    90% {
        transform: translateY(90vh) scale(1.095);
    }
    95% {
        transform: translateY(90vh) scale(1.098);
    }
    100% {
        transform: translateY(90vh) scale(1.1);
    }
}
.banana-image{
    right: -12%;
    top: 6%;
    z-index: 1;
}
.bear-image{
    right: 0%;
    z-index: 2;
    top: 15%;
}
.blue-image{
    right: -13%;
    z-index: 1;
    top: 16%;
}
.heart-image{
    left: 1%;
    z-index: 0;
    top: 9%;
}
.sliva-image{
    left: -7%;
    z-index: 11;
    top: 20%;
}
.vino-image{
    left: 39%;
    z-index: -1;
    top: 17%;
}
.square-image{
    left: -20%;
    z-index: 1;
    top: 7%;
}
.lolipop-image{
    left: 0;
}
.logo-header {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
}
.first-step.animate .logo-header {
    opacity: 1;
    visibility: visible;
    animation: logo-header-fall 3s cubic-bezier(0.4, 0, 0.2, 1) forwards,
               logo-header-shake 1.5s cubic-bezier(0.45, 0, 0.55, 1) forwards;
    animation-delay: 0.3s, 3.3s;
}

@keyframes logo-header-fall {
    0% {
        transform: translateY(-110vh) scale(1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes logo-header-shake {
    0% {
        transform: translateY(0) scale(1);
    }
    5% {
        transform: translateY(0.35vh) scale(1.02);
    }
    10% {
        transform: translateY(0.7vh) scale(1.035);
    }
    15% {
        transform: translateY(1.1vh) scale(1.048);
    }
    20% {
        transform: translateY(1.5vh) scale(1.062);
    }
    25% {
        transform: translateY(2vh) scale(1.065);
    }
    30% {
        transform: translateY(1.5vh) scale(1.068);
    }
    35% {
        transform: translateY(0.7vh) scale(1.07);
    }
    40% {
        transform: translateY(-0.3vh) scale(1.072);
    }
    45% {
        transform: translateY(-1.2vh) scale(1.075);
    }
    50% {
        transform: translateY(-2.2vh) scale(1.078);
    }
    55% {
        transform: translateY(-2.5vh) scale(1.08);
    }
    60% {
        transform: translateY(-2.1vh) scale(1.082);
    }
    65% {
        transform: translateY(-1.5vh) scale(1.084);
    }
    70% {
        transform: translateY(-0.9vh) scale(1.086);
    }
    75% {
        transform: translateY(-0.4vh) scale(1.088);
    }
    80% {
        transform: translateY(-0.1vh) scale(1.09);
    }
    85% {
        transform: translateY(0.05vh) scale(1.092);
    }
    90% {
        transform: translateY(0) scale(1.095);
    }
    95% {
        transform: translateY(0) scale(1.098);
    }
    100% {
        transform: translateY(0) scale(1.1);
    }
}
.first-step.fade-out .logo-header,
.first-step.fade-out .first-step-image {
    opacity: 0;
    transition: opacity 1s ease;
}

@keyframes pulse-tap-icon {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
.tap-icon{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99;
    width: 360px;
    animation: pulse-tap-icon 1.6s ease-in-out infinite;
}
.tap-icon-text{
    font-size: 7.58vh;
    line-height: 8.29vh;
    font-family: "Staatliches", sans-serif;
    margin-top: 1vh;
    color:#fff;
}
.second-step {
    display: none;
    position: relative;
    background: center/cover no-repeat url('../img/second-step/back-game.png');
    height: calc(100dvh - 28px);
}
.second-step.visible {
    display: block;
}
/* Before big win moves to center: hide grid and step background */
.second-step.big-win-center-phase {
    background: none;
}
.second-step.big-win-center-phase .slot-grid-wrapper {
    transition: opacity 0.5s ease;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
.second-step,
.third-step{
    padding-top: 28px;
}
.find-bonus{
    margin-bottom: 25px;
}
.slot-grid-wrapper {
    --grid-line: 14px; /* border line thickness */
    position: relative;
    z-index: 0;
    width: 320px;
    height: 340px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 6px;
    padding-top: 32px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(150px);
    -webkit-backdrop-filter: blur(150px); 
}
.slot-grid-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    pointer-events: none;
    /* horizontal borders (top & bottom) using same frame as button */
    background-image:
        url('../img/second-step/button-frame.png'),
        url('../img/second-step/button-frame.png');
    background-size:
        auto var(--grid-line),
        auto var(--grid-line);
    background-repeat: repeat-x, repeat-x;
    background-position: top left, bottom left;
    z-index: 1;
}
.slot-grid-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    pointer-events: none;
    /* vertical borders (left & right) using vertical frame */
    background-image:
        url('../img/second-step/button-frame-v.png'),
        url('../img/second-step/button-frame-v.png');
    background-size:
        var(--grid-line) auto,
        var(--grid-line) auto;
    background-repeat: repeat-y, repeat-y;
    background-position: left top, right top;
    z-index: 1;
}
.static-bonus-amount-wrapper{
    position: absolute;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    margin-top: 20px;
    z-index: 2;
    font-size: 24px;


}
.static-bonus-amount-wrapper.hidden {
    display: none;
}
.static-bonus-amount {
    display: none;
    position: relative;
    z-index: 2;
}
.static-bonus-amount:before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(245, 220, 131, 0.12);
    border-radius: 16px;
    filter: blur(27px);
    pointer-events: none;
    z-index: -1;
}
.static-bonus-amount .bonus-amount-number {
    padding-right: 6px;
    position: relative;
    z-index: 1;
}
.static-bonus-amount.visible {
    display: block;
}
.static-bonus-amount-wrapper-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto 0;
    background: center/cover no-repeat url('../img/second-step/bonus-heart.png');
    width: 62px;
    height: 62px;
    align-items: center;
    color: #fff;
    font-size: 16px;
    text-align: center;
}
.slot-grid {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    margin-left: 11px;
}
.explosion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    pointer-events: none;
    z-index: 10;
}
.slot-cell {
    position: absolute;
    width: 46px;
    height: 60px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transform: translate(var(--tx, 0px), var(--ty, 0px));
    transition: transform 0.6s ease, opacity 0.4s ease;
    transition-delay: var(--slot-delay, 0ms);
    will-change: transform, opacity;
}
.explosion-overlay .explosion-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.explosion-overlay .explosion-container svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.explosion-overlay .fire-frame-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.explosion-overlay .fire-frame-container svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bonus-amount {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    margin-right: auto;
    margin-left: auto;
    display: flex;
    background: center/cover no-repeat url('../img/second-step/bonus-heart.png');
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    font-size: 40px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    transform: scale(1);
}
.bonus-amount-number {
    padding-right: 6px;
    position: relative;
    z-index: 1;
}
.bonus-amount.visible {
    opacity: 1;
    pointer-events: auto;
    transform-origin: center center;
    animation: bonus-amount-wiggle-out 2s ease-in-out forwards;
}
.bonus-amount.big-win.visible {
    animation: bonus-amount-wiggle-out-big 2s ease-in-out infinite;
}
@keyframes bonus-amount-wiggle-out {
    0% {
        transform: scale(1) rotate(0deg);
    }
    15% {
        transform: scale(1.2) rotate(-10deg);
    }
    30% {
        transform: scale(1.2) rotate(10deg);
    }
    45% {
        transform: scale(1.2) rotate(-10deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    75% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}
@keyframes bonus-amount-wiggle-out-big {
    0% {
        transform: scale(1.1) rotate(0deg);
    }
    15% {
        transform: scale(1) rotate(-10deg);
    }
    30% {
        transform: scale(1.2) rotate(10deg);
    }
    45% {
        transform: scale(1) rotate(-10deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    75% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.1) rotate(0deg);
    }
}
.bonus-amount.big-win {
    background: center/cover no-repeat url('../img/second-step/big-win.png');
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
}
.bonus-amount .bonus-amount-text {
    position: relative;
    z-index: 1;
}

/* Big win center stage: fullscreen overlay for "big win to center + confetti" */
.big-win-center-stage {
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.big-win-center-stage .big-win-confetti-container {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
@keyframes big-win-box-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
@keyframes big-win-text-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* At bottom before smooth move to center (margins center 200x200, no transform so size stays correct) */
.bonus-amount.big-win-center-ready {
    position: fixed;
    left: 50%;
    top: 85%;
    margin-left: -100px;
    margin-top: -100px;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    transform-origin: center center;
    animation: big-win-box-pulse 1.5s ease-in-out infinite;
}
.bonus-amount.big-win-center-ready .bonus-amount-text {
    transform-origin: center center;
    animation: big-win-text-pulse 1.2s ease-in-out infinite;
}
/* Smooth transition to center (after slot-grid-wrapper transition ends) */
.bonus-amount.big-win-center {
    position: fixed;
    left: 50%;
    top: 50%;
    margin-left: -100px;
    margin-top: -100px;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    transition: top 0.7s ease-out;
    transform-origin: center center;
    animation: big-win-box-pulse 1.5s ease-in-out infinite;
}
.bonus-amount.big-win-center .bonus-amount-text {
    transform-origin: center center;
    animation: big-win-text-pulse 1.2s ease-in-out infinite;
}

.tap-to-spin, .button-bonus {
    --btn-line: 10px; /* line thickness – match your image */
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    margin-left:auto;
    margin-right:auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color:#EB0427;
    font-size: 40px;
    animation: pulse-button 1.6s ease-in-out infinite;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.5s ease;
    text-decoration: none;
    max-width: 345px;
    min-height: 100px;
    border-radius: 12px;
    box-sizing: border-box;
    padding: var(--btn-line);
    /* Horizontal borders: line image keeps proportions (height fixed, repeat-x) */
    background-image:
        url('../img/second-step/button-frame.png'),
        url('../img/second-step/button-frame.png'),
        linear-gradient(#fff, #fff);
    background-size: auto var(--btn-line), auto var(--btn-line), 100% 94%;
    background-repeat: repeat-x, repeat-x, no-repeat;
    background-position: top left, bottom left, center;
}
/* Vertical borders: button-frame-v.png (no rotation) */
.tap-to-spin::before,
.button-bonus::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: var(--btn-line);
    height: 100%;
    background: url('../img/second-step/button-frame-v.png') repeat-y left top;
    background-size: var(--btn-line) auto;
    z-index: 0;
    pointer-events: none;
}
.tap-to-spin::after,
.button-bonus::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 0;
    width: var(--btn-line);
    height: 100%;
    background: url('../img/second-step/button-frame-v.png') repeat-y right top;
    background-size: var(--btn-line) auto;
    z-index: -1;
    pointer-events: none;
}
/* Keep content above border; do not give button-inner-1/2 position:relative or their corner pseudos break */
.tap-to-spin > *:not(.button-inner-1):not(.button-inner-2),
.button-bonus > *:not(.button-inner-1):not(.button-inner-2) {
    position: relative;
    z-index: 1;
}
.tap-to-spin .tap-to-spin-text {
    transition: opacity 0.3s ease, color 0.3s ease;
    margin-right: 10px;
    margin-left: -10px;
}
.tap-to-spin.spinning .tap-to-spin-text {
    opacity: 0.6;
}
.tap-to-spin.spinning .count-spins-left-number {
    background-image: url('../img/second-step/broken-heart.png');
    color: transparent;
    text-indent: -9999px;
    overflow: hidden;
}
/* After click: button-inner corners scale 1 → 1.5 and repeat */
.tap-to-spin.spinning .button-inner-1::before,
.tap-to-spin.spinning .button-inner-2::before {
    animation: button-inner-corner-pulse 0.8s ease-in-out infinite;
}
.tap-to-spin.spinning .button-inner-1::after,
.tap-to-spin.spinning .button-inner-2::after {
    animation: button-inner-corner-pulse-rotated 0.8s ease-in-out infinite;
}
@keyframes button-inner-corner-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.5); }
}
@keyframes button-inner-corner-pulse-rotated {
    0%, 100% { transform: rotate(180deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.5); }
}
.tap-to-spin.hidden {
    opacity: 0;
    pointer-events: none;
}
.button-description{
    font-size: 8px;
    margin-top: 60px;
    z-index: 2;
    position: relative;
}
@keyframes pulse-button{
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.button-inner-1:before,
.button-inner-1:after,
.button-inner-2:before,
.button-inner-2:after{
    position: absolute;
    content: '';
    width: 44px;
    height: 44px;
    display: block;
}
.button-inner-1:before,
.button-inner-2:after {
    background: center/cover no-repeat url('../img/second-step/top-left.png')
}
.button-inner-1:after,
.button-inner-2:before {
    background: center/cover no-repeat url('../img/second-step/bottom-left.png')
}
.button-inner-1:before{
    top: -16px;
    left: -15px;
}
.button-inner-1:after{
    top: -16px;
    right: -15px;
    transform:rotate(180deg);
}
.button-inner-2:before{
    bottom: -12px;
    left: -14px;
}
.button-inner-2:after{
    bottom: -11px;
    right: -16px;
    transform:rotate(180deg);
}
.footer{
    position: relative;
    margin-top: 122px;
}
.second-step .footer::before {
    content: '';
    display: block;
    height: 85px;
}

.slot-grid-inner-1:before,
.slot-grid-inner-1:after,
.slot-grid-inner-2:before,
.slot-grid-inner-2:after{
    position: absolute;
    content: '';
    z-index: 2;
    width: 40px;
    height: 40px;
    display: block;
}
.slot-grid-inner-1:before,
.slot-grid-inner-2:after {
    background: center/cover no-repeat url('../img/second-step/top-left.png')
}
.slot-grid-inner-1:after,
.slot-grid-inner-2:before {
    background: center/cover no-repeat url('../img/second-step/bottom-left.png')
}
.slot-grid-inner-1:before{
    top: -16px;
    left: -15px;
}
.slot-grid-inner-1:after{
    top: -16px;
    right: -15px;
    transform:rotate(180deg);
}
.slot-grid-inner-2:before{
    bottom: -12px;
    left: -14px;
}
.slot-grid-inner-2:after{
    bottom: -11px;
    right: -16px;
    transform:rotate(180deg);
}


.count-spins-left-number{
    font-size: 20px;
    width: 42px;
    height: 42px;
    background: center/contain no-repeat url('../img/second-step/spins-left.png');
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.third-step {
    display: none;
    position: relative;
    z-index: 100;
    min-height: 100dvh;
}
.third-step-confetti {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}
.third-step::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    background: center bottom / contain no-repeat url('../img/third-step/third-bottom.png');
    z-index: -1;
    pointer-events: none;
}
/* Column: from off-screen bottom to final position, then stays */
@keyframes third-step-column-enter {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Summary: enter to translateY(125%), hold 0.5s, then move to translateY(0%) */
@keyframes third-step-summary-enter {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    37.5% {
        opacity: 1;
        transform: translateY(125%);
    }
    68.75% {
        opacity: 1;
        transform: translateY(125%);
    }
    100% {
        opacity: 1;
        transform: translateY(0%);
    }
}
.third-step-summary {
    text-align: center;
    margin: 24px 0 16px;
    color: #fff;
    z-index: 2;
    position: relative;
}
.third-step:not(.third-step-static) .third-step-summary {
    animation: third-step-summary-enter 1.6s ease-out forwards;
}
.third-step-reward-line {
    font-size: 88px;
    font-weight: bold;
    margin-bottom: -10px;
    text-shadow: 2px 2px 0 #FF1D9F;
}
.third-step-free-spins-line {
    font-size: 41px;
    opacity: 1;
    text-shadow: 2px 2px 0 #FF1D9F; 
}
.third-step .footer {
    position: relative;
    z-index: 200;
    margin-top: 70px;
    min-height: 85px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.third-step .footer.footer-visible {
    opacity: 1;
}
.third-step .column-3-wrapper {
    position: absolute;
    z-index: 0;
    overflow: hidden;
    width: 100%;
    height: 40vh;
    bottom: 0;
    animation: third-step-column-enter 0.6s ease-out forwards;
}
.third-step .button-description {
    font-size: 7px;
    z-index: 2;
    position: absolute;
    bottom: 35px;
    width: 88%;
    left: 0;
    right: 0;
    margin: auto;
}
/* Fullscreen money-rain Lottie on third step – below button (z-index 200) so button stays clickable */
.money-rain-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.money-rain-overlay svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== ADAPTIVE: short height & landscape ==================== */
/* iPhone SE (667px), small phones, or when user zooms */
@media (max-height: 700px) {
    .second-step,
    .third-step {
        padding-top: 14px;
    }
    .find-bonus {
        margin-bottom: 12px;
        max-height: 40px;
        width: auto;
        object-fit: contain;
    }
    .slot-grid-wrapper {
        margin-left: auto;
        margin-right: auto;
        padding-top: 16px;
    }
    .static-bonus-amount-wrapper {
        margin-top: 10px;
    }
    .footer {
        margin-top: 40px;
    }
    .second-step .footer::before {
        height: 50px;
    }
    .tap-to-spin, .button-bonus {
        min-height: 65px;
        font-size: 32px;
    }
    .bonus-amount {
        font-size: 32px;
        top: -18px;
    }
    .static-bonus-amount {
        font-size: 26px;
    }
    .button-description {
        font-size: 7px;
        margin-top: 40px;
    }
    .third-step .footer {
        margin-top: 40px;
    }
    .third-step-reward-line {
        font-size: 64px;
    }
    .third-step-free-spins-line {
        font-size: 32px;
    }
    .third-step .button-description {
        bottom: 24px;
    }
    .third-step .column-3-wrapper {
        height: 32vh;
    }
}

/* Very short viewport: scale only game steps (2 & 3), keep first step full screen */
@media (max-height: 600px) {
    body {
        overflow-y: hidden;
    }
    #container {
        height: 100dvh;
        overflow: hidden;
    }
    .second-step.visible,
    .third-step {
        transform: scale(0.88);
        transform-origin: top center;
        min-height: calc(100dvh / 0.88);
        height: calc(100dvh / 0.88);
    }
}

/* Landscape: logo fits in short viewport height */
@media (orientation: landscape) {
    .first-step .logo-header {
        max-width: 85vw;
        max-height: 35vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

/* Landscape + small height: first step fills screen; scale only game steps */
@media (orientation: landscape) and (max-height: 500px) {
    body {
        overflow-y: hidden;
    }
    #container {
        height: 100dvh;
        overflow: hidden;
    }
    .first-step .logo-header {
        max-height: 28vh;
    }
    .tap-to-spin {
        max-width: 290px;
    }
    .second-step.visible,
    .third-step {
        transform: scale(0.65);
        transform-origin: top center;
        min-height: calc(100dvh / 0.65);
        height: calc(100dvh / 0.65);
    }
}