#ai-chat-container {
    position: fixed;
    right: 16px;
    top: 50%;
    z-index: 9999;
}

.ai-button-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

#ai-chat-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px 12px 0 12px;
    background: #1F1F1F;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: none;
    outline: none;
    position: absolute;
    top: 0;
    right: 0;
}

#ai-chat-toggle:hover {
    background: #2A2A2A;
}

#ai-chat-container.expanded {
    width: 340px;
    height: 490px;
    top: 50%;
    margin-top: -260px;
    right: 16px;
}

#ai-chat-container.expanded .ai-button-text {
    opacity: 0;
}

#ai-chat-container.expanded #ai-chat-toggle {
    width: 100%;
    height: 100%;
    background: #1F1F1F;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    padding: 20px;
    align-items: stretch;
}

.ai-chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.1s ease;
}

#ai-chat-container.expanded .ai-chat-content {
    opacity: 1;
    transition: opacity 0.2s ease 0.1s;
}

.ai-chat-messages {
    height: 100%;
    overflow-y: scroll;
    padding-right: 5px;
    text-align: center;
    max-height: 400px;
    position: relative;
}

.ai-chat-messages.no-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0,0)!important;
}

#ai-chat-container:not(.expanded) .ai-chat-content {
    display: none;
}

.ai-placeholder {
    opacity: 0.7;
    line-height: 1.4;
    font-size: 15px;
    padding: 10px;

    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

#ai-chat-send {
    background: #fff;
    border: none;
    margin-left: 8px;
    padding: 0 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F1F1F;
    transition: background 0.2s;
    font-size: 12px;
    min-width: 40px;
}

#ai-chat-send:hover {
    background: #e6e6e6;
}

.ai-chat-input {
    display: flex;
    padding-top: 15px;
    width: 100%;
}

.ai-chat-input input {
    flex: 1;
    border-radius: 10px;
    border: none;
    padding: 10px 12px;
    outline: none;
    font-size: 14px;
    background: #2A2A2A;
    color: #fff;
}

.ai-chat-input input::placeholder {
    color: #888;
}

.ai-chat-input button {
    background: #fff;
    border: none;
    margin-left: 8px;
    padding: 0 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F1F1F;
    transition: background 0.2s;
}

.ai-chat-input button:hover {
    background: #e6e6e6;
}

.message {
    margin-bottom: 12px;
    text-align: left;
    animation: fadeInUp 0.3s ease;
}

.user-message {
    color: #fff;
    font-weight: 500;
}

.ai-message {
    color: #E0E0E0;
    line-height: 1.4;
}

.thinking {
    opacity: 0.7;
    font-style: italic;
    color: #aaa;
}

.error-message {
    color: #ff6666;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}