
:root {
    --chat-accent: #a824e4;
    --chat-bg: rgba(10, 10, 10, 0.85);
    --chat-glass: rgba(255, 255, 255, 0.05);
    --chat-glass-border: rgba(255, 255, 255, 0.1);
}

/* Chat Widget Container */
#agentrix-chatbot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Floating Bubble */
#chat-bubble {
    width: 65px;
    height: 65px;
    background: var(--chat-accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(168, 36, 228, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#chat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(168, 36, 228, 0.6);
}

#chat-bubble .bubble-icon {
    font-size: 30px;
    color: white;
}

#chat-bubble::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    animation: pulse-out 2s infinite;
}

@keyframes pulse-out {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Chat Window */
#chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 400px;
    height: 600px;
    background: var(--chat-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--chat-glass-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

#chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Header */
.chat-header {
    padding: 20px 24px;
    background: linear-gradient(90deg, rgba(168, 36, 228, 0.1), transparent);
    border-bottom: 1px solid var(--chat-glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
}

.header-info p {
    margin: 4px 0 0;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.close-chat {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close-chat:hover {
    color: white;
}

/* Messages Area */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#chat-messages::-webkit-scrollbar {
    width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: message-in 0.4s ease forwards;
}

@keyframes message-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    align-self: flex-start;
    background: var(--chat-glass);
    border: 1px solid var(--chat-glass-border);
    border-bottom-left-radius: 4px;
    color: #eee;
}

.message.user {
    align-self: flex-end;
    background: var(--chat-accent);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 10px 20px rgba(168, 36, 228, 0.2);
}

.message strong {
    color: var(--chat-accent);
    font-weight: 700;
}

/* Input Area */
.chat-input-container {
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--chat-glass-border);
}

.input-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--chat-glass-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 4px 6px 4px 16px;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--chat-accent);
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    padding: 10px 0;
    outline: none;
}

#send-message {
    background: var(--chat-accent);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
}

#send-message:hover {
    transform: scale(1.05);
}

#send-message:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--chat-glass);
    border-radius: 16px;
    width: fit-content;
    margin-bottom: 16px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

@media (max-width: 480px) {
    #chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 80px;
    }
}
