/* ANIMATION ENGINE & EFFECTS */

/* Keyframes */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes zoom {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    to {
        transform: scale(1);
    }
}

@keyframes slide {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out;
}

.bounce {
    animation: bounce 1s ease-out;
}

.shake {
    animation: shake 0.8s ease-out;
}

.rotate {
    animation: rotate 1s linear infinite;
}

.zoom {
    animation: zoom 0.6s ease-out;
}

/* Loading Screen Animations */
.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    animation: pulse 2s infinite;
}

.progress-fill {
    animation: progress 2s ease-in-out;
}

/* Hero Section Animations */
.hero-logo {
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    animation: slideInDown 0.8s ease-out;
}

.hero-subtitle {
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero-description {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.hero-stats .stat-item {
    animation: fadeIn 0.8s ease-out both;
}

.hero-stats .stat-item:nth-child(1) {
    animation-delay: 0.6s;
}

.hero-stats .stat-item:nth-child(2) {
    animation-delay: 0.8s;
}

.hero-stats .stat-item:nth-child(3) {
    animation-delay: 1s;
}

.hero-actions .btn {
    animation: slideInUp 0.8s ease-out both;
}

.hero-actions .btn:nth-child(1) {
    animation-delay: 1.2s;
}

.hero-actions .btn:nth-child(2) {
    animation-delay: 1.4s;
}

/* Feature Cards Animation */
.features-grid .feature-card {
    animation: fadeIn 0.8s ease-out both;
}

.features-grid .feature-card:nth-child(1) {
    animation-delay: 0.2s;
}

.features-grid .feature-card:nth-child(2) {
    animation-delay: 0.4s;
}

.features-grid .feature-card:nth-child(3) {
    animation-delay: 0.6s;
}

.features-grid .feature-card:nth-child(4) {
    animation-delay: 0.8s;
}

/* Category Cards Animation */
.categories-grid .category-card {
    animation: slideInUp 0.8s ease-out both;
}

.categories-grid .category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.categories-grid .category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.categories-grid .category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.categories-grid .category-card:nth-child(4) {
    animation-delay: 0.4s;
}

.categories-grid .category-card:nth-child(5) {
    animation-delay: 0.5s;
}

.categories-grid .category-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Section Transitions */
.section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.section.active {
    animation: fadeIn 0.5s ease-out;
}

/* Navigation Animations */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e94560, #533483);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(233, 69, 96, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Card Animations */
.feature-card,
.category-card,
.stat-item {
    transition: all 0.3s ease;
}

.feature-card:hover,
.category-card:hover,
.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Form Animations */
.form-input,
.form-textarea {
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.2);
}

/* Comment Animations */
.comment-item {
    animation: slideInUp 0.6s ease-out both;
}

.comment-item:nth-child(1) {
    animation-delay: 0.1s;
}

.comment-item:nth-child(2) {
    animation-delay: 0.2s;
}

.comment-item:nth-child(3) {
    animation-delay: 0.3s;
}

.comment-item:nth-child(4) {
    animation-delay: 0.4s;
}

.comment-item:nth-child(5) {
    animation-delay: 0.5s;
}

/* Footer Animations */
.footer-section {
    animation: slideInUp 0.8s ease-out both;
}

.footer-section:nth-child(1) {
    animation-delay: 0.2s;
}

.footer-section:nth-child(2) {
    animation-delay: 0.4s;
}

.footer-section:nth-child(3) {
    animation-delay: 0.6s;
}

.footer-section:nth-child(4) {
    animation-delay: 0.8s;
}

/* Social Button Animations */
.social-btn {
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: rotate(360deg) scale(1.1);
}

/* Search Animation */
.search-container {
    transition: all 0.3s ease;
}

.search-container:focus-within {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.2);
}

/* Loading Animation for Content */
.loading-content {
    position: relative;
}

.loading-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: slide 2s linear infinite;
}

/* Notification Animation */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
    transition: all 0.3s ease;
}

.notification.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.notification.error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.notification.warning {
    background: linear-gradient(135deg, #ffc107, #f39c12);
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8, #3498db);
}

.notification.fade-out {
    animation: slideOutRight 0.5s ease-out forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile Menu Animation */
.nav-toggle {
    transition: all 0.3s ease;
}

.nav-toggle span {
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .hero-logo {
        animation: float 2s ease-in-out infinite;
    }
    
    .hero-title {
        animation: slideInDown 0.6s ease-out;
    }
    
    .feature-card,
    .category-card {
        animation: slideInUp 0.6s ease-out both;
    }
    
    .btn {
        animation: slideInUp 0.6s ease-out both;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
