/* ============================================
   Cryptmano Global Animations
   ============================================ */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInCenter {
    from {
        opacity: 0;
        transform: scale(0.8) translate(-50%, -50%);
    }
    to {
        opacity: 1;
        transform: scale(1) translate(-50%, -50%);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pulse Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(104, 155, 238, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(104, 155, 238, 0.8), 0 0 30px rgba(104, 155, 238, 0.4);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(104, 155, 238, 0.5),
                     0 0 10px rgba(104, 155, 238, 0.3),
                     0 0 15px rgba(104, 155, 238, 0.2);
    }
    50% {
        text-shadow: 0 0 10px rgba(104, 155, 238, 0.8),
                     0 0 20px rgba(104, 155, 238, 0.6),
                     0 0 30px rgba(104, 155, 238, 0.4);
    }
}

/* ============================================
   Animation Classes
   ============================================ */

/* Fade In Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

/* Scale Classes */
.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Slide Classes */
.animate-slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
}

.animate-slide-in-down {
    animation: slideInDown 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Pulse Classes */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Float Class */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Rotate Class */
.animate-rotate {
    animation: rotate 2s linear infinite;
}

/* Bounce Class */
.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Shake Class */
.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Gradient Animation */
.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Glow Animation */
.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================
   Staggered Animations
   ============================================ */

.animate-stagger-1 {
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

.animate-stagger-2 {
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-stagger-3 {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-stagger-4 {
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-stagger-5 {
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
    opacity: 0;
}

.animate-stagger-6 {
    animation: fadeInUp 0.6s ease-out 0.6s forwards;
    opacity: 0;
}

/* ============================================
   Hover Animations
   ============================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(104, 155, 238, 0.6);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-shimmer {
    position: relative;
    overflow: hidden;
}

.hover-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hover-shimmer:hover::before {
    left: 100%;
}

/* ============================================
   Page Load Animations
   ============================================ */

.page-load-fade {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.page-load-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ============================================
   Responsive Animation Adjustments
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right {
        animation-duration: 0.5s;
    }
}

/* ============================================
   Additional Content Animations
   ============================================ */

/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-count-up {
    animation: countUp 0.8s ease-out forwards;
}

/* Image Zoom Animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        clip-path: inset(0 0 100% 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

.animate-text-reveal {
    animation: textReveal 0.8s ease-out forwards;
}

/* Card Flip Animation */
@keyframes cardFlip {
    from {
        opacity: 0;
        transform: rotateY(-15deg) translateZ(0);
    }
    to {
        opacity: 1;
        transform: rotateY(0) translateZ(0);
    }
}

.animate-card-flip {
    animation: cardFlip 0.6s ease-out forwards;
    transform-style: preserve-3d;
}

/* Stats Counter Animation */
@keyframes statsPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-stats-pop {
    animation: statsPop 0.6s ease-out forwards;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width, 100%);
    }
}

.animate-progress {
    animation: progressFill 1.5s ease-out forwards;
}

/* Icon Spin and Fade */
@keyframes iconSpinFade {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.animate-icon-spin {
    animation: iconSpinFade 0.6s ease-out forwards;
}

/* Section Title Animation */
@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-title-slide {
    animation: titleSlide 0.8s ease-out forwards;
}

/* Badge Pulse Animation */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(104, 155, 238, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(104, 155, 238, 0);
    }
}

.animate-badge-pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Content Slide In from Right */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out forwards;
}

/* Content Slide In from Left */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

/* Staggered List Items */
.animate-list-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-list-item:nth-child(1) { animation-delay: 0.1s; }
.animate-list-item:nth-child(2) { animation-delay: 0.2s; }
.animate-list-item:nth-child(3) { animation-delay: 0.3s; }
.animate-list-item:nth-child(4) { animation-delay: 0.4s; }
.animate-list-item:nth-child(5) { animation-delay: 0.5s; }
.animate-list-item:nth-child(6) { animation-delay: 0.6s; }
.animate-list-item:nth-child(7) { animation-delay: 0.7s; }
.animate-list-item:nth-child(8) { animation-delay: 0.8s; }

/* Image Hover Zoom */
.hover-zoom {
    transition: transform 0.4s ease, filter 0.4s ease;
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.4s ease;
}

.hover-zoom:hover img {
    transform: scale(1.1);
}

.hover-zoom:hover {
    transform: scale(1.02);
}

/* Card Tilt Animation */
@keyframes cardTilt {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateX(10deg) translateY(20px);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateX(0) translateY(0);
    }
}

.animate-card-tilt {
    animation: cardTilt 0.8s ease-out forwards;
}

/* Button Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Text Gradient Animation */
@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient-text {
    background: linear-gradient(90deg, #689bee, #4a7bc8, #689bee);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s linear infinite;
}

/* Stats Card Animation */
@keyframes statsCard {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-stats-card {
    animation: statsCard 0.6s ease-out forwards;
}

/* Section Divider Animation */
@keyframes dividerGrow {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

.animate-divider {
    animation: dividerGrow 1s ease-out forwards;
}

/* Icon Bounce In */
@keyframes iconBounce {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.animate-icon-bounce {
    animation: iconBounce 0.6s ease-out forwards;
}

/* Content Fade In with Scale */
@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-scale {
    animation: fadeScale 0.6s ease-out forwards;
}

/* Continuous Float Animation */
@keyframes continuousFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-continuous-float {
    animation: continuousFloat 3s ease-in-out infinite;
}

/* Shine Effect */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.animate-shine {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: shine 2s linear infinite;
}

/* Content Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure section-wrapper and page-wrapper are always visible */
.section-wrapper,
.page-wrapper {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Ensure sections are visible by default */
section {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Only apply reveal-on-scroll to specific child elements, not containers */
.section-wrapper > section,
.page-wrapper > section {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Image Parallax Effect */
.parallax-image {
    transition: transform 0.3s ease-out;
}

/* Loading Skeleton Animation */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.animate-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

