/* Advanced Loading Effects CSS */

/* Quantum Loading Spinner */
.quantum-loader {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 20px auto;
}

.quantum-loader::before,
.quantum-loader::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: quantumSpin 1.5s linear infinite;
}

.quantum-loader::after {
    border-top: 3px solid #ff00ff;
    animation: quantumSpin 1.5s linear infinite reverse;
    transform: scale(0.8);
}

@keyframes quantumSpin {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

/* DNA Helix Loader */
.dna-loader {
    width: 60px;
    height: 100px;
    position: relative;
    margin: 20px auto;
}

.dna-loader::before,
.dna-loader::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: dnaHelix 2s ease-in-out infinite;
}

.dna-loader::before {
    left: 0;
    animation-delay: 0s;
}

.dna-loader::after {
    right: 0;
    background: #764ba2;
    animation-delay: 1s;
}

@keyframes dnaHelix {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateY(25px) translateX(26px) scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: translateY(50px) translateX(0) scale(1);
        opacity: 1;
    }
    75% {
        transform: translateY(75px) translateX(-26px) scale(0.8);
        opacity: 0.7;
    }
}

/* Particle Wave Loader */
.particle-wave-loader {
    display: flex;
    justify-content: space-between;
    width: 100px;
    height: 40px;
    margin: 20px auto;
}

.particle-wave-loader .particle {
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 50%;
    animation: particleWave 1.4s ease-in-out infinite;
}

.particle-wave-loader .particle:nth-child(1) { animation-delay: 0s; }
.particle-wave-loader .particle:nth-child(2) { animation-delay: 0.1s; }
.particle-wave-loader .particle:nth-child(3) { animation-delay: 0.2s; }
.particle-wave-loader .particle:nth-child(4) { animation-delay: 0.3s; }
.particle-wave-loader .particle:nth-child(5) { animation-delay: 0.4s; }
.particle-wave-loader .particle:nth-child(6) { animation-delay: 0.5s; }
.particle-wave-loader .particle:nth-child(7) { animation-delay: 0.6s; }
.particle-wave-loader .particle:nth-child(8) { animation-delay: 0.7s; }

@keyframes particleWave {
    0%, 40%, 100% {
        transform: scaleY(0.4) translateY(0);
        opacity: 0.5;
    }
    20% {
        transform: scaleY(1) translateY(-20px);
        opacity: 1;
    }
}

/* Holographic Loading Ring */
.holographic-ring {
    width: 80px;
    height: 80px;
    border: 4px solid transparent;
    border-radius: 50%;
    position: relative;
    margin: 20px auto;
    background: conic-gradient(
        from 0deg,
        #ff0080,
        #ff8c00,
        #40e0d0,
        #ff0080
    );
    animation: holographicRotate 2s linear infinite;
}

.holographic-ring::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: #1a1a1a;
    border-radius: 50%;
    z-index: 1;
}

.holographic-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #00ffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    animation: holographicPulse 1s ease-in-out infinite;
}

@keyframes holographicRotate {
    0% {
        transform: rotate(0deg);
        filter: hue-rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
        filter: hue-rotate(360deg);
    }
}

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

/* Morphing Blob Loader */
.morphing-blob {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    position: relative;
    margin: 20px auto;
    animation: blobMorph 3s ease-in-out infinite;
}

.morphing-blob::before,
.morphing-blob::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    opacity: 0.7;
}

.morphing-blob::before {
    animation: blobMorphBefore 3s ease-in-out infinite;
}

.morphing-blob::after {
    animation: blobMorphAfter 3s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% {
        border-radius: 50%;
        transform: scale(1) rotate(0deg);
    }
    25% {
        border-radius: 60% 40% 30% 70%;
        transform: scale(1.1) rotate(90deg);
    }
    50% {
        border-radius: 30% 60% 70% 40%;
        transform: scale(0.9) rotate(180deg);
    }
    75% {
        border-radius: 70% 30% 40% 60%;
        transform: scale(1.05) rotate(270deg);
    }
}

@keyframes blobMorphBefore {
    0%, 100% {
        transform: scale(0.8) translate(-20%, -20%);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2) translate(20%, 20%);
        opacity: 0.3;
    }
}

@keyframes blobMorphAfter {
    0%, 100% {
        transform: scale(1.1) translate(15%, -15%);
        opacity: 0.5;
    }
    50% {
        transform: scale(0.7) translate(-25%, 25%);
        opacity: 0.8;
    }
}

/* Neural Network Loader */
.neural-network {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 20px auto;
}

.neural-network .node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00ffff;
    border-radius: 50%;
    animation: neuralPulse 2s ease-in-out infinite;
}

.neural-network .node:nth-child(1) {
    top: 10px;
    left: 10px;
    animation-delay: 0s;
}

.neural-network .node:nth-child(2) {
    top: 10px;
    right: 10px;
    animation-delay: 0.2s;
}

.neural-network .node:nth-child(3) {
    bottom: 10px;
    left: 10px;
    animation-delay: 0.4s;
}

.neural-network .node:nth-child(4) {
    bottom: 10px;
    right: 10px;
    animation-delay: 0.6s;
}

.neural-network .node:nth-child(5) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 0.8s;
    background: #ff00ff;
}

.neural-network::before,
.neural-network::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 255, 255, 0.5),
        transparent
    );
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    animation: neuralConnection 2s ease-in-out infinite;
}

.neural-network::after {
    width: 80px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 0, 255, 0.5),
        transparent
    );
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    animation-delay: 1s;
}

@keyframes neuralPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
        box-shadow: 0 0 0 10px rgba(0, 255, 255, 0);
    }
}

@keyframes neuralConnection {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-50%) scaleY(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleY(1.2);
    }
}

/* Plasma Energy Loader */
.plasma-loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    margin: 20px auto;
    background: radial-gradient(
        circle,
        rgba(255, 0, 128, 0.8),
        rgba(0, 255, 255, 0.6),
        transparent
    );
    animation: plasmaRotate 3s linear infinite;
}

.plasma-loader::before,
.plasma-loader::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 255, 128, 0.6),
        rgba(255, 128, 0, 0.4),
        transparent
    );
}

.plasma-loader::before {
    animation: plasmaWave1 2s ease-in-out infinite;
}

.plasma-loader::after {
    background: radial-gradient(
        circle,
        rgba(128, 0, 255, 0.5),
        rgba(255, 255, 0, 0.3),
        transparent
    );
    animation: plasmaWave2 2.5s ease-in-out infinite;
}

@keyframes plasmaRotate {
    0% {
        transform: rotate(0deg);
        filter: hue-rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
        filter: hue-rotate(360deg);
    }
}

@keyframes plasmaWave1 {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 0.4;
    }
}

@keyframes plasmaWave2 {
    0%, 100% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1) rotate(-180deg);
        opacity: 0.9;
    }
}

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

.advanced-progress .progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        #667eea,
        #764ba2,
        #667eea
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: progressFill 3s ease-in-out infinite;
    width: 0%;
}

.advanced-progress.loading .progress-fill {
    animation: progressFill 3s ease-in-out infinite,
               progressShimmer 1.5s linear infinite;
    width: 70%;
}

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

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

/* Skeleton Loading Effect */
.skeleton-loader {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin: 8px 0;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

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

/* Responsive Loading Effects */
@media (max-width: 768px) {
    .quantum-loader,
    .holographic-ring,
    .morphing-blob,
    .neural-network,
    .plasma-loader {
        width: 60px;
        height: 60px;
    }
    
    .dna-loader {
        width: 45px;
        height: 75px;
    }
    
    .particle-wave-loader {
        width: 80px;
        height: 30px;
    }
    
    .advanced-progress {
        width: 250px;
    }
}

/* Loading Container Utilities */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px;
}

.loading-text {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
    animation: loadingTextFade 2s ease-in-out infinite;
}

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