/* Custom styles for Open Genspark AI Browser */

/* Custom undefined color theme */
:root {
    --undefined-primary: #3B82F6; /* Fallback blue for undefined */
    --undefined-primary-dark: #2563EB;
    --undefined-primary-light: #60A5FA;
    --undefined-secondary: #8B5CF6; /* Fallback purple for undefined */
    --undefined-secondary-dark: #7C3AED;
    --undefined-secondary-light: #A78BFA;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Loading animations */
.loading {
    animation: pulse 2s infinite;
}

/* Fade in animation for elements */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom hover effects */
.hover-lift:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease-in-out;
}

/* Chat message animations */
.chat-message {
    animation: fadeInUp 0.4s ease-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--undefined-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--undefined-primary-dark);
}

/* Focus states for accessibility */
.focus-visible:focus {
    outline: 2px solid var(--undefined-primary);
    outline-offset: 2px;
}

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, var(--undefined-primary) 0%, var(--undefined-secondary) 100%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--undefined-primary) 0%, var(--undefined-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
    transition: all 0.3s ease-in-out;
}

/* Button animations */
.btn-primary {
    background-color: var(--undefined-primary);
    transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: var(--undefined-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: var(--undefined-secondary);
    transition: all 0.3s ease-in-out;
}

.btn-secondary:hover {
    background-color: var(--undefined-secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Navigation transitions */
nav a {
    position: relative;
    overflow: hidden;
}

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

nav a:hover::before {
    left: 100%;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-text {
        font-size: 0.875rem;
    }
}

/* Feature grid responsive adjustments */
@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* 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;
    }
}

/* Custom utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Status indicators */
.status-online {
    background-color: #10B981;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #10B981;
}

.status-offline {
    background-color: #EF4444;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #EF4444;
}

/* Progress bars */
.progress-bar {
    background: linear-gradient(90deg, var(--undefined-primary) 0%, var(--undefined-secondary) 100%);
    transition: width 0.3s ease-in-out;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1F2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}