/* Particles and floating elements */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    animation: float-particle 20s infinite;
}

.particle:nth-child(2n) {
    background: rgba(59, 130, 246, 0.3);
    animation-duration: 25s;
    animation-delay: -5s;
}

.particle:nth-child(3n) {
    background: rgba(168, 85, 247, 0.3);
    animation-duration: 30s;
    animation-delay: -10s;
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        transform: translate(calc(var(--tx) * 1px), calc(var(--ty) * 1px)) scale(1.5);
        opacity: 0.8;
    }
    90% {
        opacity: 0.5;
    }
}

/* Glowing orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: pulse-glow 8s ease-in-out infinite;
}

.glow-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    bottom: -15%;
    right: -15%;
    animation-delay: -4s;
}

.glow-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    top: 40%;
    right: 10%;
    animation-delay: -2s;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.2) translate(30px, 30px);
        opacity: 0.4;
    }
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Smooth page transitions */
.page-transition {
    opacity: 0;
    animation: fadeInPage 0.6s ease-out forwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced mobile touch feedback */
@media (hover: none) and (pointer: coarse) {
    .card-wrapper {
        -webkit-tap-highlight-color: rgba(139, 92, 246, 0.1);
        tap-highlight-color: rgba(139, 92, 246, 0.1);
    }

    .card-wrapper:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
