#feature-preview-screen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    transition: opacity 1.2s ease, transform 1.2s ease;
    justify-content: center;
    align-items: center;
    --safe-x: max(env(safe-area-inset-left), env(safe-area-inset-right));
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: var(--safe-x);
    padding-right: var(--safe-x);
    box-sizing: border-box;
}

/* keep loaded wild symbol image hidden */
#hidden-wild {
    display: none;
}

/* region BACKGROUND */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}
@media (orientation: landscape) {
    .background-layer {
        width: 100%;
    }
}
@media (orientation: portrait) {
    .background-layer {
        width: 120%;
        height: 100%;
    }
}
.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
}
.background-image::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

@media (orientation: landscape) {
    .pyramids {
        position: absolute;
        bottom: -25%;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: auto;
        z-index: 2;
        display: block;
    }
}
@media (orientation: portrait) {
    .pyramids {
        position: absolute;
        bottom: 0;
        left: 43%;
        transform: translateX(-50%);
        width: clamp(156%, calc(1.8 * 100vh), 100%);
        height: auto;
        z-index: 2;
        display: block;
    }
}

.stars-1, .stars-2 {
    position: absolute;
    pointer-events: none;
    animation: stars-move 60s linear infinite, stars-twinkle 3s ease-in-out infinite alternate;
    opacity: 0.8;
}
@media (orientation: landscape) {
    .stars-1 {
        top: 0;
        left: 0;
        width: 39%;
        height: auto;
    }
}
@media (orientation: portrait) {
    .stars-1 {
        top: 5%;
        left: -2%;
        height: 50%;
    }
}
@media (orientation: landscape) {
    .stars-2 {
        top: 0;
        right: 2%;
        width: 29%;
        height: auto;
    }
}
@media (orientation: portrait) {
    .stars-2 {
        top: 4%;
        height: 40%;
    }
}
@keyframes stars-twinkle {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}
@keyframes cloudsMoveLeftUp {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-30px, -10px); }
}
@keyframes cloudsMoveRightDown {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(30px, 10px); }
}

.clouds-1,
.clouds-2 {
    position: absolute;
    top: -15%;
    pointer-events: none;
    display: block;
    z-index: 1;
}
@media (orientation: landscape) {
    .clouds-1,
    .clouds-2 {
        width: 100%;
        height: auto;
    }
}
@media (orientation: portrait) {
    .clouds-1,
    .clouds-2 {
        height: 100%;
    }
}
.clouds-1 {
    animation: cloudsMoveLeftUp 10s ease-in-out infinite alternate;
}
@media (orientation: landscape) {
    .clouds-1 {
        left: 0;
    }
}
@media (orientation: portrait) {
    .clouds-1 {
        left: -10%;
    }
}
.clouds-2 {
    right: 0;
    animation: cloudsMoveRightDown 10s ease-in-out infinite alternate;
}
/* endregion */
/* region LOGO */
#logo-placeholder {
    position: relative;
    grid-area: logo;
    display: flex;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}
@media (orientation: landscape) {
    #logo-placeholder {
        top: 0;
        left: 0;
        width: 100%;
    }
}
@media (orientation: portrait) {
    #logo-placeholder {
        align-items: center;
        margin-top: 5px;
        /*padding-top: min(2vh, 2vw);*/
        padding-bottom: 5%;
    }
}
.logo-image {
    display: block;
    opacity: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    animation: logoFadeIn 1s ease-out 0.5s forwards;
}
@media (orientation: landscape) {
    .logo-image {
        height: 15vh;
        margin-bottom: 3vh;
        margin-top: 1vh;
    }
}
@media (orientation: portrait) {
    .logo-image {
        height: clamp(8vh, 12vh, 14vh);
        width: auto;
        margin-top: 1.5vh;
        max-width: 80vw;
    }
}
/* endregion */
/* region LANDSCAPE */
.feature-preview-landscape {
    display: none;
}

@media (orientation: landscape) {
    .feature-preview-landscape-wrapper {
        position: absolute;
        top: 10%;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: none;
    }
    .feature-preview-landscape {
        margin: 0 auto;
        max-height: 100%;
        display: block;
    }
    #scaled-landscape {
        display: flex;
        /*display: grid;*/
        /*grid-template-areas:*/
        /*"feature-block1-landscape feature-cleopatra-landscape feature-block2-landscape"*/
        /*"feature-desc1-landscape feature-cleo-desc-landscape feature-desc2-landscape";*/
        /*grid-template-columns: 33% 24% 33%;*/
        /*!*grid-template-columns: 1fr auto 1fr;*!*/
        /*grid-template-rows: auto auto;*/
        /*column-gap: 20px;*/
        column-gap: clamp(1px, 1vw, 20px);
        width: 100%;
        /*max-width: 100vw;*/
        /*justify-items: center;*/
        /*align-items: start;*/
        align-items: center;
        box-sizing: border-box;
        padding-left: 5dvw;
        padding-right: 5dvw;
        padding-bottom: 1dvw;
    }
    .features-column {
        aspect-ratio: 1 / 1;
        height: clamp(180px, 30vh, 280px);
        /*height: 280px;*/
        /*width: 280px;*/
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        margin-top: -10%;
    }
    #feature-block1-landscape {
        grid-row: 1;
        grid-area: feature-block1-landscape;
    }
    #feature-cleopatra-landscape {
        /*position: absolute;*/
        /*left: 50%;*/
        /*transform: translateX(-50%);*/
        /*z-index: 1;*/
        max-width: 200px;
        grid-area: feature-cleopatra-landscape;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: clamp(8px, 2vw, 24px);
    }
    #feature-block2-landscape {
        grid-area: feature-block2-landscape;
    }
    #feature-desc1-landscape {
        /*align-self: start;*/
        /*justify-self: center;*/
        /*margin-top: -60px;*/
        grid-area: feature-desc1-landscape;
    }
    #feature-desc2-landscape {
        /*margin-top: 40px;*/
        align-self: start;
        justify-self: center;
        grid-area: feature-desc2-landscape;
    }
    #feature-cleo-desc-landscape {
        /*margin-top: -38px;*/
        grid-area: feature-cleo-desc-landscape;
    }
    .feature-block {
        width: 250px;
        height: 250px;
        display: flex;
        flex-direction: column;
        position: relative;
        aspect-ratio: 1 / 1;
        margin: 0;
        padding: 0;
        /*width: 100%;*/
        /*height: auto;*/
        min-width: 200px;
        justify-content: center;
        overflow: visible;
        transform-origin: center;
        align-items: center;
        /*max-width: 300px;*/
    }
    .feature-description {
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: -1px;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        font-size: clamp(14px, 1vw, 24px);
        line-height: 1.1;
        margin: 0;
        padding: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        z-index: 2;
        font-family: var(--main-font);
        color: rgba(100, 229, 255, 1);
    }
    #cleo-column-landscape {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
        gap: 12px;
        margin-top: -35px;
    }
    .cleo {
        max-width: 33%;
        height: auto;
        display: block;
        transition: opacity 0.1s ease;
        animation: cleoGlow 2s ease-in-out infinite;

        max-height: 60vh;
        width: auto;
    }
    #feature-cleopatra-landscape .cleo {
        height: auto;
        max-height: 55dvh;
        width: auto;
    }
    .feature-separator-left,
    .feature-separator-right {
        height: 160%;
        width: auto;
    }
    .feature-separator-right {
        padding-right: 35px;
        transform: scaleX(-1); /* дзеркально */
    }
    .feature-separator-left {
        padding-right: 35px;
    }
    .scatter.landscape {
        /*margin-top: 40px;*/
        width: clamp(200px, 25dvw, 300px);
        transition: opacity 0.2s ease, transform 0.2s ease;

        animation: hideScatter 0.01s forwards;
        animation-delay: 3s;
        animation-fill-mode: forwards;

        display: flex;
        justify-content: center;
        align-items: center;
    }
    .slot-container {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        /*top: -30px;*/
    }
    .slot2-container {
        position: relative;
        width: 100%;
        height: auto;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .scarab {
        width: clamp(200px, min(50vw, 60vh), 320px);
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        height: auto;
    }
    .scarab-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        filter: drop-shadow(0 4px 12px rgba(5, 10, 30, 0.7))
        drop-shadow(0 0 30px rgba(10, 15, 35, 0.4));
    }
    .or-more {
        margin-top: 10px;
        justify-content: center;
        font-size: 14px;
        font-weight: 600;
        color: #f5c000;
        animation: hideScatter 0.01s forwards;
        animation-delay: 3s;
        animation-fill-mode: forwards;

        position: absolute;
        top: 100%;
        left: 50%;
        transform: translate(-50%, -50%);

        pointer-events: none;
        text-align: center;
        z-index: 2;
    }
    .symbol {
        position: relative;
        width: clamp(20px, min(20dvw, 18dvh), 80px);
        height: clamp(20px, min(20dvw, 18dvh), 80px);
        position: relative;
        overflow: visible;
    }
    .symbol .base {
        width: 100%;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .frame {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 150%;
        height: auto;
        opacity: 0;
        animation: dropFrameLandscape 1s ease forwards;
    }
    /* падаючі фрейми */
    #symbol2-landscape .frame {
        animation-delay: 0.5s;
    }
    #symbol3-landscape .frame {
        animation-delay: 1s;
    }
    #intro-landscape {
        position: absolute;
        top: 70%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0;
        visibility: hidden;
        animation: showPopup 0.5s ease forwards, pulseLandscape 2s ease-in-out infinite;
        animation-delay: 3s, 3.6s;
        animation-iteration-count: 1;
        z-index: 2;
        transform-origin: center center;
    }
    .intro-popup {
        width: clamp(240px, min(60dvw, 78dvh), 360px);
        height: auto;
    }
    .divider {
        position: relative;
        text-align: center;
        width: 1.5px;
        height: 100%;
        background: linear-gradient(to bottom, transparent 0%, #FFD700 30%, #FFF8DC 50%, #FFD700 70%, transparent 100%);
        border-radius: 2px;
        opacity: 0.9;
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
        margin-top: -10px;
    }
    .start-button {
        width: clamp(40vw, 50vw, 60vw);
        font-size: clamp(0.7rem, calc(0.8vw + 0.8vh), 1.5rem);
        text-transform: uppercase;
        text-align: center;

        /*letter-spacing: 0.05em;*/
        font-weight: 500;
        background-size: 200% auto;
        background: linear-gradient(to right, #ffc10d, white, #ffc10d);
        background-size: 200% auto;
        -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;

        padding: 2dvh;
        margin: 0 auto;
    }
    .loading-bar-wrapper {
        position: absolute;
        /*bottom: clamp(2vh, 5vh, 5vh) 0;*/
        left: 50%;
        transform: translateX(-50%);
        width: clamp(20dvw, 25dvw, 35dvw);
        height: clamp(2dvh, 2.5dvh, 3.5dvh);
        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;
        margin-top: 0;
        min-width: clamp(140px, 30vw, 320px);
        transition: opacity 0.35s ease;
        margin-bottom: clamp(2vh, 1vh, 2vh);
    }
    .start-fixed {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        /*justify-content: center;*/
        text-align: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 10;

        background: linear-gradient(to top, rgba(18, 16, 48, 0.88), rgba(18, 16, 48, 0));
        box-sizing: border-box;
        padding-top: 2vh;
        padding-bottom: 1.8dvh;
        padding-inline: 5vw;
    }
}
/* endregion */
/* region PORTRAIT */
.feature-preview-portrait {
    display: none;
}

@media (orientation: portrait) {
    .feature-preview-portrait {
        display: block;
    }
    #fps-wrapper-scaler {
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    #fps-wrapper {
        height: auto;
        min-height: 100dvh;
        display: grid;
        grid-template-areas:
        "logo"
        'features-wrapper'
        "start-button";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto auto;

        box-sizing: border-box;
        padding-top: env(safe-area-inset-top, 0dvh);
        padding-bottom: env(safe-area-inset-bottom, 2dvh);
        width: 100dvw;
        overflow-x: hidden;
        align-content: start;
        place-items: center;
        max-width: 100dvw;
        max-height: 100dvh;

        place-content: start center; /* вертикаль top/start, горизонталь center */
        padding-inline: clamp(12px, 4vw, 40px); /* щоб контент не прилипав */

        /*aspect-ratio: 390 / 844; !* базовий дизайн *!*/
    }
    .feature-separator {
        display: block;
        width: 100%;
        /*height: 90%;*/
        height: auto;
        margin: 0 auto;
    }
    #features-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: clamp(8px, 2dvw, 16px);
        margin-inline: clamp(2%, 6dvw, 6%);
        margin-top: -10%;
        box-sizing: border-box;
        transform: scale(0.95);
        transform-origin: center;
    }
    #cleo-column, #features-column {
        flex-shrink: 1;
        max-width: 100%;
    }
    .feature-description {
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: -1px;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        font-size: clamp(14px, 2vw, 24px);
        line-height: 1.3;
        margin: 0;
        padding: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        z-index: 2;
        font-family: var(--main-font);
        color: rgba(100, 229, 255, 1);
    }
    /* Права колонка */
    #cleo-column {
        width: 34%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        box-sizing: border-box;
        margin-top: 4vh;
    }
    .cleo {
        max-width: 44%;
        height: auto;
        display: block;
        transition: opacity 0.1s ease;
        animation: cleoGlow 2s ease-in-out infinite;
    }
    .slot2-container {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    #feature-cleo-desc {
        margin-top: 2px;
    }
    /* Ліва колонка */
    #features-column {
        margin-top: 20%;
        width: 66%;
        display: flex;
        flex-direction: column;
        gap: 16px;
        box-sizing: border-box;
    }
    .features-wrapper {
        display: grid;
        grid-template-areas:
            "feature-block1"
            "feature-desc1"
            "feature-block2"
            "feature-desc2";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;

        width: 100%;
        height: auto;
        max-height: none;
        max-width: 100vw;
        justify-items: center;
        align-items: start;
        box-sizing: border-box;
        padding-left: 10dvw;
        padding-right: 10dvw;
        padding-bottom: 4vw;
    }
    .feature-block {
        width: 100%;
        /*aspect-ratio: 1.1 / 1;*/
        display: flex;
        /*flex-direction: column;*/
        position: relative;
        margin: 0;
        height: auto;
        min-width: 200px;
        justify-content: center;
        overflow: visible;
        transform-origin: center;
    }
    #feature-block1 {
        padding-bottom: 30px;
        margin-top: -5vh;
        grid-area: feature-block1;
    }
    #feature-block2 {
        margin-top: 4vh;
        grid-area: feature-block2;
    }
    #feature-desc1 {
        grid-area: feature-desc1;
        text-align: center;
        /*margin-top: -80px;*/
    }
    #feature-desc2 {
        grid-area: feature-desc2;
        text-align: center;
        margin-top: -20px;
        /*margin-top: 5vh;*/
        /*margin-top: clamp(20px, 5vh, 60px);*/
    }
    .feature-image {
        margin-top: -20px;
        display: block;
        object-fit: contain;
        /*max-width: 100%;*/
        max-height: 100%;
        height: auto;
        filter: drop-shadow(0 6px 16px rgba(5, 10, 30, 0.9))
        drop-shadow(0 0 40px rgba(10, 15, 35, 0.6));
        transition: transform 0.3s ease;
    }
    .slot-container,
    .slot2-container {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        top: unset;
    }
    .scarab {
        width: clamp(200px, min(50vw, 60vh), 320px);
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        height: auto;
    }
    .scarab-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        filter: drop-shadow(0 4px 12px rgba(5, 10, 30, 0.7))
        drop-shadow(0 0 30px rgba(10, 15, 35, 0.4));
    }
    .or-more {
        font-size: 14px;
        font-weight: 600;
        color: #f5c000;
        animation: hideScatter 0.01s forwards;
        animation-delay: 3s;
        animation-fill-mode: forwards;
    }
    .symbol {
        width: clamp(20px, min(22dvw, 22dvh), 60px);
        height: clamp(20px, min(22dvw, 22dvh), 60px);
        position: relative;
        overflow: visible;
    }
    .symbol .base {
        width: 100%;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .frame {
        position: absolute;
        /*top: calc(-1 * var(--frame-offset, 80%));*/
        left: 50%;
        transform: translateX(-50%);
        width: 150%;
        height: auto;
        opacity: 0;
        animation: dropFramePortrait 1s ease forwards;
    }
    /* падаючі фрейми */
    #symbol2 .frame {
        animation-delay: 0.5s;
    }
    #symbol3 .frame {
        animation-delay: 1s;
    }
    #intro {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        visibility: hidden;
        animation: showPopup 0.5s ease forwards, pulse 2s ease-in-out infinite;
        animation-delay: 3s, 3.6s;
        animation-iteration-count: 1;
    }
    .intro-popup {
        width: clamp(240px, min(60dvw, 87dvh), 400px);
        height: auto;
    }
    #scatter {
        margin-top: 20px;
        height: 100%;
        width: 100%;
        transition: opacity 0.2s ease, transform 0.2s ease;

        animation: hideScatter 0.01s forwards;
        animation-delay: 3s;
        animation-fill-mode: forwards;

        display: flex;
        justify-content: center;
        align-items: center;
    }
    img.scatter {
        width: clamp(180px, 40dvw, 360px);
        height: auto;
        display: block;
        margin: 0 auto;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .divider {
        position: relative;
        text-align: center;
        width: 1.5px;
        height: 100%;
        background: linear-gradient(to bottom, transparent 0%, #FFD700 30%, #FFF8DC 50%, #FFD700 70%, transparent 100%);
        border-radius: 2px;
        opacity: 0.9;
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
        margin-top: -20px;
    }
    .start-fixed {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        background: linear-gradient(to top, rgba(18, 16, 48, 0.88), rgba(18, 16, 48, 0));
        box-sizing: border-box;
        z-index: 3;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-top: 2vh;
        /*padding-bottom: max(1.5vh, env(safe-area-inset-bottom));*/
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: 5vw;
        padding-right: 5vw;
    }
    .start-button {
        width: clamp(40vw, 60vw, 70vw);
        font-size: clamp(1rem, calc(0.8vw + 0.8vh), 1.5rem);
        text-transform: uppercase;
        text-align: center;

        /*letter-spacing: 0.05em;*/
        font-weight: 500;
        background-size: 200% auto;
        background: linear-gradient(to right, #ffc10d, white, #ffc10d);
        background-size: 200% auto;
        -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;

        padding: clamp(1vh, 2.5vh, 3vh) 0;
        margin: 0 auto;
    }
    .loading-bar-wrapper {
        position: absolute;
        bottom: clamp(2vh, 2.5vh, 3.5vh);
        left: 50%;
        transform: translateX(-50%);
        width: clamp(40dvw, 45dvw, 50dvw);
        height: clamp(1.6dvh, 2dvh, 2.5dvh);
        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;
    }
}

/* endregion */

.popup.visible {
    opacity: 1;
    visibility: visible;
    animation: showPopup 0.5s ease forwards, pulse 2s ease-in-out infinite;
    animation-delay: 3s, 3.6s;
}

/* region падаючі фрейми */
@keyframes dropFramePortrait {
    0% {
        top: -150px;
        opacity: 0;
    }
    100% {
        top: -14px;
        opacity: 1;
    }
}

@keyframes dropFrameLandscape {
    0% {
        top: -150px;
        opacity: 0;
    }
    100% {
        top: -18px;
        opacity: 1;
    }
}
/* endregion */
/* region сині камінчики на скарабі */
.scarab-1 { animation: show1 2s steps(1) forwards; }
.scarab-2 { animation: show2 2s steps(1) forwards; }
.scarab-3 { animation: show3 2s steps(1) forwards; }
@keyframes show1 {
    0%, 32% { opacity: 1; }
    33%, 100% { opacity: 0; }
}
@keyframes show2 {
    0%, 32% { opacity: 0; }
    33%, 65% { opacity: 1; }
    66%, 100% { opacity: 0; }
}
@keyframes show3 {
    0%, 65% { opacity: 0; }
    66%, 100% { opacity: 1; }
}
/* endregion */
.hidden {
    display: none !important;
}

.pop-in {
    opacity: 0;
    transform: scale(1.4);
    animation: popWild 0.5s forwards ease-in-out;
}
@keyframes popWild {
    0%   { opacity: 0; transform: scale(0.5) rotate(-15deg); }
    50%  { opacity: 1; transform: scale(1.3) rotate(10deg); }
    100% { opacity: 1; transform: scale(1.2) rotate(0deg); }
}
.hidden {
    display: none !important;
}
.pop-in {
    opacity: 0;
    transform: scale(1.4);
    animation: popWild 0.5s forwards ease-in-out;
}
@keyframes popWild {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-15deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.3) rotate(10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1.1) rotate(0deg);
    }
}

/* Сховати Scatter */
@keyframes hideScatter {
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Сховати Or More */
@keyframes hideOr-more {
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* === ПОКАЗАТИ POPUP ЧЕРЕЗ 3s === */
@keyframes showPopup {
    to {
        opacity: 1;
        visibility: visible;
    }
}
@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
    /*0%, 100% { transform: scale(1); }*/
    /*50% { transform: scale(1.05); }*/
}
@keyframes pulseLandscape {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* region SOUND BUTTON */
#sound-toggle {
    position: absolute;
    width: clamp(40px, 6vh, 10vh);
    height: clamp(40px, 6vh, 10vh);
    cursor: pointer;
    transition: all 0.3s ease;
}
@media (orientation: landscape) {
    #sound-toggle {
        bottom: 3vh;
        right: clamp(2vw, 3vw, 4vw);
        z-index: 9999;
    }
}
@media (orientation: portrait) {
    #sound-toggle {
        bottom: 1.5vh;
        right: clamp(3vw, 4vw, 5vw);
        z-index: 999;
    }
}
#sound-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* endregion */
/* region LOADING*/
.loading-bar{
    position: relative;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #00BFFF;
    transition: width .3s ease;
    box-shadow: 0 0 20px rgba(0,191,255,.9),
    0 0 40px rgba(0,122,255,.7),
    0 0 60px rgba(0,229,255,.6);
    overflow: hidden;
}

.loading-bar::after{
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(90deg,
    #00BFFF 0%,
    #00A0FF 25%,
    #007BFF 50%,
    #00E5FF 75%,
    #00BFFF 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2.2s linear infinite;
    will-change: background-position;
    transform: translateZ(0);
}

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

.loading-percent {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font, sans-serif);
    /*font-size: clamp(9px, 1vw, 14px);*/
    color: white;
    font-weight: bold;
    pointer-events: none;
}
@media (orientation: portrait) {
    .loading-percent {
        font-size: clamp(12px, 1vw, 14px);
    }
}
@media (orientation: landscape) {
    .loading-percent {
        font-size: clamp(9px, 1vw, 14px);
    }
}

.loading-bar.is-complete::after{ animation: none; }

/* endregion */
/* region PRESS TO START */
.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); }
}
/* endregion */

@keyframes blurPulse {
    0%, 100% { filter: blur(6px); }
    50% { filter: blur(10px); }
}
@keyframes subtleZoom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
@keyframes parallaxZoom {
    0%, 100% { transform: scale(1.05) translate(0, 0); }
    50% { transform: scale(1.12) translate(-1.5%, 1.5%); }
}
@keyframes parallaxShift {
    0% { transform: translate(0%, 0%) scale(1.05); }
    25% { transform: translate(1.5%, -1%) scale(1.08); }
    50% { transform: translate(-1%, 2%) scale(1.1); }
    75% { transform: translate(2%, 1%) scale(1.07); }
    100% { transform: translate(0%, 0%) scale(1.05); }
}
@keyframes brightnessPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}
@keyframes overlayPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.28; }
}
@keyframes logoFadeIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 2px 8px rgb(20, 35, 81)); }
    50% { filter: drop-shadow(0 4px 14px rgb(30, 46, 103)); }
}

.scaled {
    margin-top: -5%;
}

@media (max-width: 390px) {
    .scaled {
        transform: scale(0.90);
    }
}

@media (max-width: 344px) {
    .scaled {
        margin-top: 10%;
    }
}

@media (min-height: 700px) {
    #feature-block2 {
        margin-top: 0;
    }
    #feature-desc2 {
        margin-top: 0;
    }
    .feature-separator.top {
        margin-bottom: 2%;
    }
}
@media (min-width: 700px) and (orientation: portrait) {
    .scaled {
        transform: scale(1.1);
    }
    .cleo {
        max-width: 50%
    }
    .feature-separator.top {
        margin-top: 10%;
    }
    #feature-cleo-desc {
        margin-top: 20px;
    }
}

@media (max-width: 1000px) and (orientation: landscape) {
    #scaled-landscape {
        transform: scale(0.9);
        transform-origin: center;
    }
    .features-column {
        transform: scale(0.9);
        transform-origin: center;
    }
    .slot-container {
        gap: 5px;
    }
    .feature-separator-left, .feature-separator-right {
        height: 120%;
    }
    .features-column {
        height: auto;
    }
    #scaled-landscape {
        margin-bottom: -10px;
    }
    #scaled-landscape {
        grid-template-columns: 35% 24% 33%;
        }
}
@media (max-height: 400px) and (orientation: landscape) {
    #scaled-landscape {
        transform: scale(0.8);
    }
}
@media (orientation: landscape) and (min-height: 1000px)  {
    #scaled-landscape {
        transform: scale(1.3);
        transform-origin: center;
    }
}

@media (min-width: 1024px) {
    .cleo {
        max-width: 50%;
    }
    .feature-separator.top {
        margin-top: 12%;
    }
    #feature-cleo-desc {
        margin-top: -20px;
    }
    #scaled-landscape {
        column-gap: 0;
        /*transform: scale(1.11);*/
        grid-template-columns: 33% 24% 33%;
    }
    #feature-cleo-desc-landscape {
        margin-top: 48px;
    }
}
@media (min-width: 2560px) {
    #scaled-landscape {
        transform: scale(1.5);
        transform-origin: top center;
    }

    #feature-desc1-landscape,
    #feature-desc2-landscape,
    #feature-cleo-desc-landscape {
        transform: scale(0.8);
        transform-origin: top center;
    }

    .features-column {
        height: clamp(180px, 30vh, 380px);
    }

    .cleo {
        max-width: 50%;
    }

    .feature-separator.top {
        margin-top: 14%;
    }

    #feature-cleo-desc {
        margin-top: 48px;
    }

    #scaled-landscape {
        transform: scale(1.6);
        grid-template-columns: 32% 22% 32%;
    }

    .slot-container {
        gap: 20px;
    }
}

/* Анімація (золоте сяйво) */
@keyframes cleoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9));
    }
}

/* iPhone SE (2020/2022) — портрет */
@media screen
and (device-width: 375px)
and (device-height: 667px)
and (-webkit-device-pixel-ratio: 2)
and (orientation: portrait) {
   .scaled {
       margin-top: -10%;
       transform: scale(0.8);
   }
    .feature-preview-portrait {
        margin-top: -4%;
    }
    .cleo {
        max-width: 36%;
    }
}

@media (orientation: landscape) and (max-height: 300px) {
    .feature-preview-landscape-wrapper {
        transform: scale(0.9);
    }
    #cleo-column-landscape {
        gap: -10px;
    }
    #scaled-landscape {
        margin-top: -26px;
    }
    #feature-cleo-desc-landscape {
        margin-top: -38px;
    }
}