/* ============================================
   FIFA World Cup 2026 Dashboard - Animations
   Smooth Transitions and Keyframe Animations
   ============================================ */

/* ============================================
   Keyframe Animations
   ============================================ */

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

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

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

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

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

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

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

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

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

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

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

/* ============================================
   Animation Classes
   ============================================ */

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

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

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

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease;
}

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

.animate-shake {
    animation: shake 0.5s ease;
}

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

/* ============================================
   Staggered Animations
   ============================================ */

.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.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: 1s; }
.stagger-item:nth-child(11) { animation-delay: 1.1s; }
.stagger-item:nth-child(12) { animation-delay: 1.2s; }

/* ============================================
   Component-Specific Animations
   ============================================ */

/* Header Animation */
.header {
    animation: fadeInDown 0.5s ease-out;
}

/* Sidebar Animation */
.sidebar {
    animation: slideInLeft 0.4s ease-out;
}

/* Group Cards */
.group-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.group-card:hover .group-badge {
    animation: pulse 0.6s ease;
}

/* Match Cards */
.match-card {
    transition: all 0.3s ease;
}

.match-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Score Animation */
.score-update {
    animation: pulse 0.5s ease, bounce 0.8s ease 0.5s;
}

/* Live Match Indicator */
.live-indicator {
    position: relative;
    display: inline-block;
}

.live-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0.5;
}

/* Loading Spinner */
.loading-spinner i {
    animation: rotate 2s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

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

.skeleton-card {
    height: 200px;
    border-radius: 8px;
}

/* Progress Bar Animation */
.progress-bar {
    position: relative;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    animation: progressBar 2s ease-out forwards;
}

/* Notification Toast */
.toast {
    animation: slideInRight 0.4s ease-out, fadeInUp 0.4s ease-out 3s;
}

.toast.removing {
    animation: slideInRight 0.4s ease-out reverse;
}

/* Modal Animation */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: scaleIn 0.3s ease-out;
}

/* Dropdown Animation */
.dropdown-menu {
    animation: fadeInDown 0.3s ease-out;
    transform-origin: top;
}

/* Tab Switch Animation */
.content-section {
    animation: fadeIn 0.4s ease-out;
}

/* Filter Apply Animation */
.filter-applying {
    position: relative;
    overflow: hidden;
}

.filter-applying::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1s infinite;
}

/* Score Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-digit {
    display: inline-block;
    animation: countUp 0.5s ease-out;
}

/* Trophy Animation */
.trophy-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.trophy-icon:hover {
    transform: scale(1.2) rotate(10deg);
    animation: bounce 0.6s ease;
}

/* Flag Wave Animation */
@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

.team-flag:hover {
    animation: wave 0.5s ease;
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Hover Glow Effect */
.glow-on-hover {
    transition: box-shadow 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* ============================================
   Transition Utilities
   ============================================ */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.2s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

/* ============================================
   Delay Utilities
   ============================================ */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ============================================
   Duration Utilities
   ============================================ */

.duration-fast { animation-duration: 0.2s; }
.duration-normal { animation-duration: 0.3s; }
.duration-slow { animation-duration: 0.5s; }

/* Made with Bob */
