@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%;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    z-index: -3;
    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;
}
#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.7rem, 1.9vw, 1.2rem);
    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: flex;
    flex-direction: column;
    align-items: center;
    justify-content: 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: absolute;
    width: clamp(20vw, 25vw, 35vw);
    height: clamp(2vh, 2.5vh, 3.5vh);
    margin-top: clamp(5vh, 7vh, 10vh);
    background: radial-gradient(circle at center, rgba(60, 90, 120, 0.4), rgba(10, 30, 60, 0.6));
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.6);
    border: 2px solid #f8f8f8;
}

.loading-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #FFCC00, #FF9900, #FF5500, #FF3300, #FF9900, #FFCC00);
    background-size: 300% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 999px;
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.8), 0 0 30px rgba(255, 85, 0, 0.6), 0 0 45px rgba(255, 51, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.loading-percent {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font, sans-serif), sans-serif;
    font-size: clamp(12px, 2vw, 16px);
    color: white;
    font-weight: bold;
    pointer-events: none;
}

.start-button {
    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-top: clamp(3vh, 4vh, 5vh);
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    background-image: linear-gradient(to right, rgb(255, 193, 13), #ffe53c, #ffc10d);
    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: auto;
        min-height: 100svh;
        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: 13dvh 4vw 16dvh 4vw;;
        gap: 1.2dvh;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

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


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

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

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

    #logo-placeholder {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        width: 100%;
        margin-top: 0.5vh;
    }

    .logo-image {
        height: clamp(8vh, 10vh, 12vh);
        width: auto;
        object-fit: contain;
        margin-bottom: 1vh;
        margin-top: 1.2dvh;
    }


    .feature-description {
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        font-size: clamp(0.6rem, 2.2vw, 0.8rem);
        line-height: 1.2;
        padding: 0;
        text-align: center;
    }


    #feature-desc1 {
        margin-top: 4dvh;
    }


    #feature-description {
        margin-top: 1dvh;
    }


    #feature-desc3 {
        margin-top: 0dvh;
    }

    .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: flex;
        justify-content: center;
        align-items: center;
        padding: 1.5vh 5% calc(env(safe-area-inset-bottom, 0px) + 1.5vh) 5%;
    }

    .loading-bar-wrapper {
        position: absolute;
        bottom: clamp(1vh, 1.8vh, 2.5vh);
        left: 50%;
        transform: translateX(-50%);
        width: clamp(38vw, 42vw, 48vw);
        height: clamp(1.5vh, 1.9vh, 2.4vh);
        margin-bottom: 0;
    }

    .start-button {
        font-size: clamp(0.85rem, 1.4vw, 1.05rem);
        padding: clamp(1.2vh, 2vh, 2.5vh) 0;
        background-image: linear-gradient(to right, #ffc10d, white, #ffc10d);
        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: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding-bottom: env(safe-area-inset-bottom, 1dvh);
    }

    .loading-bar-wrapper {
        position: relative; /* Убираем absolute, чтобы бар не улетал из-за плавающей панели Safari */
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 1.5vh;
        margin-bottom: 1.5vh;
        width: clamp(25vw, 30vw, 35vw);
        height: clamp(2vh, 2.5vh, 3vh);
    }

    .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.7rem, 1.6vw, 1.05rem);
        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 { font-size: 0.8rem; }
}

@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.7rem, 1.4vw, 0.9rem);
        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: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px 1px #fff, 0 0 10px 3px #ffd700, 0 0 20px 6px #ff8c00;
    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; }
}

.crowns-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    height: 78%;
    width: 100%;
    z-index: 5;
    pointer-events: none;
}

.crown-icon {
    width: auto;
    height: 26%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(170, 0, 255, 0.4));
    animation: crownPulse 2s ease-in-out infinite;
}

.crown-icon:nth-child(1) { animation-delay: 0s; }
.crown-icon:nth-child(2) { animation-delay: 0.2s; }
.crown-icon:nth-child(3) { animation-delay: 0.4s; }

@keyframes crownPulse {
    0%, 100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 8px rgba(170, 0, 255, 0.4)); }
    50% { transform: scale(1.08); filter: brightness(1.15) drop-shadow(0 0 16px rgba(170, 0, 255, 0.8)); }
}

@media (orientation: portrait) {
    .crowns-overlay { height: 80%; }
}
