@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;
    }
    #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: 100dvw;
    height: 100dvh;
    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-size: cover;
}
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-width: 100%;
    min-height: 100%;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: parallaxZoom 20s ease-in-out infinite,
    parallaxShift 30s ease-in-out infinite,
    brightnessPulse 10s ease-in-out infinite;
    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;
    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: 2;
    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;
    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 {
    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;
}

.tropical-title {
    color: #ffc10d;
    font-size: clamp(0.6rem, calc(1.3vw + 1.3vh), 2.2rem);
}

.feature-description {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.feature-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    aspect-ratio: 1 / 1;
    /*margin-top: 3vh;*/
    padding: 0;
    width: 100%;
    height: 100%;
    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: 100%;
    filter: none !important;
    mix-blend-mode: normal;
}

.feature-block.small {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 65vh;
    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: center;
}

.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

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

@keyframes sparkleFade {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

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

    font-size: clamp(0.5rem, calc(1vw + 1vh), 1.8rem);
    line-height: 1.2;
    font-weight: 900;
    margin: 0;
    padding: 0;
    max-width: 35vw;
    width: 70%;
    box-sizing: border-box;
    z-index: 2;
    font-family: "Noto Sans", sans-serif;
    text-transform: uppercase;
    color: white;
    letter-spacing: 0.6px;
}

#feature-desc1, #feature-desc2, #feature-desc3 {
    justify-content: unset;
    align-items: center;
}

#feature-block1,
#feature-block2,
#feature-block3 {
    align-self: center;
    justify-self: center;
    margin-bottom: -2vh;
}

#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, 25dvw, 35dvw);
    height: clamp(2dvh, calc(2dvw + 1dvh), 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;
    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 {
    font-family: "Noto Sans", sans-serif;
    width: clamp(40vw, 50vw, 60vw);
    font-size: clamp(0.5rem, 1.5vw, 1.3rem);
    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;
    z-index: 10;
    outline: none;
}

.start-button:focus {
    outline: none;
    box-shadow: none;
}

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

@media (orientation: landscape) and (max-height: 450px) {
    #fps-wrapper {
        grid-template-rows:
        minmax(10vh, auto)
        minmax(20vh, auto)
        auto
        minmax(10vh, auto);
    }
    #feature-block1,
    #feature-block2,
    #feature-block3 {
        margin-bottom: 0;
    }
}

@media (orientation: portrait) {
    #feature-preview-screen {
        height: auto;
        min-height: 100svh;
        overflow-y: hidden;
    }

    #fps-wrapper {
        display: grid;
        grid-template-areas:
        "logo"
        "feature-block1"
        "feature-desc1"
        "feature-block3"
        "feature-desc3"
        "start-button";
        grid-template-columns: 1fr;
        height: 100dvh;
        min-height: 0;
        box-sizing: border-box;
        row-gap: clamp(0.5vh, 1vh, 1.5vh);
        width: 100vw;
        overflow-x: hidden;
    }
    .feature-block,
    .feature-description,
    #section-button {
        min-height: 0;
    }
    .feature-block.small {
        width: min(75vw, 35vh);
        height: min(75vw, 35vh);
        align-self: center;
        aspect-ratio: 1 / 1;
        justify-content: center;
        position: relative;
        overflow: visible;
    }

    .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;
    }
    #feature-block1,
    #feature-block2,
    #feature-block3 {
        align-self: center;
        justify-self: center;
        margin-bottom: 0;
    }

    .highlight {
        font-size: clamp(0.6rem, calc(1.3vw + 1.3vh), 2rem);
    }

    .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;
        width: 100%;
        height: 100%;
        align-self: baseline;
    }

    .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;
        padding-top: min(2vh, 2vw);
        margin-bottom: -3vh;
        z-index: 2;
    }

    .logo-image {
        height: clamp(8vh, 12vh, 14vh);
        width: auto;
        margin-top: 1.5vh;
        max-width: 70vw;
    }

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

    #section-button {
        grid-area: start-button;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding-bottom: max(env(safe-area-inset-bottom, 0px), 2vh);
        box-sizing: border-box;
    }

    .start-fixed-portrait {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: clamp(1vh, 1.5vh, 2vh);
        width: 100%;
    }

    .loading-bar-wrapper {
        width: clamp(40dvw, 50dvw, 60dvw);
        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;
        border: 2px solid #f8f8f8;
        overflow: hidden;
    }

    .start-button {
        font-family: "Noto Sans", sans-serif;
        font-size: clamp(0.5rem, calc(1vw + 1vh), 1.5rem);
        text-transform: uppercase;
        background: linear-gradient(to right, #ffc10d, white, #ffc10d);
        background-size: 200% auto;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        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 {
        bottom: 1.5vh;
        right: clamp(3vw, 4vw, 5vw);
        z-index: 999;
    }
}
@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: landscape) {
    #fps-wrapper {
        grid-template-rows:
      minmax(8vh, 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 {
        width: 100%;
        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;
    }
}

.layer-base {
    mix-blend-mode: lighten;
}