/*
Premium AI Wizard Animations & Micro-Interactions
Advanced UI polish for Fortune 500 experience
*/

/* Neural Network Background Animation */
.wizard-container {
    position: relative;
    overflow: hidden;
}

.wizard-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 25%, rgba(13, 110, 253, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    animation: neuralPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes neuralPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Floating AI Particles */
.wizard-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.ai-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #0d6efd, #667eea);
    border-radius: 50%;
    animation: floatParticle linear infinite;
    opacity: 0.6;
}

.ai-particle:nth-child(1) { left: 10%; animation-duration: 15s; animation-delay: 0s; }
.ai-particle:nth-child(2) { left: 20%; animation-duration: 18s; animation-delay: 2s; }
.ai-particle:nth-child(3) { left: 30%; animation-duration: 12s; animation-delay: 4s; }
.ai-particle:nth-child(4) { left: 40%; animation-duration: 20s; animation-delay: 6s; }
.ai-particle:nth-child(5) { left: 50%; animation-duration: 16s; animation-delay: 8s; }
.ai-particle:nth-child(6) { left: 60%; animation-duration: 14s; animation-delay: 10s; }
.ai-particle:nth-child(7) { left: 70%; animation-duration: 17s; animation-delay: 12s; }
.ai-particle:nth-child(8) { left: 80%; animation-duration: 13s; animation-delay: 14s; }

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* Advanced Step Transitions */
.wizard-step {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wizard-step.active {
    opacity: 1;
    transform: translateX(0);
}

.wizard-step.leaving {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.4s ease-out;
}

/* Premium Option Cards with Morphing */
.role-option, .industry-option, .team-size-option, .budget-option, .urgency-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-option::before, .industry-option::before, .team-size-option::before, 
.budget-option::before, .urgency-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(13, 110, 253, 0.1) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
}

.role-option:hover::before, .industry-option:hover::before, .team-size-option:hover::before,
.budget-option:hover::before, .urgency-option:hover::before {
    left: 100%;
}

.role-option:hover, .industry-option:hover, .team-size-option:hover,
.budget-option:hover, .urgency-option:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.3);
    background: rgba(13, 110, 253, 0.1);
}

.role-option.selected, .industry-option.selected, .team-size-option.selected,
.budget-option.selected, .urgency-option.selected {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.2), rgba(102, 126, 234, 0.15));
    border-color: #0d6efd;
    box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% { box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 15px 35px rgba(13, 110, 253, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
}

/* Progress Bar with Intelligence Indicators */
.progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, #0d6efd, #667eea, #10b981);
    background-size: 200% 100%;
    animation: progressFlow 3s ease-in-out infinite;
    position: relative;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: progressShine 2s ease-in-out infinite;
}

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

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* Navigation Buttons with Advanced Interactions */
.btn-wizard {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6efd, #667eea);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.btn-wizard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
}

.btn-wizard:hover::before {
    left: 100%;
}

.btn-wizard:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #667eea, #0d6efd);
}

.btn-wizard:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Loading State with AI Brain Animation */
.loading-brain {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.brain-hemisphere {
    position: absolute;
    width: 28px;
    height: 40px;
    background: linear-gradient(45deg, #0d6efd, #667eea);
    border-radius: 15px 15px 15px 0;
    animation: brainPulse 1.5s ease-in-out infinite;
}

.brain-hemisphere.left {
    left: 0;
}

.brain-hemisphere.right {
    right: 0;
    transform: scaleX(-1);
    animation-delay: 0.3s;
}

.brain-connection {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #10b981;
    transform: translate(-50%, -50%);
    animation: connectionPulse 1s ease-in-out infinite;
}

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

@keyframes connectionPulse {
    0%, 100% { opacity: 0.5; width: 15px; }
    50% { opacity: 1; width: 25px; }
}

/* Recommendation Cards with Advanced Animations */
.recommendation-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardSlideIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.recommendation-card:nth-child(1) { animation-delay: 0.1s; }
.recommendation-card:nth-child(2) { animation-delay: 0.2s; }
.recommendation-card:nth-child(3) { animation-delay: 0.3s; }
.recommendation-card:nth-child(4) { animation-delay: 0.4s; }
.recommendation-card:nth-child(5) { animation-delay: 0.5s; }

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

.recommendation-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0d6efd, #667eea, #10b981, #0d6efd);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    animation: borderFlow 3s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.recommendation-card:hover::before {
    opacity: 1;
}

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

.recommendation-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(13, 110, 253, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Intelligence Badges with Glow Effects */
.intelligence-badge {
    position: relative;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #10b981;
    display: inline-block;
    margin: 4px;
    animation: intelligenceGlow 2s ease-in-out infinite;
}

@keyframes intelligenceGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

.confidence-meter {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 8px 0;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #10b981);
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.confidence-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        transparent 100%);
    animation: confidenceShine 2s ease-in-out infinite;
}

@keyframes confidenceShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .wizard-container::before {
        animation-duration: 12s; /* Slower for mobile performance */
    }
    
    .ai-particle {
        animation-duration: 20s; /* Slower particles on mobile */
    }
    
    .recommendation-card:hover {
        transform: translateY(-4px) scale(1.01); /* Reduced hover effect */
    }
    
    .btn-wizard:hover {
        transform: translateY(-2px); /* Reduced button hover */
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .wizard-container::before,
    .ai-particle,
    .progress-bar::after,
    .brain-hemisphere,
    .brain-connection {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .role-option, .industry-option, .team-size-option, 
    .budget-option, .urgency-option {
        border-width: 2px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .recommendation-card {
        border-width: 2px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .intelligence-badge {
        border-width: 2px;
        background: rgba(16, 185, 129, 0.3);
    }
}