html, body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
}

#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;
    padding: env(safe-area-inset-top) env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right);
    box-sizing: border-box;
}

/* region BACKGROUND */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}
.background-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 1;
}
@media (orientation: landscape) {
    .background-image {
        transform-origin: center top;
    }
}
@media (orientation: portrait) {
    .background-image {
        transform-origin: center left;
    }
}
.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: parallax-zoom 16s ease-in-out infinite;
}
@keyframes parallax-zoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08); /* збільшення */
    }
    100% {
        transform: scale(1); /* назад до нормального */
    }
}
/* 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;
        padding-top: min(-1dvh, -1dvw);
        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;
        width: 100%;
        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);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        margin-top: -10%;
    }
    #feature-block1-landscape {
        transform: scale(1.1);
        grid-row: 1;
        grid-area: feature-block1-landscape;
    }
    #feature-panda-landscape {
        max-width: 200px;
        grid-area: feature-panda-landscape;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: clamp(8px, 2vw, 24px);
    }
    .scarab {
        width: clamp(200px, min(50vw, 60vh), 320px);
        position: absolute;
        bottom: -1%;
        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));
    }
    #feature-block2-landscape {
        grid-area: feature-block2-landscape;
    }
    #feature-desc1-landscape {
        grid-area: feature-desc1-landscape;
    }
    #feature-desc2-landscape {
        align-self: start;
        justify-self: center;
        grid-area: feature-desc2-landscape;
    }
    #feature-panda-desc-landscape {
        grid-area: feature-panda-desc-landscape;
    }
    .feature-block {
        width: 300px;
        height: 220px;
        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;
        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: #fff333;
    }
    #panda-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: 10px;
        margin-top: -20px;
    }
    .panda {
        max-width: 43%;
        height: auto;
        display: block;
        transition: opacity 0.1s ease;
        /*animation: cleoGlow 2s ease-in-out infinite;*/

        max-height: 60dvh;
        width: auto;
    }
    #feature-panda-landscape .panda {
        height: auto;
        max-height: 53dvh;
        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(300px, 10dvw, 400px);
        transition: opacity 0.2s ease, transform 0.2s ease;

        animation: hideScatter 0.01s forwards;
        animation-delay: 4s;
        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;
    }
    .or-more {
        margin-top: 26px;
        justify-content: center;
        font-size: 14px;
        font-weight: 600;
        color: #ff5188;
        animation: hideScatter 0.01s forwards;
        animation-delay: 4s;
        animation-fill-mode: forwards;

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

        pointer-events: none;
        text-align: center;
        z-index: 2;
    }
    .slot-container > .symbol {
        margin: 8px;
        position: relative;
        width: clamp(20px, min(20dvw, 18dvh), 80px);
        height: clamp(20px, min(20dvw, 18dvh), 80px);
        position: relative;
        overflow: visible;
    }
    .symbol .base,
    .symbol .wild {
        width: 100%;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .frame {
        /*position: absolute;*/
        /*left: 50%;*/
        /*transform: translateX(-50%);*/
        /*width: 140%;*/
        /*height: auto;*/
        /*opacity: 0;*/
        /*animation: dropFrameLandscape 1s ease forwards;*/

        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 140%;
        height: auto;
        opacity: 0;
    }
    #intro-landscape {
        position: absolute;
        top: 70%;
        left: 50%;
        transform: translate(-50%, -60%);
        opacity: 0;
        visibility: hidden;
        animation: showPopup 0.5s ease forwards, pulseLandscape 2s ease-in-out infinite;
        animation-delay: 4s, 4.6s;
        animation-iteration-count: 1;
        z-index: 2;
        transform-origin: center center;
    }
    .intro-popup {
        width: clamp(240px, min(50dvw, 70dvh), 360px);
        height: auto;
    }
    .start-button {
        width: clamp(40dvw, 50dvw, 60dvw);
        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 5px rgba(255, 255, 255, 0.1), 0 2px 6px rgba(0, 0, 0, 0.6);
        border: 2px solid #f8f8f8;
    }
    .start-fixed {
        display: flex;
        flex-direction: column;
        align-items: center;
        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.8), rgba(18, 16, 48, 0));*/
        box-sizing: border-box;
        padding-top: 3dvh;
        padding-bottom: env(safe-area-inset-bottom);
        padding-inline: 5dvw;
    }
    .symbol .frame {
        animation:
            dropFrameLandscape var(--drop-dur) ease forwards var(--drop-delay),
            hideBaseFrame var(--hide-dur)  ease forwards
            calc(var(--last-end) + var(--buffer) + (var(--seq) * var(--wild-stagger)));
    }
}
/* 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, 2dvh);
        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: 94%;
        /*height: 90%;*/
        height: auto;
        margin: -5% auto 0;
    }
    #features-wrapper {
        display: grid;
        grid-template-columns: 60% 40%;
        width: 90dvw;
        /*display: flex;*/
        flex-direction: row;
        justify-content: center;
        /*align-items: center;*/
        gap: clamp(16px, 2dvw, 26px);
        /*margin-left: clamp(2%, 6dvw, 5%);*/
        /*margin-right: clamp(1%, 6dvw, 3%);*/
        margin-top: -5%;
        box-sizing: border-box;
        transform: scale(0.95);
        transform-origin: center;
    }

    /* Внутрішня сітка зліва: [блок][підпис][блок][підпис] */
    #features-wrapper .col-left {
        display: grid;
        grid-auto-rows: max-content;
        grid-template-rows: auto auto auto auto;
        gap: clamp(8px, 2dvw, 16px);
        align-items: start;
    }

    /* Внутрішня сітка справа: [малий підпис][великий блок][підпис] */
    #features-wrapper .col-right {
        display: grid;
        grid-template-rows: auto 1fr auto;
        /* середній розтягується */
        gap: clamp(8px, 2dvw, 16px);
        align-items: start;
    }

    /* корисні дрібниці */
    .col-right .right-main {
        align-self: stretch;
    }

    .right-main img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .left-block img {
        width: 100%;
        height: auto;
        display: block;
    }

    .caption {
        text-align: center;
    }

    #panda-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: #96030c;*/
        color: #fff333;
    }
    .feature-description-name {
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: -1px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        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: #96030c;*/
        color: #fff333 60%;
        font-size: clamp(16px, 2vw, 26px);
    }
    .scarab {
        width: 100%;
        /*width: clamp(200px, min(50dvw, 50dvh), 200px);*/
        position: absolute;
        margin-bottom: 2%;
        bottom: 1%;
        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));
    }
    /* Права колонка */
    #panda-column {
        justify-content: center;
        /* width: 34%; */
        display: flex;
        height: 100%;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        box-sizing: border-box;
        /* margin-top: 4vh; */
    }
    .panda{
        margin: 0 auto;
        max-width: clamp(40%, 10vw + 10vh, 75%);
        /* 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-panda-desc {
        margin-top: 2px;
    }
    /* Ліва колонка */
    #features-column {
        margin-top: 8%;
        /*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 {
        object-position: center;
        /* 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 {
        width: auto;
        /* transform: scale(1.2); */
        /*padding-bottom: 30px;*/
        /* margin-top: -3vh; */
        /* grid-area: feature-block1; */
    }
    #feature-block2 {
        margin-top: clamp(4dvh, 2dvh + 7vw, 10dvh);
        grid-area: feature-block2;
    }
    #feature-desc1 {
        margin-top: clamp(2vh, calc(1vh + 3vw), 5vh);
        grid-area: feature-desc1;
        text-align: center;
        /*margin-top: -80px;*/
    }
    #feature-desc2 {
        grid-area: feature-desc2;
        text-align: center;
        margin-top: -2px;
        /*margin-top: -2vh;*/
        /*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: 6px;
        top: unset;
    }
    .or-more {
        /*margin-top: 20px;*/
        font-size: 14px;
        font-weight: 600;
        color: #ff5188;
        animation: hideScatter 0.01s forwards;
        animation-delay: 4s;
        animation-fill-mode: forwards;
    }
    .symbol {
        width: 100%;
        /*width: clamp(60px, min(10dvw, 10dvh), 160px);*/
        /*height: clamp(20px, min(22dvw, 22dvh), 60px);*/
        position: relative;
        overflow: visible;
    }
    .symbol .base,
    .symbol .wild {
        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: 140%;
        height: auto;
        opacity: 0;
        animation: dropFramePortrait 1s ease forwards;
    }
    #intro {
        position: absolute;
        top: -10%;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        visibility: hidden;
        animation: showPopup 0.5s ease forwards, pulse 2s ease-in-out infinite;
        animation-delay: 4s, 4.6s;
        animation-iteration-count: 1;
    }
    .intro-popup {
        width: clamp(230px, min(50dvw, 70dvh), 580px);
        height: auto;
    }
    #scatter {
        transform: scale(1.2);
        margin-bottom: clamp(0px, calc(1vh + 1vw), 20px);
        margin-top: 20px;
        height: 100%;
        width: 100%;
        transition: opacity 0.2s ease, transform 0.2s ease;

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

        display: flex;
        justify-content: center;
        align-items: center;
    }
    img.scatter {
        width: clamp(160px, 40dvw, 280px);
        height: auto;
        display: block;
        margin: 0 auto;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .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, 50vw, 60vw);
        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 5px rgba(255, 255, 255, 0.1), 0 2px 6px 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: 5s, 5.6s;
}

.symbol {
    --frame-scale: 1.35;
    --frame-top: -12%;
    position: relative;
}

@media (orientation: portrait) and (min-width: 600px) {
    .symbol {
        --frame-scale: 1.25;
        --frame-top: -18%;
    }
}

.symbol .frame {
    position: absolute;
    left: 50%;
    top: var(--frame-top);
    transform: translate(-50%, 0);
    width: calc(100% * var(--frame-scale));
    height: auto;
    opacity: 0;
    animation: dropFrameResponsive 0.9s ease forwards;
}

@keyframes dropFrameResponsive {
    0%   { transform: translate(-50%, -120%); opacity: 0; }
    100% { transform: translate(-50%, 0);     opacity: 1; }
}

/* region Frames */
@keyframes dropFramePortrait {
    0% {
        top: -150px;
        opacity: 0;
    }
    100% {
        top: -14px;
        opacity: 1;
    }
}

@keyframes dropFrameLandscape {
    0% {
        top: -150px;
        opacity: 0;
    }
    100% {
        top: -14px;
        opacity: 1;
    }
}
/* endregion */
/* region Crossfade to WILD */
@keyframes toWild {
    0%   { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes hideBase { to { opacity: 0; } }
:root {
    --drop-dur: 600ms;
    --stagger: 140ms;
}
/* 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;
}
/* region First Feature Animation */
/* PORTRAIT */
/* ключові кадри */
@keyframes hideBaseFrame { to { opacity: 0; } }
@keyframes showWild { 0% {opacity:0; transform:scale(.96)} 100% {opacity:1; transform:scale(1)} }

/* таймінги в одному місці */
.slot-container{
    --drop-dur: 1s;         /* тривалість падіння frame */
    --d1: 0s;               /* затримки падіння для 1/2/3 */
    --d2: .5s;
    --d3: 1s;
    --last-end: calc(var(--drop-dur) + var(--d3)); /* коли впаде останній */
    --buffer: .10s;         /* невеликий запас після падіння */
    --wild-stagger: .25s;   /* інтервал почергової заміни */
    --hide-dur: .20s;       /* скільки ховаємо base+frame */
    --show-dur: .35s;       /* скільки показуємо wild */
    --gap: .06s;            /* пауза між hide і show для однієї клітинки */
}

/* базова позиція wild зверху, але схований */
.symbol .wild{
    position:absolute; inset:0;
    opacity:0; transform:scale(.96);
}

/* призначаємо кожній клітинці свій індекс для почерговості */
.slot-container .symbol:nth-child(1){ --seq: 0; --drop-delay: var(--d1); }
.slot-container .symbol:nth-child(2){ --seq: 1; --drop-delay: var(--d2); }
.slot-container .symbol:nth-child(3){ --seq: 2; --drop-delay: var(--d3); }

/* ФРЕЙМ: 1) падає як у тебе  2) ховається ПОТІМ, вже після падіння всіх, з почерговістю */
.symbol .frame{
    /* твій початковий стиль .frame з opacity:0; width:140% тощо лишається */
    animation:
        /* падіння (твій існуючий dropFramePortrait) з індивідуальною затримкою */
            dropFramePortrait var(--drop-dur) ease forwards var(--drop-delay),
                /* приховування після того як впадуть усі, ще й зі стаггером */
            hideBaseFrame var(--hide-dur) ease forwards
            calc(var(--last-end) + var(--buffer) + (var(--seq) * var(--wild-stagger)));
}

/* BASE: ховаємо в ті самі моменти, що й frame */
.symbol .base{
    animation: hideBaseFrame var(--hide-dur) ease forwards
    calc(var(--last-end) + var(--buffer) + (var(--seq) * var(--wild-stagger)));
}

/* WILD: показуємо трохи пізніше за hide тієї ж клітинки */
.symbol .wild{
    animation: showWild var(--show-dur) ease forwards
    calc(var(--last-end) + var(--buffer) + (var(--seq) * var(--wild-stagger)) + var(--gap));
}

/* LANDSCAPE */
@media (orientation: landscape){
    /* індекси тільки для ряду в #feature-block1-landscape */
    #feature-block1-landscape .slot-container > .symbol:nth-of-type(1){ --seq: 0; --drop-delay: var(--d1); }
    #feature-block1-landscape .slot-container > .symbol:nth-of-type(2){ --seq: 1; --drop-delay: var(--d2); }
    #feature-block1-landscape .slot-container > .symbol:nth-of-type(3){ --seq: 2; --drop-delay: var(--d3); }
}

@media (orientation: landscape){
    .feature-preview-landscape .symbol .frame{
        animation:
                dropFrameLandscape var(--drop-dur) ease forwards var(--drop-delay),
                hideBaseFrame var(--hide-dur)  ease forwards
                calc(var(--last-end) + var(--buffer) + (var(--seq) * var(--wild-stagger)));
    }
}

/* дефолти, щоб calc() не ламався навіть якщо nth-* не спрацює */
.symbol{
    position: relative;
    --seq: 0;
    --drop-delay: 0s;
    z-index: 0;
}
.symbol .base, .symbol .frame{ z-index: 1; }
.symbol .wild{ z-index: 2; }

/* таймінги мають бути на ТОМУ контейнері, що реально огортає символи у landscape */
.slot-container,
.slot2-container{
    --drop-dur: 1s;
    --d1: 0s;
    --d2: .5s;
    --d3: 1s;
    --last-end: calc(var(--drop-dur) + var(--d3));
    --buffer: .10s;
    --wild-stagger: .25s;
    --hide-dur: .20s;
    --show-dur: .35s;
    --gap: .06s;
}

#feature-block1-landscape .slot-container > .symbol:nth-of-type(1){ --seq:0; --drop-delay: var(--d1);}
#feature-block1-landscape .slot-container > .symbol:nth-of-type(2){ --seq:1; --drop-delay: var(--d2);}
#feature-block1-landscape .slot-container > .symbol:nth-of-type(3){ --seq:2; --drop-delay: var(--d3);}

#feature-block1-landscape .symbol .frame{ /* dropFrameLandscape , hideBaseFrame */ }
#feature-block1-landscape .symbol .base{  /* hideBaseFrame */ }
#feature-block1-landscape .symbol .wild{  /* showWild */ }

/* ---- WILD: більший у landscape ---- */
@keyframes showWildLandscape {
    0%   { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1.28); } /* підбери 1.24–1.32 за смаком */
}

@media (orientation: landscape){
    /* точковий таргет: лише landscape-блок і лише картинки WILD */
    .feature-preview-landscape #feature-block1-landscape img.wild{
        transform-origin: center center;
        will-change: transform, opacity;
        animation: showWildLandscape var(--show-dur) ease forwards
        calc(var(--last-end) + var(--buffer) + (var(--seq) * var(--wild-stagger)) + var(--gap));
    }
}

/* endregion */
/* region Second Feature Animation */
.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 ЧЕРЕЗ 4s === */
@keyframes showPopup {
    to {
        opacity: 1;
        visibility: visible;
    }
}
@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}
@keyframes pulseLandscape {
    0%, 100% {
        transform: translate(-50%, -60%) scale(1);
    }
    50% {
        transform: translate(-50%, -60%) scale(1.05);
    }
}
/* endregion */
/* 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 {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #FFD15C, #FF9E4D, #FF6F61, #FBB03B, #FF6F61, #FF9E4D, #FFD15C);
    background-size: 300% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 999px;
    box-shadow: 0 0 20px rgba(255, 209, 92, 0.9),
    0 0 40px rgba(255, 158, 77, 0.7),
    0 0 60px rgba(255, 111, 97, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.loading-percent {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font, sans-serif);
    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);
    }
}
/* 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)); }
}
@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}


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

@media (max-height: 400px) and (orientation: landscape) {
    #feature-panda-landscape {
        margin-top: -18px;
    }
    #scaled-landscape {
        transform: scale(0.9);
    }
    #feature-panda-desc-landscape {
        margin-top: -18px;
    }
}

@media screen and (min-width: 800px) and (orientation: portrait) {
    #intro {
        top: -40%;
    }
    .panda {
        width: 60%;
    }
    #scatter {
        transform: scale(1.4);
    }
    #feature-block1 {
        transform: scale(0.9);
    }
}

@media (max-width: 1000px) and (orientation: landscape) {
    #scaled-landscape {
        transform: scale(0.8);
        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%;
        }
    .panda {
        max-width: 48%
    }
   .feature-description {
       font-size: clamp(12px, 1dvw, 18px);
   }

}
@media (orientation: landscape) and (min-height: 1000px)  {
    #scaled-landscape {
        transform: scale(1.3);
        transform-origin: center;
    }
}

@media (orientation: landscape) and (min-width: 1280px) {
    #panda-column {
        width: 30%;
        gap: 26px;
        margin-top: 7dvh;
    }
    .panda{
        max-width: 58%;
    }
    .feature-separator.top {
        margin-top: 12%;
    }
    #feature-panda-desc {
        margin-top: -20px;
    }
    #scaled-landscape {
        column-gap: 0;
        transform: scale(1.2);
        grid-template-columns: 33% 24% 33%;
    }
    #feature-panda-desc-landscape {
        margin-top: 48px;
    }
}
@media (orientation: landscape) and (min-width: 1024px) {
    #panda-column-landscape {
        gap: 40px;
    }
}
@media (min-width: 2560px) {
    #scaled-landscape {
        transform: scale(1.5);
        transform-origin: top center;
    }

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

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

    .panda {
        max-width: 70%;
    }

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

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

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

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

@media (orientation: portrait) and (max-aspect-ratio: 3/4) {
    #feature-desc2 {
        margin-top: calc(env(safe-area-inset-top, 0px) + 16px);
    }
}
@media (orientation: portrait) and (max-aspect-ratio: 7/10) and (min-width: 600px) {
    #feature-desc2 {
        margin-top: calc(env(safe-area-inset-top, 0px) + 1px);
    }
}
@media (orientation: portrait) and (max-aspect-ratio: 13/20) and (min-width: 540px) {
    #feature-desc2 {
        margin-top: calc(env(safe-area-inset-top, 0px) + 6px);
    }
}
@media (orientation: portrait)
and (max-width: 560px)
and (min-aspect-ratio: 3/4)
and (max-aspect-ratio: 5/6) {
    #feature-desc2 {
        margin-top: calc(env(safe-area-inset-top, 0px) + -12px);
    }
}
