/* Loading Overlay dengan Logo */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.loading-container {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

/* Ring spinner - presisi di tengah */
.loading-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.loading-ring::before,
.loading-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid transparent;
}

.loading-ring::before {
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.4);
    animation: spin 1.2s linear infinite;
}

.loading-ring::after {
    border-bottom-color: rgba(255, 255, 255, 0.9);
    border-left-color: rgba(255, 255, 255, 0.4);
    animation: spin 1.2s linear infinite reverse;
}

/* Logo di tengah ring */
.loading-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-logo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

/* Teks loading */
.loading-text {
    margin-top: 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.loading-text::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffc107, transparent);
    animation: lineExpand 1.5s ease-in-out infinite;
}

/* Dot animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 5px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: #ffc107;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Animations */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineExpand {
    0% {
        width: 0%;
        opacity: 0;
    }
    50% {
        width: 100%;
        opacity: 1;
    }
    100% {
        width: 0%;
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.7;
    }
}