@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@700;800;900&display=swap');
html, body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

#feature-preview-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    transition: opacity 1.2s ease, transform 1.2s ease;
    overflow-x: hidden;
}

.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

#background-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.particles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    z-index: 0;
    filter: brightness(0.85);
    animation: parallaxZoom 20s ease-in-out infinite;
}

.landscape-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
}

.portrait-bg {
    display: none;
}

#fps-wrapper {
    display: grid;
    place-items: center;
    justify-content: center;
    grid-template-areas:
        "logo logo logo"
        "feature-block1 feature-block2 feature-block3"
        "feature-desc1 feature-desc2 feature-desc3"
        "start-button start-button start-button";
    grid-template-rows: 23dvh 1fr 10dvh 15dvh;
    grid-template-columns: 26dvw 30dvw 26dvw;
    height: 100%;
    box-sizing: border-box;
    padding: 0 6%;
    column-gap: 2dvw;
    width: 100%;
    max-width: 100%;
}

#logo-placeholder {
    position: absolute;
    grid-area: logo;
    top: 0;
    margin-top: 1.5vh;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

.logo-image {
    height: 18dvh;
    display: block;
    opacity: 0;
    margin-bottom: 3dvh;
    animation:
            logoFadeIn 1.2s ease-out 0.5s forwards,
            logoShadowPulse 4s ease-in-out infinite 2s;
    filter:
            drop-shadow(0 0 8px rgba(10, 2, 25, 0.5))
            drop-shadow(0 0 16px rgba(10, 2, 25, 0.3));
    transition: transform 0.3s ease;
    will-change: transform, filter;
}

@keyframes logoShadowPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(10, 2, 25, 0.5)) drop-shadow(0 0 16px rgba(10, 2, 25, 0.3)); }
    50% { filter: drop-shadow(0 0 12px rgba(10, 2, 25, 0.6)) drop-shadow(0 0 24px rgba(10, 2, 25, 0.4)); }
}

#feature-block1 { grid-area: feature-block1; }
#feature-block2 {
    grid-area: feature-block2;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1.6 / 1;
    max-height: 45vh;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
#feature-block2 .feature-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ========================================= */
/* SLOT PREVIEW — ORIGINAL SIZE              */
/* ========================================= */

.slot-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1083 / 662;
    overflow: visible;
    transform: scale(0.82);
    transform-origin: center;
    animation: slot-machine-cycle 3s linear infinite;
    will-change: transform, filter;
}

/* Original slot image */
#feature-block2 .slot-machine-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: none;
}

/* ========================================= */
/* SCATTERS — FIVE REELS                     */
/* ========================================= */

/* ========================================= */
/* SLOT — ORIGINAL SIZE                      */
/* ========================================= */

.slot-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1083 / 662;
    overflow: visible;
    transform: scale(0.82);
    transform-origin: center;
    animation: slot-machine-cycle 3s linear infinite;
    will-change: transform, filter;
}

#feature-block2 .slot-machine-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: none;
}

/* ORIGINAL SLOT SIZE */
.slot-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1083 / 662;
    overflow: visible;
    transform-origin: center;
    animation: slot-machine-cycle 3s linear infinite;
}

#feature-block2 .slot-machine-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: none;
}

/* GRID EXACTLY OVER FIVE REELS */
#feature-block2 .slot-symbols-overlay {
    position: absolute;
    left: 3%;
    top: 4%;
    width: 94%;
    height: 92%;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));

    pointer-events: none;
    z-index: 3;
}

/* SCATTER CELLS */
#feature-block2 .slot-symbols-overlay .slot-symbol {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    background: transparent;
    transform: none;
    animation: none;
}

/* REMOVE DARK SQUARES */
#feature-block2 .slot-symbols-overlay .slot-symbol::before,
#feature-block2 .slot-symbols-overlay .slot-symbol::after {
    content: none;
}

/* SCATTER IMAGE SIZE */
#feature-block2 .slot-symbols-overlay .slot-symbol img {
    display: block;
    width: 95%;
    height: 95%;
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
    object-fit: contain;
    transform: none;
    animation: scatter-glow 3s ease-in-out infinite;
}

/* FIVE REEL POSITIONS */
#feature-block2 .slot-symbol--1 {
    grid-column: 1;
    grid-row: 3;
}

#feature-block2 .slot-symbol--2 {
    grid-column: 2;
    grid-row: 2;
}

#feature-block2 .slot-symbol--3 {
    grid-column: 3;
    grid-row: 1;
}

#feature-block2 .slot-symbol--4 {
    grid-column: 4;
    grid-row: 2;
}

#feature-block2 .slot-symbol--5 {
    grid-column: 5;
    grid-row: 3;
}

/* ORIGINAL SLOT ANIMATION */
@keyframes slot-machine-cycle {
    0%, 100% {
        transform: scale(0.82);
        filter: brightness(1) saturate(1);
    }
    36%, 64% {
        transform: scale(0.83);
        filter: brightness(1.05) saturate(1.05);
    }
    50% {
        transform: scale(0.84);
        filter: brightness(1.12) saturate(1.1);
    }
}


/* SCATTER ANIMATION */
@keyframes slot-symbol-pulse {
    0%, 100% {
        transform: scale(1.25);
        filter: brightness(1) saturate(1);
    }

    50% {
        transform: scale(1.4);
        filter:
                brightness(1.12)
                saturate(1.1)
                drop-shadow(0 0 6px rgb(79 11 152));
    }
}

/* Apply animation to all 5 SCATTERS */
#feature-block2 .slot-symbols-overlay .slot-symbol img {
    animation: slot-symbol-pulse 3s linear infinite;
    transform-origin: center;
}



#feature-block3 { grid-area: feature-block3; }

#feature-desc1 { grid-area: feature-desc1;}
#feature-description { grid-area: feature-desc2; }
#feature-desc3 { grid-area: feature-desc3; }

#feature-desc1,
#feature-description,
#feature-desc3 {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stacked-block {
    position: relative;
    display: inline-block;
    width: fit-content;
    height: auto;
}

.layer-base,
.layer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.layer-base { z-index: 2; }
.layer-overlay { z-index: 1; }

.stacked-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    z-index: 1;
}

#section-button {
    position: sticky;
    grid-area: start-button;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1vh;
    z-index: 10;
}

.feature-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: unset;
    justify-content: center;
    overflow: visible;
    transform-origin: center;
    max-height: 45vh;
}

.feature-image {
    display: block;
    object-fit: contain;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    transform: scale(0.82);
}

#feature-block1,
#feature-block3 {
    height: clamp(30vh, 36vh, 40vh);
    display: flex;
    justify-content: center;
    align-items: center;
}

#feature-block1 .feature-image,
#feature-block3 .feature-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.feature-description {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-transform: uppercase;
    transform: translateY(-2vh);

    font-size: clamp(0.78rem, 2.05vw, 1.3rem);
    line-height: 1.2;
    padding: 0.5vh 1vw;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Exo 2', sans-serif;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;

    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    flex-wrap: wrap;
    z-index: 11;
}

.feature-description .stroke-text {
    position: relative;
    color: transparent;
    -webkit-text-stroke: 2.5px #110330;
    animation: textShadowPulse 4s ease-in-out infinite;
    z-index: 1;
}

.feature-description .fill-text {
    background: linear-gradient(to top, #fae873, #ffa500, #ff4500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: absolute;
    z-index: 2;
}

.fill-text span {
    display: inline-block;
    background: linear-gradient(to top, #fae873, #ffa500, #ff4500);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.start-fixed-portrait {
    display: grid;
    place-items: center;
    text-align: center;
}

.start-gradient-background {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 20vh;
    background: linear-gradient(to top, rgba(18, 16, 48, 0.85), rgba(18, 16, 48, 0.0));
    z-index: 1;
    pointer-events: none;
}

.loading-bar-wrapper {
    position: relative;
    grid-area: 1 / 1;
    width: clamp(20vw, 25vw, 35vw);
    height: clamp(24px, 4.2vh, 48px);
    margin: 0;
    box-sizing: border-box;
    padding: clamp(2px, 0.25vh, 3px);
    border: clamp(2px, 0.35vh, 4px) solid transparent;
    border-radius: 999px;
    overflow: hidden;
    background:
            linear-gradient(180deg, #21075a 0%, #10022f 58%, #080119 100%) padding-box,
            linear-gradient(180deg, #fff7ad 0%, #ffd53f 18%, #ff9d00 52%, #ff7300 72%, #fff4a0 100%) border-box;
    box-shadow:
            inset 0 0 0 1px rgba(255, 245, 173, 0.78),
            inset 0 0 12px rgba(75, 20, 172, 0.85),
            0 0 5px rgba(255, 242, 139, 0.95),
            0 0 14px rgba(255, 160, 0, 0.82),
            0 5px 16px rgba(5, 0, 28, 0.72);
}

.loading-bar {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 0;
    height: 100%;
    background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.05) 56%, rgba(12, 28, 152, 0.28) 100%),
            linear-gradient(90deg, #087cff 0%, #22ddff 25%, #5572ff 50%, #22ddff 75%, #087cff 100%);
    background-size: 100% 100%, 200% 100%;
    animation: loader-flow 2.8s ease-in-out infinite alternate;
    transition: width 0.3s ease;
    border-radius: 999px;
    box-shadow:
            inset 0 0 5px rgba(255, 255, 255, 0.95),
            inset 0 -7px 12px rgba(17, 20, 154, 0.55),
            0 0 8px rgba(0, 225, 255, 0.95),
            0 0 18px rgba(54, 89, 255, 0.8);
}

@keyframes loader-flow {
    0% { background-position: 0 0, 0 center; }
    100% { background-position: 0 0, 100% center; }
}

.loading-percent {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font, sans-serif), sans-serif;
    box-sizing: border-box;
    padding: 1px clamp(4px, 0.8vw, 10px);
    font-size: clamp(9px, 2vh, 16px);
    line-height: 1;
    white-space: nowrap;
    color: white;
    font-weight: bold;
    pointer-events: none;
    z-index: 4;
    text-shadow: 0 1px 2px #080128, 0 0 6px #1bbcff;
}

.start-button {
    grid-area: 1 / 1;
    width: clamp(40vw, 50vw, 60vw);
    font-size: 1.4rem;
    text-align: center;
    text-transform: uppercase;
    padding: clamp(1.2vh, 2vh, 3vh) clamp(3vw, 5vw, 6vw);
    margin: 0;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    background-image: linear-gradient(to right, #36bfff, #d9fbff, #5ce7ff, #268cff, #36bfff);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: white;
    border: none;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.4s ease;
    animation: gradientShift 5s linear infinite, pulseZoom 5s ease-in-out infinite;
}

.start-button.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

@keyframes gradientShift {
    0% { background-position: 0 center; }
    100% { background-position: 200% center; }
}

@keyframes pulseZoom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes logoFadeIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================================================================= */
/* PORTRAIT                               */
/* ================================================================= */

@media (orientation: portrait) {
    .landscape-bg { display: none; }
    .portrait-bg {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform-origin: center;
    }

    .stars-layer { opacity: 0.88; }
    .star { transform: scale(0.92); }

    #feature-preview-screen {
        height: 100svh;
        min-height: 0;
        box-sizing: border-box;
        overflow-y: hidden;
        padding-bottom: env(safe-area-inset-bottom, 2dvh);
        padding-top: env(safe-area-inset-top, 2dvh);
    }

    #fps-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
        height: 100%;
        box-sizing: border-box;
        padding: 1.5dvh 4vw 14dvh 4vw;
        gap: 0.8dvh;
        align-items: center;
        justify-content: space-evenly;
        margin: 0 auto;
    }

    #logo-placeholder {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        z-index: 2;
    }

    .logo-image {
        height: clamp(8vh, 10vh, 12vh);
        width: auto;
        object-fit: contain;
        margin: 0;
    }

    .feature-block {
        margin: 0 auto;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #feature-block1 {
        width: min(70dvw, calc(17dvh * 16 / 9));
        max-width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    #feature-block2 {
        width: min(84dvw, calc(20dvh * 1.6));
        max-width: 100%;
        aspect-ratio: 1.6 / 1;
        height: auto;
    }

    #feature-block3 {
        width: min(76dvw, calc(18dvh * 16 / 9));
        max-width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .feature-description {
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        font-size: clamp(0.68rem, 2.45vw, 0.9rem);
        line-height: 1.2;
        padding: 0;
        text-align: center;
        transform: none;
    }

    #feature-desc1,
    #feature-description,
    #feature-desc3 {
        margin-top: 0;
    }

    .start-fixed-portrait {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        background: linear-gradient(to top, rgba(18, 16, 48, 0.9), rgba(18, 16, 48, 0));
        box-sizing: border-box;
        z-index: 20;
        display: grid;
        place-items: center;
        padding: 1.5vh 5% calc(env(safe-area-inset-bottom, 0px) + 1.5vh) 5%;
    }

    .loading-bar-wrapper {
        position: relative;
        grid-area: 1 / 1;
        bottom: auto;
        left: auto;
        transform: none;
        width: clamp(38vw, 42vw, 48vw);
        height: clamp(20px, 3.2vh, 34px);
        margin: 0;
    }

    .start-button {
        grid-area: 1 / 1;
        font-size: clamp(0.85rem, 1.4vw, 1.05rem);
        padding: clamp(1.2vh, 2vh, 2.5vh) 0;
        background-image: linear-gradient(to right, #36bfff, #eaffff, #5ce7ff, #268cff, #36bfff);
        background-size: 200% auto;
        transform: scale(0.95);
        margin-left: auto;
        margin-right: auto;
    }

    .start-button.visible {
        transform: scale(1);
    }
}

/* ================================================================= */
/* LANDSCAPE                              */
/* ================================================================= */

@media (orientation: landscape) {
    .start-fixed-portrait {
        position: relative;
        display: grid;
        place-items: center;
        width: 100%;
        padding-bottom: env(safe-area-inset-bottom, 1dvh);
    }

    .loading-bar-wrapper {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 0;
        width: clamp(25vw, 30vw, 35vw);
        height: clamp(22px, 4vh, 44px);
    }

    .gem-10 {
        position: absolute;
        width: 70%;
        left: 50%;
        top: 50%;
        animation-name: gem-float-center;
    }
}

@media (orientation: landscape) and (max-height: 700px) {
    #fps-wrapper {
        grid-template-columns: 22dvw 32dvw 22dvw;
        padding: 0 3vw;
        column-gap: 1.5dvw;
        row-gap: 0.6dvh;
    }

    .feature-description {
        font-size: clamp(0.76rem, 1.72vw, 1.15rem);
        line-height: 1.1;
        padding: 0.3vh 0;
        margin: 0;
        max-width: 100%;
        word-break: normal;
    }

    .start-button {
        font-size: clamp(0.8rem, 1.3vw, 1.1rem);
        padding: clamp(1vh, 1.5vh, 2vh);
        margin-top: 0;
    }
}

@media (orientation: landscape) and (max-height: 480px) {
    .start-fixed-portrait {
        display: grid;
        place-items: center;
        transform: translateY(clamp(-22px, -5dvh, -16px));
    }

    .loading-bar-wrapper {
        grid-area: 1 / 1;
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 150px;
        height: 13px;
        margin: 0 auto;
        padding: 0;
    }

    .start-button {
        grid-area: 1 / 1;
        margin: 0;
    }

    .loading-percent {
        padding-block: 0;
        font-size: 9px;
    }
}

@media (orientation: landscape) and (max-height: 260px) {
    #fps-wrapper {
        grid-template-columns: 30vw 35vw 30vw;
        grid-template-rows: 15vh auto auto auto;
        row-gap: 0.6vh;
        column-gap: 1vw;
        padding: 0 2vw;
    }
    #feature-block1,
    #feature-block3 {
        width: clamp(25vw, 30vw, 35vw);
    }
    #feature-block2 {
        width: clamp(30vw, 35vw, 40vw);
        aspect-ratio: unset;
    }
    .feature-description {
        font-size: clamp(0.74rem, 1.5vw, 0.98rem);
        line-height: 1.1;
        padding: 0.3vh 0;
        word-break: normal;
        white-space: normal;
        text-align: center;
    }

    .start-button {
        padding: clamp(0.6vh, 1vh, 1.4vh) clamp(3vw, 4vw, 5vw);
        z-index: 3;
        transform: scale(1);
    }

    #section-button { padding-bottom: 3vh; }

    .logo-image { height: clamp(12vh, 15vh, 18vh); }
}

/* === ANIMATIONS, STARS & GEMS === */

@keyframes breath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmerFlash {
    0% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.9; filter: brightness(2); }
    100% { opacity: 1; filter: brightness(1); }
}

.breath { animation: breath 2s ease-in-out; }
.shimmer { animation: shimmerFlash 2s ease-in-out; }

.layer-overlay.glow-shadow {
    filter: drop-shadow(0 0 3px rgba(255, 200, 0, 0.6)) drop-shadow(0 0 6px rgba(255, 150, 0, 0.5)) drop-shadow(0 0 10px rgba(255, 100, 0, 0.4)) drop-shadow(0 0 16px rgba(255, 50, 0, 0.3));
    transition: filter 0.2s ease;
}

.stars-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    mix-blend-mode: screen;
}

.star {
    position: absolute;
    top: var(--star-top);
    left: var(--star-left);
    width: var(--star-size);
    height: var(--star-size);
    animation: starDrift var(--drift-duration, 16s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

.star::before,
.star::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation-delay: var(--delay, 0s);
}

.star::before {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(239, 248, 255, 1) 18%, rgba(208, 233, 255, 0.82) 42%, rgba(186, 220, 255, 0) 100%);
    box-shadow: 0 0 calc(var(--star-size) * 1.8) rgba(236, 247, 255, 1), 0 0 calc(var(--star-size) * 3.2) rgba(123, 190, 255, 0.55);
    animation: starPulse var(--twinkle-duration, 5.8s) ease-in-out infinite;
}

.star::after {
    width: calc(var(--star-size) * 3.4);
    height: calc(var(--star-size) * 3.4);
    background: radial-gradient(circle, rgba(196, 232, 255, 0.54) 0%, rgba(196, 232, 255, 0.18) 34%, rgba(188, 227, 255, 0) 74%);
    opacity: 0.72;
    filter: blur(1.2px);
    animation: starHaloPulse calc(var(--twinkle-duration, 5.8s) * 1.1) ease-in-out infinite;
}

.star-1 { --star-top: 10%; --star-left: 14%; --star-size: 4px; --twinkle-duration: 3.8s; --drift-duration: 17s; --delay: -0.8s; }
.star-2 { --star-top: 18%; --star-left: 31%; --star-size: 3px; --twinkle-duration: 4.4s; --drift-duration: 15s; --delay: -2.6s; }
.star-3 { --star-top: 11%; --star-left: 53%; --star-size: 5px; --twinkle-duration: 3.5s; --drift-duration: 18s; --delay: -1.9s; }
.star-4 { --star-top: 22%; --star-left: 74%; --star-size: 3.5px; --twinkle-duration: 4.9s; --drift-duration: 14s; --delay: -3.2s; }
.star-5 { --star-top: 37%; --star-left: 20%; --star-size: 4px; --twinkle-duration: 4.1s; --drift-duration: 19s; --delay: -1.4s; }
.star-6 { --star-top: 33%; --star-left: 61%; --star-size: 2px; --twinkle-duration: 5.2s; --drift-duration: 13s; --delay: -4s; }
.star-7 { --star-top: 48%; --star-left: 44%; --star-size: 5px; --twinkle-duration: 3.9s; --drift-duration: 16s; --delay: -2.2s; }
.star-8 { --star-top: 57%; --star-left: 79%; --star-size: 3px; --twinkle-duration: 4.6s; --drift-duration: 20s; --delay: -0.5s; }
.star-9 { --star-top: 67%; --star-left: 18%; --star-size: 2.5px; --twinkle-duration: 4.2s; --drift-duration: 15s; --delay: -3.8s; }
.star-10 { --star-top: 72%; --star-left: 57%; --star-size: 4px; --twinkle-duration: 3.6s; --drift-duration: 17s; --delay: -1.1s; }
.star-11 { --star-top: 84%; --star-left: 33%; --star-size: 5px; --twinkle-duration: 4.5s; --drift-duration: 19s; --delay: -2.9s; }
.star-12 { --star-top: 81%; --star-left: 71%; --star-size: 3px; --twinkle-duration: 3.7s; --drift-duration: 14s; --delay: -4.4s; }

.gems-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.gem {
    position: absolute;
    will-change: transform;
    transform-origin: center;
    --r: 0deg;
    filter: brightness(0.8);
    animation: gem-float 30s ease-in-out infinite;
}

@keyframes gem-float {
    0%, 100% { transform: translate(0, 0) rotate(var(--r)) scale(1); }
    25% { transform: translate(-4px, -6px) rotate(calc(var(--r) - 6deg)) scale(0.8); }
    50% { transform: translate(5px, 4px) rotate(calc(var(--r) + 8deg)) scale(1.05); }
    75% { transform: translate(-3px, 2px) rotate(calc(var(--r) - 3deg)) scale(0.8); }
}

@keyframes gem-float-center {
    0%, 100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
    25% { transform: translate(calc(-50% - 4px), calc(-50% - 6px)) rotate(calc(var(--r) - 6deg)) scale(0.8); }
    50% { transform: translate(calc(-50% + 5px), calc(-50% + 4px)) rotate(calc(var(--r) + 8deg)) scale(1.05); }
    75% { transform: translate(calc(-50% - 3px), calc(-50% + 2px)) rotate(calc(var(--r) - 3deg)) scale(0.8); }
}

@keyframes parallaxZoom {
    0%, 100% { transform: scale(1.05) translate(0, 0); }
    50% { transform: scale(1.12) translate(-1.5%, 1.5%); }
}

@keyframes starPulse {
    0%, 100% { opacity: 0.42; transform: translate(-50%, -50%) scale(0.72); }
    18% { opacity: 0.76; transform: translate(-50%, -50%) scale(0.92); }
    38% { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }
    56% { opacity: 0.62; transform: translate(-50%, -50%) scale(0.88); }
    72% { opacity: 0.92; transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes starHaloPulse {
    0%, 100% { opacity: 0.12; transform: translate(-50%, -50%) scale(0.84); }
    35% { opacity: 0.46; transform: translate(-50%, -50%) scale(1.18); }
    65% { opacity: 0.28; transform: translate(-50%, -50%) scale(0.96); }
}

@keyframes starDrift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-3px, -2px, 0); }
    50% { transform: translate3d(3px, 4px, 0); }
    75% { transform: translate3d(-2px, 2px, 0); }
}

.featuresGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    justify-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
}

.cardsBox, .jackpotBox, .slotBox {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cardsStack {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    perspective: 1400px;
    perspective-origin: 50% 46%;
    margin: 0 auto;
    transform: scale(0.90);
}

.fps-card {
    position: absolute;
    z-index: 2;
    width: 29%;
    aspect-ratio: 162 / 225;
    transform-origin: 50% 85%;
    transform-style: preserve-3d;
    animation: cardFloat 5.2s ease-in-out infinite;
}

.card--1 { left: 4%;  top: 25%; z-index: 1; transform: rotate(-16deg); animation-delay: 0s;   --r: -16deg; --flip-delay: 0.08s; filter: drop-shadow(0 0 12px rgba(255, 48, 0, 0.50)); }
.card--2 { left: 26%; top: 32%; z-index: 3; transform: rotate(-4deg);  animation-delay: 0.6s; --r: -4deg;  --flip-delay: 0.5s; filter: drop-shadow(0 0 12px rgba(253, 0, 226, 0.50)); }
.card--3 { left: 44%; top: 16%;  z-index: 2; transform: rotate(10deg);  animation-delay: 1.2s; --r: 10deg;   --flip-delay: 0.92s; filter: drop-shadow(0 0 12px rgba(0, 188, 251, 0.50)); }
.card--4 { left: 64%; top: 32%; z-index: 4; transform: rotate(19deg);  animation-delay: 1.8s; --r: 22deg;  --flip-delay: 1.34s; filter: drop-shadow(0 0 12px rgba(49, 233, 4, 0.50)); }

.cardFlip__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: cardSequentialFlip 0.72s cubic-bezier(0.24, 0.82, 0.22, 1) both;
    animation-delay: var(--flip-delay, 0s);
    animation-play-state: running;
    will-change: transform;
}

body:has(#preloader-screen:not(.fade-out)) #feature-preview-screen .cardFlip__inner {
    animation-play-state: paused;
}

.cardFace {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.cardFace--back {
    z-index: 2;
    transform: rotateY(0deg) translateZ(1px);
}

.cardFace--front {
    z-index: 1;
    transform: rotateY(180deg) translateZ(1px);
}

@keyframes cardSequentialFlip {
    0%   { transform: rotateY(0deg) translateY(0) scale(1); }
    14%  { transform: rotateY(0deg) translateY(0) scale(1); }
    44%  { transform: rotateY(88deg) translateY(-1px) scale(1.03); }
    60%  { transform: rotateY(108deg) translateY(-2px) scale(1.04); }
    82%  { transform: rotateY(180deg) translateY(-1px) scale(1.015); }
    100% { transform: rotateY(180deg) translateY(0) scale(1); }
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r)); }
    50% { transform: translateY(3px) rotate(var(--r)); }
}

.jackpotBox {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transform-origin: center;
    transform: scale(0.85);
}

.jackpot-single-img {
    display: block;
    object-fit: contain;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    transform-origin: 50% 50%;
    animation: jackpotPulse 2.8s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.35));
}

@keyframes jackpotPulse {
    0%, 100% { transform: scale(1); filter: brightness(1) saturate(1); }
    50% { transform: scale(1.04); filter: brightness(1.05) saturate(1.1); }
}

.particle {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    background-color: #e8fdff;
    border-radius: 50%;
    box-shadow:
            0 0 4px 1px #f4ffff,
            0 0 10px 3px #31e9ff,
            0 0 20px 6px #1677ff;
    animation: drift var(--d) linear infinite alternate, twinkle var(--fd) ease-in-out infinite alternate;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes drift {
    0% { transform: translate(var(--x), var(--y)) scale(var(--s)); }
    100% { transform: translate(var(--tx), var(--ty)) scale(var(--s)); }
}

@keyframes twinkle {
    0%, 15% { opacity: 0; }
    50% { opacity: 0.8; }
    85%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .slot-preview,
    .slot-symbol {
        animation: none;
    }

}

/* ========================================= */
/* FIX: SLOT AND SCATTER IMAGE SIZES         */
/* ========================================= */

/* Restore original slot dimensions */
#feature-block2 .slot-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1083 / 662;
    transform-origin: center;
    animation: slot-machine-cycle 3s linear infinite;
}

/* Prevent double scaling of slot image */
#feature-block2 .slot-preview > .slot-machine-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: none;
}

/* Overlay positioned over reels */
#feature-block2 .slot-symbols-overlay {
    position: absolute;
    left: 2%;
    top: 3.8%;
    width: 96%;
    height: 92.9%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    pointer-events: none;
    z-index: 3;
}

/* Reset symbol containers */
#feature-block2 .slot-symbols-overlay > .slot-symbol {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    transform: none;
    animation: none;
    background: transparent;
}

/* Remove dark square backgrounds */
#feature-block2 .slot-symbols-overlay > .slot-symbol::before,
#feature-block2 .slot-symbols-overlay > .slot-symbol::after {
    content: none;
}

/* Keep each SCATTER inside its reel */
#feature-block2 .slot-symbols-overlay > .slot-symbol > img {
    display: block;
    position: relative;
    width: 85%;
    height: 85%;
    max-width: 100%;
    max-height: 100%;
    flex: 0 0 auto;
    object-fit: contain;
    transform-origin: center;
    animation: slot-symbol-pulse 3s linear infinite;
}

/* Symbol positions */
#feature-block2 .slot-symbol--1 {
    grid-column: 1;
    grid-row: 3;
}

#feature-block2 .slot-symbol--2 {
    grid-column: 2;
    grid-row: 2;
}

#feature-block2 .slot-symbol--3 {
    grid-column: 3;
    grid-row: 1;
}

#feature-block2 .slot-symbol--4 {
    grid-column: 4;
    grid-row: 2;
}

#feature-block2 .slot-symbol--5 {
    grid-column: 5;
    grid-row: 3;
}

/* Original slot animation */
@keyframes slot-machine-cycle {
    0%, 100% {
        transform: scale(0.82);
        filter: brightness(1);
    }
    50% {
        transform: scale(0.84);
        filter: brightness(1.12);
    }
}

/* Original SCATTER animation */
@keyframes slot-symbol-pulse {
    0%, 100% {
        transform: scale(1.25);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.4);
        filter:
                brightness(1.1)
                drop-shadow(0 0 6px rgba(79, 220, 255, 0.55));
    }
}
