/* Animations CSS for StellarNet12 - 2025 Design */

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

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

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

/* Slide In From Right Animation */
@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Float Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Apply animations to elements */
.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

.slide-up {
    animation: slideInUp 0.5s ease-out forwards;
}

.slide-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.slide-right {
    animation: slideInRight 0.5s ease-out forwards;
}

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

.shimmer {
    background-size: 200% auto;
    animation: shimmer 3s infinite linear;
}

.bounce {
    animation: bounce 2s infinite;
}

.rotate {
    animation: rotate 10s linear infinite;
}

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

/* Staggered animations for lists and cards */
.stagger-item {
    opacity: 0;
}

.stagger-item.animated {
    animation: slideInUp 0.5s ease-out forwards;
}

/* Apply animation delays to staggered items */
.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; }
.stagger-item:nth-child(9) { animation-delay: 0.9s; }
.stagger-item:nth-child(10) { animation-delay: 1.0s; }

/* Card hover effects */
.card {
    transition: all 0.3s ease;
}

.card.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card.hover-glow:hover {
    box-shadow: 0 0 20px rgba(69, 104, 220, 0.3);
}

/* Button hover effects */
.btn.btn-hover-pulse:hover {
    animation: pulse 1s infinite;
}

.btn.btn-hover-shimmer {
    background-size: 200% auto;
    transition: all 0.5s ease;
}

.btn.btn-hover-shimmer:hover {
    background-position: right center;
}

/* Dashboard card animations */
.dashboard-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.dashboard-card:hover .dashboard-stats {
    animation: pulse 1s ease-in-out;
}

.dashboard-card:hover .sb-nav-link-icon i {
    animation: bounce 1s ease-in-out;
}

/* Notification bell animation */
.notification-bell {
    position: relative;
}

.notification-bell.active i {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(7deg); }
    80% { transform: rotate(-7deg); }
    100% { transform: rotate(0); }
}

/* Badge animations */
.badge.animated {
    animation: pulse 2s infinite;
}

/* Page transition effects */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

/* Theme transition effect */
.theme-transition {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Loading spinner animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: rotate 1s linear infinite;
}

[data-theme="dark"] .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
}

/* Gradient text effect */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shimmer 3s infinite linear;
}

/* Hover underline animation for links */
.hover-underline {
    position: relative;
    text-decoration: none;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.hover-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Animated icons */
.icon-animated:hover {
    animation: pulse 1s infinite;
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.6s ease;
}

.progress-bar.animated {
    animation: shimmer 3s infinite linear;
    background-size: 200% auto;
}
