@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -10px); }
    50% { transform: translate(0, -20px); }
    75% { transform: translate(-10px, -10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin360 {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

.glitch-char {
    display: inline-block;
    animation: glitch 0.3s infinite;
    color: #ff00ff;
    text-shadow: 
        2px 0 #00ffff,
        -2px 0 #ff8000;
}

@keyframes glitch-anim {
    0% {
        clip: rect(51px, 9999px, 28px, 0);
    }
    5% {
        clip: rect(70px, 9999px, 71px, 0);
    }
    10% {
        clip: rect(92px, 9999px, 90px, 0);
    }
    /* ... add more keyframes as desired ... */
    100% {
        clip: rect(67px, 9999px, 62px, 0);
    }
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.floating-shape {
    position: absolute;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    top: 10%;
    left: 5%;
    width: 50px;
    height: 50px;
    background: var(--highlight-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float 6s ease-in-out infinite, rotate 10s linear infinite;
}

.shape-2 {
    top: 60%;
    right: 10%;
    width: 70px;
    height: 70px;
    background: var(--accent-color);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 8s ease-in-out infinite alternate, pulse 5s ease-in-out infinite;
}

.shape-3 {
    bottom: 15%;
    left: 15%;
    width: 60px;
    height: 60px;
    background: var(--text-color);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float 7s ease-in-out infinite, rotate 15s linear infinite reverse;
}

.connect-item {
    animation: float 5s ease-in-out infinite;
}

.connect-item:nth-child(even) {
    animation-delay: 1s;
}

.header-content::before,
.header-content::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.header-content::before {
    top: -100px;
    left: -100px;
    animation: pulse 10s infinite alternate;
}

.header-content::after {
    bottom: -100px;
    right: -100px;
    animation: pulse 10s infinite alternate-reverse;
}

.title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1em;
    position: relative;
    overflow: hidden;
}

.title::before,
.title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.title::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.title::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Add a subtle glow effect to particles */
.particle::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(2px);
    opacity: 0.3;
    z-index: -1;
}

/* Enhance header background for better particle visibility */
header {
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.9), rgba(36, 36, 62, 0.9), rgba(75, 63, 114, 0.9));
}

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -10px); }
    50% { transform: translate(0, -20px); }
    75% { transform: translate(-10px, -10px); }
}

@keyframes pulseParticle {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.5); opacity: 0.2; }
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(90deg); }
    50% { transform: translate(0, -40px) rotate(180deg); }
    75% { transform: translate(-20px, -20px) rotate(270deg); }
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.floating-shape {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
    will-change: transform;
}

.circle {
    border-radius: 50%;
    background: var(--highlight-color);
}

.triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid var(--accent-color);
}

.square {
    background: var(--text-color);
}

.pentagon {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    background: var(--highlight-color);
}

.hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--accent-color);
}

/* Enhance header background for better particle and shape visibility */
header {
    background: linear-gradient(135deg, 
        rgba(15, 12, 41, 0.9), 
        rgba(36, 36, 62, 0.9), 
        rgba(75, 63, 114, 0.9)
    );
}

/* Add a subtle glow to the header content */
.header-content {
    position: relative;
    z-index: 2;
}

.header-content::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(
        circle,
        rgba(157, 78, 221, 0.2) 0%,
        rgba(157, 78, 221, 0) 70%
    );
    z-index: -1;
    filter: blur(20px);
}

/* Particle styles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Floating shape styles */
.floating-shape {
    position: absolute;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    top: 10%;
    left: 5%;
    width: 50px;
    height: 50px;
    background: var(--highlight-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float 6s ease-in-out infinite, rotate 10s linear infinite;
}

.shape-2 {
    top: 60%;
    right: 10%;
    width: 70px;
    height: 70px;
    background: var(--accent-color);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 8s ease-in-out infinite alternate, pulse 5s ease-in-out infinite;
}

.shape-3 {
    bottom: 15%;
    left: 15%;
    width: 60px;
    height: 60px;
    background: var(--text-color);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float 7s ease-in-out infinite, rotate 15s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.8; }
}