/* Animations for Vranjo Social Casino */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.8s ease forwards;
}

/* Pulse Animation for CTAs */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Glow Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.9);
    }
    100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.6);
    }
}

.glow {
    animation: glow 2s infinite;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

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

/* Sparkle Animation for Background */
@keyframes sparkle {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-sparkle {
    background: linear-gradient(
        90deg,
        rgba(59, 130, 246, 0.05) 0%,
        rgba(16, 185, 129, 0.05) 25%,
        rgba(59, 130, 246, 0.05) 50%,
        rgba(16, 185, 129, 0.05) 75%,
        rgba(59, 130, 246, 0.05) 100%
    );
    background-size: 200% 200%;
    animation: sparkle 15s ease infinite;
}

/* Shine Effect for Cards */
@keyframes shine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

/* Button Pop Animation */
@keyframes buttonPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-pop {
    animation: buttonPop 2s ease infinite;
}

/* Loading Spinner Animation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: rotate 1s linear infinite;
}

/* Background Movement */
@keyframes bgMove {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.bg-move {
    background-size: 200% 200%;
    animation: bgMove 30s ease infinite;
}

/* Fade in sequentially for multiple elements */
.fade-in-sequence > * {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-sequence > *:nth-child(1) { animation-delay: 0.1s; }
.fade-in-sequence > *:nth-child(2) { animation-delay: 0.3s; }
.fade-in-sequence > *:nth-child(3) { animation-delay: 0.5s; }
.fade-in-sequence > *:nth-child(4) { animation-delay: 0.7s; }
.fade-in-sequence > *:nth-child(5) { animation-delay: 0.9s; }
.fade-in-sequence > *:nth-child(6) { animation-delay: 1.1s; }

/* Apply animations to specific elements */
#hero .hero-content {
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

.section-header h2 {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.games-grid {
    opacity: 0;
    animation: fadeIn 0.8s ease 0.3s forwards;
}

/* Transitions for Navigation */
.nav-menu li a {
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}