:root {
    --enterprise-d-hull: gray;
    --enterprise-d-hull-light: #d0d2d3;
    --enterprise-d-hull-dark: #5d5e60;
    --red-nacelle-light-light: #ff949e;
    --red-nacelle-light-dark: #cf0000;
    --blue-nacelle-light-light: #4b9fa6;
    --blue-nacelle-light-dark: #1b5fab;
}

* {
    box-sizing: border-box;
}

body {
    background-color: black;
    overflow: hidden;
}

/* ENTERPRISE PARTS */

#enterprise-d {
    position: fixed;
    top: 47vh;
    left: 50%;
    right: 50%;
    transform: translate(-50%, -50%);
}

#saucer-bridge {
    position: absolute;
    left: 235px;
    top: -40px;
    background-color: var(--enterprise-d-hull-light);
    width:  70px;
    height: 10px;
    /* horizontal radius / vertical radius */
    /* top-left top-right/bottom-left bottom-right */
    border-radius: 50% 50% 0% 0%/ 50% 100% 0% 0%;
    z-index: 100;
}

#bridge-light {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #cf0000;
    left: 50px;
    border-radius: 100%;
    animation: 3s linear infinite bridge-blink;
    z-index: 102;
}

#saucer-top {
    position: absolute;
    left: 35px;
    top: -35px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-light),
        var(--enterprise-d-hull-dark));
    width:  475px;
    height: 38px;
    /* horizontal radius / vertical radius */
    /* top-left top-right/bottom-left bottom-right */
    border-radius: 50% 50% 0% 0%/ 100% 100% 0% 0%;
    z-index: 100;
}

#saucer-bottom {
    position: absolute;
    left: 80px;
    top: 0px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-dark),
        var(--enterprise-d-hull-light));
    width:  380px;
    height: 20px;
    /* horizontal radius / vertical radius */
    /* top-left top-right/bottom-left bottom-right */
    border-radius:  0% 0% 50% 50%/ 0% 0% 100% 100%;
    z-index: 100;
}

#neck {
    position: absolute;
    left: 0px;
    top: 0px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-dark),
        var(--enterprise-d-hull-light));
    width: 150px;
    height: 60px;
    transform: skew(130deg);
    z-index: 98;
}

#engineering-top {
    position: absolute;
    left: -225px;
    top: 40px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-light),
        var(--enterprise-d-hull-dark));
    width: 356px;
    height: 40px;
    border-radius: 80% 20% 0% 0%/ 100% 40% 0% 0%;
    transform: skew(160deg);
    z-index: 99;
}

#engineering-bottom {
    position: absolute;
    left: -80px;
    top: 76px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-dark),
        var(--enterprise-d-hull-light));
    width: 205px;
    height: 30px;
    /* horizontal radius / vertical radius */
    /* top-left top-right/bottom-left bottom-right */
    border-radius: 0% 0% 90% 10% /0% 0% 100% 100% ;
    transform: skew(-160deg);
    z-index: 99;
}

#nacelle-bottom {
    position: absolute;
    left: -205px;
    top: 40px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-dark),
        var(--enterprise-d-hull-light));
    width: 85px;
    height: 35px;
    transform: skew(130deg);
    z-index: 98;
}

#nacelle {
    position: absolute;
    left: -260px;
    top: 12px;
    background: linear-gradient(
        180deg,
        var(--enterprise-d-hull-dark),
        var(--enterprise-d-hull-light),
        var(--enterprise-d-hull-dark));
    width: 300px;
    height: 30px;;
    /* horizontal radius / vertical radius */
    /* top-left top-right/bottom-left bottom-right */
    border-radius: 10% 10% 10% 10% / 30% 50% 50% 30%;
    z-index: 99;
}

#nacelle-red-light {
    position: absolute;
    left: 268px;
    top: 6px;
    background: linear-gradient(
        90deg,
        var(--red-nacelle-light-dark),
        var(--red-nacelle-light-light));
    width: 36px;
    height: 18px;;
    border-radius: 40%;
    z-index: 100;
    animation: 2s linear infinite red-nacelle;
}

#nacelle-blue-light {
    position: absolute;
    left: 0px;
    top: 9.5px;
    background: linear-gradient(
        180deg,
        var(--blue-nacelle-light-dark) 0%,
        var(--blue-nacelle-light-light) 35%,
        var(--blue-nacelle-light-light) 65%,
        var(--blue-nacelle-light-dark));
    width: 240px;
    height: 10px;;
    border-radius: 10%;
    z-index: 100;
    animation: 2s linear infinite blue-nacelle;
}

#bottom-cover {
    position: absolute;
    left: -120px;
    top: 80px;
    background: black;
    width: 75px;
    height: 100px;;
    border-radius: 100%;
    z-index: 99;
}

/* ENTERPRISE ANIMATIONS */

@keyframes bridge-blink {
    50% {
        width: 10px;
        height: 10px;
        filter: blur(2px);
    }
}

@keyframes red-nacelle {
    50% {
        background: linear-gradient(
        90deg,
        var(--red-nacelle-light-light),
        var(--red-nacelle-light-dark));
    }
}

@keyframes blue-nacelle {
    0% {
        background: linear-gradient(
        180deg,
        var(--blue-nacelle-light-dark),
        var(--blue-nacelle-light-light));
    }
    50% {
        background: linear-gradient(
        180deg,
        var(--blue-nacelle-light-light),
        var(--blue-nacelle-light-dark));
    }
    100% {
        background: linear-gradient(
        180deg,
        var(--blue-nacelle-light-dark),
        var(--blue-nacelle-light-light));
    }
}

/* BACKGROUND ITEMS */

#background {
    overflow: hidden;
}

.star-s {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: white;
    filter: blur(1px);
    z-index: 80;
    animation: 1s linear infinite stars;
    overflow: hidden;
}

.star-s.a {
    top: 10%;
    margin-left: 90%;
}

.star-s.b {
    top: 25%;
    margin-left: 66%;
}

.star-s.c {
    top: 63%;
    margin-left: -30%;
}

.star-s.d {
    top: 70%;
    margin-left: 80%;

}

.star-s.e {
    top: 98%;
    margin-left: 10%;
}

/* BACKGROUND ANIMATION */

@keyframes stars {
    0% {
        left: 140%;
    }

    100% {
        left: -30%;
    }
}



/* AT MEDIA */

@media screen and (max-width: 1000px) {
    #enterprise-d {
        transform: scale(0.4);
    }
}