/* SPACESHIP MOVEMENT */
.spaceship-wrap {
    display: table;
    height: 100%;
    width: 100%;
    margin-top: 88px;
}

.spaceship-inner {
    position: relative;
    margin: auto;
    animation: spaceship-flight 35s ease-in-out infinite;
}

@keyframes spaceship-flight {
    0% {
        transform: translate(0, 39px) scale(0) rotate(-4deg);
    }

    8% {
        transform: translate(0, -10px) scale(1) rotate(2deg);
    }

    18% {
        transform: translate(0, -1px) scale(.9) rotate(-2deg);
    }

    35% {
        transform: translate(0, -14px) scale(1) rotate(3deg);
    }

    53% {
        transform: translate(0, 1px) scale(0.9) rotate(-2deg);
    }

    71% {
        transform: translate(0, -14px) scale(.9) rotate(3deg);
    }

    81% {
        transform: translate(0, 1px) scale(0.8) rotate(-2deg);
    }

    90% {
        transform: translate(0, -14px) scale(1) rotate(1deg);
    }

    100% {
        transform: translate(0, 39px) scale(0) rotate(-4deg);
    }
}

/* SPACESHIP SHAPE */
#spaceship-ring {
    width: 258px;
    height: 48px;
    top: 28px;
    margin: auto;
    border-radius: 50%;
    border: 3.5px solid black;
    background: white;
    position: relative;
}

/* SPACESHIP CABIN */
.cabin {
    width: 178px;
    height: 71px;
    border-radius: 53% 53% 17% 17% / 71% 71% 44% 44%;
    background: white;
    position: relative;
    border: 3.5px solid black;
    top: -30px;
    z-index: -2;
    margin: 0 auto;
    left: 4px;
}

/* SPACESHIP CABIN ANIMATED TEXT */
.cabin::before {
    position: relative;
    color: cyan;
    top: 1.7px;
    font-size: 18px;
    font-weight: 800;
    content: "CT";
    animation: cabin-animated-text 35s ease-in-out infinite;
}


@keyframes cabin-animated-text {

    0% {
        content: "";
    }

    8% {
        content: "WELCOME";
        text-shadow: .8px .8px .8px black;
    }

    26% {
        content: "I like coding";
        text-shadow: .8px .8px .8px black;
    }

    35% {
        content: "HTML";
        text-shadow: .8px .8px .8px black;
    }

    44% {
        content: "CSS";
        text-shadow: .8px .8px .8px black;
    }

    53% {
        content: "SVG";
        text-shadow: .8px .8px .8px black;
    }

    62% {
        content: "JavaScript";
        text-shadow: .8px .8px .8px black;
    }

    71% {
        content: "Bootstrap";
        text-shadow: .8px .8px .8px black;
    }

    80% {
        content: "I like coding";
        text-shadow: .8px .8px .8px black;
    }

    90% {
        content: "GOODBYE";
        text-shadow: .8px .8px .8px black;
    }

    100% {
        content: "";
    }
}

/* SPACESHIP CIRCULAR REACTORS */
ul.circles {
    margin: 0;
    position: absolute;
    top: 0;
    width: 100%;
    display: block;
    height: 100%;
}

ul.circles li {
    list-style-type: none;
    width: 17px;
    height: 8px;
    position: absolute;
    background: cyan;
    border: 1.7px solid black;
    border-radius: 50%;
}

ul.circles li:nth-child(1) {
    left: 21px;
    bottom: 15px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
}

ul.circles li:nth-child(2) {
    left: 44px;
    top: 11px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: .2s;
}

ul.circles li:nth-child(3) {
    left: 73px;
    top: 6px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: .4s;
}

ul.circles li:nth-child(4) {
    right: 131px;
    top: 4px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: .6s;
}

ul.circles li:nth-child(5) {
    right: 100px;
    top: 4px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: .8s;
}

ul.circles li:nth-child(6) {
    right: 70px;
    top: 6px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: 1s;
}

ul.circles li:nth-child(7) {
    right: 41px;
    top: 11px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: 1.2s;
}

ul.circles li:nth-child(8) {
    right: 17px;
    top: 19px;
    animation: colors 8s linear;
    animation-iteration-count: infinite;
    animation-delay: 1.4s;
}

@keyframes colors {
    0% {
        background: red;
    }

    10% {
        background: orange;
    }

    20% {
        background: yellow;
    }

    30% {
        background: green;
    }

    40% {
        background: blue;
    }

    50% {
        background: springgreen;
    }

    60% {
        background: violet;
    }

    70% {
        background: purple;
    }

    80% {
        background: pink;
    }

    90% {
        background: cyan;
    }

    100% {
        background: marine;
    }
}

/* SPACESHIP CENTRAL REACTOR */
.reactor {
    width: 148px;
    height: 17px;
    margin: 0 auto;
    background: cyan;
    border: 1.7px solid black;
    position: relative;
    left: 3px;
    border-radius: 50%;
    top: -52px;
    overflow: hidden;
}

/* COLORED STARS TWINKLE ANIMATION */
#stars {
    background-color: transparent;
    height: 8vh;
    margin: auto;
    z-index: 1;
}

.star {
    position: absolute;
}

@keyframes stars-twinkle {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    53% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        transform: scale(0);
        opacity: 1;
    }
}