@import url('https://fonts.googleapis.com/css2?family=Spectral:wght@800&display=swap');
@supports (height: 100svh) {
    html, body,
    #feature-preview-screen,
    #fps-wrapper {
        height: 100svh !important;
        max-height: 100svh !important;
    }
}
html, body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img {
    background: transparent;
    box-shadow: none;
    filter: none;
}

#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%;
    overflow: hidden;
    z-index: 0;
}

.stacked-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.stacked-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    z-index: 5;
    pointer-events: none;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: slowZoom 30s ease-in-out infinite;
    transform-origin: center;
}

@keyframes slowZoom {
    0%   { transform: scale(1.05); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1.05); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

#fps-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    margin: 0;
    overflow: hidden;
}

.feature-image-ls, .feature-image-pt {
    display: none;
}

.logo-image {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

.only-portrait {
    display: block;
}

@keyframes wildGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 40, 0, 0.95))
        drop-shadow(0 0 18px rgba(255, 64, 142, 0.85))
        brightness(1);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(255, 60, 0, 1))
        drop-shadow(0 0 28px rgba(255, 64, 142, 0.85))
        brightness(1.5);
        transform: scale(1.05);
    }
}

@keyframes shimmerFlash {
    0%, 100% { opacity: 1;   filter: brightness(1); }
    50%      { opacity: 0.9; filter: brightness(2); }
}

@media (orientation: landscape) {
    .only-landscape { display: block; }
    .only-portrait { display: none !important; }

    .portrait-scaler,
    .portrait-grid,
    #portrait-stack,
    #portrait-stack * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #landscape-scaler {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

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

        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }

    .landscape-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        height: 100%;
        padding: 2rem;
        box-sizing: border-box;
    }

    .feature-block {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .feature-image-ls {
        width: 100%;
        height: auto;
        display: block;
    }

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

    .feature-block img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center;
    }

    .right-panel {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .landscape-logo .logo-image {
        width: 100%;
        max-width: clamp(15vw, 20%, 25vw);
        height: auto;
        margin-bottom: 2rem;
        object-fit: contain;
    }

   .text-ls {
        font-size: clamp(0.5rem, calc(1.3vw + 1vh), 3rem);
        font-weight: 900;

        font-family: 'Spectral', serif;
       white-space: nowrap;
        line-height: 1.8;
        text-align: center;
       letter-spacing: 0.1em;
       background: linear-gradient(
               to bottom,
               #fff490 30%,
               #ff7e2a 70%,
               #fff490 30%,
               #ff7e2a 100%
       );
       -webkit-background-clip: text;
       -webkit-text-fill-color: transparent;
       color: transparent;
       -webkit-text-stroke: 1px #ffcf26;
       text-stroke: 1px #ffcf26;
       filter:
               drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.6))
               drop-shadow(0px 0px 10px rgba(43, 0, 70, 0.5))
               drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.7)) !important;

       text-shadow: none !important;
    }


    .text-ls .x6 {
        background: linear-gradient(
                to bottom,
                #ffdd00 30%,
                #ff0808 70%,
                #781b00 100%
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        -webkit-text-stroke: 1px #ff894c;
        text-stroke: 1px #ff894c;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        color: transparent !important;
        font-size: 1.2em !important;
        font-weight: 800 !important;
    }

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

    .loading-bar-wrapper {
        position: absolute;
        bottom: clamp(1vh, 3vh, 5vh);
        width: clamp(20vw, 25vw, 35vw);
        height: clamp(2vh, 2.5vh, 3.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;
    }

    .loading-bar {
        width: 0%;
        height: 100%;
        background: linear-gradient(
                90deg,
                #0d1b2a,
                #7a00ff,
                #d200ff,
                #ff2e00,
                #ff6a00,
                #ff9b00,
                #0d1b2a
        );
        background-size: 400% 100%;
        animation: shimmer 3s linear infinite;
        transition: width 0.3s ease;
        border-radius: 999px;
        box-shadow:
                0 0 14px rgba(255, 46, 0, 0.8),
                0 0 22px rgba(122, 0, 255, 0.7),
                0 0 32px rgba(255, 155, 0, 0.6);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    @keyframes shimmer {
        0% { background-position: 0% center; }
        100% { background-position: 300% 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: 'Spectral', serif;
        font-weight: 800;
        font-size: clamp(0.5rem, calc(0.8vw + 1vh), 1.2rem);
        text-transform: uppercase;
        background: none;
        border: none;
        cursor: pointer;
        width: 100%;

        background-image: linear-gradient(
                90deg,
                #ffe6a7 0%,
                #ffd700 20%,
                #fff3b0 40%,
                #ffa83c 60%,
                #ffe6a7 80%,
                #fff3b0 100%
        );
        background-size: 200% auto;
        color: transparent;
        -webkit-background-clip: text;
        background-clip: text;

        filter:
                drop-shadow(0px 0px 8px rgba(43, 0, 70, 0.6))
                drop-shadow(0px 3px 8px rgba(0, 0, 0, 0.6))
                drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.5));

        justify-self: center;
        margin-top: clamp(2vh, calc(2vw + 2vh), 5vh);

        animation: shine 4s linear infinite;
    }

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

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

    #section-button {
        position: absolute;
        bottom: 3vh;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        display: flex;
        justify-content: center;
        z-index: 10;
    }

    .loading-bar-wrapper {
        position: relative;
        width: clamp(20vw, 25vw, 35vw);
        height: clamp(2vh, 2.5vh, 3.5vh);
    }
}

@media (orientation: landscape) {
    .landscape-grid {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        /*grid-template-columns: 2fr minmax(0, 1fr);*/
        /*grid-template-columns: 2fr 1fr;*/
        grid-template-rows: 1fr;
        align-items: center;
        justify-items: center;
        gap: 2vw;
        width: 100%;
        height: 100%;
        padding: 2vw;
        box-sizing: border-box;
    }

    .right-panel {
        grid-column: 2;
        grid-row: 1;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;

        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;

        justify-self: stretch;
        align-self: stretch;

        padding: 0 1rem;
        box-sizing: border-box;
    }

    .logo-placeholder {
        width: 100%;
        min-width: 0;
        min-height: 0;
        flex: 0 1 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo-image {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 50vh;
        object-fit: contain;
    }

    .text-ls {
        max-width: 100%;
        min-height: 0;
        min-width: 0;
    }

    .logo-placeholder,
    .feature-description-ls {
        min-width: 0;
        min-height: 0;
        flex-shrink: 1;
    }

    .feature-description-ls {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 0;
        box-sizing: border-box;
    }

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

    .feature-block img {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
    }

    .start-button {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.6s ease;
    }

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

    .feature-block.stacked-block-h {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        overflow: hidden;
        contain: layout paint;
    }

    .feature-block.stacked-block-h .feature-main-wild {
        display: block;
        visibility: visible;
        opacity: 1;
        will-change: transform;
    }

    .feature-block.stacked-block-h img:not(.wild) {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .feature-block.stacked-block-h .wild {
        position: absolute !important;
        inset: 0;
        margin: auto;
        max-width: 100% !important;
        max-height: 100% !important;
        width: 100%;
        height: 100%;
        object-fit: contain;
        z-index: 2;
        pointer-events: none;
    }

    .feature-block.stacked-block-h .shimmer {
        will-change: transform, filter, opacity;
        animation: wildGlow 3s ease-in-out infinite,
                   shimmerFlash 3s ease-in-out infinite;
    }

    #portrait-stack,
    #portrait-stack .wild,
    #portrait-stack .shimmer,
    #portrait-stack img.feature-main-wild,
    #portrait-stack img {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .feature-block.stacked-block-h {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .feature-block.stacked-block-h .wild,
    .feature-block.stacked-block-h .shimmer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #landscape-scaler {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.88);
        transform-origin: center;

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

        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }
}

/* =============================== */
/* === PORTRAIT MODE STYLES === */
/* =============================== */
@media (orientation: portrait) {
    .only-landscape {
        display: none !important;
    }

    .only-portrait {
        display: block !important;
    }

    #landscape-scaler,
    .landscape-grid,
    .feature-block.stacked-block-h:not(#portrait-stack),
    .feature-block.stacked-block-h:not(#portrait-stack) * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .portrait-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        align-items: start;
        justify-items: center;
        width: 100%;
        height: 100%;
        gap: 0;
        row-gap: clamp(0.5vh, 1vh, 1.5vh);
        padding-top: clamp(1vh, 1.5vh, 2vh);
        box-sizing: border-box;
    }

    .portrait-grid .logo-placeholder {
        grid-row: 1;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        width: 100%;
        padding-top: 0;
    }

    .portrait-grid .logo-image {
        width: 100%;
        max-width: clamp(40vw, 60vw, 80vw);
        max-height: clamp(12vh, 15vh, 18vh);
        object-fit: contain;
        margin: 0;
    }

    #portrait-stack {
        position: relative;
        grid-row: 2;
        width: 90%;
        max-width: 90%;
        min-height: 35vh;
        max-height: 60vh;
        justify-self: center;
        align-self: start;
        overflow: hidden;
        contain: layout paint;
        margin-bottom: 0;
    }

    .feature-description-pt {
        grid-row: 3;
        text-align: center;
        width: 100%;
        max-width: 90%;
        margin: 0 auto;
        padding-top: 0;
        align-self: start;
        transform: translateY(-1vh);
    }

    .text-pt {
        font-size: clamp(0.8rem, calc(2vw + 1vh), 3rem);
        font-weight: 800;
        font-family: 'Spectral', serif;
        line-height: 1.4;
        text-align: center;
        letter-spacing: 0.1em;
        background: linear-gradient(
                to bottom,
                #fff490 30%,
                #ff7e2a 70%,
                #781b00 100%
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        -webkit-text-stroke: 1px #ffcf26;
        text-stroke: 1px #ffcf26;
        filter:
                drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.6))
                drop-shadow(0px 0px 10px rgba(43, 0, 70, 0.5))
                drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.7)) !important;

        text-shadow: none !important;
        margin: 0;
        padding: 0;
    }

    .text-pt .x6 {
        display: inline-block;
        font-weight: 800;
        background: linear-gradient(
                to bottom,
                #ffdd00 30%,
                #ff0808 70%,
                #781b00 100%
        );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        -webkit-text-stroke: 1px #ff894c;
        text-stroke: 1px #ff894c;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        color: transparent !important;
        font-size: 1.2em !important;
        font-weight: 800 !important;
    }

    .start-button {
        position: absolute;
        bottom: clamp(2vh, 4vh, 6vh);
        left: 50%;
        transform: translateX(-50%);
        width: 100%;

        font-family: 'Spectral', serif;
        font-weight: 800;
        font-size: clamp(0.7rem, calc(1vw + 1.2vh), 1.5rem);
        text-transform: uppercase;
        background: none;
        border: none;
        cursor: pointer;

        background-image: linear-gradient(
                90deg,
                #ffe6a7 0%,
                #ffd700 20%,
                #fff3b0 40%,
                #ffa83c 60%,
                #ffe6a7 80%,
                #fff3b0 100%
        );
        background-size: 200% auto;
        color: transparent;
        -webkit-background-clip: text;
        background-clip: text;
        border: none !important;
        outline: none !important;
        -webkit-appearance: none !important;

        -webkit-tap-highlight-color: transparent;

        filter:
                drop-shadow(0px 0px 8px rgba(43, 0, 70, 0.6))
                drop-shadow(0px 3px 8px rgba(0, 0, 0, 0.6))
                drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.5));

        animation: pulse 2.5s infinite, shine 4s linear infinite;
    }

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

    .loading-bar-wrapper {
        position: absolute;
        bottom: clamp(2vh, 4vh, 6vh);
        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;
    }

    .loading-bar {
        width: 0%;
        height: 100%;
        background: linear-gradient(
                90deg,
                #0d1b2a,
                #7a00ff,
                #d200ff,
                #ff2e00,
                #ff6a00,
                #ff9b00,
                #0d1b2a
        );
        background-size: 400% 100%;
        animation: shimmer 3s linear infinite;
        transition: width 0.3s ease;
        border-radius: 999px;
        box-shadow:
                0 0 14px rgba(255, 46, 0, 0.8),
                0 0 22px rgba(122, 0, 255, 0.7),
                0 0 32px rgba(255, 155, 0, 0.6);
    }

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

    .start-button {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.6s ease;
    }

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

    #portrait-stack img.main-layer {
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
        z-index: 1;
    }

    #portrait-stack img {
        vertical-align: middle;
    }

    #portrait-stack img.feature-main-wild:not(.wild),
    #portrait-stack .glow-svg {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        pointer-events: none;
        z-index: 2;
    }

    #portrait-stack .glow-svg {
        z-index: 4;
    }

    #portrait-stack .wild {
        position: absolute !important;
        inset: 0;
        margin: auto;
        max-width: 100% !important;
        max-height: 100% !important;
        width: 100%;
        height: 100%;
        object-fit: contain;
        z-index: 3;
        pointer-events: none;
    }

    #portrait-stack .shimmer {
        will-change: transform, filter, opacity;
        animation: wildGlow 3s ease-in-out infinite,
                   shimmerFlash 3s ease-in-out infinite;
    }

    .landscape-grid,
    .feature-block.stacked-block-h:not(#portrait-stack),
    .feature-block.stacked-block-h:not(#portrait-stack) .wild,
    .feature-block.stacked-block-h:not(#portrait-stack) .shimmer,
    .feature-block.stacked-block-h:not(#portrait-stack) img,
    .feature-block.stacked-block-h:not(#portrait-stack) .feature-main-wild {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #portrait-stack.stacked-block-h {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #portrait-stack .wild,
    #portrait-stack .shimmer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

}

@media (orientation: portrait) and (min-width: 700px) and (min-height: 700px) {
    .portrait-grid .logo-image {
        max-height: 12vh;
    }

    #portrait-stack {
        width: 80%;
        max-width: 80%;
        min-height: 45vh;
        max-height: 65vh;
    }

    .feature-description-pt {
        transform: translateY(-2vh);
        max-width: 80%;
    }
}


@media (orientation: portrait) and (min-width: 1000px) {
    .portrait-grid .logo-image {
        max-height: 10vh;
        max-width: clamp(300px, 50vw, 600px);
    }

    #portrait-stack {
        width: 75%;
        max-width: 75%;
        min-height: 50vh;
        max-height: 70vh;
    }

    .feature-description-pt {
        transform: translateY(-2.5vh);
        max-width: 75%;
    }

    .start-button {
        font-size: clamp(1rem, calc(1.5vw + 1.5vh), 2rem);
    }
}

@media (orientation: portrait) and (min-aspect-ratio: 7/10) and (max-aspect-ratio: 10/10) {
    #portrait-stack {
        min-height: 40vh;
        max-height: 65vh;
    }

    .feature-description-pt {
        transform: translateY(-2vh);
    }

    .portrait-grid .logo-image {
        max-height: 13vh;
    }
}

@media (min-device-width: 768px) and (min-device-height: 768px) {
    #sound-toggle {
        width: 45px;
        height: 45px;
    }
}

#fps-wrapper,
#fps-wrapper *:not(svg):not(svg *) {
    hyphens: unset;
    -webkit-hyphens: unset;
    -ms-hyphens: unset;
    overflow-wrap: unset;
    white-space: nowrap;
}