.page-loader {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,0.6), transparent 16rem),
        linear-gradient(135deg, #4da8ff, #79c3ff, #eaf7ff);
    background-size: 160% 160%;
    animation: loaderGradient 7s ease-in-out infinite;
    transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease), filter 0.7s var(--ease);
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    filter: blur(12px);
    pointer-events: none;
}

.loader-panel {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: min(92vw, 390px);
    padding: 2.4rem;
    border: 1px solid rgba(255,255,255,0.66);
    border-radius: 34px;
    background: rgba(255,255,255,0.22);
    box-shadow: 0 34px 90px rgba(15, 76, 129, 0.28);
    backdrop-filter: blur(22px);
    animation: loaderPanelIn 0.8s var(--ease) both;
}

.loader-panel h2 {
    margin-top: 1.35rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.55rem, 5vw, 2.35rem);
    text-align: center;
    text-shadow: 0 12px 30px rgba(15,76,129,0.28);
}

.loader-panel p {
    margin-top: 0.45rem;
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    text-align: center;
    animation: pulseText 1.7s ease-in-out infinite;
}

.loader {
    position: relative;
    width: 108px;
    display: flex;
    justify-content: space-between;
    filter: drop-shadow(0 20px 32px rgba(15, 76, 129, 0.22));
}

.loader::after,
.loader::before {
    content: '';
    display: inline-block;
    width: 48px;
    height: 48px;
    background-color: #ffffff;
    background-image: radial-gradient(circle 14px, #0d161b 100%, transparent 0);
    background-repeat: no-repeat;
    border-radius: 50%;
    animation: eyeMove 10s infinite, blink 10s infinite;
    box-shadow: 0 0 30px rgba(77,168,255,0.6), inset 0 -8px 14px rgba(77,168,255,0.16);
}

.loader-bubbles span,
.bubble {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 28%, rgba(255,255,255,0.95), rgba(255,255,255,0.2) 52%, rgba(77,168,255,0.18));
    box-shadow: inset 0 0 18px rgba(255,255,255,0.45), 0 18px 38px rgba(15,76,129,0.12);
}

.loader-bubbles span:nth-child(1) { width: 86px; height: 86px; left: 10%; top: 18%; animation: bubbleFloat 7s ease-in-out infinite; }
.loader-bubbles span:nth-child(2) { width: 46px; height: 46px; left: 76%; top: 14%; animation: bubbleFloat 8s ease-in-out -1.3s infinite; }
.loader-bubbles span:nth-child(3) { width: 120px; height: 120px; left: 68%; top: 68%; animation: bubbleFloat 10s ease-in-out -2.4s infinite; }
.loader-bubbles span:nth-child(4) { width: 58px; height: 58px; left: 18%; top: 76%; animation: bubbleFloat 7.8s ease-in-out -3s infinite; }
.loader-bubbles span:nth-child(5) { width: 34px; height: 34px; left: 52%; top: 25%; animation: bubbleFloat 6.8s ease-in-out -0.5s infinite; }

.background-bubbles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.background-bubbles .bubble {
    bottom: -120px;
    opacity: 0.5;
    animation: riseBubble var(--bubble-duration, 18s) linear infinite;
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    filter: blur(10px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease), filter 0.85s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
}

.reveal-left { transform: translate3d(-34px, 0, 0); }
.reveal-right { transform: translate3d(34px, 0, 0); }
.reveal-zoom { transform: scale(0.94); }

.fade-in {
    opacity: 0;
    transform: translateY(22px);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
}

.delay-1 { --reveal-delay: 90ms; }
.delay-2 { --reveal-delay: 180ms; }
.delay-3 { --reveal-delay: 270ms; }
.delay-4 { --reveal-delay: 360ms; }

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255,255,255,0.55);
    pointer-events: none;
    animation: ripple 0.7s ease-out;
}

@keyframes eyeMove {
    0%,10% { background-position: 0px 0px; }
    13%,40% { background-position: -15px 0px; }
    43%,70% { background-position: 15px 0px; }
    73%,90% { background-position: 0px 15px; }
    93%,100% { background-position: 0px 0px; }
}

@keyframes blink {
    0%,10%,12%,20%,22%,40%,42%,60%,62%,70%,72%,90%,92%,98%,100% { height: 48px; }
    11%,21%,41%,61%,71%,91%,99% { height: 18px; }
}

@keyframes loaderGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes loaderPanelIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.72; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes bubbleFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(20px, -26px, 0) scale(1.06); }
}

@keyframes riseBubble {
    from { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0; }
    12% { opacity: 0.58; }
    86% { opacity: 0.48; }
    to { transform: translate3d(var(--bubble-drift, 30px), -115vh, 0) scale(1.15); opacity: 0; }
}

@keyframes shimmerLine {
    0%, 100% { transform: translateX(-34%) scaleX(0.55); }
    50% { transform: translateX(34%) scaleX(0.75); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    45% {
        transform: scale(1.12) rotate(-4deg);
    }
}
