/* Hub Animations - Smooth transitions and effects */

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

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

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

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

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
    }
}

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

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

/* Apply Animations */
.hub-header {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.decision-helper {
    animation: fadeIn 0.6s ease-out;
}

.path-card {
    animation: scaleIn 0.5s ease-out;
    animation-fill-mode: both;
}

.path-card:nth-child(1) {
    animation-delay: 0.1s;
}

.path-card:nth-child(2) {
    animation-delay: 0.2s;
}

.path-card:nth-child(3) {
    animation-delay: 0.3s;
}

.path-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Hover Effects */
.path-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.path-card:hover .path-icon {
    animation: float 2s ease-in-out infinite;
}

.path-button {
    position: relative;
    overflow: hidden;
}

.path-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.path-button:hover::before {
    left: 100%;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tag Hover Effects */
.tag {
    transition: all 0.3s ease;
}

.tag:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

/* Filter Button Active State */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn.active {
    animation: pulse 2s infinite;
}

/* Comparison Table Row Hover */
.comparison-table tr {
    transition: background 0.3s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Help Card Hover */
.help-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-card:hover {
    animation: glow 2s ease-in-out infinite;
}

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

/* Focus States */
.filter-btn:focus,
.path-button:focus,
.help-link:focus {
    outline: 2px solid var(--accent-cloud);
    outline-offset: 3px;
}

/* Stat Item Animation */
.stat-item {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.stat-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-item:nth-child(4) {
    animation-delay: 0.4s;
}

/* Background Animation */
.hub-container::before {
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Mobile Touch Feedback */
@media (hover: none) {
    .path-card:active {
        transform: scale(0.98);
    }
    
    .filter-btn:active {
        transform: scale(0.95);
    }
    
    .path-button:active {
        transform: scale(0.98);
    }
}