/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Selection */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #fff;
}

/* Gradient animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 8s ease infinite;
}

/* Model Slider Styles */
.model-slider {
    position: relative;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-slide.active {
    opacity: 1;
}

.slider-dot {
    transition: all 0.3s ease;
}

.slider-dot.active {
    transform: scale(1.5);
}

/* Neural network canvas */
#neuralCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Glow effects */
.glow-primary {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.glow-secondary {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Code block styling */
pre {
    background: #0f0f0f;
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
}

/* Modal animation */
#model-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#model-modal:not(.hidden) {
    opacity: 1;
}

#model-modal > div:last-child {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

#model-modal:not(.hidden) > div:last-child {
    transform: scale(1);
}

/* Responsive typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}