/**
 * WANTED ZONE - Advanced Design 2026
 * Modern Authentication Dashboard Enhancements
 * 
 * Features:
 * - Glassmorphism Cards
 * - Magnetic Buttons
 * - Holographic Effects
 * - Smooth Animations
 * - Morphing Backgrounds
 * - 3D Transforms
 */

/* ===============================================
   1. ANIMATED MESH GRADIENT BACKGROUND
   =============================================== */
.wz-mesh-gradient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: 
        radial-gradient(circle at 20% 50%, rgba(138,43,226,0.18) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96,165,250,0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(168,85,247,0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(199,125,255,0.10) 0%, transparent 50%);
    animation: meshMove 25s ease-in-out infinite alternate;
    filter: blur(80px);
}

@keyframes meshMove {
    0% { 
        transform: translate(0, 0) scale(1) rotate(0deg); 
    }
    33% {
        transform: translate(5%, -5%) scale(1.05) rotate(2deg);
    }
    66% {
        transform: translate(-5%, 5%) scale(0.98) rotate(-2deg);
    }
    100% { 
        transform: translate(3%, -3%) scale(1.02) rotate(1deg); 
    }
}

/* ===============================================
   2. MORPHING SHAPES BACKGROUND
   =============================================== */
.wz-morph-shape {
    position: fixed;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(138,43,226,0.2), rgba(176,133,245,0.15));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 12s ease-in-out infinite;
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.wz-morph-shape:nth-child(1) {
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.wz-morph-shape:nth-child(2) {
    bottom: -150px;
    right: -150px;
    animation-delay: 2s;
    background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(138,43,226,0.15));
}

@keyframes morph {
    0%, 100% { 
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg) scale(1);
    }
    25% { 
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
        transform: rotate(5deg) scale(1.05);
    }
    50% { 
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
        transform: rotate(-3deg) scale(0.98);
    }
    75% { 
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
        transform: rotate(2deg) scale(1.02);
    }
}

/* ===============================================
   3. ENHANCED GLASSMORPHISM CARDS
   =============================================== */
.wz-glass-card {
    background: rgba(15, 15, 23, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(138,43,226,0.2) !important;
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(138,43,226,0.1);
    border-radius: 18px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.wz-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(138,43,226,0.1), 
        transparent
    );
    transition: left 0.7s;
}

.wz-glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(138,43,226,0.4) !important;
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(138,43,226,0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.wz-glass-card:hover::before {
    left: 100%;
}

/* ===============================================
   4. HOLOGRAPHIC TEXT EFFECT
   =============================================== */
.wz-holo-text {
    background: linear-gradient(
        90deg,
        #8A2BE2 0%,
        #B085F5 20%,
        #60a5fa 40%,
        #c77dff 60%,
        #B085F5 80%,
        #8A2BE2 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holoShift 4s ease infinite;
    filter: drop-shadow(0 0 15px rgba(138,43,226,0.5));
    font-weight: 700;
    position: relative;
}

@keyframes holoShift {
    0%, 100% { 
        background-position: 0% 50%; 
        filter: drop-shadow(0 0 15px rgba(138,43,226,0.5));
    }
    50% { 
        background-position: 100% 50%; 
        filter: drop-shadow(0 0 25px rgba(96,165,250,0.6));
    }
}

/* ===============================================
   5. MAGNETIC BUTTONS
   =============================================== */
.wz-magnetic-btn {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    cursor: pointer;
    transform-style: preserve-3d;
}

.wz-magnetic-btn:hover {
    z-index: 10;
}

/* Applied via JavaScript */

/* ===============================================
   6. 3D CARD EFFECTS
   =============================================== */
.wz-card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
}

.wz-card-3d:hover {
    transform: translateZ(30px) rotateY(2deg) rotateX(2deg);
}

.wz-card-3d .card-content {
    transform: translateZ(20px);
}

.wz-card-3d .card-badge {
    transform: translateZ(40px);
    box-shadow: 0 15px 35px rgba(138,43,226,0.4);
}

/* ===============================================
   7. LIQUID BUTTON EFFECT
   =============================================== */
.wz-liquid-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8A2BE2, #7b2cbf);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.wz-liquid-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wz-liquid-btn:hover::before {
    width: 400px;
    height: 400px;
}

.wz-liquid-btn:active {
    transform: scale(0.95);
}

/* ===============================================
   8. PARTICLE BURST ANIMATION
   =============================================== */
.wz-particle-burst {
    position: fixed;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #8A2BE2, #c77dff);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particleBurst 1s ease-out forwards;
    box-shadow: 0 0 10px rgba(138,43,226,0.8);
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
        opacity: 0;
    }
}

/* ===============================================
   9. ANIMATED COUNTERS
   =============================================== */
.wz-counter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #8A2BE2, #c77dff);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0 6px;
    box-shadow: 0 4px 12px rgba(138,43,226,0.4);
    animation: counterPulse 2s ease-in-out infinite;
}

@keyframes counterPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(138,43,226,0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(138,43,226,0.6);
    }
}

.wz-counter-update {
    animation: counterBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes counterBounce {
    0% { transform: scale(1); }
    25% { transform: scale(0.8); }
    50% { transform: scale(1.4) rotate(8deg); }
    75% { transform: scale(0.95) rotate(-4deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ===============================================
   10. SHIMMER LOADING EFFECT
   =============================================== */
.wz-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.02) 0%,
        rgba(138,43,226,0.12) 20%,
        rgba(255,255,255,0.02) 40%,
        rgba(255,255,255,0.02) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===============================================
   11. SMOOTH PAGE TRANSITIONS
   =============================================== */
.wz-page-transition {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.wz-page-transition.fade-out {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
}

/* ===============================================
   12. ADVANCED HOVER STATES
   =============================================== */
.wz-hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wz-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 25px 50px rgba(138,43,226,0.25),
        0 0 0 1px rgba(138,43,226,0.2),
        0 0 30px rgba(138,43,226,0.15);
}

/* ===============================================
   13. GLOWING BORDERS
   =============================================== */
.wz-glow-border {
    position: relative;
    border: 1px solid rgba(138,43,226,0.3);
}

.wz-glow-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(138,43,226,0.6),
        transparent
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    filter: blur(8px);
}

.wz-glow-border:hover::after {
    opacity: 1;
}

/* ===============================================
   14. FLOATING ACTION BUTTON
   =============================================== */
.wz-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.wz-fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8A2BE2, #c77dff);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(138,43,226,0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wz-fab-main:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 32px rgba(138,43,226,0.6);
}

.wz-fab-option {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(138,43,226,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    transform: translateY(0) scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: 0;
    right: 0;
}

.wz-fab.active .wz-fab-option {
    transform: translateY(calc(-70px * var(--i))) scale(1);
    opacity: 1;
}

.wz-fab-option:hover {
    background: rgba(138,43,226,1);
    transform: translateY(calc(-70px * var(--i))) scale(1.15);
}

/* ===============================================
   15. PROGRESS BARS
   =============================================== */
.wz-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.wz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8A2BE2, #c77dff, #60a5fa);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: progressGlow 2s ease infinite;
    box-shadow: 0 0 20px rgba(138,43,226,0.6);
}

@keyframes progressGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ===============================================
   16. TOAST NOTIFICATIONS
   =============================================== */
.wz-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    background: rgba(18,18,28,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138,43,226,0.3);
    border-radius: 16px;
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.5),
        0 0 20px rgba(138,43,226,0.25),
        inset 0 1px 0 rgba(255,255,255,0.08);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.4s cubic-bezier(0.16,1,.3,1);
    z-index: 10000;
    pointer-events: auto;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.wz-toast.removing {
    animation: toastSlideOut 0.3s cubic-bezier(0.16,1,.3,1) forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100px) scale(0.95);
    }
}

/* ===============================================
   17. DATA TABLES ENHANCEMENT
   =============================================== */
.wz-table-wrapper {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(138,43,226,0.15);
    background: rgba(15,15,23,0.6);
    backdrop-filter: blur(12px);
}

.wz-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.wz-table thead th {
    background: rgba(138,43,226,0.08);
    backdrop-filter: blur(10px);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #c77dff;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(138,43,226,0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.wz-table tbody tr {
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.wz-table tbody tr:hover {
    background: rgba(138,43,226,0.08);
    transform: translateX(4px);
}

.wz-table tbody td {
    padding: 14px 16px;
    color: rgba(255,255,255,0.85);
}

/* ===============================================
   18. MODAL ENHANCEMENTS
   =============================================== */
.wz-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.wz-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.wz-modal-content {
    background: rgba(18,18,28,0.98);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(138,43,226,0.3);
    border-radius: 24px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    box-shadow: 
        0 25px 60px rgba(0,0,0,0.6),
        0 0 30px rgba(138,43,226,0.2),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wz-modal-overlay.active .wz-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Dashboard / Flowbite / Bootstrap modal clickability (Create Application fix) */
.modal {
    z-index: 1050 !important;
}

.modal-backdrop,
[data-modal-backdrop] {
    z-index: 1040 !important;
    pointer-events: none !important;
}

.modal-dialog,
.modal-content,
.modal-body,
.modal.show .modal-dialog,
.modal.show .modal-content,
.modal.show .modal-body {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1051 !important;
}

[id$="-modal"]:not(.hidden) {
    z-index: 10050 !important;
    pointer-events: auto !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.55);
}

[id$="-modal"]:not(.hidden) > div {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10051 !important;
}

[id$="-modal"]:not(.hidden) input,
[id$="-modal"]:not(.hidden) button,
[id$="-modal"]:not(.hidden) textarea,
[id$="-modal"]:not(.hidden) select {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1051 !important;
}

[id$="-modal"] label.absolute {
    pointer-events: none !important;
}

#wanted-loader.hide {
    z-index: -1 !important;
}

/* ===============================================
   19. UTILITY CLASSES
   =============================================== */
.wz-reveal {
    animation: wzReveal 0.6s cubic-bezier(0.16,1,.3,1) forwards;
}

@keyframes wzReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wz-stagger > * {
    animation: wzReveal 0.5s cubic-bezier(0.16,1,.3,1) both;
}

.wz-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.wz-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.wz-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.wz-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.wz-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.wz-stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* ===============================================
   20. RESPONSIVE ADJUSTMENTS
   =============================================== */
@media (max-width: 768px) {
    .wz-glass-card {
        backdrop-filter: blur(15px);
    }
    
    .wz-fab {
        bottom: 20px;
        right: 20px;
    }
    
    .wz-fab-main {
        width: 56px;
        height: 56px;
    }
    
    .wz-toast {
        min-width: 280px;
        right: 10px;
        top: 10px;
    }
}

/* ===============================================
   21. PERFORMANCE OPTIMIZATIONS
   =============================================== */
.wz-optimized {
    will-change: transform, opacity;
    contain: layout style paint;
    transform: translate3d(0,0,0);
}

/* ===============================================
   22. DARK MODE TRANSITION
   =============================================== */
.wz-theme-transition,
.wz-theme-transition *,
.wz-theme-transition *::before,
.wz-theme-transition *::after {
    transition: 
        background-color 1s ease,
        border-color 1s ease,
        color 1s ease,
        box-shadow 1s ease !important;
}
