/* ============================================================
   JULYEM PRELOADER
   ============================================================ */

#jl-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 42%, #0B3F66 0%, #003462 72%);
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility .5s ease;
}
#jl-preloader.jl-hide {
    opacity: 0;
    visibility: hidden;
}

.jl-pre-inner {
    text-align: center;
}

.jl-pre-logo-wrap {
    position: relative;
    display: inline-block;
}

/* Sóng aura gold lan toả ra từ logo rồi tan dần */
.jl-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 2px solid var(--fs-color-secondary, #CFA56A);
    opacity: 0;
    transform: scale(.45);
    pointer-events: none;
    z-index: 1;
    animation: jl-aura-wave 2.8s cubic-bezier(.22, .61, .36, 1) infinite;
}
.jl-aura:nth-child(2) { animation-delay: .93s; }
.jl-aura:nth-child(3) { animation-delay: 1.86s; }
@keyframes jl-aura-wave {
    0%   { opacity: .65; transform: scale(.45); border-width: 3px; }
    70%  { opacity: .18; }
    100% { opacity: 0;   transform: scale(2.1); border-width: 1px; }
}

/* Logo "thở" + glow gold (nổi trên sóng aura) */
.jl-pre-logo {
    position: relative;
    z-index: 2;
    width: 200px;
    max-width: 56vw;
    height: auto;
    display: block;
    animation: jl-pre-breath 1.8s ease-in-out infinite;
    will-change: transform, filter;
}
@keyframes jl-pre-breath {
    0%, 100% {
        transform: scale(.95);
        filter: drop-shadow(0 0 8px rgba(207, 165, 106, .35));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 22px rgba(207, 165, 106, .8));
    }
}

/* Sparkle 4 cánh lấp lánh quanh logo */
.jl-pre-spark {
    position: absolute;
    z-index: 3;
    width: 14px;
    height: 14px;
    background: #fff;
    clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
    filter: drop-shadow(0 0 5px rgba(207, 165, 106, .95));
    opacity: 0;
    transform: scale(0) rotate(0deg);
    animation: jl-pre-spark 2.4s ease-in-out infinite;
}
@keyframes jl-pre-spark {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    12%      { opacity: 1; transform: scale(1) rotate(40deg); }
    24%      { opacity: 0; transform: scale(.2) rotate(80deg); }
}

/* Tôn trọng người dùng tắt chuyển động */
@media (prefers-reduced-motion: reduce) {
    .jl-pre-logo, .jl-pre-spark, .jl-aura {
        animation: none;
    }
    .jl-aura:nth-child(1) { opacity: .3; transform: scale(1.1); }
    .jl-aura:nth-child(2), .jl-aura:nth-child(3) { display: none; }
    .jl-pre-logo { filter: drop-shadow(0 0 14px rgba(207, 165, 106, .6)); }
}
