/**
 * Neural Voice Engine 4.6 Ultra — Styles
 * Advanced Voice Control Widget UI
 * 
 * Features: Glow pulse, processing stages, predictive suggestions,
 * enhanced orb rings, Ultra tag
 */

/* ============ VOICE BUTTON (Floating) ============ */
.nve-btn {
    position: fixed;
    bottom: 20px;
    right: 28px;
    z-index: 9990;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
    animation: nve-float 3s ease-in-out infinite;
}
.nve-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.6);
}
.nve-btn.panel-open {
    animation: none;
}
.nve-btn.listening {
    animation: nve-pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
}
.nve-btn svg {
    width: 24px;
    height: 24px;
    color: #fff;
    transition: transform 0.3s;
    position: relative;
    z-index: 2;
}
.nve-btn.listening svg {
    color: #fff;
}

/* Glow ring on button */
.nve-glow-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #7c3aed, #a855f7, #c084fc, #7c3aed);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.4s;
    animation: nve-glow-spin 3s linear infinite;
    filter: blur(3px);
}
.nve-btn:hover .nve-glow-ring,
.nve-btn.listening .nve-glow-ring {
    opacity: 0.6;
}
@keyframes nve-glow-spin {
    to { transform: rotate(360deg); }
}

/* Ripple rings when listening */
.nve-btn .nve-ripple {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.5);
    opacity: 0;
    pointer-events: none;
}
.nve-btn.listening .nve-ripple {
    animation: nve-ripple-out 1.5s ease-out infinite;
}
.nve-btn.listening .nve-ripple:nth-child(2) {
    animation-delay: 0.5s;
}
.nve-btn.listening .nve-ripple:nth-child(3) {
    animation-delay: 1s;
}

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

@keyframes nve-pulse {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6); }
    70% { box-shadow: 0 0 0 18px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

@keyframes nve-ripple-out {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ============ VOICE PANEL ============ */
.nve-panel {
    position: fixed;
    bottom: 110px;
    right: 28px;
    z-index: 9989;
    width: 400px;
    max-height: 560px;
    background: rgba(12, 12, 20, 0.97);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(124, 58, 237, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nve-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.nve-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(124, 58, 237, 0.06);
}
.nve-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nve-header-title .nve-ai-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}
.nve-ai-icon-glow {
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, transparent 60%, rgba(168, 85, 247, 0.4) 80%, transparent 100%);
    animation: nve-icon-glow 2s linear infinite;
    border-radius: 12px;
}
@keyframes nve-icon-glow {
    to { transform: rotate(360deg); }
}
.nve-header-title h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e2f0;
    margin: 0;
}
.nve-header-title .nve-version {
    font-size: 0.62rem;
    color: #7c3aed;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.nve-ultra-tag {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: nve-ultra-shimmer 2s ease-in-out infinite;
}
@keyframes nve-ultra-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; filter: brightness(1.3); }
}
.nve-close-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}
.nve-close-btn:hover { color: #f87171; }

/* ============ NEURAL VISUALIZER ============ */
.nve-visualizer {
    padding: 10px 16px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* ── Enhanced Brain Orb ── */
.nve-brain-orb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.1));
    border: 2px solid rgba(124, 58, 237, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s;
}

/* Orb animated rings */
.nve-orb-rings {
    position: absolute;
    inset: -10px;
    pointer-events: none;
}
.nve-orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid transparent;
    opacity: 0;
    transition: opacity 0.4s;
}
.nve-orb-ring.ring-1 {
    border-color: rgba(124, 58, 237, 0.15);
    inset: -4px;
}
.nve-orb-ring.ring-2 {
    border-color: rgba(168, 85, 247, 0.1);
    inset: -8px;
}
.nve-orb-ring.ring-3 {
    border-color: rgba(192, 132, 252, 0.06);
    inset: -12px;
}

/* Idle: subtle breathing glow */
.nve-brain-orb.idle-glow {
    animation: nve-orb-idle-glow 3s ease-in-out infinite;
}
.nve-brain-orb.idle-glow .nve-orb-ring {
    opacity: 0.5;
    animation: nve-ring-breathe 3s ease-in-out infinite;
}
.nve-brain-orb.idle-glow .nve-orb-ring.ring-2 {
    animation-delay: 0.5s;
}
.nve-brain-orb.idle-glow .nve-orb-ring.ring-3 {
    animation-delay: 1s;
}
@keyframes nve-orb-idle-glow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(124, 58, 237, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
    }
}
@keyframes nve-ring-breathe {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.6; }
}

/* Active: listening */
.nve-brain-orb.active {
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3), 0 0 60px rgba(124, 58, 237, 0.1);
    background: radial-gradient(circle at 40% 40%, rgba(124, 58, 237, 0.5), rgba(168, 85, 247, 0.2));
}
.nve-brain-orb.active .nve-orb-ring {
    opacity: 1;
    animation: nve-ring-pulse 1.5s ease-in-out infinite;
}
.nve-brain-orb.active .nve-orb-ring.ring-2 {
    animation-delay: 0.3s;
}
.nve-brain-orb.active .nve-orb-ring.ring-3 {
    animation-delay: 0.6s;
}
@keyframes nve-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.12); opacity: 0.8; }
}

/* Processing: spinning rings */
.nve-brain-orb.processing {
    animation: nve-orb-think 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2), 0 0 60px rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.4);
}
.nve-brain-orb.processing .nve-orb-ring {
    opacity: 1;
}
.nve-brain-orb.processing .nve-orb-ring.ring-1 {
    border-color: rgba(245, 158, 11, 0.3);
    animation: nve-ring-spin 2s linear infinite;
}
.nve-brain-orb.processing .nve-orb-ring.ring-2 {
    border-color: rgba(245, 158, 11, 0.2);
    animation: nve-ring-spin 3s linear infinite reverse;
}
.nve-brain-orb.processing .nve-orb-ring.ring-3 {
    border-color: rgba(245, 158, 11, 0.1);
    animation: nve-ring-spin 4s linear infinite;
}
@keyframes nve-ring-spin {
    to { transform: rotate(360deg); }
}
@keyframes nve-orb-think {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Speaking: green glow pulse */
.nve-brain-orb.speaking {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.25), 0 0 50px rgba(34, 197, 94, 0.08);
    animation: nve-orb-speak 0.8s ease-in-out infinite;
}
.nve-brain-orb.speaking .nve-orb-ring {
    opacity: 0.7;
}
.nve-brain-orb.speaking .nve-orb-ring.ring-1 {
    border-color: rgba(34, 197, 94, 0.25);
    animation: nve-ring-speak 0.8s ease-in-out infinite;
}
.nve-brain-orb.speaking .nve-orb-ring.ring-2 {
    border-color: rgba(34, 197, 94, 0.15);
    animation: nve-ring-speak 0.8s ease-in-out infinite 0.2s;
}
.nve-brain-orb.speaking .nve-orb-ring.ring-3 {
    border-color: rgba(34, 197, 94, 0.08);
    animation: nve-ring-speak 0.8s ease-in-out infinite 0.4s;
}
@keyframes nve-orb-speak {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(34, 197, 94, 0.2); }
    50% { transform: scale(1.04); box-shadow: 0 0 35px rgba(34, 197, 94, 0.35); }
}
@keyframes nve-ring-speak {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.nve-brain-icon {
    font-size: 1.8rem;
    color: #a855f7;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}
.nve-brain-orb.active .nve-brain-icon { color: #c084fc; }

/* ============ AUDIO WAVEFORM ============ */
.nve-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 32px;
}
.nve-waveform .bar {
    width: 3px;
    height: 6px;
    background: #7c3aed;
    border-radius: 2px;
    transition: height 0.1s ease;
    will-change: height, opacity;
}
.nve-waveform.active .bar {
    animation: nve-wave 0.8s ease-in-out infinite;
}
.nve-waveform.active .bar:nth-child(1) { animation-delay: 0s; }
.nve-waveform.active .bar:nth-child(2) { animation-delay: 0.1s; }
.nve-waveform.active .bar:nth-child(3) { animation-delay: 0.2s; }
.nve-waveform.active .bar:nth-child(4) { animation-delay: 0.3s; }
.nve-waveform.active .bar:nth-child(5) { animation-delay: 0.4s; }
.nve-waveform.active .bar:nth-child(6) { animation-delay: 0.5s; }
.nve-waveform.active .bar:nth-child(7) { animation-delay: 0.6s; }
.nve-waveform.active .bar:nth-child(8) { animation-delay: 0.7s; }
.nve-waveform.active .bar:nth-child(9) { animation-delay: 0.8s; }
.nve-waveform.active .bar:nth-child(10) { animation-delay: 0.05s; }
.nve-waveform.active .bar:nth-child(11) { animation-delay: 0.15s; }
.nve-waveform.active .bar:nth-child(12) { animation-delay: 0.25s; }
.nve-waveform.active .bar:nth-child(13) { animation-delay: 0.35s; }
.nve-waveform.active .bar:nth-child(14) { animation-delay: 0.45s; }
.nve-waveform.active .bar:nth-child(15) { animation-delay: 0.55s; }
.nve-waveform.active .bar:nth-child(16) { animation-delay: 0.65s; }

@keyframes nve-wave {
    0%, 100% { height: 6px; opacity: 0.4; }
    50% { height: 28px; opacity: 1; }
}

/* ============ PROCESSING STAGES ============ */
.nve-processing-stages {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.nve-stages-bar {
    display: flex;
    gap: 6px;
    align-items: center;
}
.nve-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}
.nve-stage-dot.active {
    background: rgba(245, 158, 11, 0.6);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    animation: nve-stage-pulse 0.6s ease-in-out infinite;
}
.nve-stage-dot.done {
    background: rgba(34, 197, 94, 0.5);
    border-color: rgba(34, 197, 94, 0.6);
}
@keyframes nve-stage-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ============ STATUS TEXT ============ */
.nve-status {
    font-size: 0.78rem;
    color: #888;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
    min-height: 18px;
}
.nve-status.listening { color: #a855f7; }
.nve-status.processing { color: #f59e0b; }
.nve-status.speaking { color: #22c55e; }
.nve-status.error { color: #f87171; }

/* ============ PREDICTIVE SUGGESTION ============ */
.nve-prediction {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin: 0 18px 6px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    animation: nve-prediction-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    transition: all 0.3s;
}
.nve-prediction.hiding {
    opacity: 0;
    transform: translateY(-8px);
}
.nve-prediction-text {
    flex: 1;
    font-size: 0.76rem;
    color: #c4b5fd;
    font-weight: 500;
}
.nve-prediction-btn {
    padding: 3px 10px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.nve-prediction-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}
.nve-prediction-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px;
    line-height: 1;
    transition: color 0.2s;
}
.nve-prediction-close:hover {
    color: #f87171;
}
@keyframes nve-prediction-in {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ NAVIGATION COUNTDOWN ============ */
.nve-nav-countdown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 0 18px 6px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 14px;
    animation: nve-prediction-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    transition: all 0.3s;
}
.nve-nav-countdown.hiding {
    opacity: 0;
    transform: translateY(-8px);
}
.nve-nav-countdown-icon {
    font-size: 1.2rem;
    animation: nve-nav-rocket 1s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes nve-nav-rocket {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.nve-nav-countdown-info {
    flex: 1;
    min-width: 0;
}
.nve-nav-countdown-label {
    font-size: 0.74rem;
    color: #c4b5fd;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nve-nav-countdown-label strong {
    color: #e2e2f0;
}
.nve-nav-countdown-bar-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.nve-nav-countdown-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    border-radius: 4px;
    width: 0%;
    animation: nve-nav-fill-progress linear forwards;
}
@keyframes nve-nav-fill-progress {
    from { width: 0%; }
    to { width: 100%; }
}
.nve-nav-countdown-cancel {
    padding: 4px 10px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 8px;
    color: #f87171;
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.nve-nav-countdown-cancel:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

/* ============ ILLUSION — Typing Cursor (Trick #2) ============ */
.nve-msg-bubble.nve-typing {
    position: relative;
}
.nve-msg-bubble.nve-typing::after {
    content: '▌';
    animation: nve-cursor-blink 0.6s step-end infinite;
    color: #a855f7;
    font-weight: bold;
    margin-left: 2px;
}
@keyframes nve-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============ CONVERSATION ============ */
.nve-conversation {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.2) transparent;
}
.nve-conversation::-webkit-scrollbar { width: 4px; }
.nve-conversation::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.2);
    border-radius: 4px;
}

.nve-msg {
    display: flex;
    gap: 10px;
    animation: nve-msg-in 0.3s ease;
    max-width: 95%;
}
.nve-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.nve-msg.ai { align-self: flex-start; }

.nve-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.nve-msg.user .nve-msg-avatar {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.nve-msg.ai .nve-msg-avatar {
    background: rgba(124, 58, 237, 0.15);
    color: #a855f7;
}

.nve-msg-bubble {
    padding: 11px 15px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #f0f0f5;
    word-break: break-word;
}
.nve-msg.user .nve-msg-bubble {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-bottom-right-radius: 4px;
    color: #e0ecff;
}
.nve-msg.ai .nve-msg-bubble {
    background: rgba(124, 58, 237, 0.16);
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-bottom-left-radius: 4px;
    color: #f0eaff;
}
.nve-msg-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.82rem;
    color: #c084fc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.nve-msg-link i {
    font-size: 0.65rem;
}
.nve-msg-link:hover {
    color: #e0b3ff;
    text-decoration: underline;
}

@keyframes nve-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator */
.nve-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
}
.nve-typing .dot {
    width: 6px;
    height: 6px;
    background: #7c3aed;
    border-radius: 50%;
    animation: nve-typing-dot 1.4s ease-in-out infinite;
}
.nve-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.nve-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes nve-typing-dot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1.2); }
}

/* ============ FOOTER ============ */
.nve-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nve-mic-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.25s;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}
.nve-mic-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}
.nve-mic-btn.listening {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
    animation: nve-pulse-sm 1s ease-in-out infinite;
}

.nve-stop-tts-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f87171);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: all 0.25s;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
    animation: nve-pulse-sm 1.2s ease-in-out infinite;
}
.nve-stop-tts-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5);
}
@keyframes nve-pulse-sm {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.nve-text-input {
    flex: 1;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: #e2e2f0;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.nve-text-input:focus {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.08);
}
.nve-text-input::placeholder { color: #555; }

.nve-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    color: #888;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.nve-send-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.3);
}

/* ============ QUICK ACTIONS ============ */
.nve-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 10px;
}
.nve-quick-btn {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: #888;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.nve-quick-btn:hover {
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.08);
    color: #c4b5fd;
}

/* ============ NEURAL NETWORK BG DECORATION ============ */
.nve-neural-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.04;
}
.nve-neural-bg .node {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #a855f7;
    border-radius: 50%;
    animation: nve-node-blink 3s ease-in-out infinite;
}
@keyframes nve-node-blink {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ============ TOOLTIP ============ */
.nve-tooltip {
    position: fixed;
    background: rgba(12, 12, 20, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 8px 14px;
    color: #ccc;
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 9991;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.nve-tooltip.show { opacity: 1; }

/* ============ HEADER ACTIONS ============ */
.nve-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nve-minimize-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px 6px;
    font-weight: 700;
}
.nve-minimize-btn:hover { color: #a855f7; }

/* ============ VOICE SELECTOR ============ */
.nve-voice-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.nve-voice-label {
    font-size: 0.68rem;
    color: #555;
    flex-shrink: 0;
}
.nve-voice-opt {
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    color: #666;
    font-size: 0.66rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.nve-voice-opt:hover {
    border-color: rgba(124, 58, 237, 0.3);
    color: #c4b5fd;
}
.nve-voice-opt.active {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    color: #c4b5fd;
}

/* ============ PROACTIVE HELP HINT ============ */
.nve-proactive-hint {
    position: fixed;
    bottom: 95px;
    right: 28px;
    z-index: 9991;
    background: rgba(12, 12, 20, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 14px;
    padding: 10px 16px;
    color: #ccc;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(124, 58, 237, 0.1);
    animation: nve-hint-in 0.4s ease, nve-hint-pulse 2s ease-in-out 0.4s infinite;
    font-family: 'Inter', sans-serif;
}
.nve-proactive-close {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    line-height: 1;
}
.nve-proactive-close:hover { color: #f87171; }

@keyframes nve-hint-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes nve-hint-pulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(124, 58, 237, 0.1); }
    50% { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(124, 58, 237, 0.2); }
}

/* ============ MINIMIZED BUBBLE ============ */
.nve-bubble-mini {
    position: fixed;
    bottom: 20px;
    right: 28px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 12, 20, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 24px;
    padding: 8px 16px 8px 10px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(124, 58, 237, 0.08);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    font-family: 'Inter', sans-serif;
}
.nve-bubble-mini.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.nve-bubble-mini:hover {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.15);
    transform: scale(1.03);
}
.nve-bubble-mini-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.nve-bubble-mini-text {
    font-size: 0.75rem;
    color: #aaa;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ HOTKEY HINT (kbd) ============ */
.nve-status kbd {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.6rem;
    font-family: 'Inter', monospace;
    color: #888;
    vertical-align: middle;
    margin-left: 4px;
}

/* ============ RESPONSIVE (NEW FEATURES) ============ */
@media (max-width: 480px) {
    .nve-panel {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 140px;
        max-height: 65vh;
    }
    .nve-btn {
        right: 16px;
        bottom: 20px;
        width: 46px;
        height: 46px;
    }
    .nve-btn svg {
        width: 20px;
        height: 20px;
    }
    .nve-prediction {
        margin: 0 12px 6px;
    }
    .nve-quick {
        gap: 4px;
    }
    .nve-quick-btn {
        font-size: 0.68rem;
        padding: 4px 9px;
    }
    .nve-voice-selector {
        flex-wrap: wrap;
    }
    .nve-voice-opt {
        font-size: 0.6rem;
        padding: 2px 7px;
    }
    .nve-bubble-mini {
        right: 10px;
        bottom: 20px;
    }
    .nve-bubble-mini-text {
        max-width: 120px;
    }
    .nve-proactive-hint {
        right: 10px;
        bottom: 80px;
        font-size: 0.76rem;
    }
}
@media (max-width: 768px) {
    .nve-panel {
        width: 360px;
    }
    /* Hide entire AI widget on mobile */
    .nve-btn,
    .nve-panel,
    .nve-wake-indicator,
    .nve-bubble-mini,
    .nve-proactive-hint {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ============ WAKE WORD INDICATOR ============ */
.nve-wake-indicator {
    position: fixed;
    bottom: 90px;
    right: 28px;
    z-index: 9987;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(12, 12, 20, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 20px;
    font-size: 0.65rem;
    color: rgba(168, 85, 247, 0.7);
    font-family: 'Inter', sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}
.nve-wake-indicator.active {
    opacity: 1;
    visibility: visible;
}
.nve-wake-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a855f7;
    animation: nve-wake-pulse 2s ease-in-out infinite;
}
@keyframes nve-wake-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}
