/* ====================================================
   NEW MOON V1 - SOFT REVEAL LOADING SCREEN
   B2B Professional - Subtle & Elegant
   ==================================================== */

.loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #081226 0%, #0b1d3a 50%, #1E3A5F 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.6s;
    overflow: hidden;
}

/* Subtle Background Overlay */
.loading-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 70%);
    opacity: 0.5;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 10;
    padding: var(--spacing-3xl);
    opacity: 0;
    animation: softReveal 0.5s ease-out 0.1s forwards;
}

/* Brand Section - Company Identity */
.loading-brand {
    margin-bottom: var(--spacing-2xl);
    opacity: 0;
    animation: softReveal 0.5s ease-out 0.1s forwards;
}

/* Moon Logo - Elegant & Creative */
.loading-logo {
    margin-bottom: var(--spacing-lg);
    display: inline-block;
    position: relative;
}

.loading-logo i {
    font-size: 5rem;
    color: var(--primary-gold);
    display: block;
    animation: moonFloat 4s ease-in-out infinite;
    filter: 
        drop-shadow(0 0 20px rgba(212, 175, 55, 0.5))
        drop-shadow(0 0 40px rgba(212, 175, 55, 0.3));
    position: relative;
    z-index: 2;
    transform-origin: center;
}

/* Glowing Ring Around Moon */
.loading-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.2);
    animation: ringPulse 3s ease-out infinite;
}

.loading-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.1);
    animation: ringPulse 3s ease-out infinite 0.5s;
}

/* Company Name */
.loading-company-name {
    color: var(--white);
    margin: 0 0 var(--spacing-xs) 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.95;
}

/* Tagline */
.loading-tagline {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Premium Spinner - Minimal & Elegant */
.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-xl);
    opacity: 0;
    animation: softReveal 0.4s ease-out 0.2s forwards;
}

/* Outer Ring - Subtle */
.loading-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-gold);
    border-right: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* Inner Ring - Subtle */
.loading-spinner::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid transparent;
    border-right: 2px solid rgba(212, 175, 55, 0.3);
    border-bottom: 2px solid rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    animation: spinReverse 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* Single Orbiting Particle - Minimal */
.spinner-ring {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    animation: orbit 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    opacity: 0;
    animation-delay: 0.3s;
    animation-fill-mode: forwards;
}

.spinner-ring {
    transform: translate(-50%, -50%) rotate(0deg) translateX(26px) rotate(0deg);
}

/* Progress Bar - Subtle */
.loading-progress {
    width: 200px;
    height: 2px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: softReveal 0.4s ease-out 0.4s forwards;
}

.loading-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-gold) 50%, 
        transparent 100%);
    animation: progressLoad 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ====== Soft Reveal Animations ====== */
@keyframes softReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes orbit {
    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(26px) rotate(-360deg);
    }
}

@keyframes progressLoad {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes moonFloat {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
        filter: 
            drop-shadow(0 0 20px rgba(212, 175, 55, 0.5))
            drop-shadow(0 0 40px rgba(212, 175, 55, 0.3));
    }
    25% {
        transform: translateY(-8px) scale(1.05) rotate(-5deg);
        filter: 
            drop-shadow(0 0 30px rgba(212, 175, 55, 0.7))
            drop-shadow(0 0 50px rgba(212, 175, 55, 0.4));
    }
    50% {
        transform: translateY(-12px) scale(1.08) rotate(0deg);
        filter: 
            drop-shadow(0 0 35px rgba(212, 175, 55, 0.8))
            drop-shadow(0 0 60px rgba(212, 175, 55, 0.5));
    }
    75% {
        transform: translateY(-8px) scale(1.05) rotate(5deg);
        filter: 
            drop-shadow(0 0 30px rgba(212, 175, 55, 0.7))
            drop-shadow(0 0 50px rgba(212, 175, 55, 0.4));
    }
}

@keyframes ringPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* ====== Responsive - Mobile Rhythm ====== */
@media (max-width: 768px) {
    .loading-content {
        animation: softReveal 0.3s ease-out 0.05s forwards;
    }
    
    .loading-brand {
        margin-bottom: var(--spacing-xl);
        animation: softReveal 0.3s ease-out 0.05s forwards;
    }
    
    .loading-logo i {
        font-size: 3rem;
        filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.3));
    }
    
    .loading-company-name {
        font-size: 1.25rem;
    }
    
    .loading-tagline {
        font-size: 0.7rem;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: var(--spacing-lg);
        animation: softReveal 0.3s ease-out 0.2s forwards;
    }
    
    .loading-spinner::before {
        animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    }
    
    .loading-spinner::after {
        animation: spinReverse 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    }
    
    .spinner-ring {
        width: 6px;
        height: 6px;
        transform: translate(-50%, -50%) rotate(0deg) translateX(22px) rotate(0deg);
        animation: orbit 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
        animation-delay: 0.2s;
    }
    
    .loading-progress {
        width: 160px;
        height: 1.5px;
        animation: softReveal 0.3s ease-out 0.3s forwards;
    }
    
    .loading-progress::before {
        animation: progressLoad 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }
    
    /* Simplified Background on Mobile */
    .loading-screen::before {
        opacity: 0.2;
    }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .loading-logo i {
        font-size: 3.5rem;
    }
    
    .loading-company-name {
        font-size: 1.75rem;
    }
    
    .loading-spinner {
        width: 55px;
        height: 55px;
    }
    
    .loading-progress {
        width: 180px;
    }
}
