/* Rexary Games - Core Styles */

/* Custom Animations */
@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(57, 255, 20, 0.4),
                    0 0 40px rgba(57, 255, 20, 0.2),
                    0 0 60px rgba(57, 255, 20, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(57, 255, 20, 0.6),
                    0 0 60px rgba(57, 255, 20, 0.4),
                    0 0 90px rgba(57, 255, 20, 0.2);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@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); }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #39ff14;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #32cd32;
}

/* Text Glow Effect */
.text-glow {
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.8),
                 0 0 20px rgba(57, 255, 20, 0.6),
                 0 0 30px rgba(57, 255, 20, 0.4);
}

/* Card Hover Effects */
.game-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.game-card:hover {
    transform: translateY(-10px) scale(1.02);
}
.game-card:hover .card-overlay {
    opacity: 1;
}
.game-card:hover .card-image {
    transform: scale(1.1);
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}
.btn-shine:hover::before {
    left: 100%;
}

/* Scanline Effect */
.scanline-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(57, 255, 20, 0.1);
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

/* Grid Pattern Background */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(57, 255, 20, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Noise Texture */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Input Focus Effects */
.input-neon:focus {
    box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.5),
                0 0 20px rgba(57, 255, 20, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #39ff14 0%, #00ff88 50%, #39ff14 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Parallax Hero */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Motion Reduction */
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Fade in animation class */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Loading state */
body:not(.loaded) {
    overflow: hidden;
}

/* Image loaded state */
img.loaded {
    animation: imageLoad 0.5s ease-out;
}

@keyframes imageLoad {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}
