/* Global Gaming Background Styles */

/* Enhanced Gaming Particle Background */
.gaming-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -5;
}

/* Base particle styles - Optimized for performance */
.particle {
    position: absolute;
    border-radius: 50%;
    animation: snowFallUpward linear infinite;
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden;
}

/* Blue particles */
.particle.blue {
    background: radial-gradient(circle, rgba(4, 150, 255, 0.9) 0%, rgba(0, 166, 251, 0.7) 40%, transparent 80%);
    box-shadow: 0 0 20px rgba(4, 150, 255, 0.6), inset 0 0 20px rgba(0, 166, 251, 0.3);
}

/* Gold particles */
.particle.gold {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 193, 7, 0.7) 40%, transparent 80%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), inset 0 0 20px rgba(255, 193, 7, 0.3);
}

/* Optimized particles with snow falling upward effect */
/* Blue particles - Row 1 */
.particle-1 {
    width: 4px;
    height: 4px;
    left: 5%;
    animation-duration: 15s;
    animation-delay: 0s;
}
.particle-2 {
    width: 3px;
    height: 3px;
    left: 15%;
    animation-duration: 18s;
    animation-delay: 2s;
}
.particle-3 {
    width: 5px;
    height: 5px;
    left: 25%;
    animation-duration: 16s;
    animation-delay: 4s;
}
.particle-4 {
    width: 4px;
    height: 4px;
    left: 35%;
    animation-duration: 19s;
    animation-delay: 6s;
}
.particle-5 {
    width: 6px;
    height: 6px;
    left: 45%;
    animation-duration: 14s;
    animation-delay: 8s;
}
.particle-6 {
    width: 4px;
    height: 4px;
    left: 55%;
    animation-duration: 17s;
    animation-delay: 10s;
}
.particle-7 {
    width: 3px;
    height: 3px;
    left: 65%;
    animation-duration: 20s;
    animation-delay: 12s;
}
.particle-8 {
    width: 5px;
    height: 5px;
    left: 75%;
    animation-duration: 15s;
    animation-delay: 14s;
}
.particle-9 {
    width: 4px;
    height: 4px;
    left: 85%;
    animation-duration: 18s;
    animation-delay: 16s;
}
.particle-10 {
    width: 6px;
    height: 6px;
    left: 95%;
    animation-duration: 16s;
    animation-delay: 18s;
}

/* Gold particles - Row 2 */
.particle-11 {
    width: 4px;
    height: 4px;
    left: 8%;
    animation-duration: 17s;
    animation-delay: 1s;
}
.particle-12 {
    width: 5px;
    height: 5px;
    left: 18%;
    animation-duration: 15s;
    animation-delay: 3s;
}
.particle-13 {
    width: 3px;
    height: 3px;
    left: 28%;
    animation-duration: 19s;
    animation-delay: 5s;
}
.particle-14 {
    width: 6px;
    height: 6px;
    left: 38%;
    animation-duration: 14s;
    animation-delay: 7s;
}
.particle-15 {
    width: 4px;
    height: 4px;
    left: 48%;
    animation-duration: 18s;
    animation-delay: 9s;
}
.particle-16 {
    width: 5px;
    height: 5px;
    left: 58%;
    animation-duration: 16s;
    animation-delay: 11s;
}
.particle-17 {
    width: 4px;
    height: 4px;
    left: 68%;
    animation-duration: 20s;
    animation-delay: 13s;
}
.particle-18 {
    width: 6px;
    height: 6px;
    left: 78%;
    animation-duration: 15s;
    animation-delay: 15s;
}
.particle-19 {
    width: 4px;
    height: 4px;
    left: 88%;
    animation-duration: 17s;
    animation-delay: 17s;
}

/* Blue particles - Row 3 */
.particle-20 {
    width: 5px;
    height: 5px;
    left: 12%;
    animation-duration: 16s;
    animation-delay: 2s;
}
.particle-21 {
    width: 4px;
    height: 4px;
    left: 22%;
    animation-duration: 18s;
    animation-delay: 4s;
}
.particle-22 {
    width: 6px;
    height: 6px;
    left: 32%;
    animation-duration: 14s;
    animation-delay: 6s;
}
.particle-23 {
    width: 4px;
    height: 4px;
    left: 42%;
    animation-duration: 19s;
    animation-delay: 8s;
}
.particle-24 {
    width: 5px;
    height: 5px;
    left: 52%;
    animation-duration: 15s;
    animation-delay: 10s;
}
.particle-25 {
    width: 3px;
    height: 3px;
    left: 62%;
    animation-duration: 17s;
    animation-delay: 12s;
}
.particle-26 {
    width: 6px;
    height: 6px;
    left: 72%;
    animation-duration: 16s;
    animation-delay: 14s;
}
.particle-27 {
    width: 4px;
    height: 4px;
    left: 82%;
    animation-duration: 20s;
    animation-delay: 16s;
}
.particle-28 {
    width: 5px;
    height: 5px;
    left: 92%;
    animation-duration: 18s;
    animation-delay: 18s;
}

/* Blue particle styling applied via classes in HTML */
/* Gold particle styling applied via classes in HTML */

/* Optimized snow falling upward animation */
@keyframes snowFallUpward {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) translateX(5px) rotate(36deg) scale(1);
    }
    50% {
        transform: translateY(50vh) translateX(-10px) rotate(180deg) scale(1.2);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) translateX(8px) rotate(324deg) scale(1);
    }
    100% {
        transform: translateY(-10vh) translateX(0px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* Optimized Gaming Icons with performance enhancements */
.gaming-icon {
    position: absolute;
    font-size: 2rem;
    animation: gentleFloat ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden;
    pointer-events: none;
}

/* Blue icons */
.gaming-icon.blue {
    color: rgba(4, 150, 255, 0.4);
    text-shadow: 0 0 20px rgba(4, 150, 255, 0.6);
    filter: drop-shadow(0 0 10px rgba(4, 150, 255, 0.3));
}

/* Gold icons */
.gaming-icon.gold {
    color: rgba(245, 158, 11, 0.4);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.3));
}

/* Optimized icon positions and colors */
.floating-1 {
    top: 15%;
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}
.floating-2 {
    top: 15%;
    left: 45%;
    animation-duration: 15s;
    animation-delay: 3s;
}
.floating-3 {
    top: 15%;
    right: 10%;
    animation-duration: 13s;
    animation-delay: 6s;
}
.floating-4 {
    top: 45%;
    left: 8%;
    animation-duration: 16s;
    animation-delay: 9s;
}
.floating-5 {
    top: 45%;
    left: 50%;
    animation-duration: 14s;
    animation-delay: 12s;
}
.floating-6 {
    top: 45%;
    right: 8%;
    animation-duration: 17s;
    animation-delay: 15s;
}
.floating-7 {
    top: 75%;
    left: 12%;
    animation-duration: 13s;
    animation-delay: 18s;
}
.floating-8 {
    top: 75%;
    left: 48%;
    animation-duration: 15s;
    animation-delay: 21s;
}
.floating-9 {
    top: 75%;
    right: 12%;
    animation-duration: 12s;
    animation-delay: 24s;
}

/* Blue and gold icon styling applied via classes in HTML */

/* Optimized gentle floating animation for icons */
@keyframes gentleFloat {
    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) translateX(8px) rotate(90deg);
    }
    50% {
        transform: translateY(-5px) translateX(-12px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) translateX(6px) rotate(270deg);
    }
}

/* Global Background Container - Enhanced */
.global-background {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

.global-background .background-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #070713 0%, #0a0f1c 25%, #0d1b2a 50%, #0f1419 75%, #060608 100%);
}

.global-background .background-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(4, 150, 255, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(0, 166, 251, 0.06) 0%, transparent 50%), radial-gradient(circle at 60% 60%, rgba(0, 119, 182, 0.05) 0%, transparent 50%), linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
}

/* Enhanced glow effects for cards */
.hover\:shadow-primary\/10:hover {
    box-shadow: 0 25px 50px -12px rgba(4, 150, 255, 0.1);
}

.hover\:shadow-primary\/20:hover {
    box-shadow: 0 25px 50px -12px rgba(4, 150, 255, 0.2);
}

.hover\:shadow-primary\/25:hover {
    box-shadow: 0 25px 50px -12px rgba(4, 150, 255, 0.25);
}

/* Glassmorphism enhancements */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

/* Animated gradient borders */
@keyframes gradientBorder {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-border {
    background: linear-gradient(45deg, #0496ff, #00a6fb, #0077b6, #0496ff);
    background-size: 300% 300%;
    animation: gradientBorder 3s ease infinite;
}

/* Smart Mobile Responsive Enhancements */
@media (max-width: 640px) {
    .gaming-icon {
        font-size: 1.5rem;
        animation-duration: calc(var(--base-duration, 15s) * 1.3);
    }

    .particle {
        animation-duration: calc(var(--base-duration, 18s) * 1.1);
    }

    /* Hide some particles for better performance */
    .particle-15,
    .particle-16,
    .particle-17,
    .particle-18,
    .particle-19,
    .particle-25,
    .particle-26,
    .particle-27,
    .particle-28 {
        display: none;
    }

    /* Hide some icons for better performance */
    .floating-7,
    .floating-8,
    .floating-9 {
        display: none;
    }
}

@media (max-width: 374px) {
    .gaming-icon {
        font-size: 1.2rem;
    }

    /* Hide more particles on very small screens */
    .particle-11,
    .particle-12,
    .particle-13,
    .particle-14,
    .particle-20,
    .particle-21,
    .particle-22,
    .particle-23,
    .particle-24 {
        display: none;
    }

    /* Keep only essential icons */
    .floating-4,
    .floating-5,
    .floating-6 {
        display: none;
    }
}

/* Tablet optimizations */
@media (max-width: 1024px) and (min-width: 641px) {
    .particle {
        animation-duration: calc(var(--base-duration, 18s) * 1.2);
    }

    .gaming-icon {
        animation-duration: calc(var(--base-duration, 15s) * 1.4);
    }
}

/* Performance Optimization - Reduce animations on all devices */
@media (max-width: 1024px) and (min-width: 641px) {
    .particle {
        animation-duration: calc(var(--base-duration, 30s) * 1.8); /* Much slower on tablets */
        opacity: 0.6;
    }

    .gaming-icon {
        animation-duration: calc(var(--base-duration, 25s) * 2); /* Much slower on tablets */
        opacity: 0.35;
    }
}

/* Background performance optimizations */
.global-background,
.gaming-particles,
.particle,
.gaming-icon {
    will-change: transform, opacity;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Reduced motion support - Enhanced for Performance */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .gaming-icon {
        animation-duration: 0.1s;
        animation-iteration-count: 1;
        opacity: 0.1;
    }

    .animate-gradient-border {
        animation: none;
    }
}

/* Enhanced Backdrop Filters for Layout Elements */
.header-bg {
    backdrop-filter: blur(10px) saturate(1.3);
    background-color: rgb(0 0 0 / 30%);
}

.aside-bg {
    backdrop-filter: blur(20px) saturate(1.3);
    background-color: rgb(0 0 0 / 30%);
}

.footer-bg {
    backdrop-filter: blur(20px) saturate(1.3);
    background-color: rgb(0 0 0 / 30%);
}

/* Enhanced Layout Element Styles */
/* header,
.header-bg {
    backdrop-filter: blur(20px) saturate(1.3) !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

aside,
.aside-bg {
    backdrop-filter: blur(20px) saturate(1.3) !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

footer,
.footer-bg {
    backdrop-filter: blur(20px) saturate(1.3) !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
} */
