/* Enhanced AI Employee Page - Premium Futuristic Styles */

/* Neural Network Animation */
@keyframes neuralPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.5); }
}

@keyframes dataFlow {
    0% { transform: translateY(0) scaleY(1); opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { transform: translateY(40px) scaleY(1.2); opacity: 0.4; }
}

@keyframes orbGlow {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.4); opacity: 0.3; }
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.08; }
}

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

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

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

/* Enhanced Background Elements */
.ai-employee-page {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #581c87 100%);
    overflow-x: hidden;
}

.neural-network-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.neural-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.8), rgba(6, 182, 212, 0.2));
    border-radius: 50%;
    animation: neuralPulse 3s ease-in-out infinite;
}

.data-stream {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, rgba(6, 182, 212, 0.6), rgba(59, 130, 246, 0.4), transparent);
    animation: dataFlow 4s ease-in-out infinite;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbGlow 10s ease-in-out infinite;
}

.tech-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridPulse 4s ease-in-out infinite;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(17, 24, 39, 0.85);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.4);
}

/* Premium Buttons */
.premium-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #9333ea, #ec4899, #9333ea);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    box-shadow: 0 20px 40px -10px rgba(236, 72, 153, 0.6);
    transition: all 0.3s ease;
}

.premium-cta:hover {
    box-shadow: 0 25px 50px -10px rgba(236, 72, 153, 0.8);
    transform: scale(1.05);
}

.premium-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-200%);
}

.premium-cta:hover::before {
    animation: shimmer 1.5s ease-in-out;
}

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

/* Interactive Demo Box */
.demo-simulation {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(31, 41, 55, 0.9));
    backdrop-filter: blur(30px);
    border: 3px solid rgba(6, 182, 212, 0.4);
    border-radius: 32px;
    box-shadow: 0 30px 60px -15px rgba(6, 182, 212, 0.3);
    padding: 40px;
    height: 400px; /* Fixed height to prevent layout shift */
    overflow-y: auto; /* Enable internal scrolling */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Keep messages at the bottom */
}

.demo-messages-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    justify-content: flex-end;
}

.demo-message {
    flex-shrink: 0;
    max-width: 80%;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e2e8f0;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: none; /* Remove previous float animation */
}

.demo-message.ai-message {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    border: 2px solid rgba(139, 92, 246, 0.5);
}

.demo-message.caller-message {
    align-self: flex-end;
    background: rgba(55, 65, 81, 0.6);
    border: 2px solid rgba(107, 114, 128, 0.5);
}

/* Animation for new messages */
@keyframes messageAppear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}



.demo-message.ai-message {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    border: 2px solid rgba(139, 92, 246, 0.5);
}

.demo-message.caller-message {
    background: rgba(55, 65, 81, 0.6);
    border: 2px solid rgba(107, 114, 128, 0.5);
}

/* Feature Cards with Gradient Borders */
.feature-card {
    position: relative;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
    border-radius: 28px;
    padding: 48px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(90deg, #9333ea, #ec4899);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(139, 92, 246, 0.4);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

/* Advantage Grid */
.advantage-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(31, 41, 55, 0.9));
    backdrop-filter: blur(15px);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s ease;
}

.advantage-card:hover {
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.3);
}

/* Process Steps */
.process-step {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(6, 182, 212, 0.4);
    border-radius: 32px;
    padding: 40px;
    transition: all 0.3s ease;
}

.process-step:hover {
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.3);
}

.process-number {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Testimonial Cards */
.testimonial-card {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    backdrop-filter: blur(25px);
    border: 2px solid rgba(6, 182, 212, 0.4);
    border-radius: 32px;
    padding: 48px;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.4);
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .neural-node {
        width: 6px;
        height: 6px;
    }
    
    .glow-orb {
        filter: blur(60px);
    }
    
    .feature-card,
    .advantage-card,
    .process-step,
    .testimonial-card {
        padding: 24px;
    }
    
    .demo-simulation {
        padding: 24px;
        height: 300px; /* Adjust height for mobile */
    }
    .demo-message {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}

/* Loading State */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
