/* ===== COMMUNITY SECTION - SOCIAL/NETWORK ANIMATION ===== */

.community {
    position: relative;
    overflow: hidden;
}

/* Social Network Background */
.social-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    opacity: 0.3;
}

/* Flying Emojis/Icons */
.flying-emoji {
    position: absolute;
    font-size: 40px;
    animation: emojiFloat 12s linear infinite;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
}

.flying-emoji:nth-child(1) { left: 5%; animation-delay: 0s; }
.flying-emoji:nth-child(2) { left: 20%; animation-delay: 1.5s; }
.flying-emoji:nth-child(3) { left: 35%; animation-delay: 3s; }
.flying-emoji:nth-child(4) { left: 50%; animation-delay: 4.5s; }
.flying-emoji:nth-child(5) { left: 65%; animation-delay: 6s; }
.flying-emoji:nth-child(6) { left: 80%; animation-delay: 7.5s; }
.flying-emoji:nth-child(7) { left: 95%; animation-delay: 9s; }
.flying-emoji:nth-child(8) { left: 12%; animation-delay: 2s; }
.flying-emoji:nth-child(9) { left: 45%; animation-delay: 5s; }
.flying-emoji:nth-child(10) { left: 75%; animation-delay: 8s; }

@keyframes emojiFloat {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* Connection Lines (Network Effect) */
.connection-web {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.connection-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(6, 182, 212, 0.5),
        transparent
    );
    animation: connectionPulse 3s ease-in-out infinite;
}

.connection-line:nth-child(1) {
    top: 15%;
    left: 10%;
    width: 30%;
    animation-delay: 0s;
    transform: rotate(25deg);
}

.connection-line:nth-child(2) {
    top: 35%;
    right: 15%;
    width: 35%;
    animation-delay: 0.5s;
    transform: rotate(-30deg);
}

.connection-line:nth-child(3) {
    top: 55%;
    left: 20%;
    width: 40%;
    animation-delay: 1s;
    transform: rotate(15deg);
}

.connection-line:nth-child(4) {
    top: 75%;
    right: 10%;
    width: 32%;
    animation-delay: 1.5s;
    transform: rotate(-20deg);
}

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

/* Social Nodes */
.social-node {
    position: absolute;
    width: 15px;
    height: 15px;
    background: rgba(6, 182, 212, 0.8);
    border: 3px solid rgba(6, 182, 212, 1);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.8),
                0 0 40px rgba(6, 182, 212, 0.4);
    animation: nodePulse 2.5s ease-in-out infinite;
}

.social-node:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.social-node:nth-child(2) { top: 15%; right: 15%; animation-delay: 0.3s; }
.social-node:nth-child(3) { top: 35%; left: 20%; animation-delay: 0.6s; }
.social-node:nth-child(4) { top: 35%; right: 10%; animation-delay: 0.9s; }
.social-node:nth-child(5) { top: 55%; left: 15%; animation-delay: 1.2s; }
.social-node:nth-child(6) { top: 55%; right: 20%; animation-delay: 1.5s; }
.social-node:nth-child(7) { top: 75%; left: 25%; animation-delay: 1.8s; }
.social-node:nth-child(8) { top: 75%; right: 12%; animation-delay: 2.1s; }
.social-node:nth-child(9) { top: 45%; left: 50%; animation-delay: 1s; }
.social-node:nth-child(10) { top: 65%; left: 45%; animation-delay: 1.3s; }

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

/* Floating Hearts */
.floating-heart {
    position: absolute;
    font-size: 30px;
    animation: heartFloat 10s ease-in-out infinite;
    opacity: 0.6;
}

.floating-heart:nth-child(1) { left: 15%; bottom: -50px; animation-delay: 0s; }
.floating-heart:nth-child(2) { left: 45%; bottom: -50px; animation-delay: 2s; }
.floating-heart:nth-child(3) { left: 75%; bottom: -50px; animation-delay: 4s; }
.floating-heart:nth-child(4) { left: 30%; bottom: -50px; animation-delay: 3s; }
.floating-heart:nth-child(5) { left: 60%; bottom: -50px; animation-delay: 5s; }

@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) scale(0.3);
        opacity: 0;
    }
}

/* Message Bubbles */
.message-bubble {
    position: absolute;
    width: 60px;
    height: 40px;
    background: rgba(6, 182, 212, 0.2);
    border: 2px solid rgba(6, 182, 212, 0.5);
    border-radius: 20px;
    animation: bubbleFloat 15s ease-in-out infinite;
}

.message-bubble::before {
    content: '💬';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.message-bubble:nth-child(1) { top: 20%; left: 8%; animation-delay: 0s; }
.message-bubble:nth-child(2) { top: 45%; right: 10%; animation-delay: 3s; }
.message-bubble:nth-child(3) { bottom: 25%; left: 12%; animation-delay: 6s; }
.message-bubble:nth-child(4) { top: 60%; right: 15%; animation-delay: 9s; }

@keyframes bubbleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translate(20px, -20px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-15px, 15px) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translate(15px, 20px) scale(1.05);
        opacity: 0.7;
    }
}

/* Wave Effect */
.wave-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    opacity: 0.15;
}

.wave-line svg {
    width: 100%;
    height: 100%;
}

.wave-path {
    fill: none;
    stroke: rgba(6, 182, 212, 0.6);
    stroke-width: 3;
    animation: waveMove 8s ease-in-out infinite;
}

@keyframes waveMove {
    0%, 100% {
        d: path("M0,50 Q250,30 500,50 T1000,50 T1500,50 T2000,50");
    }
    50% {
        d: path("M0,50 Q250,70 500,50 T1000,50 T1500,50 T2000,50");
    }
}

/* Glowing Social Orbs */
.social-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.2;
    animation: socialOrbFloat 20s ease-in-out infinite;
}

.social-orb:nth-child(1) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.6), transparent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.social-orb:nth-child(2) {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.5), transparent);
    bottom: 15%;
    right: 10%;
    animation-delay: 4s;
}

.social-orb:nth-child(3) {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4), transparent);
    top: 50%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes socialOrbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -40px) scale(1.1);
    }
    66% {
        transform: translate(-40px, 40px) scale(0.9);
    }
}

/* Sparkle Stars */
.community-sparkle {
    position: absolute;
    font-size: 20px;
    animation: sparkleAppear 4s ease-in-out infinite;
    opacity: 0;
}

.community-sparkle:nth-child(1) { top: 15%; left: 25%; animation-delay: 0s; }
.community-sparkle:nth-child(2) { top: 35%; right: 30%; animation-delay: 1s; }
.community-sparkle:nth-child(3) { top: 65%; left: 35%; animation-delay: 2s; }
.community-sparkle:nth-child(4) { top: 85%; right: 25%; animation-delay: 3s; }
.community-sparkle:nth-child(5) { top: 45%; left: 15%; animation-delay: 1.5s; }
.community-sparkle:nth-child(6) { top: 55%; right: 20%; animation-delay: 2.5s; }

@keyframes sparkleAppear {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
}

/* Make sure content is above animation */
.community .container {
    position: relative;
    z-index: 2;
}

.social-grid {
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .social-bg {
        opacity: 0.2;
    }
    
    .flying-emoji {
        font-size: 30px;
    }
    
    .message-bubble {
        width: 50px;
        height: 35px;
    }
}
