#aikb-chat-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #7373fc, #8a74f7);
    color: white;
    padding: 18px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
    transition: 0.3s ease;
    font-size: 18px;
}

#aikb-chat-button:hover {
    transform: scale(1.1);
}

#aikb-chat-window {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 360px;
    height: 500px;
    backdrop-filter: blur(20px);
    background: #28282a;
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.3);
    overflow: hidden;
}

#aikb-chat-header {
    padding: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(90deg, #7373fc, #8a74f7);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#aikb-close {
    cursor: pointer;
    font-size: 28px;
}

#aikb-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #ddd;
}

.aikb-msg {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 80%;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

.aikb-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #7373fc, #8a74f7);
    color: white;
}

.aikb-ai {
    align-self: flex-start;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(138,43,226,0.4);
    color: #eee;
}

#aikb-input-area {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#aikb-input {
    flex: 1;
    border: none;
    font-size: 14px;
    background: transparent;
    padding: 14px;
    color: white;
    outline: none;
    resize: none;
    max-height: 96px; /* ~4 рядки */
    overflow-y: auto;
}

#aikb-send {
    background: linear-gradient(135deg, #7373fc, #8a74f7);
    border: none;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
}

#aikb-send:hover {
    opacity: 0.85;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.aikb-contact-btn {
    padding: 12px;
    background: #0c8baae3;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s ease;
}

.aikb-contact-btn:hover {
    background: #2c4574;
}

.aikb-loader {
    display: flex;
    gap: 4px;
}

.aikb-loader span {
    width: 6px;
    height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: aikbBlink 1.4s infinite both;
}

.aikb-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.aikb-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes aikbBlink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

#aikb-chat-window .aikb-loader {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

#aikb-chat-window .aikb-loader span {
    all: unset;
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #8a74f7;
    box-shadow: 0 0 6px rgba(138,116,247,0.6);
    animation: aikb-bounce 1.2s infinite ease-in-out;
}

#aikb-chat-window .aikb-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

#aikb-chat-window .aikb-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes aikb-bounce {
    0%, 80%, 100% {
        transform: scale(0.4);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}