/*
 * Atom Casino Review - Animations
 * Minimalist animations for flat design
 */

/* ===== Base Animation Classes ===== */
.anim-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.6s ease forwards;
}

.anim-scale-in {
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.6s ease forwards;
}

/* Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===== Keyframes ===== */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Scroll Animations ===== */
.scroll-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.scroll-anim.visible .stagger-item:nth-child(1) { transition-delay: 0.05s; }
.scroll-anim.visible .stagger-item:nth-child(2) { transition-delay: 0.1s; }
.scroll-anim.visible .stagger-item:nth-child(3) { transition-delay: 0.15s; }
.scroll-anim.visible .stagger-item:nth-child(4) { transition-delay: 0.2s; }
.scroll-anim.visible .stagger-item:nth-child(5) { transition-delay: 0.25s; }
.scroll-anim.visible .stagger-item:nth-child(6) { transition-delay: 0.3s; }

/* ===== Rating Bar Animation ===== */
.bar-fill {
    width: 0;
    animation: fillBar 1.5s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fillBar {
    to {
        width: var(--width);
    }
}

/* ===== Score Circle Animation ===== */
.score-circle svg circle:last-child {
    stroke-dashoffset: 339.3;
    animation: drawCircle 1.5s ease forwards;
    animation-delay: 0.3s;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 20;
    }
}

/* ===== Counter Animation ===== */
.count-anim {
    transition: all 0.05s ease;
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hover-glow {
    transition: box-shadow 0.25s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(200, 255, 0, 0.3);
}

/* ===== 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.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ===== Card Animations ===== */
.rating-detail,
.bonus-card,
.game-card {
    transition: transform 0.25s ease, border-color 0.25s ease;
}

/* ===== Navigation Animation ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ===== FAQ Animation ===== */
.faq-item {
    transition: border-color 0.25s ease;
}

.faq-answer {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Tab Animation ===== */
.tab-btn {
    position: relative;
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.tab-btn.active::before {
    transform: scaleX(1);
}

/* ===== Loading Animation ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Pulse Animation ===== */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== Accent Line Animation ===== */
.accent-line {
    position: relative;
}

.accent-line::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    animation: expandLine 0.6s ease forwards;
    animation-delay: 0.3s;
    transform-origin: left;
    transform: scaleX(0);
}

@keyframes expandLine {
    to {
        transform: scaleX(1);
    }
}

/* ===== Badge Shimmer ===== */
.badge-shimmer {
    background: linear-gradient(
        90deg,
        rgba(200, 255, 0, 0) 0%,
        rgba(200, 255, 0, 0.3) 50%,
        rgba(200, 255, 0, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}a

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ===== Mobile Menu Animation ===== */
.nav-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-menu:not(.active) {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.nav-menu.active {
    opacity: 1;
    transform: translateY(0);
}

/* Menu items stagger */
.nav-menu.active li {
    animation: fadeUp 0.4s ease forwards;
}

.nav-menu.active li:nth-child(1) { animation-delay: 0.05s; }
.nav-menu.active li:nth-child(2) { animation-delay: 0.1s; }
.nav-menu.active li:nth-child(3) { animation-delay: 0.15s; }
.nav-menu.active li:nth-child(4) { animation-delay: 0.2s; }
.nav-menu.active li:nth-child(5) { animation-delay: 0.25s; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .anim-fade-in,
    .anim-fade-up,
    .anim-scale-in,
    .scroll-anim,
    .bar-fill,
    .score-circle svg circle:last-child {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .scroll-anim {
        opacity: 1;
        transform: none;
    }
    
    .bar-fill {
        width: var(--width);
    }
    
    .score-circle svg circle:last-child {
        stroke-dashoffset: 20;
    }
}

