/* Custom styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
}

/* Circuit pattern background */
.bg-circuit-pattern {
    background-color: #FEFBF6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-opacity='0.03'%3E%3Cpath d='M25 25h50v50H25V25zm0 0h50v50H25V25z' stroke='%234F46E5' stroke-width='1' fill='none'/%3E%3Ccircle cx='25' cy='25' r='2' fill='%234F46E5'/%3E%3Ccircle cx='75' cy='25' r='2' fill='%234F46E5'/%3E%3Ccircle cx='25' cy='75' r='2' fill='%234F46E5'/%3E%3Ccircle cx='75' cy='75' r='2' fill='%234F46E5'/%3E%3C/g%3E%3C/svg%3E");
}

/* Circuit overlay for header */
.bg-circuit-overlay {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cg fill='white' fill-opacity='0.1'%3E%3Cpath d='M10 10h30v30H10V10zm0 0h30v30H10V10z' stroke='white' stroke-width='0.5' fill='none'/%3E%3Ccircle cx='10' cy='10' r='1' fill='white'/%3E%3Ccircle cx='40' cy='10' r='1' fill='white'/%3E%3Ccircle cx='10' cy='40' r='1' fill='white'/%3E%3Ccircle cx='40' cy='40' r='1' fill='white'/%3E%3C/g%3E%3C/svg%3E");
}

/* Glow effect for AI elements */
.glow-effect {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

/* Custom animations */
@keyframes confetti {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

@keyframes pulse-ai {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

.confetti {
    animation: confetti 1s ease-out;
}

.pulse-ai {
    animation: pulse-ai 2s infinite;
}

/* AI buddy animations */
@keyframes thinking {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

.ai-thinking {
    animation: thinking 1.5s infinite;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4F46E5, #8B5CF6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3730A3, #7C3AED);
}

/* AI-specific styling */
.ai-message {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-left: 4px solid #8B5CF6;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
}

.ai-confidence {
    background: linear-gradient(135deg, #8B5CF6, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .ai-buddy {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .progress-bar {
        width: 100px;
    }
}

/* Focus states for accessibility */
button:focus,
input:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glow-effect {
        box-shadow: none;
        border: 2px solid #8B5CF6;
    }
}

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