/* =====================================================
   CUSTOM PRELOADER STYLES
   ===================================================== */

/* Modern Preloader */
.custom-preloader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center !important;
    align-items: center !important;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-preloader.dark {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2d2d2d 100%);
}

.custom-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: -1 !important;
}

/* Ensure content is always visible behind preloader */
.custom-preloader + * {
    opacity: 1 !important;
    visibility: visible !important;
}

.custom-preloader.fade-out + * {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Name Container */
.preloader-name-container {
    position: relative;
    overflow: hidden;
}

.preloader-name {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 100%;
    animation: preloader-gradient 3s ease-in-out infinite;
}

@keyframes preloader-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtitle */
.preloader-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

/* Loading Bar */
.loading-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb);
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; margin-left: 0; }
    50% { width: 70%; margin-left: 15%; }
    100% { width: 0%; margin-left: 100%; }
}

/* Circle Animation */
.circle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: circle-expand 3s ease-in-out infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: rgba(255, 107, 107, 0.3);
}

.circle-2 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: rgba(254, 202, 87, 0.2);
    animation-delay: 0.5s;
}

.circle-3 {
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: rgba(72, 219, 251, 0.1);
    animation-delay: 1s;
}

@keyframes circle-expand {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* Dot Animation */
.dots-container {
    display: flex;
    gap: 8px;
    margin-top: 30px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff6b6b;
    animation: dot-bounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) { animation-delay: -0.32s; background: #ff6b6b; }
.dot:nth-child(2) { animation-delay: -0.16s; background: #feca57; }
.dot:nth-child(3) { animation-delay: 0s; background: #48dbfb; }

@keyframes dot-bounce {
    0%, 80%, 100% { 
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-name {
        font-size: 28px;
        letter-spacing: 4px;
    }
    
    .preloader-subtitle {
        font-size: 10px;
        letter-spacing: 2px;
    }
    
    .loading-bar-container {
        width: 200px;
    }
    
    .circle-1 { width: 200px; height: 200px; }
    .circle-2 { width: 280px; height: 280px; }
    .circle-3 { width: 360px; height: 360px; }
}
