/* NeuroVerse Custom Styles - Production Ready */

/* Critical CSS - Above the fold */
html {
    scroll-behavior: smooth;
    font-display: swap; /* Improve font loading performance */
}

/* Preload critical fonts */
@font-face {
    font-family: 'Space Grotesk';
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/spacegrotesk/v15/V8mQoQDjQSkFtoMM3T6r8E7mPbF4C4sVBw.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

/* Reduce layout shifts */
img, video {
    max-width: 100%;
    height: auto;
}

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

/* GPU acceleration for smooth animations */
.animate-pulse,
.transition-colors,
.transition-all {
    will-change: transform;
    transform: translateZ(0);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Selection color */
::selection {
    background: rgba(0, 240, 255, 0.3);
    color: #fff;
}

/* Pulse animation for live indicators */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #00F0FF, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect for cards */
.glass {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2);
}

/* Button hover effects */
button, a {
    transition: all 0.2s ease;
}

/* Card hover effects */
.bg-rack {
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.bg-rack:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Link underline animation */
a.hover\:underline:hover {
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

/* Table styles */
table {
    border-collapse: collapse;
}

/* Form input placeholder */
input::placeholder,
textarea::placeholder {
    color: #6b7280;
}

/* Mobile menu transition */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Nav blur effect */
nav {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* Hero gradient overlay */
.hero-gradient {
    background: radial-gradient(ellipse at top, rgba(0, 240, 255, 0.1) 0%, transparent 50%);
}

/* Grid pattern */
.grid-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(0, 240, 255, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
}

/* Metric card number animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.font-mono {
    animation: countUp 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-heading {
        letter-spacing: -0.02em;
    }
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-rack, .bg-void, .bg-surface {
        background: white;
        border: 1px solid #ccc;
    }
}
