/* Preloader Styles with Animated KK Logo */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #001122 50%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    position: relative;
}

/* KK Logo Container */
.kk-logo-container {
    position: relative;
    margin-bottom: 30px;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* KK Logo Styling */
.kk-logo {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 0 20px rgba(255, 107, 1, 0.8)) 
            drop-shadow(0 0 40px rgba(0, 102, 255, 0.6));
    animation: logoAnimation 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* Logo Animation - Zoom In/Out with Bounce */
@keyframes logoAnimation {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(255, 107, 1, 0.8)) 
                drop-shadow(0 0 40px rgba(0, 102, 255, 0.6));
    }
    
    25% {
        transform: scale(1.2) rotate(5deg);
        filter: drop-shadow(0 0 30px rgba(255, 107, 1, 1)) 
                drop-shadow(0 0 50px rgba(0, 102, 255, 0.8));
    }
    
    50% {
        transform: scale(0.9) rotate(-3deg);
        filter: drop-shadow(0 0 25px rgba(255, 107, 1, 0.9)) 
                drop-shadow(0 0 45px rgba(0, 102, 255, 0.7));
    }
    
    75% {
        transform: scale(1.1) rotate(2deg);
        filter: drop-shadow(0 0 35px rgba(255, 107, 1, 1)) 
                drop-shadow(0 0 55px rgba(0, 102, 255, 0.9));
    }
    
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(255, 107, 1, 0.8)) 
                drop-shadow(0 0 40px rgba(0, 102, 255, 0.6));
    }
}

/* Alternative Bounce Animation */
@keyframes logoBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    
    25% {
        transform: translateY(-15px) scale(1.05);
    }
    
    50% {
        transform: translateY(0) scale(0.95);
    }
    
    75% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Pulsing Glow Effect */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 1, 0.5),
                    0 0 40px rgba(0, 102, 255, 0.3),
                    inset 0 0 20px rgba(255, 107, 1, 0.1);
    }
    
    50% {
        box-shadow: 0 0 40px rgba(255, 107, 1, 0.8),
                    0 0 60px rgba(0, 102, 255, 0.6),
                    inset 0 0 30px rgba(255, 107, 1, 0.2);
    }
}

/* Loading Text */
.loading-text {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FF6B01 0%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    letter-spacing: 3px;
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 107, 1, 0.5),
                     0 0 20px rgba(0, 102, 255, 0.3);
        transform: scale(1);
    }
    
    100% {
        text-shadow: 0 0 20px rgba(255, 107, 1, 0.8),
                     0 0 30px rgba(0, 102, 255, 0.6);
        transform: scale(1.05);
    }
}

/* Loading Bar */
.loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 107, 1, 0.3);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, 
                #FF6B01 0%, 
                #FF8C00 25%, 
                #0066FF 50%, 
                #4169E1 75%, 
                #FF6B01 100%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: loadingProgress 3s ease-in-out infinite,
               gradientShift 2s linear infinite;
    width: 0%;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }
    
    50% {
        width: 70%;
    }
    
    100% {
        width: 100%;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    
    100% {
        background-position: 200% 50%;
    }
}

/* Floating Particles */
.kk-logo-container::before,
.kk-logo-container::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FF6B01;
    border-radius: 50%;
    animation: floatParticles 4s ease-in-out infinite;
}

.kk-logo-container::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: #FF6B01;
    box-shadow: 0 0 10px #FF6B01;
}

.kk-logo-container::after {
    bottom: 20%;
    right: 10%;
    animation-delay: 2s;
    background: #0066FF;
    box-shadow: 0 0 10px #0066FF;
}

@keyframes floatParticles {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.7;
    }
    
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.2);
        opacity: 1;
    }
    
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.8);
        opacity: 0.8;
    }
    
    75% {
        transform: translateY(-30px) translateX(5px) scale(1.1);
        opacity: 0.9;
    }
}

/* Additional Glow Ring */
.kk-logo-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: linear-gradient(45deg, #FF6B01, #0066FF, #FF6B01) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: rotateRing 4s linear infinite;
    opacity: 0.6;
}

@keyframes rotateRing {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design for Preloader */
@media (max-width: 768px) {
    .kk-logo-container {
        width: 150px;
        height: 150px;
    }
    
    .kk-logo {
        width: 100px;
        height: 100px;
    }
    
    .loading-text {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .loading-bar {
        width: 250px;
    }
    
    .kk-logo-container::before {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .kk-logo-container {
        width: 120px;
        height: 120px;
    }
    
    .kk-logo {
        width: 80px;
        height: 80px;
    }
    
    .loading-text {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .loading-bar {
        width: 200px;
        height: 4px;
    }
    
    .kk-logo-container::before {
        width: 100px;
        height: 100px;
    }
}

/* Enhanced Animation Variants */
.kk-logo.bounce-mode {
    animation: logoBounce 2s ease-in-out infinite;
}

.kk-logo.pulse-mode {
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.kk-logo.zoom-mode {
    animation: logoAnimation 3s ease-in-out infinite;
}

/* Loading States */
.preloader-content.loading-complete .kk-logo {
    animation: finalZoom 0.8s ease-out forwards;
}

@keyframes finalZoom {
    0% {
        transform: scale(1);
    }
    
    50% {
        transform: scale(1.3);
    }
    
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.preloader-content.loading-complete .loading-text {
    animation: textFadeOut 0.5s ease-out 0.3s forwards;
}

@keyframes textFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.preloader-content.loading-complete .loading-bar {
    animation: barFadeOut 0.5s ease-out 0.5s forwards;
}

@keyframes barFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

