/* ============================================
   COGNODE - Web 4.0 AI Agent Platform
   Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --neon-blue: #60a5fa;
    --neon-purple: #8b5cf6;
    --neon-green: #10b981;
    --deep-space: #0b132b;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #050508 0%, #0a0a1a 50%, #1a0a2e 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-purple), var(--neon-blue));
}

/* Glass Panel Effect */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Neon Border Effect */
.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple), var(--neon-green), var(--neon-blue));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neon-border:hover::before {
    opacity: 0.5;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Hologram Effect */
.hologram {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
}

/* 3D Tilt Effect */
.tilt-card {
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-content {
    transform: translateZ(20px);
}

/* Interactive Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Allow clicks to pass through initially */
}

/* Live Activity Feed Ticker */
.ticker-wrap {
    position: fixed;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    height: 3rem;
    background-color: rgba(5, 5, 8, 0.95);
    border-top: 1px solid rgba(0, 243, 255, 0.3);
    z-index: 90;
    backdrop-filter: blur(10px);
}

.ticker {
    display: inline-block;
    height: 3rem;
    line-height: 3rem;
    white-space: nowrap;
    padding-right: 100%;
    box-sizing: content-box;
    animation: ticker 60s linear infinite;
}

.ticker__item {
    display: inline-block;
    padding: 0 2rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    font-size: 0.9rem;
}

.ticker__item .time {
    color: var(--neon-purple);
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Terminal Section */
.terminal-window {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(10, 255, 10, 0.1);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    margin-top: 2rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.terminal-header {
    background: rgba(10, 255, 10, 0.1);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--neon-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.terminal-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #333;
}

.terminal-control.close { background-color: #ff5f56; }
.terminal-control.minimize { background-color: #ffbd2e; }
.terminal-control.maximize { background-color: #27c93f; }

.terminal-title {
    color: var(--neon-green);
    font-size: 0.9rem;
    font-weight: bold;
}

.terminal-body {
    padding: 1rem;
    height: 300px;
    overflow-y: auto;
    color: var(--neon-green);
    font-size: 0.9rem;
    text-align: left;
}

.terminal-line {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.terminal-prompt {
    color: var(--neon-blue);
    margin-right: 0.5rem;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--neon-green);
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typed-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--neon-blue);
    margin-left: 4px;
    box-shadow: 0 0 8px var(--neon-blue);
    animation: blink 1s infinite;

/* ==================== Mobile Optimizations ==================== */
@media (max-width: 640px) {
    /* Reduce excessive blur for performance */
    .glass-panel {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    /* Improve tap targets for icons */
    .social-icon {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.08);
    }
    /* Compact cards without changing layout classes */
    .feature-card,
    .agent-card,
    .interaction-card,
    .sensor-card {
        padding: 1rem;
    }
    /* Terminal readability */
    .terminal-window {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .terminal-body {
        height: 220px;
        font-size: 0.85rem;
    }
    /* Stats font scaling */
    .stat-card .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    /* Hide decorative scanlines to reduce visual noise */
    .bg-scanlines {
        display: none;
    }
    /* Hide horizontal scrollbar in filter chips */
    .scrollbar-hide {
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none;    /* Firefox */
    }
    .scrollbar-hide::-webkit-scrollbar {
        display: none;            /* Chrome, Safari */
    }
}

@media (max-width: 1024px) {
    .glass-panel {
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
    .feature-card,
    .agent-card,
    .interaction-card,
    .sensor-card {
        padding: 1.25rem;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }
    .neon-border::before {
        opacity: 0.25;
    }
    .animate-float,
    .animate-glow,
    .animate-fade-in,
    .spin-slow {
        animation: none !important;
    }
}

.perf-mode .glass-panel {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.perf-mode .neon-border::before {
    opacity: 0;
    animation: none !important;
}
.perf-mode .animate-float,
.perf-mode .animate-glow,
.perf-mode .animate-fade-in,
.perf-mode .animate-slide-up,
.perf-mode .spin-slow {
    animation: none !important;
}
.perf-mode .bg-scanlines {
    display: none;
}
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

#hero-typed {
    display: inline;
    white-space: pre-wrap;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hologram::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 243, 255, 0.03) 2px,
        rgba(0, 243, 255, 0.03) 4px
    );
    animation: scan 8s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* Emotion Wave Animation */
.emotion-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 243, 255, 0.2), transparent);
    animation: wave 3s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

/* IoT Node Animation */
.iot-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulse-node 2s infinite;
}

@keyframes pulse-node {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--neon-blue);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* VR Overlay */
.vr-overlay {
    background: radial-gradient(circle at center, transparent 0%, rgba(5, 5, 8, 0.9) 100%);
    pointer-events: auto;
}

/* Agent Card Styles */
.agent-card {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.agent-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 243, 255, 0.3);
}

/* Skill Bar */
.skill-bar {
    background: linear-gradient(90deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    height: 4px;
    border-radius: 2px;
    transition: width 1s ease;
}

/* Voice Wave Animation */
.voice-wave {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 100%;
}

.voice-wave div {
    width: 4px;
    background: linear-gradient(to top, var(--neon-blue), var(--neon-purple));
    border-radius: 2px;
    animation: sound 0.5s ease-in-out infinite alternate;
}

.voice-wave div:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.voice-wave div:nth-child(2) { height: 20px; animation-delay: 0.2s; }
.voice-wave div:nth-child(3) { height: 30px; animation-delay: 0.3s; }
.voice-wave div:nth-child(4) { height: 20px; animation-delay: 0.4s; }
.voice-wave div:nth-child(5) { height: 10px; animation-delay: 0.5s; }

@keyframes sound {
    from { transform: scaleY(1); }
    to { transform: scaleY(1.5); }
}

/* Gesture Area */
.gesture-area {
    background: radial-gradient(circle, rgba(0, 243, 255, 0.1) 0%, transparent 70%);
    border: 2px dashed rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
}

.gesture-area:hover {
    border-color: rgba(0, 243, 255, 0.6);
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15) 0%, transparent 70%);
}

/* AR Marker */
.ar-marker {
    position: relative;
}

.ar-marker::before,
.ar-marker::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-green);
    transition: all 0.3s ease;
}

.ar-marker::before {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.ar-marker::after {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

.ar-marker:hover::before,
.ar-marker:hover::after {
    width: 30px;
    height: 30px;
}

/* Particle Animation */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-blue);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 10s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Status Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-online { 
    background: var(--neon-green); 
    box-shadow: 0 0 8px var(--neon-green); 
}
.status-busy { 
    background: #ffaa00; 
    box-shadow: 0 0 8px #ffaa00; 
}
.status-offline { 
    background: #ff0040; 
    box-shadow: 0 0 8px #ff0040; 
}

/* Recruit Button */
.recruit-btn {
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    position: relative;
    overflow: hidden;
}

.recruit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.recruit-btn:hover::before {
    left: 100%;
}

/* Chat Bubble Styles */
.chat-bubble {
    position: relative;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    margin: 8px 0;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
    background: rgba(0, 243, 255, 0.2);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.agent {
    background: rgba(188, 19, 254, 0.2);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.chat-bubble.system {
    background: rgba(10, 255, 10, 0.15);
    margin: 8px auto;
    text-align: center;
    border-radius: 12px;
    max-width: 90%;
}

/* CMD-style override */
.chat-bubble.cmd {
    background: #0b0b0b;
    color: #9ef59e;
    border: 1px solid rgba(0, 255, 102, 0.2);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 102, 0.06);
    font-family: Consolas, 'Courier New', monospace;
}
.cmd-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.cmd-prompt {
    color: #38bdf8;
    white-space: nowrap;
}
.cmd-meta {
    margin-top: 6px;
    font-size: 0.7rem;
    color: #76e3a7;
}

/* Emotion Indicators */
.emotion-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.emotion-happy { background: rgba(255, 215, 0, 0.2); color: #ffd700; }
.emotion-focused { background: rgba(0, 243, 255, 0.2); color: var(--neon-blue); }
.emotion-calm { background: rgba(138, 43, 226, 0.2); color: #8a2be2; }
.emotion-inspired { background: rgba(255, 105, 180, 0.2); color: #ff69b4; }
.emotion-calculating { background: rgba(128, 128, 128, 0.2); color: #a0a0a0; }
.emotion-caring { background: rgba(255, 182, 193, 0.2); color: #ffb6c1; }
.emotion-vigilant { background: rgba(255, 69, 0, 0.2); color: #ff4500; }

/* IoT Connection Lines */
.iot-connection {
    stroke: var(--neon-green);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 5, 5;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -100; }
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Sensor Cards */
.sensor-card {
    transition: all 0.3s ease;
}

.sensor-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Stat Cards Animation */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.2);
}

/* IoT Device Cards */
.iot-device {
    transition: all 0.3s ease;
    cursor: pointer;
}

.iot-device:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

/* Interaction Cards */
.interaction-card {
    transition: all 0.3s ease;
}

.interaction-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Filter Buttons */
.filter-btn {
    display: inline-flex;
    align-items: center;
    height: 2.25rem;
    padding: 0 0.875rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: #cbd5e1;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Prevent clip on edges when horizontally scrolling */
#filter-container {
    padding-left: 8px;
    padding-right: 8px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}

.filter-btn.active {
    background: rgba(96, 165, 250, 0.18);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.08);
}

/* Navigation Link Hover */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar Aurora Background */
#navbar {
    position: relative;
    overflow: hidden;
}
#navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(1000px 300px at -10% 50%, rgba(96,165,250,0.20), transparent 60%),
                radial-gradient(800px 280px at 110% 40%, rgba(167,139,250,0.18), transparent 60%);
    filter: blur(30px);
    opacity: 0.7;
    pointer-events: none;
    animation: aurora-shift 16s ease-in-out infinite alternate;
}
/* scan-line shimmer */
#navbar::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(0deg, rgba(255,255,255,0.07) 2px, transparent 2px);
    background-size: 100% 6px;
    opacity: 0.18;
    pointer-events: none;
    animation: scan-horizontal 8s linear infinite;
    mix-blend-mode: soft-light;
}
@keyframes aurora-shift {
    0%   { transform: translateX(0) translateY(0) scale(1); }
    50%  { transform: translateX(10px) translateY(-6px) scale(1.02); }
    100% { transform: translateX(-10px) translateY(8px) scale(1); }
}
@keyframes scan-horizontal {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}
@media (prefers-reduced-motion: reduce) {
    #navbar::before { animation: none; }
}

/* Notification Styles */
.notification {
    animation: slide-in-right 0.3s ease;
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Modal Animation */
#recruit-modal > div:last-child > div {
    animation: modal-in 0.3s ease;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Page Entrance Animations */
.animate-fade-in {
    animation: fade-in-up 0.8s ease forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slide-up 0.8s ease forwards;
    opacity: 0;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow Animation */
.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
    }
    to {
        box-shadow: 0 0 20px var(--neon-purple), 0 0 30px var(--neon-purple);
    }
}

/* Floating Animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Spin Slow Animation */
.animate-spin-slow {
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shine Animation */
@keyframes shine {
    to { transform: translateX(100%); }
}

.animate-shine {
    animation: shine 2s infinite;
}

.cursor-wait {
    cursor: wait;
}

/* Scrollbar Hide */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* Pulse Slow Animation */
.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Quick Replies Scrollbar */
#quick-replies::-webkit-scrollbar {
    height: 4px;
}

#quick-replies::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 2px;
}

/* Mobile Menu */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .font-orbitron {
        font-size: 0.9em;
    }
    
    .chat-bubble {
        max-width: 90%;
    }
    
    .agent-card:hover {
        transform: translateY(-5px);
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    #chat-container {
        height: 300px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Performance Mode (manual toggle via body.perf-mode) */
.perf-mode * {
    animation: none !important;
    transition-duration: 120ms !important;
}
.perf-mode #particles-container,
.perf-mode .holographic-grid {
    display: none !important;
}
.perf-mode #navbar::before,
.perf-mode #navbar::after {
    animation: none !important;
    opacity: 0 !important;
}
.perf-mode .animate-float,
.perf-mode .animate-glow,
.perf-mode .text-glow {
    animation: none !important;
}

/* Loading Screen Animations */
#loading-screen {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-progress {
    animation: loading-progress 3s ease-out forwards;
}

@keyframes loading-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Enhanced Glassmorphism */
.glass-panel-enhanced {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Advanced Neon Effects */
.neon-glow-enhanced {
    position: relative;
}

.neon-glow-enhanced::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(90deg, var(--neon-blue), rgba(167, 139, 250, 0.25), var(--neon-blue));
    border-radius: inherit;
    z-index: -1;
    opacity: 0.28;
    filter: blur(6px);
    animation: none;
}

@keyframes neon-rotate {
    0% { filter: hue-rotate(0deg) blur(8px); }
    100% { filter: hue-rotate(360deg) blur(8px); }
}

/* Particle System Enhancement */
.particle-enhanced {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float-enhanced 12s infinite linear;
    box-shadow: 0 0 10px currentColor;
}

@keyframes particle-float-enhanced {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(1080deg) scale(0);
        opacity: 0;
    }
}

/* Holographic Grid Effect (Replaced with Starfield) */
.holographic-grid {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, 0.8), rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 40px 70px, rgba(255, 255, 255, 0.6), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, rgba(56, 189, 248, 0.6), rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 90px 40px, rgba(255, 255, 255, 0.8), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, rgba(167, 139, 250, 0.6), rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 160px 120px, rgba(255, 255, 255, 0.6), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    background-position: 0 0;
    will-change: background-position;
    animation: star-move 60s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

@keyframes star-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 -200px; }
}

/* Status Pulse Animation */
.status-pulse {
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(10, 255, 10, 0.7);
        transform: scale(1);
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(10, 255, 10, 0);
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(10, 255, 10, 0);
        transform: scale(1);
    }
}

/* Enhanced Button Hover Effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn-enhanced:hover::before {
    width: 200%;
    height: 200%;
}

/* Advanced Card Animations */
.card-hover-enhanced {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-enhanced:hover {
    transform: translateY(-15px) rotateX(8deg) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 243, 255, 0.3),
        0 0 30px rgba(188, 19, 254, 0.2);
}

/* Text Glow Animation */
.text-glow {
    animation: text-glow 2s ease-in-out infinite alternate;
}

@keyframes text-glow {
    from {
        text-shadow: 0 0 3px currentColor, 0 0 6px currentColor;
    }
    to {
        text-shadow: 
            0 0 4px currentColor, 
            0 0 8px currentColor,
            0 0 12px currentColor;
    }
}

.luxe-headline {
    background: linear-gradient(90deg, var(--neon-blue), #dcd6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.02em;
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.35));
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .glass-panel-enhanced {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .card-hover-enhanced:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.15;
        letter-spacing: 0.5px;
    }
    .luxe-headline {
        filter: drop-shadow(0 0 9px rgba(96,165,250,0.3));
    }
    #agents-grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    .feature-card,
    .interaction-card,
    .agent-card {
        padding: 1rem;
        border-radius: 1rem;
    }
    .filter-btn {
        height: 2.5rem;
        padding: 0 1rem;
        font-size: 0.875rem;
    }
    #quick-replies {
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    #quick-replies > button {
        scroll-snap-align: start;
    }
    #filter-container {
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    #filter-container > .filter-btn {
        scroll-snap-align: start;
    }
    .chat-controls {
        position: sticky;
        bottom: 0;
        z-index: 20;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    #chat-container {
        max-height: 56vh;
    }
    .animate-glow {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-panel {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid white;
    }
    
    .neon-border::before {
        opacity: 1;
        filter: none;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .glass-panel,
    .neon-border,
    .hologram {
        background: white;
        border: 1px solid black;
        box-shadow: none;
    }
    
    .animate-float,
    .animate-pulse,
    .animate-glow {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--neon-blue);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: rgba(0, 243, 255, 0.3);
    color: white;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Tooltip Styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Glow */
.card-glow:hover {
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tech Icon Styles */
.tech-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.3);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.3s ease;
}

.tech-icon-wrapper:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
    transform: scale(1.1) rotate(30deg);
}

.tech-icon-wrapper i {
    font-size: 1.2rem;
    color: var(--neon-blue);
    transition: all 0.3s ease;
}

.tech-icon-wrapper:hover i {
    color: white;
    text-shadow: 0 0 5px white;
    transform: rotate(-30deg);
}

.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    transform: translateY(-3px);
}

.tech-icon-lg {
    width: 4rem;
    height: 4rem;
}

.tech-icon-lg i {
    font-size: 1.5rem;
}

/* Complex Cyber Background Animations */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 15s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.cyber-nebula {
    background: 
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(167, 139, 250, 0.15), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(52, 211, 153, 0.15), transparent 25%);
    filter: blur(80px);
    width: 150%;
    height: 150%;
    position: absolute;
    top: -25%;
    left: -25%;
    animation: nebula-move 20s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes nebula-move {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, -2%) scale(1.05); }
    66% { transform: translate(-2%, 2%) scale(1.02); }
    100% { transform: translate(0, 0) scale(1); }
}

.bg-scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
}

.bg-radial-gradient {
    background: radial-gradient(circle at center, transparent 0%, rgba(15, 23, 42, 0.4) 40%, rgba(15, 23, 42, 0.9) 100%);
}
