/* --- Neural AI Chat (God Mode) --- */

:root {
    --chat-primary: #f97316;
    --chat-accent: #0ea5e9;
    --chat-bg: rgba(15, 17, 21, 0.85);
    --chat-glass: rgba(255, 255, 255, 0.03);
    --chat-border: rgba(255, 255, 255, 0.1);
    --chat-glow: rgba(249, 115, 22, 0.3);
}

/* Floating Bubble */
#neural-chat-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--chat-primary), #ea580c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 0 20px var(--chat-glow);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#neural-chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px var(--chat-primary);
}

#neural-chat-trigger .ai-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--chat-primary);
    opacity: 0.5;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Chat Container */
#neural-chat-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: var(--chat-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid var(--chat-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#neural-chat-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.neural-chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.neural-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.neural-chat-header .status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.neural-chat-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Messages Area */
#neural-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-border) transparent;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    animation: msg-appear 0.3s ease-out;
}

@keyframes msg-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg.ai {
    align-self: flex-start;
    background: var(--chat-glass);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--chat-primary), #ea580c);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

/* Footer & Input */
.neural-chat-footer {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--chat-border);
}

.neural-chat-input-wrapper {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--chat-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    transition: border-color 0.3s;
}

.neural-chat-input-wrapper:focus-within {
    border-color: var(--chat-primary);
}

#neural-chat-input {
    background: transparent;
    border: none;
    color: white;
    flex: 1;
    padding: 8px;
    font-size: 0.9rem;
    outline: none;
}

.btn-send-chat {
    background: transparent;
    border: none;
    color: var(--chat-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-send-chat:hover {
    transform: scale(1.1);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--chat-glass);
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 5px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #8a8f98;
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    from {
        opacity: 0.3;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Brand tag */
.chat-brand-tag {
    text-align: center;
    font-size: 10px;
    color: #4b5563;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}