/* ============================================
   FUTURISTIC PRELOADER ANIMATION
   ============================================
   World-class, cinematic preloader with multiple
   animation layers. Does not interfere with
   existing styles.
   ============================================ */

/* Preloader Container */
.preloader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.preloader-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Animated Background Particles */
.preloader-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #CEF501;
    border-radius: 50%;
    box-shadow: 0 0 6px #CEF501, 0 0 12px #CEF501;
    animation: particleFloat 8s infinite ease-in-out;
    opacity: 0.6;
}

.particle:nth-child(odd) {
    background: #a8c001;
    box-shadow: 0 0 6px #a8c001, 0 0 12px #a8c001;
    animation-duration: 10s;
}

.particle:nth-child(3n) {
    background: #e5ff33;
    box-shadow: 0 0 6px #e5ff33, 0 0 12px #e5ff33;
    animation-duration: 12s;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.8;
    }
}

/* Energy Waves */
.energy-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(206, 245, 1, 0.1) 0%, transparent 70%);
    animation: energyPulse 4s infinite ease-in-out;
    border-radius: 50%;
}

.energy-wave:nth-child(2) {
    animation-delay: 1s;
    background: radial-gradient(circle, rgba(168, 192, 1, 0.1) 0%, transparent 70%);
}

.energy-wave:nth-child(3) {
    animation-delay: 2s;
    background: radial-gradient(circle, rgba(229, 255, 51, 0.08) 0%, transparent 70%);
}

@keyframes energyPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Grid Overlay */
.preloader-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(206, 245, 1, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(206, 245, 1, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    animation: gridScan 3s infinite linear;
}

@keyframes gridScan {
    0% {
        transform: translate(0, 0);
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: translate(50px, 50px);
        opacity: 0.2;
    }
}

/* Main Loader Content */
.preloader-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* 3D Rotating Rings */
.ring-container {
    position: relative;
    width: 200px;
    height: 200px;
    perspective: 1000px;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: #CEF501;
    border-right-color: #a8c001;
    animation: ringRotate 2s infinite linear;
    box-shadow: 
        0 0 20px rgba(206, 245, 1, 0.5),
        inset 0 0 20px rgba(206, 245, 1, 0.2);
}

.ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-duration: 1.5s;
    animation-direction: reverse;
    border-top-color: #a8c001;
    border-right-color: #e5ff33;
    box-shadow: 
        0 0 15px rgba(168, 192, 1, 0.5),
        inset 0 0 15px rgba(168, 192, 1, 0.2);
}

.ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation-duration: 1s;
    border-top-color: #e5ff33;
    border-right-color: #CEF501;
    box-shadow: 
        0 0 10px rgba(229, 255, 51, 0.5),
        inset 0 0 10px rgba(229, 255, 51, 0.2);
}

@keyframes ringRotate {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

/* Central Loading Symbol */
.loader-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.symbol-circle {
    width: 100%;
    height: 100%;
    border: 3px solid #CEF501;
    border-radius: 50%;
    border-top-color: transparent;
    animation: symbolSpin 1s infinite linear;
    box-shadow: 
        0 0 20px rgba(206, 245, 1, 0.6),
        inset 0 0 20px rgba(206, 245, 1, 0.2);
}

.symbol-hexagon {
    width: 100%;
    height: 100%;
    clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
    background: linear-gradient(135deg, rgba(206, 245, 1, 0.3), rgba(168, 192, 1, 0.3));
    border: 2px solid #CEF501;
    animation: symbolPulse 1.5s infinite ease-in-out;
    box-shadow: 
        0 0 30px rgba(206, 245, 1, 0.8),
        inset 0 0 30px rgba(206, 245, 1, 0.3);
}

.symbol-tech {
    width: 100%;
    height: 100%;
    position: relative;
}

.symbol-tech::before,
.symbol-tech::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #CEF501;
    border-radius: 50%;
    animation: techRotate 2s infinite linear;
    box-shadow: 0 0 20px rgba(206, 245, 1, 0.6);
}

.symbol-tech::before {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.symbol-tech::after {
    clip-path: polygon(0% 0%, 50% 0%, 100% 50%, 50% 100%);
    animation-direction: reverse;
}

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

@keyframes symbolPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

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

/* Liquid Morphing Shapes */
.liquid-shape {
    position: absolute;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(206, 245, 1, 0.2), rgba(168, 192, 1, 0.2));
    border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
    filter: blur(20px);
    animation: liquidMorph 8s infinite ease-in-out;
    opacity: 0.5;
}

.liquid-shape:nth-child(2) {
    width: 120px;
    height: 120px;
    animation-duration: 6s;
    animation-delay: 1s;
    background: linear-gradient(135deg, rgba(168, 192, 1, 0.2), rgba(229, 255, 51, 0.2));
}

.liquid-shape:nth-child(3) {
    width: 100px;
    height: 100px;
    animation-duration: 10s;
    animation-delay: 2s;
    background: linear-gradient(135deg, rgba(229, 255, 51, 0.2), rgba(206, 245, 1, 0.2));
}

@keyframes liquidMorph {
    0%, 100% {
        border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        border-radius: 60% 40% 30% 70% / 40% 60% 30% 70%;
        transform: translate(20px, -20px) rotate(90deg);
    }
    50% {
        border-radius: 30% 70% 70% 30% / 70% 30% 50% 50%;
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        border-radius: 70% 30% 40% 60% / 30% 70% 50% 50%;
        transform: translate(20px, 20px) rotate(270deg);
    }
}

/* Data Streams */
.data-stream {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #CEF501, transparent);
    box-shadow: 0 0 10px #CEF501;
    animation: dataFlow 3s infinite linear;
    opacity: 0.7;
}

.data-stream:nth-child(odd) {
    background: linear-gradient(to bottom, transparent, #a8c001, transparent);
    box-shadow: 0 0 10px #a8c001;
    animation-duration: 2.5s;
}

.data-stream:nth-child(3n) {
    background: linear-gradient(to bottom, transparent, #e5ff33, transparent);
    box-shadow: 0 0 10px #e5ff33;
    animation-duration: 3.5s;
}

@keyframes dataFlow {
    0% {
        transform: translateY(-100px) scaleY(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) scaleY(1);
        opacity: 0;
    }
}

/* Neon Lines */
.neon-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #CEF501, transparent);
    box-shadow: 0 0 10px #CEF501;
    animation: neonSweep 4s infinite ease-in-out;
    opacity: 0.6;
}

.neon-line:nth-child(2) {
    background: linear-gradient(90deg, transparent, #a8c001, transparent);
    box-shadow: 0 0 10px #a8c001;
    animation-delay: 1s;
}

.neon-line:nth-child(3) {
    background: linear-gradient(90deg, transparent, #e5ff33, transparent);
    box-shadow: 0 0 10px #e5ff33;
    animation-delay: 2s;
}

@keyframes neonSweep {
    0%, 100% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        transform: translateX(100vw);
        opacity: 0.8;
    }
}

/* Progress Bar */
.progress-container {
    position: relative;
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #CEF501, #a8c001, #e5ff33, #CEF501);
    background-size: 200% 100%;
    border-radius: 2px;
    box-shadow: 
        0 0 10px rgba(206, 245, 1, 0.8),
        0 0 20px rgba(168, 192, 1, 0.6);
    animation: progressGradient 2s infinite linear;
    width: 0%;
    transition: width 0.3s ease-out;
}

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

/* Loading Text */
.loading-text {
    color: #CEF501;
    font-family: 'Satoshi', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 
        0 0 10px rgba(206, 245, 1, 0.8),
        0 0 20px rgba(206, 245, 1, 0.4);
    animation: textPulse 2s infinite ease-in-out;
    margin-top: 20px;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Holographic UI Elements */
.hud-element {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(206, 245, 1, 0.3);
    background: rgba(206, 245, 1, 0.05);
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 70% 100%, 0% 100%);
    animation: hudScan 3s infinite ease-in-out;
    opacity: 0.4;
}

.hud-element:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 30%);
}

.hud-element:nth-child(3) {
    bottom: 20%;
    left: 10%;
    animation-delay: 2s;
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 30% 100%, 0% 70%);
}

@keyframes hudScan {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Logo Reveal */
.logo-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
}

.logo-reveal.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.logo-reveal img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(206, 245, 1, 0.8));
}

/* Completion Animation - Faster */
.preloader-container.complete {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ring-container {
        width: 150px;
        height: 150px;
    }

    .loader-symbol {
        width: 60px;
        height: 60px;
    }

    .progress-container {
        width: 250px;
    }

    .loading-text {
        font-size: 12px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .ring-container {
        width: 120px;
        height: 120px;
    }

    .loader-symbol {
        width: 50px;
        height: 50px;
    }

    .progress-container {
        width: 200px;
    }
}

/* Performance Optimizations */
.preloader-container * {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ensure no interference with existing styles */
.preloader-container,
.preloader-container * {
    box-sizing: border-box;
}

