@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@500;600;700;800;900&display=swap');
:root {
    --main-font: 'Noto Sans', sans-serif;
}
@supports (height: 100svh) {
    html, body,
    #feature-preview-screen,
    #fps-wrapper {
        height: 100svh !important;
        max-height: 100svh !important;
    }
    #section-button {
        padding-bottom: clamp(1vh, env(safe-area-inset-bottom, 2vh), 3vh);
        /*bottom: max(env(safe-area-inset-bottom, 0px), clamp(14px, 2.6svh, 36px));*/
    }
}
html, body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
}
#feature-preview-screen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    transition: opacity 1.2s ease, transform 1.2s ease;
}

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

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    animation: parallaxZoom 20s ease-in-out infinite,
    parallaxShift 30s ease-in-out infinite,
    brightnessPulse 10s ease-in-out infinite;
}

.landscape-bg {
    display: block;
    z-index: -1;
}
.portrait-bg {
    display: none;
}

@media (orientation: portrait) {
    .landscape-bg {
        display: none;
    }

    .portrait-bg {
        display: block;
        z-index: -1;
    }
}

#fps-wrapper {
    display: grid;
    place-items: center;
    grid-template-areas:
            "logo logo logo"
            "feature-block1 . feature-block3"
            "feature-desc1 . feature-desc3"
            "start-button start-button start-button";

    grid-template-columns: 40vw 1vw 40vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
}

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

.logo-image {
    height: clamp(12vh, 15vh, 20vh);
    display: block;
    opacity: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    animation: logoFadeIn 1s ease-out 0.5s forwards,
    pulseGlow 6s ease-in-out infinite 2s;
    margin-bottom: 4vh;
}

#sound-toggle {
    position: absolute;
    bottom: 3vh;
    right: clamp(2vw, 3vw, 4vw);
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

#sound-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

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

#feature-desc1 {
    grid-area: feature-desc1;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#feature-desc3 {
    grid-area: feature-desc3;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.feature-description {
    font-family: var(--main-font);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.subtext {
    font-weight: 800;
    text-align: center;
    margin: 0;
    padding: 0;
    text-shadow:
            0 0 1.5px #210030,
            0 0 3px #210030,
            1px 1.5px 3px #210030;
}

.feature-description strong {
    color: #00ff99;
    font-weight: 900;
    font-size: clamp(0.7rem, calc(1.1vw + 1.1vh), 2rem);
    display: inline;
    white-space: nowrap;
    text-shadow:
            0 0 1.5px #210030,
            0 0 3px #210030,
            1px 1.5px 3px #210030;
}

#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-top: 3vh;*/
    padding: 0;
    width: 100%;
    height: auto;
    min-width: unset;
    justify-content: center;
    overflow: visible;
    transform-origin: center;
}

.feature-image {
    display: block;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    filter: none !important;
    mix-blend-mode: normal;
}
.feature-block.small {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 60vh;
    height: auto;
    /*height: min(40vw, 70vh);*/
    aspect-ratio: 1 / 1;
    overflow: visible;
}

.glow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: screen;
}

.stacked-block {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    align-self: baseline;
}

/*FINISH ANIMATION AND STACK IF IT NEEDED FOR BEAUTY ANIMATION*/
.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

.feature-description {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;

    font-family: var(--main-font);
    font-size: clamp(0.5rem, calc(1vw + 1vh), 1.8rem);
    line-height: 1.3;

    margin: 0;
    padding: 0;
    /*transform: translateY(-8vh);*/
    max-width: 35vw;
    width: 85%;
    box-sizing: border-box;
    z-index: 2;
    text-transform: uppercase;
    color: white;
    letter-spacing: 0.6px;
}

#section-button {
    grid-area: start-button;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: clamp(1vh, 2vh, 3vh);
    text-align: center;
}

.start-button {
    position: relative;
    bottom: auto;
    transform: none;
    order: 1;
}

.loading-bar-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(20dvw, calc(20dvw + 15dvh), 35dvw);
    height: clamp(1.6dvh, calc(0.6dvh + 1dvw), 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;
    z-index: 999;
}
.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(
            90deg,
            #FF5EDB,
            #B341FF,
            #38EF7D,
            #FF5EDB
    );
    background-size: 300% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 999px;
    box-shadow:
            0 0 20px rgba(255, 94, 219, 0.6),
            0 0 40px rgba(179, 65, 255, 0.5),
            0 0 60px rgba(56, 239, 125, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


@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);
    font-size: clamp(0.5rem, calc(1vw + 1vh), 1.5rem);
    color: white;
    font-weight: bold;
    pointer-events: none;
}

/* START BUTTON */
.start-button {
    width: clamp(40vw, 50vw, 60vw);
    font-size: clamp(0.5rem, calc(1vw + 1vh), 1.2rem);
    text-transform: uppercase;
    text-align: center;
    font-family: var(--main-font);
    letter-spacing: 0.08em;
    font-weight: 700;

    background: linear-gradient(to right, #ffef41, #d4ffee, #FFFF66, #ffef41);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    border: none;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;

    z-index: 10;

    animation: gradientShift 4s linear infinite, pulseZoom 3s ease-in-out infinite, glowText 2.5s ease-in-out infinite;
    transition: opacity 0.6s ease, transform 0.4s ease;
}

.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 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;
    }
}
.feature-image {
    filter:
            drop-shadow(0 0 2px rgba(0, 255, 153, 0.6))
            drop-shadow(0 0 6px rgba(0, 255, 153, 0.4))
            drop-shadow(0 0 10px rgba(0, 255, 153, 0.3)) !important;

    -webkit-filter:
            drop-shadow(0 0 2px rgba(0, 255, 153, 0.6))
            drop-shadow(0 0 6px rgba(0, 255, 153, 0.4))
            drop-shadow(0 0 10px rgba(0, 255, 153, 0.3)) !important;
}

/* region PORTRAITE */
@media (orientation: portrait) {
    #feature-preview-screen {
        height: 100dvh;
        min-height: 100vh;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    html, body {
        overflow-x: hidden;
        min-height: 100vh;
        width: 100vw;
    }

    #fps-wrapper {
        display: grid;
        grid-template-areas:
        "logo"
        "feature-block1"
        "feature-desc1"
        "feature-block3"
        "feature-desc3"
        "start-button";
        grid-template-columns: 1fr;
        row-gap: 1.2vh;
        height: 100dvh;
        min-height: 0;
        box-sizing: border-box;
        padding-top: env(safe-area-inset-top, 2vh);
        padding-bottom: env(safe-area-inset-bottom, 2vh);
        width: 100vw;
        overflow-x: hidden;
        align-content: start;
    }

    #feature-desc1 {
        grid-area: feature-desc1;
        justify-content: center;
        align-items: center;
    }

    #feature-desc3 {
        grid-area: feature-desc3;
        justify-content: center;
        align-items: center;
    }

    .feature-block.small {
        width: min(70vw, 35vh);
        height: min(70vw, 35vh);
        align-self: center;
        aspect-ratio: 1 / 1;
        justify-content: center;
        position: relative;
        overflow: visible;
    }

    .feature-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        position: relative;
    }

    .layer-under {
        z-index: 1;
    }
    .layer-middle {
        z-index: 2;
    }
    .layer-top {
        z-index: 3;
    }

    .feature-block {
        max-width: 100vw;
        margin: 0 auto;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: visible;
    }

    .feature-image {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
        position: relative;
        z-index: 1;
    }

    .glow-svg {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 3;
        mix-blend-mode: screen;
    }

    .stacked-block {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        display: flex;
        justify-content: center;
        align-items: center;
        align-self: center;
    }

    .star-particle {
        z-index: 12;
        mix-blend-mode: screen;
        pointer-events: none;
        animation: sparkleFade 1.8s ease-in-out forwards;
        opacity: 0;
        position: absolute;
    }

    #logo-placeholder {
        position: relative;
        grid-area: logo;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        z-index: 5;
    }

    .logo-image {
        height: clamp(6vh, 10vh, 12vh);
        width: auto;
        max-width: 70vw;
    }

    .feature-description strong {
        font-size: clamp(0.7rem, calc(1.6vw + 1.3vh), 2rem);
    }

    .feature-description {
        font-size: clamp(0.5rem, calc(1.5vw + 1.2vh), 1.8rem);
        line-height: 1.2;
        max-width: 85vw;
        margin-top: 1%;
        padding: 0 2vw;
        text-align: center;
    }
    #feature-desc3, #feature-desc1 {
        justify-content: center;
        align-items: center;
    }
    .start-fixed-portrait {
        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: env(safe-area-inset-bottom);
        padding-left: 5vw;
        padding-right: 5vw;
    }

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

    .start-button {
        padding: clamp(1.5vh, 2.5vh, 3vh) 0;
        margin: 0 auto;
    }

    .start-button.visible {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (orientation: portrait) {
    #fps-wrapper {
        display: grid;
        grid-template-areas:
      "logo"
      "feature-block1"
      "feature-desc1"
      "feature-block3"
      "feature-desc3"
      "start-button";
        grid-template-columns: 1fr;
        grid-template-rows:
      auto
      minmax(0, 2fr)
      auto
      minmax(0, 2fr)
      auto
      minmax(0, 0.8fr);

        height: 100dvh;
        min-height: 0;
        box-sizing: border-box;
        row-gap: clamp(0.8vh, 1.2vh, 1.6vh);

        align-content: stretch;
    }

    .feature-block,
    .feature-description,
    #section-button {
        min-height: 0;
    }

    .feature-description {
        margin-top: 2.5vh;
        z-index: 5;
        position: relative;
    }

    #feature-desc1, #feature-desc3 {
        justify-content: center;
    }

    #section-button {
        align-self: end;
        margin-bottom: env(safe-area-inset-bottom, 12px);
    }
}

@media (orientation: portrait) {
    #sound-toggle {
        position: fixed;
        bottom: clamp(2vh, 3vh, 4vh);
        right: clamp(3vw, 4vw, 5vw);
        width: 40px;
        height: 40px;
        z-index: 9999;
    }

    #sound-toggle img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
}
/* endregion */

@media (orientation: landscape) {
    #fps-wrapper {
        grid-template-rows:
      minmax(8vh, auto)
      auto
    auto
      /*minmax(0, 2fr)*/
      /*minmax(0, 0.5fr)*/
      minmax(8vh, auto);

        height: 100dvh;
        min-height: 0;
    }

    .feature-block {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .feature-image {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
        flex-shrink: 1;
    }

    .feature-description {
        align-self: start;
        margin: 0 auto;
        min-height: 0;
        text-align: center;
    }

    .feature-block.small,
    .stacked-block {
        position: relative;
        align-items: center;
        justify-content: center;
        min-height: 0;
    }

    .feature-image,
    .overlay-image,
    .glow-svg {
        position: absolute;
        inset: 0;
        object-fit: contain;
        display: block;
    }

    #feature-desc1, #feature-desc2, #feature-desc3 {
        justify-content: unset;
        align-items: center;
        transform: translateY(-5vh);
    }
    #feature-block1,
    #feature-block2,
    #feature-block3 {
        align-self: end;
        justify-self: center;
    }
}