@keyframes gradient-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 140, 66, 0.4), 0 0 40px rgba(59, 130, 246, 0.3);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 140, 66, 0.8), 0 0 60px rgba(59, 130, 246, 0.5);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.8)); }
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #fb923c, #f97316, #ea580c, #3B82F6, #60A5FA, #fb923c);
    background-size: 400% 400%;
    animation: gradient-border 6s ease infinite;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.8;
}

.gradient-border-blue::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3B82F6, #60A5FA, #fb923c, #f97316, #3B82F6);
    background-size: 400% 400%;
    animation: gradient-border 6s ease infinite;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.9;
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.float-badge {
    animation: float 4s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.float-badge:hover {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.2);
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.link-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(251, 146, 60, 0.2), 
        rgba(59, 130, 246, 0.2),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-card:hover::before {
    left: 100%;
}

.link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(59, 130, 246, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.link-card:hover::after {
    opacity: 1;
}

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

.particle {
    position: absolute;
    font-size: 24px;
    animation: particle 20s linear infinite;
    filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.6));
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; }
.particle:nth-child(2) { left: 30%; animation-delay: 3s; animation-duration: 22s; font-size: 18px; }
.particle:nth-child(3) { left: 50%; animation-delay: 6s; animation-duration: 20s; font-size: 28px; }
.particle:nth-child(4) { left: 70%; animation-delay: 9s; animation-duration: 19s; font-size: 22px; }
.particle:nth-child(5) { left: 85%; animation-delay: 12s; animation-duration: 21s; font-size: 20px; }
.particle:nth-child(6) { left: 15%; animation-delay: 2s; animation-duration: 23s; font-size: 26px; }
.particle:nth-child(7) { left: 60%; animation-delay: 8s; animation-duration: 17s; font-size: 19px; }
.particle:nth-child(8) { left: 40%; animation-delay: 5s; animation-duration: 24s; font-size: 21px; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced scrollbar with gradient */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fb923c 0%, #3B82F6 50%, #f97316 100%);
    border-radius: 5px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #fdba74 0%, #60A5FA 50%, #fb923c 100%);
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.5);
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 3px solid #3B82F6;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
}

/* Shimmer effect for buttons */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Glassmorphism enhancement */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .gradient-border,
    .gradient-border-blue {
        width: 28px;
        height: 28px;
    }
    
    .link-card {
        padding: 1.25rem;
    }
    
    .particle {
        font-size: 18px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .link-card {
        border: 2px solid currentColor;
    }
}