/* ==========================================
   FUJI X PLAY - SPLASH SCREEN
========================================== */

.fx-splash,
.fx-splash * {
    box-sizing: border-box;
}

.fx-splash {
    position: fixed;
    inset: 0;
    z-index: 2147483647;

    display: none;
    justify-content: center;

    width: 100%;
    height: 100%;

    background: #9195a3;

    font-family: var(--fx-font);

    opacity: 1;

    transition: opacity 0.45s ease,
                visibility 0.45s ease;
}

.fx-show-splash .fx-splash {
    display: flex;

    /* Fallback if the JavaScript fails */
    animation: fxSafetyExit 0.5s ease 5s forwards;
}

/* html.fx-show-splash,
html.fx-show-splash body {
    overflow: hidden;
} */

.fx-splash.fx-splash-exit {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fx-splash-screen {
    position: relative;

    width: 100%;
    /* max-width: var(--fx-splash-width, var(--fx-app-width)); */
    max-width: var(--fx-app-width);
    height: 100%;

    overflow: hidden;
    isolation: isolate;

    background:
        radial-gradient(
            ellipse at 50% 40%,
            #650909 0%,
            #260405 40%,
            #080708 85%
        );

    border-left: 1px solid rgba(212, 175, 55, 0.08);
    border-right: 1px solid rgba(212, 175, 55, 0.08);
}


/* Background Glow */

.fx-splash-glow {
    position: absolute;

    width: 100%;
    height: 60%;

    top: 8%;
    left: 0;

    background: radial-gradient(
        ellipse,
        rgba(255, 36, 0, 0.32),
        transparent 70%
    );

    animation: fxGlow 2s ease-in-out infinite alternate;

    pointer-events: none;
}


/* Logo Content */

.fx-splash-content {
    position: absolute;

    top: 43%;
    left: 50%;

    width: 100%;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    flex-direction: column;

    padding: 0 20px;

    z-index: 2;
}

.fx-splash-emblem {
    position: relative;

    width: min(82%, 340px);
    aspect-ratio: 1 / 1;

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

.fx-splash-logo {
    position: relative;

    width: 100%;
    height: auto;

    object-fit: contain;

    z-index: 3;

    filter: drop-shadow(
        0 0 22px rgba(255, 60, 0, 0.45)
    );

    animation:
        fxLogoEnter 0.85s cubic-bezier(.16, 1, .3, 1) both,
        fxLogoFloat 3s ease-in-out 0.85s infinite;
}


/* Animated Golden Rings */

.fx-ring {
    position: absolute;

    top: 50%;
    left: 50%;

    aspect-ratio: 1 / 1;

    border-radius: 50%;

    transform: translate(-50%, -50%);

    pointer-events: none;
}

.fx-ring-one {
    width: 85%;

    border: 1px solid rgba(212, 175, 55, 0.40);

    box-shadow:
        0 0 25px rgba(212, 175, 55, 0.10),
        inset 0 0 25px rgba(212, 175, 55, 0.10);
}

.fx-ring-two {
    width: 98%;

    border: 1px solid rgba(212, 175, 55, 0.20);

    border-top-color: #ffe5a0;
    border-bottom-color: #d4af37;

    animation: fxRingRotate 8s linear infinite;
}

.fx-ring-three {
    width: 110%;

    border: 1px dashed rgba(212, 175, 55, 0.23);

    animation: fxRingRotate 20s linear infinite reverse;
}


/* Tagline */

.fx-splash-tagline {
    margin-top: 18px;

    color: var(--fx-gold-light);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 4px;
    text-align: center;

    animation: fxTextEnter 0.7s ease 0.4s both;
}

.fx-splash-divider {
    width: 70px;
    height: 1px;

    margin-top: 18px;

    background: linear-gradient(
        90deg,
        transparent,
        #d4af37,
        transparent
    );
}


/* Floating Golden Particles */

.fx-splash-particles {
    position: absolute;
    inset: 0;

    overflow: hidden;

    pointer-events: none;
}

.fx-particle {
    position: absolute;

    bottom: -15px;

    border-radius: 50%;

    background: #ffd36b;

    box-shadow: 0 0 8px rgba(255, 185, 50, 0.8);

    opacity: 0;

    animation: fxParticleFloat linear infinite;
}


/* Loading Indicator */

.fx-splash-bottom {
    position: absolute;

    bottom: 13%;
    left: 50%;

    width: 58%;
    max-width: 230px;

    transform: translateX(-50%);

    text-align: center;

    z-index: 5;
}

.fx-loading-track {
    width: 100%;
    height: 4px;

    border-radius: 20px;

    background: rgba(212, 175, 55, 0.15);

    overflow: hidden;
}

.fx-loading-bar {
    width: 100%;
    height: 100%;

    border-radius: 20px;

    background: linear-gradient(
        90deg,
        #926316,
        #ffe5a0,
        #d4af37
    );

    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);

    transform: scaleX(0);
    transform-origin: left;

    animation: fxLoading 2.5s ease-out forwards;
}

.fx-loading-text {
    margin-top: 14px;

    color: rgba(255, 229, 160, 0.65);

    font-size: 11px;
    font-weight: 400;

    letter-spacing: 1px;
}


/* Bottom Branding */

.fx-splash-brand {
    position: absolute;

    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    left: 0;

    width: 100%;

    color: rgba(212, 175, 55, 0.5);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 3px;
    text-align: center;
}


/* ==========================================
   ANIMATIONS
========================================== */

@keyframes fxLogoEnter {
    from {
        opacity: 0;
        transform: scale(0.78);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fxLogoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes fxRingRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fxGlow {
    from {
        opacity: 0.5;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes fxTextEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fxParticleFloat {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translate(40px, -105vh);
        opacity: 0;
    }
}

@keyframes fxLoading {
    0% {
        transform: scaleX(0);
    }

    30% {
        transform: scaleX(0.35);
    }

    70% {
        transform: scaleX(0.8);
    }

    100% {
        transform: scaleX(1);
    }
}

@keyframes fxSafetyExit {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}


/* Small Screens */

@media (max-width: 360px) {
    .fx-splash-tagline {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .fx-splash-emblem {
        width: 86%;
    }
}

@media (max-height: 450px) {
    .fx-splash-emblem {
        max-width: 180px;
    }

    .fx-splash-bottom {
        bottom: 10%;
    }

    .fx-splash-brand {
        bottom: 8px;
    }
}


/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .fx-splash-logo,
    .fx-ring,
    .fx-splash-glow,
    .fx-particle,
    .fx-splash-tagline {
        animation: none;
    }
}