/* =========================================
   DINO LOGISTICS - PREMIUM PRELOADER (MASCOT JUMP)
   ========================================= */
#dino-preloader {
    position: fixed;
    inset: 0;
    background-color: #f8fafc; /* Latar abu sangat muda biar adem */
    /* Pola dot-grid modern */
    background-image: radial-gradient(rgba(5, 84, 198, 0.08) 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: center center;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Jarak antara animasi maskot dan teks */
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#dino-preloader.loaded {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px); /* Efek slide up mulus saat preloader menghilang */
}

/* 1. ANIMASI MASKOT DINO LONCAT */
.preloader-animation-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 160px; /* Alokasi ruang tinggi untuk lompatan */
}

.dino-mascot {
    width: 130px; /* Ukuran maskot, sesuaikan jika kurang besar/kecil */
    height: auto;
    object-fit: contain;
    /* Animasi loncat dengan timing curve yang natural (cepat di bawah, melayang di atas) */
    animation: dino-jump 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate;
    transform-origin: bottom center;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 15px rgba(5, 84, 198, 0.2));
}

/* Bayangan di bawah Dino (Mengecil saat dino di udara) */
.dino-shadow {
    width: 80px;
    height: 10px;
    background: rgba(15, 23, 42, 0.15);
    border-radius: 50%;
    filter: blur(3px);
    margin-top: 10px;
    animation: dino-shadow-pulse 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate;
    z-index: 1;
}

/* 2. TEKS BRANDING SHIMMER */
.preloader-text {
    position: relative;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin: 0;
    
    /* Efek Shimmer Bercahaya Mewah */
    background: linear-gradient(
        90deg, 
        #0f172a 0%, 
        #0f172a 40%, 
        #ef4444 50%, 
        #0554c6 60%, 
        #0f172a 100%
    );
    background-size: 300% 100%;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: scan-text 2.5s linear infinite;
}

/* 3. SUBTEKS LOADING BAWAH */
.preloader-text::after {
    content: 'MEMUAT DATA...';
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    animation: pulse-subtext 1.5s ease-in-out infinite;
    -webkit-text-fill-color: #64748b; /* Memaksa warna override efek shimmer parent */
}

/* =========================================
   KEYFRAMES ANIMATION (GRAVITASI & GERAKAN)
   ========================================= */

@keyframes dino-jump {
    0% { 
        /* Posisi di tanah, sedikit gepeng (squash) untuk kesan realistis */
        transform: translateY(0) scale(1.05, 0.95); 
    }
    100% { 
        /* Melayang di udara, postur normal */
        transform: translateY(-45px) scale(1, 1); 
    }
}

@keyframes dino-shadow-pulse {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: scale(0.4); /* Bayangan mengecil */
        opacity: 0.2; /* Bayangan memudar saat makin jauh */
    }
}

@keyframes scan-text {
    0% { background-position: 100% 0; }
    100% { background-position: -50% 0; }
}

@keyframes pulse-subtext {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Penyesuaian untuk layar HP */
@media (max-width: 480px) {
    .dino-mascot {
        width: 100px;
    }
    .dino-shadow {
        width: 60px;
    }
    .preloader-text {
        font-size: 1.25rem;
        letter-spacing: 4px;
    }
    .preloader-text::after {
        font-size: 0.65rem;
        bottom: -30px;
    }
}