:root {
    --spacelightblue: white;
    --spacemediumblue: #c8f0ff;
    --spacedarkblue: #0C354E;
    --spacebackground: #00214055;
}

body {
    background-image: url(../resources/textures/background/galaxy.webp);
    background-size: cover;
    font-family: "Exo 2", sans-serif;
    font-optical-sizing: auto;
    color: white;
    /* font-weight: 10em; */
    font-style: normal;
    text-align: center;
}


#mainDiv {
    flex-wrap: wrap;
}

#sectionTitle {}

.menu {
    display: flex;
    /* Inline layout */
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    justify-content: center;
    /* Center items horizontally */
    gap: 1rem;
    /* Space between links */
    padding: 1rem;
    background: #111;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: #333;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu a:hover {
    background: #555;
}

@media (max-width: 600px) {
    .menu {
        flex-direction: column;
        align-items: stretch;
    }

    .menu a {
        text-align: center;
    }
}

h1 {
    font-size: 3em;
}

#canvasContainer {
    position: relative;
    /* important so overlay can be positioned relative to this */
    width: 100vw;
    height: 100vh;
    padding: 0;
}

#hud {
    /* position: absolute; */
    width: 100%;
    height: 100%;
    /* distance from top */
    /* distance from left */
    left: 0px;
    /* background: rgba(0, 0, 0, 0.6); */
    /* semi-transparent background */
    align-self: center;
    color: var(--spacelightblue);
    padding: 0px;
    border-radius: 5px;
    z-index: 10;
    display: inline-block;
    /* ensure it's above the canvas */
}

#loadingText {
    font-family: "Exo 2", sans-serif;
    font-optical-sizing: auto;
    /* font-weight: 10em; */
    font-style: normal;
    text-align: center;
}

#planetNameText {
    font-family: "Exo 2", sans-serif;
    font-optical-sizing: auto;
    font-size: 2em;
    /* font-weight: 10em; */
    font-style: normal;
    text-align: center;
    text-transform: capitalize;
}

#btnContainer {
    text-align: center;
}

canvas {
    display: block;
    /* remove default spacing */
}

button.myButton {
    width: 100px;
    height: 100px;
    font-size: 3rem;
}

.spaceHud {
    margin: 5em;
    border-width: 2px;
    border-style: solid;
    border-color: var(--spacemediumblue);
    border-radius: 1em;
    font-family: "Exo 2", sans-serif;
    color: var(--spacelightblue);
    background-color: var(--spacedarkblue);
    box-shadow: 0px 0px 60px 10px var(--spacemediumblue);
    background: var(--spacebackground);
    transform-origin: center;
    opacity: 0;
    /* hidden by default */
    position: relative;
    overflow: hidden;
}

/* ✅ Power ON */
.spaceHud.turn-on {
    animation: scifi-on 1.5s forwards;
}

/* ✅ Power OFF */
.spaceHud.turn-off {
    animation: scifi-off 1s forwards;
}

@keyframes scifi-on {
    0% {
        opacity: 0;
        transform: scaleX(0.05) scaleY(0);
        filter: brightness(0.2) blur(5px);
    }

    40% {
        opacity: 1;
        transform: scaleX(1) scaleY(0.05);
        filter: brightness(1.5) blur(1px);
    }

    70% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}


@keyframes scifi-off {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }

    20% {
        opacity: 0.8;
        transform: scale(0.95);
        filter: brightness(2) blur(2px);
    }

    80% {
        opacity: 0.4;
        transform: scale(1.05);
        filter: brightness(0.5) blur(3px);
    }

    100% {
        opacity: 0;
        transform: scale(0.9);
        filter: brightness(0) blur(8px);
    }
}

.spaceHud .typing span {
    opacity: 0;
    display: inline-block;
    transition: opacity 0.05s;
}

.spaceHud .typing span.visible {
    opacity: 1;
}

/* === Optional: add a scanline sweep effect when powering ON === */
.spaceHud.turn-on::before {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: scan-sweep 1s forwards;
}

@keyframes scan-sweep {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

h1,
h2,
h3,
h4,
h5 {
    text-align: center;
}

p {
    margin: 2em;
    padding: 1em;
    border-width: 2px;
    border-style: solid;
    border-color: var(--spacelightblue);
    border-radius: 1em;
    font-size: 1em;
    color: white;
    /* font-weight: 10em; */
    font-style: normal;

    text-transform: capitalize;

    /* text-shadow:
        0 0 6px rgba(202, 228, 225, 0.92),
        0 0 30px rgba(202, 228, 225, 0.34),
        0 0 12px rgba(30, 132, 242, 0.52),
        0 0 21px rgba(30, 132, 242, 0.92),
        0 0 34px rgba(30, 132, 242, 0.78),
        0 0 54px rgba(30, 132, 242, 0.92); */
}