/* Laboratory Futurism Styles */

:root {
    --nexus-blue: #2563EB;
    --nexus-cyan: #06B6D4;
    --nexus-dark: #111827;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --neon-glow: 0 0 10px rgba(37, 99, 235, 0.5), 0 0 20px rgba(37, 99, 235, 0.3);
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Glassmorphism --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* --- Holographic Card Styles --- */
.nexus-card {
    background: #ffffff;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nexus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transition: 0.5s;
    z-index: 10;
    pointer-events: none;
}

.nexus-card:hover::before {
    left: 100%;
}

.nexus-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.3);
}

/* Image Blend Mode & Float */
.product-image-container {
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
}

.product-image {
    mix-blend-mode: multiply;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nexus-card:hover .product-image {
    transform: scale(1.1) translateY(-5px);
}

/* --- Filter Chips --- */
.filter-chip {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.filter-chip:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--nexus-blue);
}

.filter-chip.active {
    background: var(--nexus-blue);
    color: white;
    border-color: var(--nexus-blue);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* --- Navigation --- */
.nav-link-hover {
    position: relative;
}

.nav-dot {
    width: 6px;
    height: 6px;
    background-color: var(--nexus-blue);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.nav-link-hover:hover .nav-dot,
.nav-link-hover.active .nav-dot {
    opacity: 1;
    transform: scale(1);
}

/* --- Terminal Styles (Footer) --- */
.terminal-footer {
    background-color: #0f172a;
    color: #334155;
    font-family: 'Courier New', monospace;
}

.terminal-link {
    color: #94a3b8;
    transition: color 0.2s;
}

.terminal-link:hover {
    color: #4ade80;
    /* green-400 */
    text-decoration: underline;
}

/* --- Glitch Effect --- */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    /* Match bg color */
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(34px, 9999px, 11px, 0);
    }

    20% {
        clip: rect(68px, 9999px, 89px, 0);
    }

    40% {
        clip: rect(12px, 9999px, 56px, 0);
    }

    60% {
        clip: rect(94px, 9999px, 23px, 0);
    }

    80% {
        clip: rect(45px, 9999px, 4px, 0);
    }

    100% {
        clip: rect(2px, 9999px, 78px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(14px, 9999px, 91px, 0);
    }

    20% {
        clip: rect(28px, 9999px, 39px, 0);
    }

    40% {
        clip: rect(52px, 9999px, 16px, 0);
    }

    60% {
        clip: rect(84px, 9999px, 73px, 0);
    }

    80% {
        clip: rect(5px, 9999px, 64px, 0);
    }

    100% {
        clip: rect(92px, 9999px, 28px, 0);
    }
}

/* --- Mobile Menu --- */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* --- Tooltip --- */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- Animations --- */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

/* Scanline for Terminal */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 10;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(37, 99, 235, 0.1) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }

    100% {
        bottom: -100%;
    }
}

/* --- Utility --- */
.font-space {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    /* Fallback to Inter if Space Grotesk not loaded */
}
/* --- Splash Screen & Header Animation Classes --- */
.splash-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.header-visible {
    transform: translate(-50%, 0) !important;
}

/* --- Terminal Minimized State --- */
.minimized #terminal-body {
    height: 0 !important;
    opacity: 0;
    pointer-events: none;
    border: none;
}

.minimized #terminal-header {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* --- Fade In Up Animation --- */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
