/**
 * Click Mineração - Animations CSS
 * All keyframes, transitions, and animation utilities
 */

/* ==================== KEYFRAMES ==================== */

/* Spin Animation (for loading spinner) */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* Fade Out */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Slide In from Bottom */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Out to Bottom */
@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Out to Right */
@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Scale In (Zoom In) */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scale Out (Zoom Out) */
@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Float (Hover Effect) */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Glow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(234, 88, 12, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(234, 88, 12, 0.6);
    }
}

/* Progress Bar */
@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Slide In from Top */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-6deg) scale(0.95);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* ==================== ANIMATION UTILITY CLASSES ==================== */

/* Fade Animations */
.animate-fade-in {
    animation: fadeIn 200ms ease-in-out forwards;
}

.animate-fade-out {
    animation: fadeOut 200ms ease-in-out forwards;
}

/* Slide Animations */
.animate-slide-in-up {
    animation: slideInUp 300ms ease-out forwards;
}

.animate-slide-out-down {
    animation: slideOutDown 300ms ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 300ms ease-out forwards;
}

.animate-slide-out-right {
    animation: slideOutRight 300ms ease-out forwards;
}

.animate-slide-in-down {
    animation: slideInDown 300ms ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 300ms ease-out forwards;
}

/* Scale Animations */
.animate-scale-in {
    animation: scaleIn 200ms ease-out forwards;
}

.animate-scale-out {
    animation: scaleOut 200ms ease-out forwards;
}

/* Special Animations */
.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-shake {
    animation: shake 500ms ease-in-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-rotate-in {
    animation: rotateIn 300ms ease-out forwards;
}

/* ==================== TRANSITION UTILITIES ==================== */

.transition-all {
    transition: all var(--transition-base);
}

.transition-colors {
    transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.transition-transform {
    transition: transform var(--transition-base);
}

.transition-opacity {
    transition: opacity var(--transition-base);
}

.transition-fast {
    transition-duration: var(--transition-fast);
}

.transition-slow {
    transition-duration: var(--transition-slow);
}

/* ==================== HOVER EFFECTS ==================== */

/* Lift on Hover */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Scale on Hover */
.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Brighten on Hover */
.hover-brighten {
    transition: filter var(--transition-base);
}

.hover-brighten:hover {
    filter: brightness(1.1);
}

/* ==================== LOADING STATES ==================== */

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 200px;
}

/* Loading Dots */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--color-primary);
    animation: progressBar 2s ease-in-out;
}

/* ==================== STAGGER ANIMATIONS ==================== */

/* Stagger children animations with delay */
.stagger-children > * {
    animation: slideInUp 300ms ease-out forwards;
    opacity: 0;
}

.stagger-children > *:nth-child(1) { animation-delay: 50ms; }
.stagger-children > *:nth-child(2) { animation-delay: 100ms; }
.stagger-children > *:nth-child(3) { animation-delay: 150ms; }
.stagger-children > *:nth-child(4) { animation-delay: 200ms; }
.stagger-children > *:nth-child(5) { animation-delay: 250ms; }
.stagger-children > *:nth-child(6) { animation-delay: 300ms; }
.stagger-children > *:nth-child(7) { animation-delay: 350ms; }
.stagger-children > *:nth-child(8) { animation-delay: 400ms; }
.stagger-children > *:nth-child(9) { animation-delay: 450ms; }
.stagger-children > *:nth-child(10) { animation-delay: 500ms; }

/* ==================== PAGE TRANSITIONS ==================== */

.page-enter {
    animation: fadeIn 300ms ease-out forwards;
}

.page-exit {
    animation: fadeOut 200ms ease-out forwards;
}

/* ==================== MODAL ANIMATIONS ==================== */

.modal-backdrop-enter {
    animation: fadeIn 200ms ease-out forwards;
}

.modal-backdrop-exit {
    animation: fadeOut 200ms ease-out forwards;
}

.modal-enter {
    animation: scaleIn 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-exit {
    animation: scaleOut 200ms ease-out forwards;
}

/* ==================== TOAST ANIMATIONS ==================== */

.toast-enter {
    animation: slideInRight 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
    animation: slideOutRight 200ms ease-out forwards;
}

/* ==================== DROPDOWN ANIMATIONS ==================== */

.dropdown-enter {
    animation: slideInDown 200ms ease-out forwards;
}

.dropdown-exit {
    animation: fadeOut 150ms ease-out forwards;
}

/* ==================== RIPPLE EFFECT ==================== */

.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    animation: ripple 600ms ease-out;
}

/* ==================== ATTENTION SEEKERS ==================== */

/* Flash */
@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

.animate-flash {
    animation: flash 1s ease-in-out;
}

/* Rubber Band */
@keyframes rubberBand {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scaleX(1.25) scaleY(0.75);
    }
    40% {
        transform: scaleX(0.75) scaleY(1.25);
    }
    50% {
        transform: scaleX(1.15) scaleY(0.85);
    }
    65% {
        transform: scaleX(0.95) scaleY(1.05);
    }
    75% {
        transform: scaleX(1.05) scaleY(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.animate-rubber-band {
    animation: rubberBand 1s ease-in-out;
}

/* Tada */
@keyframes tada {
    0% {
        transform: scale(1) rotate(0deg);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.animate-tada {
    animation: tada 1s ease-in-out;
}

/* ==================== ENTRANCE ANIMATIONS ==================== */

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom-in {
    animation: zoomIn 300ms ease-out forwards;
}

/* Flip In */
@keyframes flipIn {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-10deg);
    }
    70% {
        transform: perspective(400px) rotateX(10deg);
    }
    to {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

.animate-flip-in {
    animation: flipIn 600ms ease-out forwards;
}

/* ==================== EXIT ANIMATIONS ==================== */

/* Zoom Out */
@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.3);
    }
}

.animate-zoom-out {
    animation: zoomOut 300ms ease-out forwards;
}

/* ==================== CUSTOM CLICK MINERAÇÃO ANIMATIONS ==================== */

/* Logo Rotation on Load */
@keyframes logoRotate {
    from {
        transform: rotate(-6deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.logo-animate {
    animation: logoRotate 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Card Hover Glow */
.card-glow:hover {
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.3);
    transition: box-shadow var(--transition-base);
}

/* Button Click Effect */
.btn-click-effect:active {
    transform: scale(0.98);
    transition: transform 100ms ease-out;
}

/* Notification Badge Ping */
@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.notification-ping::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: inherit;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ==================== DELAY UTILITIES ==================== */

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-500 { animation-delay: 500ms; }
.delay-700 { animation-delay: 700ms; }
.delay-1000 { animation-delay: 1000ms; }

/* ==================== DURATION UTILITIES ==================== */

.duration-75 { animation-duration: 75ms; }
.duration-100 { animation-duration: 100ms; }
.duration-150 { animation-duration: 150ms; }
.duration-200 { animation-duration: 200ms; }
.duration-300 { animation-duration: 300ms; }
.duration-500 { animation-duration: 500ms; }
.duration-700 { animation-duration: 700ms; }
.duration-1000 { animation-duration: 1000ms; }

/* ==================== EASING UTILITIES ==================== */

.ease-linear { animation-timing-function: linear; }
.ease-in { animation-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.ease-out { animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in-out { animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
