/**
 * Mystic Numerology Theme - Advanced Animations & Effects
 *
 * @package Mystic_Numerology_Theme
 * @version 1.0.0
 */

/* ==========================================================================
   Custom Cursor
   ========================================================================== */

.mnt-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mnt-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out, opacity 0.15s ease;
    mix-blend-mode: difference;
}

.mnt-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--mnt-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.08s ease-out;
}

.mnt-cursor.hover {
    transform: scale(2);
    background: rgba(214, 158, 46, 0.1);
    border-color: var(--mnt-primary);
}

.mnt-cursor.clicking {
    transform: scale(0.8);
}

@media (max-width: 1024px) {
    .mnt-cursor,
    .mnt-cursor-dot {
        display: none !important;
    }
}

/* ==========================================================================
   Particle System
   ========================================================================== */

.mnt-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.mnt-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: mnt-particle-float linear infinite;
}

.mnt-particle--star {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.mnt-particle--orb {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, var(--mnt-primary-light) 0%, transparent 70%);
    filter: blur(1px);
}

.mnt-particle--gold {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, var(--mnt-gold) 0%, transparent 70%);
    box-shadow: 0 0 15px var(--mnt-gold);
}

@keyframes mnt-particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==========================================================================
   Glassmorphism Effects
   ========================================================================== */

.mnt-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.mnt-glass-dark {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 70, 193, 0.2);
}

.mnt-glass-gold {
    background: rgba(214, 158, 46, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(214, 158, 46, 0.3);
}

/* ==========================================================================
   3D Card Effects
   ========================================================================== */

.mnt-card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.mnt-card-3d-inner {
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.mnt-card-tilt {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.mnt-card-tilt:hover {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 30px rgba(107, 70, 193, 0.3);
}

.mnt-card-shine {
    position: relative;
    overflow: hidden;
}

.mnt-card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
    z-index: 2;
}

.mnt-card-shine:hover::before {
    transform: translateX(100%) rotate(45deg);
}

/* ==========================================================================
   Mystical Glow Effects
   ========================================================================== */

.mnt-glow-primary {
    box-shadow: 
        0 0 20px rgba(107, 70, 193, 0.4),
        0 0 40px rgba(107, 70, 193, 0.2),
        0 0 60px rgba(107, 70, 193, 0.1);
}

.mnt-glow-gold {
    box-shadow: 
        0 0 20px rgba(214, 158, 46, 0.4),
        0 0 40px rgba(214, 158, 46, 0.2),
        0 0 60px rgba(214, 158, 46, 0.1);
}

.mnt-glow-text {
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
}

.mnt-glow-pulse {
    animation: mnt-glow-pulse 2s ease-in-out infinite;
}

@keyframes mnt-glow-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(107, 70, 193, 0.4),
            0 0 40px rgba(107, 70, 193, 0.2);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(107, 70, 193, 0.6),
            0 0 80px rgba(107, 70, 193, 0.4);
    }
}

/* ==========================================================================
   Animated Gradients
   ========================================================================== */

.mnt-gradient-animated {
    background: linear-gradient(
        -45deg,
        var(--mnt-primary),
        var(--mnt-primary-dark),
        var(--mnt-gold),
        var(--mnt-accent)
    );
    background-size: 400% 400%;
    animation: mnt-gradient-shift 15s ease infinite;
}

@keyframes mnt-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.mnt-text-gradient-animated {
    background: linear-gradient(
        90deg,
        var(--mnt-gold),
        var(--mnt-primary-light),
        var(--mnt-gold),
        var(--mnt-accent),
        var(--mnt-gold)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: mnt-text-shine 3s linear infinite;
}

@keyframes mnt-text-shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ==========================================================================
   Floating Elements
   ========================================================================== */

.mnt-float-slow {
    animation: mnt-float-vertical 6s ease-in-out infinite;
}

.mnt-float-medium {
    animation: mnt-float-vertical 4s ease-in-out infinite;
}

.mnt-float-fast {
    animation: mnt-float-vertical 2s ease-in-out infinite;
}

@keyframes mnt-float-vertical {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.mnt-float-horizontal {
    animation: mnt-float-h 8s ease-in-out infinite;
}

@keyframes mnt-float-h {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

.mnt-orbit {
    animation: mnt-orbit 20s linear infinite;
    transform-origin: center center;
}

@keyframes mnt-orbit {
    from { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

/* ==========================================================================
   Number Counter Animation
   ========================================================================== */

.mnt-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.mnt-counter-animate {
    animation: mnt-number-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes mnt-number-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mystical Number Reveal */
.mnt-number-reveal {
    position: relative;
    display: inline-block;
}

.mnt-number-reveal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(214, 158, 46, 0.3) 0%,
        transparent 70%
    );
    opacity: 0;
    animation: mnt-reveal-glow 2s ease-out forwards;
}

@keyframes mnt-reveal-glow {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */

.mnt-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.mnt-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero content should always be visible with animation */
.mnt-hero-content.mnt-animate-fade-in {
    animation: mnt-hero-entrance 1s ease forwards;
}

@keyframes mnt-hero-entrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.mnt-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.mnt-reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.mnt-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.mnt-reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.mnt-reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.mnt-reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger animation delays */
.mnt-stagger > *:nth-child(1) { transition-delay: 0.1s; }
.mnt-stagger > *:nth-child(2) { transition-delay: 0.2s; }
.mnt-stagger > *:nth-child(3) { transition-delay: 0.3s; }
.mnt-stagger > *:nth-child(4) { transition-delay: 0.4s; }
.mnt-stagger > *:nth-child(5) { transition-delay: 0.5s; }
.mnt-stagger > *:nth-child(6) { transition-delay: 0.6s; }
.mnt-stagger > *:nth-child(7) { transition-delay: 0.7s; }
.mnt-stagger > *:nth-child(8) { transition-delay: 0.8s; }
.mnt-stagger > *:nth-child(9) { transition-delay: 0.9s; }

/* ==========================================================================
   Mystical Borders & Decorations
   ========================================================================== */

.mnt-border-glow {
    position: relative;
}

.mnt-border-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--mnt-primary),
        var(--mnt-gold),
        var(--mnt-primary-light),
        var(--mnt-gold)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: mnt-border-glow 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mnt-border-glow:hover::before {
    opacity: 1;
}

@keyframes mnt-border-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mystical Corner Decorations */
.mnt-corners {
    position: relative;
}

.mnt-corners::before,
.mnt-corners::after {
    content: '✦';
    position: absolute;
    font-size: 1.5rem;
    color: var(--mnt-gold);
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mnt-corners::before {
    top: -10px;
    left: -10px;
}

.mnt-corners::after {
    bottom: -10px;
    right: -10px;
}

.mnt-corners:hover::before,
.mnt-corners:hover::after {
    opacity: 1;
    transform: scale(1.2);
}

/* ==========================================================================
   Loading & Skeleton Effects
   ========================================================================== */

.mnt-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: mnt-skeleton-shimmer 1.5s infinite;
    border-radius: var(--mnt-radius);
}

@keyframes mnt-skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.mnt-loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(107, 70, 193, 0.2);
    border-top-color: var(--mnt-primary);
    border-radius: 50%;
    animation: mnt-spin 1s linear infinite;
}

.mnt-loader-mystical {
    width: 60px;
    height: 60px;
    position: relative;
}

.mnt-loader-mystical::before,
.mnt-loader-mystical::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.mnt-loader-mystical::before {
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--mnt-gold);
    animation: mnt-spin 1s linear infinite;
}

.mnt-loader-mystical::after {
    inset: 8px;
    border: 3px solid transparent;
    border-top-color: var(--mnt-primary);
    animation: mnt-spin 0.8s linear reverse infinite;
}

@keyframes mnt-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Hover Effect Classes
   ========================================================================== */

.mnt-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mnt-hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.mnt-hover-grow {
    transition: transform 0.3s ease;
}

.mnt-hover-grow:hover {
    transform: scale(1.05);
}

.mnt-hover-rotate {
    transition: transform 0.3s ease;
}

.mnt-hover-rotate:hover {
    transform: rotate(5deg);
}

.mnt-hover-glow {
    transition: box-shadow 0.3s ease;
}

.mnt-hover-glow:hover {
    box-shadow: 
        0 0 30px rgba(107, 70, 193, 0.5),
        0 0 60px rgba(107, 70, 193, 0.3);
}

/* ==========================================================================
   Mystical Symbol Animations
   ========================================================================== */

.mnt-symbol-spin {
    display: inline-block;
    animation: mnt-symbol-rotate 10s linear infinite;
}

@keyframes mnt-symbol-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mnt-symbol-pulse {
    display: inline-block;
    animation: mnt-symbol-pulse 2s ease-in-out infinite;
}

@keyframes mnt-symbol-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ==========================================================================
   Magic Circle Effect
   ========================================================================== */

.mnt-magic-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mnt-magic-circle::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    border: 2px dashed var(--mnt-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: mnt-circle-rotate 30s linear infinite;
}

.mnt-magic-circle::after {
    content: '';
    position: absolute;
    width: 180%;
    height: 180%;
    border: 1px solid var(--mnt-primary-light);
    border-radius: 50%;
    opacity: 0.2;
    animation: mnt-circle-rotate 45s linear reverse infinite;
}

@keyframes mnt-circle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .mnt-cursor,
    .mnt-cursor-dot {
        display: none !important;
    }
}
