/* Premium AI Chat Styles */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chat-bubble {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--accent-aqua), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 3px;
    /* Frame thickness */
    animation: float 3s ease-in-out infinite;
}

.bubble-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.bubble-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-aqua);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.6);
}

.chat-bubble.chat-open {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.status-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #00ff00;
    border: 2px solid white;
    border-radius: 50%;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

.chat-window.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* Header */
.chat-header {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-aqua);
}

.header-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: white;
}

.header-info .status {
    margin: 0;
    font-size: 0.75rem;
    color: #00ff00;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

/* Messages */
.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 85%;
}

.message.assistant {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--accent-aqua);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

.message.thinking {
    font-style: italic;
    opacity: 0.7;
}

/* Social Links */
.social-links-chat {
    display: flex;
    gap: 10px;
    padding: 10px 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.chat-social-link {
    flex: 1;
    padding: 8px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
}

.chat-social-link.zalo {
    background: #0068ff;
}

.chat-social-link.fb {
    background: #1877f2;
}

.chat-social-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

/* Input Area */
.chat-input-area {
    padding: 1.2rem;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    outline: none;
    font-size: 0.9rem;
}

.chat-input-area button {
    width: 40px;
    height: 40px;
    background: var(--accent-aqua);
    color: #000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chat-input-area button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-aqua);
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 450px;
        bottom: 70px;
        right: -10px;
    }

    .chat-widget {
        bottom: 20px;
        right: 20px;
    }
}