/* Quantum Effects CSS - TachyonBuilt Theme */

/* Clean background without overlay interference */
body {
    background-color: #f8f9fa;
    position: relative;
}

/* Clean content styling */
.container, .card, .modal-content {
    background: rgba(255, 255, 255, 0.98);
    color: #2c3e50;
}

header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
}

/* Make particles perspective-enabled */
.quantum-effects {
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Quantum particle background pattern */
.quantum-background {
    position: relative;
    overflow: hidden;
}

.quantum-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Quantum grid pattern */
.quantum-grid {
    position: relative;
}

.quantum-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

/* Quantum particle animations - Multiple movement patterns */
@keyframes quantum-flow-0 {
    0% {
        transform: translateX(-100px) translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    25% {
        transform: translateX(25vw) translateY(-30px) rotate(90deg);
    }
    50% {
        transform: translateX(50vw) translateY(20px) rotate(180deg);
    }
    75% {
        transform: translateX(75vw) translateY(-10px) rotate(270deg);
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(15px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes quantum-flow-1 {
    0% {
        transform: translateX(-100px) translateY(0) scale(1);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateX(20vw) translateY(-50px) scale(1.2);
    }
    30% {
        transform: translateX(40vw) translateY(30px) scale(0.8);
    }
    45% {
        transform: translateX(60vw) translateY(-20px) scale(1.1);
    }
    60% {
        transform: translateX(80vw) translateY(40px) scale(0.9);
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-30px) scale(1);
        opacity: 0;
    }
}

@keyframes quantum-flow-2 {
    0% {
        transform: translateX(-100px) translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(sin(10deg) * 50px);
        opacity: 0;
    }
}

@keyframes quantum-flow-3 {
    0% {
        transform: translateX(-100px) translateY(0) rotateY(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateX(30vw) translateY(-40px) rotateY(180deg);
    }
    40% {
        transform: translateX(50vw) translateY(50px) rotateY(360deg);
    }
    60% {
        transform: translateX(70vw) translateY(-60px) rotateY(540deg);
    }
    80% {
        opacity: 1;
        transform: translateX(90vw) translateY(20px) rotateY(720deg);
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-10px) rotateY(900deg);
        opacity: 0;
    }
}

@keyframes quantum-flow-4 {
    0% {
        transform: translateX(-100px) translateY(0) translateZ(0);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    50% {
        transform: translateX(50vw) translateY(-100px) translateZ(50px);
        opacity: 1;
    }
    95% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(50px) translateZ(0);
        opacity: 0;
    }
}

/* Legacy animation for compatibility */
@keyframes neutrino-flow {
    0% {
        transform: translateX(-100%) translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(100vw) translateY(-20px) rotate(360deg);
        opacity: 0;
    }
}

.neutrino-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.neutrino-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8),
                0 0 40px rgba(102, 126, 234, 0.6),
                0 0 60px rgba(102, 126, 234, 0.4);
    animation: neutrino-flow 12s linear infinite;
}

/* More particles for enhanced visibility */
.neutrino-particle:nth-child(1) { top: 5%; animation-delay: 0s; }
.neutrino-particle:nth-child(2) { top: 15%; animation-delay: 1.5s; }
.neutrino-particle:nth-child(3) { top: 25%; animation-delay: 3s; }
.neutrino-particle:nth-child(4) { top: 35%; animation-delay: 4.5s; }
.neutrino-particle:nth-child(5) { top: 45%; animation-delay: 6s; }
.neutrino-particle:nth-child(6) { top: 55%; animation-delay: 7.5s; }
.neutrino-particle:nth-child(7) { top: 65%; animation-delay: 9s; }
.neutrino-particle:nth-child(8) { top: 75%; animation-delay: 10.5s; }
.neutrino-particle:nth-child(9) { top: 85%; animation-delay: 12s; }
.neutrino-particle:nth-child(10) { top: 95%; animation-delay: 13.5s; }

/* Superposition wave effect */
@keyframes superposition-wave {
    0%, 100% {
        opacity: 0.05;
        transform: scaleX(1) scaleY(1);
    }
    50% {
        opacity: 0.1;
        transform: scaleX(1.1) scaleY(0.9);
    }
}

.superposition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
    animation: superposition-wave 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Tachyon trail effect */
@keyframes tachyon-trail {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(50px);
        opacity: 0;
    }
}

.tachyon-trail {
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(118, 75, 162, 0.5) 50%, 
        transparent 100%);
    animation: tachyon-trail 3s ease-in-out infinite;
    pointer-events: none;
}

/* Quantum entanglement connection lines */
.quantum-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.quantum-connection {
    position: absolute;
    width: 1px;
    height: 200px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.2) 50%, 
        transparent 100%);
    transform-origin: top center;
    opacity: 0.5;
}

/* Apply quantum effects to specific sections */
.hero-section {
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(102, 126, 234, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(118, 75, 162, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Quantum shimmer for cards */
.quantum-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.quantum-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #667eea, 
        #764ba2, 
        #667eea);
    background-size: 300% 300%;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.quantum-card:hover::before {
    opacity: 0.3;
    animation: quantum-shimmer 3s ease-in-out infinite;
}

@keyframes quantum-shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quantum-grid::after {
        background-size: 30px 30px;
    }
    
    .neutrino-particle {
        width: 1px;
        height: 1px;
    }
}