/* ==========================================
   Cat Casino - Animations
   ========================================== */

/* Base animation settings */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   Fade Animations
   ========================================== */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in-down {
    opacity: 0;
    transform: translateY(-30px);
    animation: fadeInDown 0.6s ease forwards;
}

.animate-fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 0.6s ease forwards;
}

/* 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 fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   Scale Animations
   ========================================== */
.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================
   AOS-like Scroll Animations
   ========================================== */
[data-aos] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Fade Up */
[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* Fade Down */
[data-aos="fade-down"] {
    transform: translateY(-40px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

/* Fade Left */
[data-aos="fade-left"] {
    transform: translateX(40px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

/* Fade Right */
[data-aos="fade-right"] {
    transform: translateX(-40px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

/* Zoom In */
[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Flip Up */
[data-aos="flip-up"] {
    transform: perspective(2500px) rotateX(50deg);
}

[data-aos="flip-up"].aos-animate {
    transform: perspective(2500px) rotateX(0);
}

/* ==========================================
   Hover Effects
   ========================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.2);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ==========================================
   Button Animations
   ========================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    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.6s ease, height 0.6s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Shine effect */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after {
    transform: translateX(100%) rotate(45deg);
}

/* ==========================================
   Card Animations
   ========================================== */
.feature-card,
.game-card,
.bonus-card,
.review-card,
.vip-level {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image reveal effect */
.game-card .game-image img {
    transition: transform 0.5s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

/* ==========================================
   Loading Animations
   ========================================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

/* ==========================================
   Text Animations
   ========================================== */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 2s steps(30) forwards;
}

.cursor-blink::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

/* ==========================================
   Gradient Animations
   ========================================== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* ==========================================
   Floating Elements
   ========================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    75% {
        transform: translateY(10px) rotate(-2deg);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

/* ==========================================
   Pulse Effects
   ========================================== */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(255, 107, 157, 0);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease infinite;
}

/* ==========================================
   Counter Animation
   ========================================== */
.counter {
    display: inline-block;
}

.counter.animate {
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Stagger Animation Helper
   ========================================== */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }

/* AOS delays */
[data-aos-delay="50"] { transition-delay: 50ms; }
[data-aos-delay="100"] { transition-delay: 100ms; }
[data-aos-delay="150"] { transition-delay: 150ms; }
[data-aos-delay="200"] { transition-delay: 200ms; }
[data-aos-delay="250"] { transition-delay: 250ms; }
[data-aos-delay="300"] { transition-delay: 300ms; }
[data-aos-delay="350"] { transition-delay: 350ms; }
[data-aos-delay="400"] { transition-delay: 400ms; }
[data-aos-delay="500"] { transition-delay: 500ms; }

/* ==========================================
   Page Transition
   ========================================== */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

/* ==========================================
   Skeleton Loading
   ========================================== */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* ==========================================
   Notification Badge
   ========================================== */
@keyframes notificationPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.notification-badge {
    animation: notificationPulse 2s ease infinite;
}

/* ==========================================
   Smooth Scroll Indicator
   ========================================== */
@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.scroll-indicator {
    animation: scrollDown 2s ease infinite;
}

/* ==========================================
   Interactive States
   ========================================== */
.interactive {
    transition: all 0.2s ease;
}

.interactive:active {
    transform: scale(0.98);
}

/* Focus states for accessibility */
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ==========================================
   Cat Specific Animations
   ========================================== */
@keyframes catWalk {
    0%, 100% {
        transform: translateX(0) scaleX(1);
    }
    25% {
        transform: translateX(20px) scaleX(1);
    }
    50% {
        transform: translateX(20px) scaleX(-1);
    }
    75% {
        transform: translateX(0) scaleX(-1);
    }
}

@keyframes catTail {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

@keyframes catEyes {
    0%, 90%, 100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.1);
    }
}

.cat-walk {
    animation: catWalk 4s ease-in-out infinite;
}

.cat-tail {
    animation: catTail 1s ease-in-out infinite;
    transform-origin: bottom;
}

.cat-eyes {
    animation: catEyes 3s ease-in-out infinite;
}

/* ==========================================
   Confetti Animation (for wins)
   ========================================== */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    top: -10px;
    animation: confetti 3s ease-in-out forwards;
}

/* ==========================================
   Slot Machine Effect
   ========================================== */
@keyframes slotSpin {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.slot-item {
    animation: slotSpin 0.1s linear infinite;
}

.slot-item.stopped {
    animation: none;
}

