/* =====================================================
   Unlock Meta | وسطاء ميتا
   Animations CSS
   ===================================================== */

/* AOS Custom Overrides */
[data-aos] {
    pointer-events: none;
}
[data-aos].aos-animate {
    pointer-events: auto;
}

/* =====================================================
   Particle / Orb Animations
   ===================================================== */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(8, 102, 255, 0.3), transparent);
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 201, 255, 0.2), transparent);
    bottom: 10%;
    left: -5%;
    animation-delay: -4s;
    animation-duration: 15s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(8, 102, 255, 0.15), transparent);
    top: 50%;
    left: 40%;
    animation-delay: -8s;
    animation-duration: 18s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, -20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* =====================================================
   Shine Effect
   ===================================================== */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: rotate(15deg);
    animation: shineMove 4s infinite;
}

@keyframes shineMove {
    0% { left: -60%; }
    60%, 100% { left: 160%; }
}

/* =====================================================
   Count Up Animation
   ===================================================== */
.counter-value {
    display: inline-block;
    transition: all 0.1s ease;
}

/* =====================================================
   Typing Cursor
   ===================================================== */
.typing-cursor::after {
    content: '|';
    animation: typingBlink 0.8s infinite;
    color: var(--primary);
    font-weight: 300;
}

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

/* =====================================================
   Gradient Border Animation
   ===================================================== */
.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-lg) + 2px);
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 200%;
    z-index: -1;
    animation: gradientRotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

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

/* =====================================================
   Wave Effect
   ===================================================== */
.wave-divider {
    position: relative;
    overflow: hidden;
}

.wave-divider::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60'%3E%3Cpath d='M0,30 C300,60 600,0 900,30 C1050,45 1150,15 1200,30 L1200,60 L0,60Z' fill='%23F5F9FF'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
}

/* =====================================================
   Hero Particles
   ===================================================== */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: particleFly 8s infinite;
}

@keyframes particleFly {
    0% { opacity: 0; transform: translateY(100px) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-200px) scale(1); }
}

/* =====================================================
   Ripple Effect
   ===================================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

/* =====================================================
   Stagger Animation Helpers
   ===================================================== */
.stagger-1 { animation-delay: 0.1s !important; }
.stagger-2 { animation-delay: 0.2s !important; }
.stagger-3 { animation-delay: 0.3s !important; }
.stagger-4 { animation-delay: 0.4s !important; }
.stagger-5 { animation-delay: 0.5s !important; }
.stagger-6 { animation-delay: 0.6s !important; }

/* =====================================================
   Loading Spinner
   ===================================================== */
.spinner-meta {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(8, 102, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinMeta 0.7s linear infinite;
}

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

/* =====================================================
   Skeleton Loading
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 70%; margin-bottom: 16px; }
.skeleton-card { height: 200px; border-radius: var(--radius-lg); }

/* =====================================================
   Notification Badge Pulse
   ===================================================== */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* =====================================================
   Hover Scale
   ===================================================== */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-scale:hover { transform: scale(1.05); }

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* =====================================================
   Text Reveal Animation
   ===================================================== */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: textRevealUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

/* =====================================================
   Custom Scrollbar
   ===================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(8, 102, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

    #loading-screen { display: none !important; }
    [data-aos] { opacity: 1 !important; transform: none !important; }
}
