
.splash-screen {
    --orange: #FFA51F;
    --yellow: #FFD044;
    --navy: #19172F;
    --cream: #FFF8E9;
    --green: #20CDA0;
    --purple: #7041CC;
    --pink: #EC4D91;

    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100dvh;
    min-height: 560px;
    overflow: hidden;

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

    padding: max(25px, env(safe-area-inset-top))
             20px
             max(17px, env(safe-area-inset-bottom));

    background: linear-gradient(
        120deg,
        #FFB72F,
        #FFA51F 50%,
        #FFAC36
    );

    font-family: 'Nunito', sans-serif;
}

.splash-background {
    position: absolute;
    inset: 0;
    z-index: -3;

    background:
        linear-gradient(
            105deg,
            transparent 14%,
            rgba(255,255,255,.15) 14% 27%,
            transparent 27%
        ),
        linear-gradient(
            75deg,
            transparent 42%,
            rgba(255,255,255,.13) 42% 57%,
            transparent 57%
        );
}

.splash-glow {
    position: absolute;
    z-index: -2;
    width: 300px;
    height: 300px;
    top: 22%;
    background: #FFE27B;
    border-radius: 50%;
    filter: blur(85px);
    opacity: .75;
}

.splash-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.decoration {
    position: absolute;
    animation: splashFloat 3s ease-in-out infinite;
}

.star-one {
    left: 9%;
    top: 26%;
    color: var(--pink);
    font-size: 35px;
}

.star-two {
    right: 10%;
    top: 36%;
    color: white;
    font-size: 30px;
    animation-delay: .7s;
}

.star-three {
    left: 12%;
    bottom: 28%;
    color: var(--purple);
    font-size: 25px;
}

.circle-one {
    right: 15%;
    top: 21%;
    width: 20px;
    height: 20px;
    border: 4px solid white;
    border-radius: 50%;
}

.square-one {
    right: 11%;
    bottom: 30%;
    width: 22px;
    height: 22px;
    background: var(--green);
    border-radius: 6px;
}

/* Top label */

.splash-top-label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border: 2px solid rgba(25,23,47,.25);
    border-radius: 30px;
    background: rgba(255,255,255,.25);
    color: var(--navy);
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: 1.6px;
    animation: splashFadeDown .7s both;
}

.online-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--green);
}

/* Mascot */

.mascot-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 40%;
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashMascotEnter .9s both;
}

.mascot-orbit {
    position: absolute;
    width: 225px;
    height: 225px;
    border: 3px dashed rgba(255,255,255,.6);
    border-radius: 50%;
    animation: splashOrbit 25s linear infinite;
}

.mascot-platform {
    position: absolute;
    width: 165px;
    height: 22px;
    bottom: 4px;
    background: rgba(25,23,47,.25);
    border-radius: 50%;
    filter: blur(7px);
}

.mascot-character {
    position: relative;
    width: 180px;
    height: 235px;
    z-index: 2;
    animation: splashMascotFloat 2.8s ease-in-out infinite;
}

.worker-helmet {
    position: absolute;
    z-index: 8;
    top: 3px;
    left: 22px;
    width: 136px;
    height: 59px;
    border: 5px solid var(--navy);
    border-radius: 75px 75px 15px 15px;
    background: linear-gradient(135deg,#FFF17D,#FFD044 65%,#F5A900);
    box-shadow: 0 6px 0 rgba(25,23,47,.15);
}

.worker-helmet::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: -11px;
    width: 142px;
    height: 15px;
    border: 4px solid var(--navy);
    border-radius: 50%;
    background: #FFB91E;
}

.helmet-highlight {
    width: 28px;
    height: 6px;
    margin: 10px 0 0 40px;
    background: white;
    border-radius: 20px;
    transform: rotate(-25deg);
}

.worker-face {
    position: absolute;
    z-index: 6;
    top: 49px;
    left: 37px;
    width: 106px;
    height: 105px;
    border: 5px solid var(--navy);
    border-radius: 43% 43% 48% 48%;
    background: linear-gradient(135deg,#FFD1A0,#F3A36E);
}

.worker-hair {
    position: absolute;
    top: -9px;
    left: 8px;
    width: 80px;
    height: 22px;
    border-radius: 50%;
    background: #302033;
}

.worker-eye {
    position: absolute;
    top: 37px;
    width: 9px;
    height: 14px;
    border-radius: 50%;
    background: var(--navy);
}

.eye-left { left: 25px; }
.eye-right { right: 25px; }

.worker-eyebrow {
    position: absolute;
    top: 27px;
    width: 20px;
    height: 4px;
    background: var(--navy);
    border-radius: 10px;
}

.eyebrow-left { left: 18px; }
.eyebrow-right { right: 18px; }

.worker-nose {
    position: absolute;
    top: 52px;
    left: 46px;
    width: 10px;
    height: 8px;
    background: #CF805B;
    border-radius: 50%;
}

.worker-moustache {
    position: absolute;
    left: 23px;
    top: 62px;
    width: 54px;
    height: 17px;
    background: #33202B;
    border-radius: 50% 50% 60% 60%;
}

.worker-mouth {
    position: absolute;
    top: 76px;
    left: 39px;
    width: 28px;
    height: 11px;
    border-bottom: 4px solid var(--navy);
    border-radius: 50%;
}

.worker-neck {
    position: absolute;
    z-index: 3;
    top: 140px;
    left: 74px;
    width: 32px;
    height: 27px;
    background: #F3AC79;
    border: 4px solid var(--navy);
    border-radius: 8px;
}

.worker-body {
    position: absolute;
    z-index: 4;
    top: 153px;
    left: 34px;
    width: 112px;
    height: 72px;
    border: 5px solid var(--navy);
    border-radius: 24px 24px 10px 10px;
    background: linear-gradient(120deg,#FF9341,#E75A27);
}

.worker-shirt-line {
    position: absolute;
    left: 48px;
    top: 0;
    width: 4px;
    height: 44px;
    background: #FFD88D;
}

.worker-pocket {
    position: absolute;
    right: 11px;
    top: 16px;
    width: 22px;
    height: 19px;
    border: 3px solid #FFD88D;
    border-radius: 4px;
}

.worker-belt {
    position: absolute;
    bottom: 0;
    left: -1px;
    width: 105px;
    height: 10px;
    background: var(--yellow);
    border-top: 3px solid var(--navy);
}

.worker-arm {
    position: absolute;
    z-index: 3;
    top: 156px;
    width: 26px;
    height: 59px;
    background: #F3A36E;
    border: 4px solid var(--navy);
    border-radius: 18px;
}

.left-arm {
    left: 15px;
    transform: rotate(25deg);
}

.right-arm {
    right: 14px;
    transform: rotate(-25deg);
}

.worker-glove {
    position: absolute;
    bottom: -8px;
    left: -5px;
    width: 29px;
    height: 23px;
    background: var(--green);
    border: 4px solid var(--navy);
    border-radius: 10px;
}

.worker-leg {
    position: absolute;
    z-index: 2;
    top: 211px;
    width: 25px;
    height: 30px;
    background: #F3A36E;
    border: 4px solid var(--navy);
}

.left-leg { left: 54px; }
.right-leg { right: 53px; }

.worker-boot {
    position: absolute;
    bottom: -8px;
    left: -8px;
    width: 39px;
    height: 17px;
    background: #68402F;
    border: 4px solid var(--navy);
    border-radius: 12px 12px 5px 5px;
}

.worker-trowel {
    position: absolute;
    z-index: 9;
    top: 89px;
    right: 0;
    width: 50px;
    height: 100px;
    transform: rotate(25deg);
    animation: splashTrowelMove 2.5s ease-in-out infinite;
}

.trowel-handle {
    position: absolute;
    top: 0;
    left: 17px;
    width: 15px;
    height: 48px;
    background: #94562F;
    border: 4px solid var(--navy);
    border-radius: 8px;
}

.trowel-neck {
    position: absolute;
    top: 44px;
    left: 20px;
    width: 9px;
    height: 18px;
    background: #ADB7C8;
    border: 2px solid var(--navy);
}

.trowel-metal {
    position: absolute;
    top: 59px;
    left: 1px;
    width: 47px;
    height: 35px;
    background: linear-gradient(135deg,#F1F4FA,#8792A7);
    border: 4px solid var(--navy);
    border-radius: 6px 6px 16px 16px;
}

/* Mascot labels */

.mascot-badge {
    position: absolute;
    z-index: 10;
    bottom: -1px;
    padding: 7px 17px;
    background: var(--green);
    border: 3px solid var(--navy);
    border-radius: 30px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 var(--navy);
}

.mascot-badge span {
    color: white;
}

.mascot-speech {
    position: absolute;
    z-index: 10;
    top: 13%;
    right: 0;
    padding: 9px 13px;
    border: 3px solid var(--navy);
    border-radius: 14px;
    background: white;
    color: var(--navy);
    font-size: 10px;
    font-weight: 1000;
    transform: rotate(5deg);
    box-shadow: 0 4px 0 var(--navy);
}

/* Branding */

.splash-brand {
    text-align: center;
    animation: splashFadeUp .8s .2s both;
}

.welcome-text {
    color: var(--navy);
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: 5px;
    margin-bottom: 4px;
}

.game-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Baloo 2',sans-serif;
    font-weight: 800;
    line-height: .9;
    -webkit-text-stroke: 2px var(--navy);
    filter: drop-shadow(0 5px 0 rgba(25,23,47,.2));
}

.logo-grout {
    color: var(--cream);
    font-size: clamp(62px,16vw,84px);
    text-shadow: 0 4px 0 var(--navy);
}

.logo-bhar {
    color: var(--yellow);
    font-size: clamp(32px,9vw,44px);
    margin-top: 7px;
    text-shadow: 0 4px 0 var(--navy);
}

.game-tagline {
    display: inline-block;
    margin-top: 13px;
    padding: 9px 23px;
    border-radius: 14px;
    background: var(--navy);
    color: white;
    font-size: 14px;
    font-weight: 1000;
    box-shadow: 0 4px 0 rgba(25,23,47,.2);
}

/* Loading */

.splash-loading {
    width: min(100%,310px);
    animation: splashFadeUp .8s .4s both;
}

.loading-heading {
    display: flex;
    justify-content: space-between;
    color: var(--navy);
    font-size: 12px;
    font-weight: 1000;
    margin-bottom: 9px;
}

.loading-track {
    position: relative;
    height: 17px;
    overflow: hidden;
    border: 3px solid var(--navy);
    border-radius: 20px;
    background: rgba(255,255,255,.55);
    box-shadow: 0 4px 0 rgba(25,23,47,.16);
}

.loading-fill {
    height: 100%;
    width: 0%;
    border-radius: 20px;
    background: linear-gradient(90deg,var(--green),#9AF0C6);
    transition: width .12s linear;
}

.loading-shine {
    position: absolute;
    top: 0;
    left: -60px;
    width: 45px;
    height: 100%;
    background: rgba(255,255,255,.6);
    transform: skewX(-25deg);
    animation: splashShine 1.8s linear infinite;
}

.loading-status {
    text-align: center;
    margin-top: 11px;
    color: var(--navy);
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: 2px;
}

.splash-footer {
    display: flex;
    gap: 12px;
    color: rgba(25,23,47,.7);
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: 2px;
}

.footer-star {
    color: white;
}

/* Animations */

@keyframes splashMascotEnter {
    from { opacity: 0; transform: translateY(45px) scale(.7); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splashMascotFloat {
    0%,100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-9px) rotate(2deg); }
}

@keyframes splashTrowelMove {
    0%,100% { transform: rotate(25deg); }
    50% { transform: rotate(12deg) translateY(-4px); }
}

@keyframes splashOrbit {
    to { transform: rotate(360deg); }
}

@keyframes splashFloat {
    0%,100% { translate: 0 0; }
    50% { translate: 0 -14px; }
}

@keyframes splashShine {
    from { left: -60px; }
    to { left: 110%; }
}

@keyframes splashFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes splashFadeDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */

@media(max-height:700px) {

    .splash-screen {
        padding-top: max(12px,env(safe-area-inset-top));
        padding-bottom: max(10px,env(safe-area-inset-bottom));
    }

    .mascot-container {
        min-height: 180px;
    }

    .mascot-character {
        transform: scale(.78);
    }

    .mascot-orbit {
        width: 175px;
        height: 175px;
    }

    .logo-grout {
        font-size: 56px;
    }

    .logo-bhar {
        font-size: 30px;
    }

    .game-tagline {
        margin-top: 8px;
    }
}

@media(max-width:360px) {

    .mascot-speech {
        right: -5px;
        font-size: 9px;
    }

    .splash-top-label {
        font-size: 8px;
        letter-spacing: 1px;
    }
}

@media(prefers-reduced-motion:reduce) {

    .splash-screen *,
    .splash-screen *::before,
    .splash-screen *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}
