@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@500;700;900&display=swap');
@supports (height: 100svh) {
    html, body,
    #feature-preview-screen,
    #fps-wrapper {
        height: 100svh !important;
        max-height: 100svh !important;
    }
    .start-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: 100vh;
    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: -2%;
    left: -2%;
    width: 110%;
    height: 110%;
    z-index: -3;
    overflow: hidden;
}

.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;
    }
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
}

#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;

    grid-template-rows:
        minmax(12vh, auto)
        minmax(28vh, auto)
        auto
        minmax(12vh, auto);

    height: 100dvh;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100dvw;
    padding: 5px;
}

#logo-placeholder { grid-area: logo; }
#feature-block1   { grid-area: feature-block1; }
#feature-desc1    { grid-area: feature-desc1; }
#feature-block3   { grid-area: feature-block3; }
#feature-desc3    { grid-area: feature-desc3; }
#section-button   { grid-area: start-button; }


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

.logo-image {
    height: clamp(10vh, 17vh, 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-top: 1vh;
}

#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,
#feature-block3 {
    position: relative;
    display: flex;
    justify-content: center;
    height: clamp(25vh, 40vw, 65vh);
    overflow: visible;
    align-items: flex-end;
    margin-bottom: -5vh;
}

#feature-block1{
    margin-left: 20px;
}

#feature-desc1,
#feature-desc3 {
    height: auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
}

.feature-description {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    margin-top: 0.5vh;
    max-width: 90%;

    font-family: "Noto Sans", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: antialiased;

    font-size: clamp(0.45rem, calc(1.2vw + 0.85vh), 1.65rem);
    line-height: 1.5;
    transform: translateY(clamp(-0.5vh, -2vh, -3vh));
    z-index: 2;
}

.feature-description .line {
    background: linear-gradient(to bottom, #ecff26 30%, #a6f10b 50%, #2bd100 100%);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: clamp(0.5px, 0.15vw, 1.3px) #00ff3f;
    text-stroke: clamp(0.5px, 0.15vw, 1.3px) #00ff3f;
    text-shadow: none !important;
    font-weight: 900;
    display: block;
    margin-top: 0;
    filter: drop-shadow(clamp(0.5px, 0.12vw, 1px) clamp(1px, 0.35vw, 3px) 0px #820206);
}

.feature-description .subtext {
    position: relative;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: none !important;
}

.feature-description .subtext span {
    display: inline;
    background: linear-gradient(
            to bottom,
            #ffe426 40%,
            #f28c65 70%,
            #ff7f21 30%,
            #f14c0b 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    -webkit-text-stroke: clamp(0.4px, 0.12vw, 1px) #eeed13;
    text-stroke: clamp(0.4px, 0.12vw, 1px) #eeed13;

    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;

    filter: drop-shadow(clamp(0.5px, 0.12vw, 1px) clamp(1px, 0.35vw, 3px) 0px #820206);
}

.stacked-block {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.glow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: screen;
}

.feature-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;

    max-width: 100%;
    max-height: 100%;
}

.layer-back {
    mix-blend-mode: normal;
    z-index: 1;

    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    isolation: isolate;

    filter: drop-shadow(0 0 3px rgba(17, 255, 0, 0.6));
    opacity: 0.9999;
}

.layer-middle {
    z-index: 2;
}

.layer-top {
    z-index: 10;
}

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

    align-self: end;
    padding-bottom: clamp(1.5vh, 2vh, 3vh);
}

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

.start-fixed-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loading-bar-wrapper {
    position: absolute;
    width: clamp(20vw, 25vw, 35vw);
    height: clamp(2vh, 2.5vh, 3.5vh);
    /*bottom: 2vh;*/
    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,
            #35ff6b,
            #a3ff3b,
            #ffd700,
            #ff9a16,
            #ff5edb,
            #b23cff,
            #4de8ff,
            #3ca0ff,
            #35ff6b
    );
    background-size: 600% 100%;
    animation: shimmer 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 999px;
    box-shadow:
            0 0 28px rgba(53, 255, 107, 0.7),
            0 0 45px rgba(255, 117, 221, 0.6),
            0 0 60px rgba(255, 186, 38, 0.5),
            0 0 85px rgba(77, 232, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.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.1rem);;
    color: white;
    font-weight: bold;
    pointer-events: none;
}

.start-button {
    font-family: "Noto Sans", sans-serif;
    font-weight: 600;
    font-size: clamp(0.5rem, calc(0.8vw + 0.8vh), 1.3rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    width: 100%;
    background: linear-gradient(
            to right,
            #baff3b,
            #ffdd00,
            #00ff3f,
            #f86b13,
            #baff3b
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgb(186, 255, 59));

    border: none;
    color: white;
    white-space: nowrap;
    /*padding: 0.6em 1em;*/
    position: static;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.4s ease;
    animation: shimmerMetallic 6s linear infinite;
    white-space: nowrap;
    z-index: 5;
}

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


.bear {
    opacity: 0;
    transform: scale(0) translateY(30%);
    animation:
            bear-appear-hide 3.2s infinite ease-in-out,
            bear-zoom-shine 3.2s infinite ease-in-out;
}

.bear:nth-child(3) { animation-delay: 0s, 0s; }
.bear:nth-child(4) { animation-delay: 0.4s, 0.4s; }
.bear:nth-child(5) { animation-delay: 0.8s, 0.8s; }

@keyframes bear-appear-hide {
    0% { opacity: 0; transform: scale(0) translateY(0); }
    10% { opacity: 1; transform: scale(1) translateY(0); }
    70% { opacity: 1; transform: scale(1) translateY(0); }
    75% { opacity: 0; transform: scale(0) translateY(0); }
    100% { opacity: 0; transform: scale(0) translateY(30%); }
}

@keyframes bear-zoom-shine {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    40% { transform: scale(1.06); filter: brightness(1.3); }
    70% { transform: scale(1.02); filter: brightness(1.1); }
}

.shaking {
    animation: golden-glow 3.2s infinite ease-in-out,
    golden-sparkle 3.2s infinite ease-in-out;
    transform-origin: right center;
}

@keyframes golden-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 220, 0, 0.6))
        drop-shadow(0 0 8px rgba(255, 180, 0, 0.4))
        drop-shadow(0 0 12px rgba(255, 140, 0, 0.3));
    }
    40% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 8px rgba(255, 230, 120, 0.8))
        drop-shadow(0 0 14px rgba(255, 200, 0, 0.6))
        drop-shadow(0 0 20px rgba(255, 160, 0, 0.4));
    }
    70% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 6px rgba(255, 225, 100, 0.7))
        drop-shadow(0 0 10px rgba(255, 190, 0, 0.5))
        drop-shadow(0 0 14px rgba(255, 150, 0, 0.3));
    }
}
@keyframes golden-sparkle {
    0%, 75%, 100% {
        filter: brightness(1);
    }
    80% {
        filter: brightness(1.1);
    }
    85% {
        filter: brightness(1.15);
    }
    90% {
        filter: brightness(1.2);
    }
    95% {
        filter: brightness(1.1);
    }
}

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

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

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

@media (max-height: 500px) and (max-width: 1400px) and (orientation: landscape) {
    #feature-block1,
    #feature-block3 {
        max-height: 50vh;
    }

    .feature-description {
        line-height: 1.2;
        margin-top: 0.2vh;
    }

    .start-button {
        font-size: clamp(0.7rem, 1vw + 0.5vh, 1.2rem);
    }
}
@media (orientation: landscape) and (max-aspect-ratio: 5/4) and (min-aspect-ratio: 3/4) and (max-aspect-ratio: 4/3){
    .feature-description {
        transform: translateY(clamp(-5vh, -6vh, -7vh));
    }
}

@media (orientation: portrait) {
    #feature-preview-screen {
        height: 100dvh;
        min-height: 100svh;
        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;

        grid-template-rows:
          minmax(10vh, auto)
          minmax(22vh, 2fr)
          auto
          minmax(22vh, 2fr)
          auto
          minmax(8vh, auto);

        height: 100dvh;
        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;
    }

    #feature-block1,
    #feature-block3 {
        /*width: min(100vw, 80vh) !important;*/
        height: min(80vw, 32vh) !important;
        align-self: center;
        /*aspect-ratio: 1 / 1;*/
        justify-content: center;
        position: relative;
        overflow: visible;
        margin-bottom: 0;
    }

    #feature-block1 {
        margin-left: 10px;
    }

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

    .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: 100%;
        object-fit: contain;
        display: block;
        position: absolute;
        z-index: 1;
    }

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

        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        align-self: baseline;
    }
    .glow-svg {
        z-index: 1 !important;
    }

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

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

    .feature-description {
        font-size: clamp(0.45rem, calc(1.65vw + 1.2vh), 1.25rem);
        line-height: 1.2;
        max-width: 85vw;
        margin: 0 auto;
        padding: 0 2vw;
        text-align: center;
    }

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

        align-self: end;
        padding-bottom: clamp(2vh, env(safe-area-inset-bottom, 3vh), 5vh);
    }

    .loading-bar-wrapper {
        order: 1;
        width: clamp(40vw, 50vw, 60vw);
        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;
        margin: 0;
        bottom: auto;
    }

    .start-button {
        order: 2;
        font-size: clamp(0.5rem, calc(1vw + 1vh), 1.1rem);;
        text-transform: uppercase;
        text-align: center;
        color: #ffed00;
        background-size: 200% auto;
        -webkit-background-clip: text;
        border: none;

        opacity: 0;
        pointer-events: none;
        transform: scale(0.95);
        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);
    }

    #sound-toggle {
        position: fixed;
        bottom: max(env(safe-area-inset-bottom, 6px), 2vh);
        right: clamp(2vw, 3vw, 4vw);
        z-index: 999999;
    }

    .shaking {
        animation: golden-glow 3.2s infinite ease-in-out,
        golden-sparkle 3.2s infinite ease-in-out;
        transform-origin: center;
    }
}

@media (max-width: 280px) and (orientation: portrait) {
    #feature-block1,
    #feature-block3 {
        max-height: 25vh;
        margin-bottom: 0;
    }
    .feature-description {
        transform: translateY(-3vh);
    }
}

@media (max-width: 600px) {
    .feature-description {
        letter-spacing: 0.3px;
    }
    
    .feature-description .line {
        -webkit-text-stroke: 0.5px #00ff3f;
        text-stroke: 0.5px #00ff3f;
        filter: drop-shadow(0.5px 1.5px 0px #820206);
    }
    
    .feature-description .subtext span {
        -webkit-text-stroke: 0.4px #eeed13;
        text-stroke: 0.4px #eeed13;
        filter: drop-shadow(0.5px 1.5px 0px #820206);
        letter-spacing: 0.01em;
    }
}

@media (max-width: 400px) {
    .feature-description .line {
        -webkit-text-stroke: 0.3px #00ff3f;
        text-stroke: 0.3px #00ff3f;
        filter: drop-shadow(0.3px 1px 0px #820206);
    }
    
    .feature-description .subtext span {
        -webkit-text-stroke: 0.3px #eeed13;
        text-stroke: 0.3px #eeed13;
        filter: drop-shadow(0.3px 1px 0px #820206);
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .feature-description .line {
        -webkit-text-stroke: 0.4px #00ff3f;
        text-stroke: 0.4px #00ff3f;
        filter: drop-shadow(0.4px 1.2px 0px #820206);
    }
    
    .feature-description .subtext span {
        -webkit-text-stroke: 0.35px #eeed13;
        text-stroke: 0.35px #eeed13;
        filter: drop-shadow(0.4px 1.2px 0px #820206);
    }
}