/**
 * index-loading-overlay-minimal.css
 * Minimalist loading overlay - LOGO ONLY with elegant animations
 * Clean, simple, and focused on your brand
 */

/* ==================== MINIMAL LOADING OVERLAY ==================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(250, 250, 250, 0.95) 50%, 
        rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    visibility: visible;
}

#loading-overlay.loading-complete {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.1);
}

/* ===== SUBTLE BACKGROUND ===== */
#loading-overlay::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(30, 136, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    background-size: 600px 600px, 500px 500px;
    animation: subtleFloat 30s ease-in-out infinite;
    pointer-events: none;
}

@keyframes subtleFloat {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%; 
    }
    50% { 
        background-position: 40% 60%, 60% 40%; 
    }
}

/* ==================== LOGO CONTAINER ==================== */
.logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoEntrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-20deg);
    }
    70% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ===== OUTER ROTATING RING ===== */
.logo-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: rgba(30, 136, 229, 0.6);
    border-right-color: rgba(30, 136, 229, 0.3);
    border-bottom-color: rgba(212, 175, 55, 0.6);
    border-left-color: rgba(212, 175, 55, 0.3);
    animation: ringRotate 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 30px rgba(30, 136, 229, 0.2);
}

@keyframes ringRotate {
    0% { 
        transform: rotate(0deg) scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: rotate(180deg) scale(1.08);
        opacity: 1;
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        opacity: 0.6;
    }
}

/* ===== INNER RING (OPPOSITE DIRECTION) ===== */
.logo-ring-inner {
    position: absolute;
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(212, 175, 55, 0.5);
    border-right-color: rgba(212, 175, 55, 0.2);
    border-bottom-color: rgba(30, 136, 229, 0.5);
    border-left-color: rgba(30, 136, 229, 0.2);
    animation: ringRotateReverse 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

@keyframes ringRotateReverse {
    0% { 
        transform: rotate(0deg) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: rotate(180deg) scale(0.96);
        opacity: 0.9;
    }
    100% { 
        transform: rotate(360deg) scale(1);
        opacity: 0.5;
    }
}

/* ===== GLOW PULSE ===== */
.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(30, 136, 229, 0.1) 0%, 
        rgba(212, 175, 55, 0.05) 40%, 
        transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}

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

/* ===== LOGO IMAGE ===== */
.logo-image {
    position: relative;
    width: 140px;
    height: 140px;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 4s ease-in-out infinite;
    overflow: hidden;
}

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

.logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
    animation: logoBreath 4s ease-in-out infinite;
}

@keyframes logoBreath {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===== SHINE EFFECT ===== */
.logo-image::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        transparent 45%,
        rgba(255, 255, 255, 0.7) 50%,
        transparent 55%,
        transparent 100%
    );
    animation: shineEffect 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shineEffect {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    40%, 100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ===== SPARKLES (MINIMAL) ===== */
.logo-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
}

.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(45deg, 
        rgba(30, 136, 229, 0.8), 
        rgba(212, 175, 55, 0.8));
    border-radius: 50%;
    opacity: 0;
    animation: sparkleAppear 4s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(30, 136, 229, 0.6);
}

.sparkle:nth-child(1) {
    top: 8%;
    left: 50%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 30%;
    left: 88%;
    animation-delay: 0.7s;
}

.sparkle:nth-child(3) {
    top: 70%;
    left: 88%;
    animation-delay: 1.4s;
}

.sparkle:nth-child(4) {
    top: 92%;
    left: 50%;
    animation-delay: 2.1s;
}

.sparkle:nth-child(5) {
    top: 70%;
    left: 12%;
    animation-delay: 2.8s;
}

.sparkle:nth-child(6) {
    top: 30%;
    left: 12%;
    animation-delay: 3.5s;
}

@keyframes sparkleAppear {
    0%, 90%, 100% {
        opacity: 0;
        transform: scale(0) translateY(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.8) translateY(-8px);
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .logo-container {
        width: 160px;
        height: 160px;
    }
    
    .logo-image {
        width: 110px;
        height: 110px;
    }
    
    .logo-glow {
        width: 120px;
        height: 120px;
    }
    
    .sparkle {
        width: 2.5px;
        height: 2.5px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        width: 140px;
        height: 140px;
    }
    
    .logo-image {
        width: 95px;
        height: 95px;
    }
    
    .logo-glow {
        width: 105px;
        height: 105px;
    }
    
    .sparkle {
        width: 2px;
        height: 2px;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .logo-ring,
    .logo-ring-inner,
    .logo-glow,
    .sparkle {
        animation: none;
    }
    
    .logo-image::before {
        display: none;
    }
    
    .logo-container {
        animation: logoEntranceSimple 0.5s ease forwards;
    }
    
    @keyframes logoEntranceSimple {
        0% { opacity: 0; }
        100% { opacity: 1; }
    }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
    #loading-overlay {
        background: #FFFFFF;
        backdrop-filter: none;
    }
    
    .logo-ring,
    .logo-ring-inner {
        border-color: #000000;
        box-shadow: none;
    }
    
    .logo-image img {
        filter: none;
    }
}

/* ==================== PERFORMANCE OPTIMIZATION ==================== */
.logo-container,
.logo-ring,
.logo-ring-inner,
.logo-image,
.logo-glow,
.sparkle {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}