/* Particle Animation Styles - TiTweetAPP Technology Website */

/* Particle Canvas Styles */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Particle System Container */
.particle-container {
    position: relative;
    overflow: hidden;
}

/* Floating Particles */
.floating-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 15s infinite linear;
}

.floating-particle.small {
    width: 2px;
    height: 2px;
    background: var(--secondary-blue);
    opacity: 0.6;
}

.floating-particle.medium {
    width: 4px;
    height: 4px;
    background: var(--secondary-green);
    opacity: 0.7;
}

.floating-particle.large {
    width: 6px;
    height: 6px;
    background: var(--accent-purple);
    opacity: 0.8;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Tech Grid Particles */
.tech-grid-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.grid-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--secondary-blue);
    border-radius: 50%;
    opacity: 0;
    animation: gridParticleAppear 3s infinite;
}

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

/* Connection Lines */
.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-blue), transparent);
    opacity: 0.3;
    animation: connectionPulse 4s infinite;
}

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0.1;
        transform: scaleX(0);
    }
    50% {
        opacity: 0.6;
        transform: scaleX(1);
    }
}

/* Particle Burst Effect */
.particle-burst {
    position: absolute;
    pointer-events: none;
}

.burst-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--secondary-green);
    border-radius: 50%;
    animation: burstExplode 1s ease-out forwards;
}

@keyframes burstExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* Tech Ring Particles */
.tech-ring {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: ringExpand 8s infinite;
}

@keyframes ringExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Energy Flow Particles */
.energy-flow {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-blue), var(--secondary-green), transparent);
    opacity: 0.6;
    animation: energyFlow 6s infinite linear;
}

@keyframes energyFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Glowing Orbs */
.glowing-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: orbFloat 10s infinite ease-in-out;
}

.glowing-orb.small {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, var(--secondary-blue) 0%, transparent 70%);
    box-shadow: 0 0 20px var(--secondary-blue);
}

.glowing-orb.medium {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, var(--secondary-green) 0%, transparent 70%);
    box-shadow: 0 0 30px var(--secondary-green);
}

.glowing-orb.large {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    box-shadow: 0 0 40px var(--accent-purple);
}

@keyframes orbFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
    }
    50% {
        transform: translateY(-10px) translateX(-10px) scale(0.9);
    }
    75% {
        transform: translateY(-30px) translateX(5px) scale(1.05);
    }
}

/* Data Stream Particles */
.data-stream {
    position: absolute;
    pointer-events: none;
}

.data-particle {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, var(--secondary-blue), transparent);
    animation: dataFlow 4s infinite linear;
}

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

/* Tech Hexagon Particles */
.tech-hexagon {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--secondary-blue);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.7;
    animation: hexagonRotate 8s infinite linear;
}

@keyframes hexagonRotate {
    0% {
        transform: rotate(0deg) translateY(0);
    }
    100% {
        transform: rotate(360deg) translateY(-100vh);
    }
}

/* Interactive Particle Effects */
.interactive-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.3s ease;
}

.interactive-particle:hover {
    transform: scale(1.5);
    opacity: 1;
}

/* Particle Canvas Hero Section Specific */
.hero-section #particle-canvas {
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
}

/* Particle Performance Optimization */
.particle-optimized {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Responsive Particle Adjustments */
@media (max-width: 768px) {
    .floating-particle.small {
        width: 1px;
        height: 1px;
    }
    
    .floating-particle.medium {
        width: 2px;
        height: 2px;
    }
    
    .floating-particle.large {
        width: 3px;
        height: 3px;
    }
    
    .glowing-orb.small {
        width: 4px;
        height: 4px;
    }
    
    .glowing-orb.medium {
        width: 6px;
        height: 6px;
    }
    
    .glowing-orb.large {
        width: 8px;
        height: 8px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .floating-particle,
    .grid-particle,
    .connection-line,
    .burst-particle,
    .tech-ring,
    .energy-flow,
    .glowing-orb,
    .data-particle,
    .tech-hexagon {
        animation: none !important;
        transition: none !important;
    }
    
    #particle-canvas {
        background: none !important;
    }
}

/* Particle Color Variations */
.particle-blue {
    background: var(--secondary-blue) !important;
    box-shadow: 0 0 10px var(--secondary-blue) !important;
}

.particle-green {
    background: var(--secondary-green) !important;
    box-shadow: 0 0 10px var(--secondary-green) !important;
}

.particle-purple {
    background: var(--accent-purple) !important;
    box-shadow: 0 0 10px var(--accent-purple) !important;
}

.particle-white {
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}