/* ============================================
   NEURAL NEXUS - DARK MODE THEME SYSTEM
   ============================================ */

:root {
    --primary: #8b5cf6;
    --secondary: #06b6d4;
    --accent: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark-bg: #020617;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(71, 85, 105, 0.5);
}

/* Dark mode overrides */
[data-theme="dark"] {
    color-scheme: dark;
}

/* Custom Scrollbar */
.transcript-scroll::-webkit-scrollbar {
    width: 6px;
}

.transcript-scroll::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 3px;
}

.transcript-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 3px;
}

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

.glass-button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.glass-button:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.glass-message {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    backdrop-filter: blur(10px);
}

/* Floating Action Buttons */
.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fab-btn:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* Custom Animations */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 15px var(--primary);
    }
    100% {
        box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus Styles */
input:focus, button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading State */
.loading-dots {
    display: inline-flex;
    gap: 2px;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    animation: loading-dot 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-dot {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .glass-panel {
        backdrop-filter: blur(8px);
    }
}

/* Avatar Canvas Styles */
avatar-renderer {
    display: block;
    aspect-ratio: 1;
    max-height: 80vh;
}

wave-visualizer {
    display: block;
    width: 100%;
    height: 100%;
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Neural Network Canvas */
#neural-network-canvas {
    opacity: 0.15;
}