@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700&display=swap');

body { 
    overflow: hidden;
    margin: 0px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#container {
    position: relative; 
    width: 100%; 
    height: 100vh;
}
/*
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}
*/
#fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    z-index: 52;
    color: white;
    background-color: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    cursor: pointer;
    font-size: 4rem;
}
#fullscreen-btn:focus {
  outline: none;
}

#pause-btn {
    position: absolute;
    top: 20px;
    left: 35px;
    z-index: 32;
    color: white;
    background-color: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    cursor: pointer;
    font-size: 4rem;
}
#pause-btn:focus {
  outline: none;
}

#pause-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        rgba(20, 66, 132, 0.5),
        rgba(65, 110, 133, 0.5) 59%,
        rgba(67, 115, 138, 0.5) 60%,
        rgba(83, 116, 132, 0.5) 90%
    );
    opacity: 0.0;

    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

#overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        #2681ff,
        #73C4ED 59%,
        #73C4ED 60%,
        #a0dfff 90%
    );

    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

#game-title-overlay {
    position: fixed;
    inset: 0;
    top: -50%;
    background-color: none;
    z-index: 51;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

#game-title-container {
    position: relative;
    z-index: 51;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-title {
    z-index: 52;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 10vh;
    color: rgba(255, 255, 255, 1.0);
    text-align: center;
    line-height: 1;
    padding: 30px;
    border-radius: 50%;
    background-color: none;
    filter: drop-shadow(rgba(1,1,1,0.2) 0.65vh 0.65vh 1px);
}

/* Container for the solar elements */
.space {
    width: 20vh;
    height: 20vh;

    max-width: 40vw;
    max-height: 40vw;

    background-color: rgb(64, 64, 128,1);
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    
    filter: drop-shadow(rgba(1,1,1,0.2) 0.65vh 0.65vh 1px);
    border-width: 1vh;
    border-style: solid;
    border-color: rgba(255,192,255, 1.0);
}

.space-background {
    width: 300%;
    height: 300%;

    background-image: repeating-linear-gradient( 45deg,
        rgba(128, 64, 128, 0.5), 
        rgba(128, 64, 128, 0.5) 2.5%,
        rgba(128, 64, 128, 0.0) 2.5%,
        rgba(128, 64, 128, 0.0) 5.0%);
    
    position: absolute;
    animation: spaceScroll 3s linear infinite;
}

/* The central sun element */
.sun {
    width: 15%;
    height: 15%;
    background-color: rgba(255, 255, 192, 1.0);
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(rgba(1,1,1,0.2) 0.65vh 0.65vh 1px);
}

/* The orbiting planet element, now also a container for the moon */
.planet {
    width: 50%;
    height: 50%;
    background-color: rgba(192, 255, 192, 1.0);
    border-radius: 50%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: orbit 8s linear infinite;
}

/* The new sub-moon element orbiting the moon */
.moon {
    width: 50%;
    height: 50%;
    background-color: rgba(255, 192, 255, 1.0);
    border-radius: 50%;
    position: absolute;
    animation: sub-orbit 2s linear infinite;
}

/* Keyframes for the planet's orbit around the sun */
@keyframes spaceScroll {
    from {
        transform: translate3d(0,0,0);
    }
    to {
        transform: translate3d(-10%,10%,0);
    }
}

/* Keyframes for the planet's orbit around the sun */
@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(350%) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(350%) rotate(-360deg);
    }
}

/* Keyframes for the moon's orbit around the planet */
@keyframes sub-orbit {
    from {
        transform: rotate(0deg) translateX(250%) rotate(0deg);
    }
    to {
        transform: rotate(-360deg) translateX(250%) rotate(360deg);
    }
}

#loading-bar-container {
    position: fixed;
    top: 75%;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: top;

    padding: 0;
    margin: 0;

    width: 50vw;
    max-width: 20vh;
    height: 3vh;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0);
}

#loading-bar-background {
    position: absolute;
    width: 90%;
    height: 75.0%;
    z-index: 0;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    padding: 0px;
    margin: 0px;
}
#loading-bar {
    width: 90%;
    height: 75.0%;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.0);
    border-radius: 50px;
    padding: 0px;
    margin: 0px;
    overflow: hidden;

    filter: drop-shadow(rgba(1,1,1,0.2) 0.65vh 0.65vh 1px);
}
#loading-bar-percent {
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.0);
    border-radius: 50px;
    padding: 0px;
    margin: 0px;

    transform-origin: left;
    transform: translateX(-100%);
    transition: transform 2.0s ease;

    will-change: transform;
}
#loading-bar-fill {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(90deg,#ff80ff,#ffd0ff);

    border-radius: 50px;
    padding: 0px;
    margin: 0px;
}
#loading-bar-handle {
    position: absolute;
    right: 0;
    height: 100%;
    aspect-ratio: 1;
    z-index: 3;
    background-color: rgba(255, 255, 255, 1);
    border-radius: 50px;
    border-width: 0px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.2);
    float: right;
}

/* Styles for the UI prompts */
#ui-labels-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 10;
}
.ui-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    background-color: rgba(55, 0, 255, 0.6);
    color: rgb(124, 192, 255);
    padding: 4px 8px;
    border-radius: 16px;
    /* Center the label on its coordinates */
    /*transform: translate(-50%, -150%);*/ 
    white-space: nowrap;
    transition: opacity 0.2s;
    will-change: transform;
}

.joystick-container {
    position: absolute;
    bottom: 30px;
    width: 120px; height: 120px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}
/* Positioning for each joystick */
#joystick-left {
    left: 30px;
}
#joystick-right {
    right: 30px;
}

.joystick-handle {
    width: 60px; height: 60px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    cursor: grab;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none; 
}
.joystick-handle:active {
    cursor: grabbing;
}
