/* === 🌿 Preloader Styling === */
#preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #0c1a0c 0%, #145214 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: #fff;
    font-family: "Poppins", sans-serif;
}

/* === Logo Wrapper (Rotating Circle) === */
.logo-circle {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* === Lingkaran Putar (Border) === */
.logo-circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #19EC15;
    animation: spin 1.8s linear infinite;
}

/* === SVG Logo di Tengah === */
.preloader-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    object-position: center;
    z-index: 1;
    animation: pulseLogo 2.5s ease-in-out infinite;
}

/* === Text === */
.loading-text {
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

/* === Progress Bar === */
.loading-bar {
    width: 160px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: #19EC15;
    animation: loadProgress 2s ease-in-out infinite;
}

/* === Keyframes === */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loadProgress {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}
