﻿#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

    #loader-wrapper.fade-out {
        opacity: 0;
        visibility: hidden;
    }

.printer-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-bottom: 4px solid #555;
}

.printer-bed {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 180px;
    height: 8px;
    background: #333;
    border-radius: 2px;
}

.printer-gantry {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 160px;
    height: 2px;
    background: #444;
    animation: gantryMove 4s ease-in-out infinite alternate;
}

.printer-head {
    position: absolute;
    top: 2px;
    left: 0;
    width: 20px;
    height: 15px;
    background: #17cc5f;
    border-radius: 0 0 4px 4px;
    animation: headMove 1s linear infinite alternate;
}

    .printer-head::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 8px;
        border-left: 2px solid transparent;
        border-right: 2px solid transparent;
        border-top: 6px solid #17cc5f;
    }

.printed-object {
    position: absolute;
    bottom: 8px;
    left: 50px;
    width: 100px;
    background: #00bcd4;
    border-radius: 4px 4px 0 0;
    animation: objectGrow 4s ease-in-out infinite alternate, objectSlice 1s linear infinite alternate;
}

.loading-text {
    color: #fff;
    font-family: sans-serif;
    margin-top: 20px;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

@keyframes gantryMove {
    0% {
        transform: translateY(140px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes headMove {
    0% {
        left: 0px;
    }

    100% {
        left: 140px;
    }
}

@keyframes objectGrow {
    0% {
        height: 0px;
    }

    100% {
        height: 130px;
    }
}

@keyframes objectSlice {
    0% {
        clip-path: inset(0 100% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}
