/* Custom Fonts */
body {
    font-family: 'Inter', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
}

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

/* Scroll Progress Indicator */
html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: var(--scroll-progress, 0%);
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Improved Navigation */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px);
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navigation Hover Effects */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active-nav::after {
    width: 100%;
}

.nav-link.active-nav {
    color: #3b82f6;
}

/* Enhanced scroll animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.8);
}

/* Demo Card Hover Effects */
.demo-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

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

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

.float {
    animation: float 6s ease-in-out infinite;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.animate-gradient {
    background: linear-gradient(-45deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: gradient 3s ease infinite;
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Subtle particle animation */
.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
    0% { 
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% { 
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .demo-card {
        margin-bottom: 1rem;
    }
    
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        z-index: 1000;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }
}

/* Intersection Observer Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Custom Button Animations */
button, .btn {
    position: relative;
    overflow: hidden;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

button:hover::before, .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-md {
        backdrop-filter: blur(12px);
    }
    
    .backdrop-blur-lg {
        backdrop-filter: blur(16px);
    }
}

/* Simple Animated Gradient Background */
.hyperspeed-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background: linear-gradient(
        -45deg,
        rgba(5, 8, 16, 1) 0%,
        rgba(15, 23, 42, 0.95) 25%,
        rgba(30, 41, 59, 0.9) 50%,
        rgba(15, 23, 42, 0.95) 75%,
        rgba(5, 8, 16, 1) 100%
    );
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Optional: Add subtle orbs for depth */
.hyperspeed-lines::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-orb-1 20s ease-in-out infinite;
}

.hyperspeed-lines::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-orb-2 25s ease-in-out infinite reverse;
}

@keyframes float-orb-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 40px) scale(0.9);
    }
}

@keyframes float-orb-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-40px, -20px) scale(1.2);
    }
}

/* Remove all particle and stream classes */
.floating-particle,
.data-stream {
    display: none;
}

/* Pulse effect for hero section */
.hero-pulse {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    animation: hero-pulse 8s ease-in-out infinite;
}

@keyframes hero-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: scale(1.02);
        opacity: 0.2;
    }
}

/* Fallback for older browsers */
@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur-md {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .backdrop-blur-lg {
        background: rgba(0, 0, 0, 0.9);
    }
}
