/* Author Profile Page Animations */

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

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

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

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

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

/* Bounce In Animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

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

/* Shimmer Animation for Skeleton */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Apply Animations to Elements */
.author-profile-page {
    animation: fadeIn 0.3s ease;
}

.author-profile-cover {
    animation: fadeInUp 0.5s ease;
}

.author-statistics-cards {
    animation: fadeInUp 0.5s ease 0.1s backwards;
}

.author-tab-navigation {
    animation: fadeInUp 0.5s ease 0.2s backwards;
}

.author-filters-bar {
    animation: fadeInUp 0.5s ease 0.3s backwards;
}

.author-content-grid {
    animation: fadeInUp 0.5s ease 0.4s backwards;
}

/* Statistics Cards Animation */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Content Card Hover Animations */
.content-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.content-card__cover-link {
    overflow: hidden;
}

.content-card__cover img {
    transition: transform 0.3s ease;
}

.content-card:hover .content-card__cover img {
    transform: scale(1.05);
}

/* Tab Navigation Animations */
.tab {
    position: relative;
    transition: color 0.2s ease;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary-600, #0284c7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab.is-active::after,
.tab:hover::after {
    transform: scaleX(1);
}

/* Button Hover Animations */
.btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Floating Filter Button Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.mobile-floating-filter-button {
    animation: float 3s ease-in-out infinite;
}

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

.content-card__badge {
    animation: badgePulse 2s ease-in-out infinite;
}

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

.spinner {
    animation: spin 1s linear infinite;
}

/* Stagger Animation for Grid Items */
@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.author-content-grid > * {
    animation: staggerIn 0.4s ease forwards;
}

/* Delay for each child */
.author-content-grid > *:nth-child(1) { animation-delay: 0ms; }
.author-content-grid > *:nth-child(2) { animation-delay: 50ms; }
.author-content-grid > *:nth-child(3) { animation-delay: 100ms; }
.author-content-grid > *:nth-child(4) { animation-delay: 150ms; }
.author-content-grid > *:nth-child(5) { animation-delay: 200ms; }
.author-content-grid > *:nth-child(6) { animation-delay: 250ms; }
.author-content-grid > *:nth-child(7) { animation-delay: 300ms; }
.author-content-grid > *:nth-child(8) { animation-delay: 350ms; }
.author-content-grid > *:nth-child(9) { animation-delay: 400ms; }
.author-content-grid > *:nth-child(10) { animation-delay: 450ms; }
.author-content-grid > *:nth-child(11) { animation-delay: 500ms; }
.author-content-grid > *:nth-child(12) { animation-delay: 550ms; }

/* Sidebar Animations */
.author-sidebar {
    animation: slideInRight 0.5s ease;
}

.author-sidebar__card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-sidebar__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Transition for View Mode Changes */
.author-content-grid--grid,
.author-content-grid--list,
.author-content-grid--compact {
    transition: grid-template-columns 0.3s ease;
}

/* Infinite Scroll Loading State */
.is-loading-more::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: var(--spacing-6, 24px) auto;
    border: 3px solid #f3f4f6;
    border-top-color: var(--color-primary-600, #0284c7);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.3s ease;
}
