/* 
 * Atom Casino Review - Animations
 * Liquid glass effects and smooth transitions
 */

/* ===== Scroll-triggered Animations ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--delay, 0s);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Entrance Animations ===== */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.8s ease forwards;
}

/* Animation Delays */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }

/* ===== Keyframes ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Liquid Glass Effects ===== */
@keyframes liquidWave {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%;
    }
    75% {
        border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    }
}

@keyframes liquidPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ===== Glass Card Hover Effects ===== */
.glass-card {
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

/* Deep glass card glow */
.glass-card-deep {
    position: relative;
}

.glass-card-deep::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(0, 245, 255, 0.3),
        transparent,
        rgba(124, 58, 237, 0.3)
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card-deep:hover::after {
    opacity: 1;
}

/* ===== Button Animations ===== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Primary button glow pulse */
.btn-primary {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 245, 255, 0.5);
    }
}

/* ===== Logo Animation ===== */
.logo-icon svg circle:first-child,
.logo-icon svg ellipse {
    animation: atomOrbit 10s linear infinite;
    transform-origin: center;
}

.logo-icon svg ellipse:nth-child(2) {
    animation-delay: -3.3s;
}

.logo-icon svg ellipse:nth-child(3) {
    animation-delay: -6.6s;
}

@keyframes atomOrbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Core pulse */
.logo-icon svg circle:last-child {
    animation: corePulse 2s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% {
        r: 4;
        opacity: 1;
    }
    50% {
        r: 5;
        opacity: 0.8;
    }
}

/* ===== Rating Stars Sparkle ===== */
.rating-stars span {
    animation: starSparkle 1.5s ease-in-out infinite;
}

.rating-stars span:nth-child(1) { animation-delay: 0s; }
.rating-stars span:nth-child(2) { animation-delay: 0.1s; }
.rating-stars span:nth-child(3) { animation-delay: 0.2s; }
.rating-stars span:nth-child(4) { animation-delay: 0.3s; }
.rating-stars span:nth-child(5) { animation-delay: 0.4s; }

@keyframes starSparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ===== Floating Elements ===== */
.floating-chip {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    50% {
        transform: translateY(-25px) rotate(-5deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* ===== Game Card Animations ===== */
.game-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-overlay {
    transition: opacity 0.3s ease;
}

.game-overlay .btn {
    transform: translateY(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.game-card:hover .game-overlay .btn {
    transform: translateY(0);
    opacity: 1;
}

/* ===== Bonus Card Animations ===== */
.bonus-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.bonus-card:hover {
    transform: translateY(-5px);
}

.bonus-card.featured {
    animation: featuredPulse 3s ease-in-out infinite;
}

@keyframes featuredPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 245, 255, 0.4);
    }
}

/* ===== VIP Card Stack Animation ===== */
.vip-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.vip-card-stack:hover .vip-card {
    transform: none;
}

.vip-card-stack:hover .vip-card.bronze {
    transform: rotate(-25deg) translateX(-20px) translateY(20px);
}

.vip-card-stack:hover .vip-card.silver {
    transform: rotate(-18deg) translateX(-10px) translateY(10px);
}

.vip-card-stack:hover .vip-card.gold {
    transform: rotate(-10deg) translateX(0) translateY(5px);
}

.vip-card-stack:hover .vip-card.platinum {
    transform: rotate(-3deg) translateX(5px) translateY(-5px);
}

.vip-card-stack:hover .vip-card.diamond {
    transform: rotate(10deg) translateX(10px) translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 245, 255, 0.5);
}

/* Crown bounce */
.vip-card .crown {
    animation: crownBounce 2s ease-in-out infinite;
}

@keyframes crownBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===== FAQ Accordion Animation ===== */
.faq-item {
    transition: border-color 0.3s ease;
}

.faq-answer {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CTA Decorations ===== */
.cta-decoration .deco-circle {
    animation: spinSlow 30s linear infinite;
}

.cta-decoration .deco-circle:nth-child(2) {
    animation-direction: reverse;
    animation-duration: 25s;
}

.cta-decoration .deco-circle:nth-child(3) {
    animation-duration: 20s;
}

@keyframes spinSlow {
    from {
        transform: translateY(-50%) rotate(0deg);
    }
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* First circle doesn't have translateY */
.cta-decoration .deco-circle:nth-child(1) {
    animation: spinSlowNoTranslate 30s linear infinite;
}

@keyframes spinSlowNoTranslate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== Review Card Animations ===== */
.review-card {
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
}

.reviewer-avatar {
    transition: transform 0.3s ease;
}

.review-card:hover .reviewer-avatar {
    transform: scale(1.1);
}

/* ===== Nav Link Hover Effect ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ===== Category Button Animations ===== */
.category-btn {
    transition: all 0.3s ease;
}

.category-btn.active {
    animation: buttonActivate 0.3s ease;
}

@keyframes buttonActivate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Badge Animations ===== */
.section-badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(0, 245, 255, 0.1);
    }
}

/* ===== Verdict Badge ===== */
.verdict-badge {
    animation: verdictPulse 2s ease-in-out infinite;
}

@keyframes verdictPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    }
}

/* ===== Age Badge Pulse ===== */
.age-badge {
    animation: agePulse 2s ease-in-out infinite;
}

@keyframes agePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===== Scroll Progress Bar (optional enhancement) ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===== Loading Animation ===== */
@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

/* ===== Text Gradient Animation ===== */
.animate-gradient-text {
    background: linear-gradient(
        90deg,
        var(--color-primary),
        var(--color-secondary),
        var(--color-primary)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .blob {
        animation: none;
    }
    
    .floating-chip {
        animation: none;
    }
}

