/* =====================================
   MEHRAZI PLAYER - ADVANCED ANIMATIONS
   انیمیشن‌های پیشرفته و تعاملی
   ===================================== */

/* Smooth Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Bounce & Elastic */
@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);
    }
}

@keyframes elasticIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    55% {
        opacity: 1;
        transform: scale(1.1);
    }
    75% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Rotate & Flip */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

@keyframes flipInX {
    from {
        opacity: 0;
        transform: perspective(400px) rotateX(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateX(0);
    }
}

@keyframes flipInY {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

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

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

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

@keyframes wobble {
    0%, 100% {
        transform: translateX(0) rotate(0);
    }
    15% {
        transform: translateX(-25%) rotate(-5deg);
    }
    30% {
        transform: translateX(20%) rotate(3deg);
    }
    45% {
        transform: translateX(-15%) rotate(-3deg);
    }
    60% {
        transform: translateX(10%) rotate(2deg);
    }
    75% {
        transform: translateX(-5%) rotate(-1deg);
    }
}

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

@keyframes tada {
    0%, 100% {
        transform: scale(1) rotate(0);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
}

/* Glow & Shimmer */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--mp-primary-glow);
    }
    50% {
        box-shadow: 0 0 20px var(--mp-primary-glow), 0 0 30px var(--mp-primary-glow);
    }
}

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

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

@keyframes levitate {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes rippleWave {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Progress & Loading */
@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

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

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

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Skeleton Loading */
@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Notification Animations */
@keyframes notificationSlide {
    0% {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

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

/* Card Animations */
@keyframes cardFlip {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(180deg);
    }
}

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

/* Waveform Animation */
@keyframes waveform {
    0%, 100% {
        height: 3px;
    }
    50% {
        height: 12px;
    }
}

/* Equalizer Bars */
@keyframes eq {
    0% {
        height: 3px;
    }
    50% {
        height: 12px;
    }
    100% {
        height: 3px;
    }
}

/* Utility Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out;
}

.animate-fadeInDown {
    animation: fadeInDown 0.5s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.5s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.5s ease-out;
}

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

.animate-bounceIn {
    animation: bounceIn 0.6s ease-out;
}

.animate-elasticIn {
    animation: elasticIn 0.8s ease-out;
}

.animate-rotateIn {
    animation: rotateIn 0.5s ease-out;
}

.animate-flipInX {
    animation: flipInX 0.6s ease-out;
}

.animate-flipInY {
    animation: flipInY 0.6s ease-out;
}

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

.animate-heartbeat {
    animation: heartbeat 1.3s ease-in-out infinite;
}

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

.animate-wobble {
    animation: wobble 1s ease-in-out;
}

.animate-swing {
    animation: swing 1s ease-in-out;
}

.animate-tada {
    animation: tada 1s ease-in-out;
}

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

.animate-shimmer {
    animation: shimmer 2s linear infinite;
}

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

.animate-levitate {
    animation: levitate 4s ease-in-out infinite;
}

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

.animate-skeleton {
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Delay Classes */
.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 Classes */
.duration-fast {
    animation-duration: 0.3s;
}

.duration-normal {
    animation-duration: 0.5s;
}

.duration-slow {
    animation-duration: 1s;
}

/* Hover Animations */
.hover-lift:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hover-shrink:hover {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--mp-primary-glow);
    transition: box-shadow 0.3s ease;
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(n+9) { animation-delay: 0.45s; }

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
