/* 
 * 🎭 الحركات والتأثيرات - الثيم الموحد
 * Animations and Effects - Unified Theme
 */

/* 🌊 حركة الطفو */
.floating-animation {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* 🌀 تأثير الموجة */
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ⚡ حركة الدوران */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 👆 مؤشر السحب */
.swipe-indicator {
    display: none;
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
        animation: swipeHint 2s infinite;
    }
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* 🎯 تقليل الحركة للأجهزة الحساسة */
@media (prefers-reduced-motion: reduce) {
    .floating-animation {
        animation: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 🔄 انتقالات سلسة */
.smooth-transition {
    transition: all 0.3s ease-in-out;
}

/* 🎨 انتقالات الألوان السلسة */
.color-transition {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* 🎪 تأثيرات التفاعل المحسنة */
.interactive-element {
    transition: all 0.3s ease;
}

.interactive-element:hover {
    transform: translateY(-1px);
}

.interactive-element:active {
    transform: translateY(0);
}

/* 🌅 تأثير الظهور التدريجي */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 💓 تأثير النبض */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* 🎾 تأثير الارتداد */
.bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* ✨ تأثير الظهور */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ➡️ تأثير الانزلاق من اليمين */
.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

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

/* ⬅️ تأثير الانزلاق من اليسار */
.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

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

/* 🔍 تأثير التكبير */
.scale-in {
    animation: scaleIn 0.3s ease-out;
}

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

/* 📳 تأثير الاهتزاز */
.shake {
    animation: shake 0.5s ease-in-out;
}

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

/* 🎪 تأثير النبض للأزرار المهمة */
.pulse-accent {
    animation: pulse-accent 2s infinite;
}

@keyframes pulse-accent {
    0%, 100% { 
        box-shadow: 0 0 0 0 var(--indigo-alpha-20); 
    }
    50% { 
        box-shadow: 0 0 0 20px transparent; 
    }
}

/* 🌟 تأثير التألق */
.glow-effect {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px var(--indigo-alpha-20);
    }
    to {
        box-shadow: 0 0 30px var(--indigo-alpha-10), 0 0 40px var(--indigo-alpha-10);
    }
}

/* 🎭 تأثير التمرير المتدرج */
.parallax-slow {
    transform: translateY(var(--scroll, 0) * 0.5px);
}

.parallax-fast {
    transform: translateY(var(--scroll, 0) * 2px);
}

/* 🔄 دوران مستمر */
.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 📐 تأثيرات الهندسة */
.morph-shape {
    transition: border-radius 0.5s ease, transform 0.5s ease;
}

.morph-shape:hover {
    border-radius: 50%;
    transform: rotate(180deg);
}

/* 🎨 تدرج متحرك */
.gradient-animation {
    background: linear-gradient(-45deg, 
        var(--midnight-blue), 
        var(--vivid-indigo), 
        var(--midnight-blue), 
        var(--vivid-indigo)
    );
    background-size: 400% 400%;
    animation: gradient-shift 4s ease infinite;
}

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

/* 📱 تأثيرات خاصة بالجوال */
@media (max-width: 768px) {
    .mobile-bounce {
        animation: mobile-bounce 0.3s ease;
    }
    
    @keyframes mobile-bounce {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.05);
        }
    }
    
    .mobile-slide-up {
        animation: mobile-slide-up 0.4s ease-out;
    }
    
    @keyframes mobile-slide-up {
        from {
            transform: translateY(50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* 🎯 تأثيرات التركيز */
.focus-ring {
    transition: box-shadow 0.2s ease;
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--indigo-alpha-20);
}

/* 💫 تأثير التحميل */
.loading-spinner {
    animation: spin 1s linear infinite;
}

.loading-dots {
    animation: loading-dots 1.4s ease-in-out infinite both;
}

@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 🎪 تأثيرات النص */
.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--midnight-blue) 0%,
        var(--vivid-indigo) 50%,
        var(--midnight-blue) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s ease-in-out infinite;
}

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

/* 🌊 تأثير الموجة المتقدم */
.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--indigo-alpha-10),
        transparent
    );
    animation: wave-sweep 2s ease-in-out infinite;
}

@keyframes wave-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}