/* ── LOADER WRAPPER ──────────────────────────────────── */
#loader-wrapper {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0B0015 0%, #1A0A2E 45%, #0A1820 80%, #040E12 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
}

/* ── PARTICLE BACKGROUND ─────────────────────────────── */
.loader-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(173,79,227,0.35) 1px, transparent 1px),
        radial-gradient(circle, rgba(53,143,128,0.25) 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px;
    background-position: 0 0, 40px 40px;
    opacity: 0.4;
    pointer-events: none;
    animation: loader-particles-drift 20s linear infinite;
}
@keyframes loader-particles-drift {
    0%   { background-position: 0 0, 40px 40px; }
    100% { background-position: 80px 80px, 120px 120px; }
}

/* ── SCENE ───────────────────────────────────────────── */
.loader-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    animation: loader-scene-in 0.6s ease both;
}
@keyframes loader-scene-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* ── BRAND ───────────────────────────────────────────── */
.loader-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}
.loader-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
}

/* ── ORBITAL SYSTEM ──────────────────────────────────── */
.loader-orbital-wrap {
    width: 210px;
    height: 210px;
    position: relative;
    margin-bottom: 36px;
}

.loader-orbital-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(173,79,227,0.3);
    animation: loader-orbit-spin 12s linear infinite;
}
.loader-orbital-ring:nth-child(1) { inset: 0;  animation-duration: 12s; }
.loader-orbital-ring:nth-child(2) { inset: 20px; border-color: rgba(53,143,128,0.25); animation-duration: 8s; animation-direction: reverse; }
.loader-orbital-ring:nth-child(3) { inset: 44px; border-color: rgba(212,175,55,0.2);  animation-duration: 5s; }

@keyframes loader-orbit-spin { to { transform: rotate(360deg); } }

/* Planet */
.loader-planet {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 68px; height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #AD4FE3, #4A1080);
    box-shadow: 0 0 32px rgba(173,79,227,0.55), 0 0 64px rgba(173,79,227,0.2);
    z-index: 2;
    animation: loader-planet-pulse 3s ease-in-out infinite;
}
.loader-planet::after {
    content: '';
    position: absolute;
    top: 18%; left: 22%;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}
@keyframes loader-planet-pulse {
    0%, 100% { box-shadow: 0 0 32px rgba(173,79,227,0.55), 0 0 64px rgba(173,79,227,0.2); }
    50%       { box-shadow: 0 0 48px rgba(173,79,227,0.8), 0 0 90px rgba(173,79,227,0.3); }
}

/* Orbiting dots */
.loader-orbit-dot {
    position: absolute;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 10px rgba(212,175,55,0.9);
    top: 0; left: 50%;
    transform-origin: 0 105px;
    animation: loader-dot-orbit 6s linear infinite;
    margin-left: -5px;
}
.loader-orbit-dot.teal {
    background: #358F80;
    box-shadow: 0 0 10px rgba(53,143,128,0.9);
    transform-origin: 0 75px;
    animation-duration: 4s;
    animation-direction: reverse;
    top: 20px; left: calc(50% + 20px);
}
@keyframes loader-dot-orbit { to { transform: rotate(360deg); } }

/* ── TAGLINE ─────────────────────────────────────────── */
.loader-tagline {
    font-size: 1.45rem;
    font-weight: 900;
    color: #fff;
    text-align: center;
    line-height: 1.25;
    letter-spacing: -0.4px;
    margin-bottom: 24px;
}
.loader-tagline .grd {
    background: linear-gradient(135deg, #d4af37, #AD4FE3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── PULSING DOTS ────────────────────────────────────── */
.loader-dots {
    display: flex;
    gap: 7px;
    align-items: center;
}
.loader-dots span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    animation: loader-dot-pulse 1.4s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loader-dot-pulse {
    0%, 80%, 100% { transform: scale(1);   background: rgba(255,255,255,0.25); }
    40%            { transform: scale(1.5); background: #AD4FE3; }
}

/* ── EXIT ANIMATION ──────────────────────────────────── */
.loader-finished {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
}
