@font-face {
    font-family: "NuniPixel";
    src: url(../assets/fonts/NuniPixel.ttf);
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #8fd7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .45s ease;
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loadingCard {
    width: min(420px, 85vw);
    padding: 35px 28px;
    border-radius: 24px;
    background: rgba(20, 15, 35, .88);
    color: white;
    text-align: center;
    font-family: Georgia, serif;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.loadingCard img {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    animation: loadingBounce 1.2s ease-in-out infinite;
}

.loadingCard h1 {
    font-size: 24px;
    margin: 18px 0;
}

.loadingBar {
    width: 100%;
    height: 18px;
    background: rgba(255, 255, 255, .16);
    border: 2px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    overflow: hidden;
}

#loadingFill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffd966, #ff9f1c);
    transition: width .35s ease;
}

#loadingText {
    margin: 14px 0 0;
    opacity: .85;
}

@keyframes loadingBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.skyLayer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
}

#skyFront {
    opacity: 0;
    transition: opacity 1.5s ease;
}

.skyStrip {
    position: absolute;
    left: 0;
    top: 0;

    width: 300%;
    height: 300%;

    background-image: url("../assets/props/sky.png");
    background-repeat: repeat;
    background-size: 100% 100%;

    image-rendering: pixelated;
}

#game {
    background: transparent;
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    transition: 1s all ease-in-out;
}

#coords {
    position: fixed;
    top: 12px;
    left: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-family: "NuniPixel";
    font-size: 16px;
    border-radius: 8px;
    z-index: 999;
}

#musicToggle {
    position: fixed;
    top: 18px;
    right: 18px;

    width: 58px;
    height: 58px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);

    color: white;
    font-size: 26px;

    cursor: pointer;

    z-index: 99999;

    transition:
        transform .2s ease,
        background .2s ease;

    animation: musicFloat 3s ease-in-out infinite;
}

#musicToggle:hover {
    transform: scale(1.08);
    background: rgba(0, 0, 0, .5);
}

#musicToggle:active {
    transform: scale(.95);
}

@keyframes musicFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}