#chat-widget-container {
    position: absolute;
    top: 85px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 1024px) {
    #chat-widget-container {
        position: fixed !important;
        bottom: 120px !important;
        top: auto !important;
        right: 20px !important;
    }
    #chat-widget-button {
        width: 60px !important;
        height: 60px !important;
    }
    #chat-widget-button svg {
        width: 28px !important;
        height: 28px !important;
    }
}

#chat-widget-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#chat-widget-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
}

#chat-widget-button svg {
    width: 32px;
    height: 32px;
    fill: white;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.chat-bubble-back {
    animation: floatBack 3s ease-in-out infinite;
    transform-origin: center;
}

.chat-bubble-front {
    animation: floatFront 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes floatBack {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-1.5px, -1.5px) scale(1.02); }
}

@keyframes floatFront {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(1.5px, 1.5px) scale(0.98); }
}

#chat-window {
    position: absolute;
    top: 75px;
    right: 0;
    width: 380px;
    height: 580px;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-origin: top right;
}

#chat-window.active {
    display: flex;
    animation: premiumShow 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes premiumShow {
    from { 
        transform: scale(0.8) translateY(-20px); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) translateY(0); 
        opacity: 1; 
    }
}

#chat-header {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 40px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
}

.chat-title {
    display: flex;
    flex-direction: column;
}

.chat-name {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.chat-status {
    color: #10b981;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
}

#chat-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
}

#chat-close-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

#chat-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.1);
}

#chat-lang-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

#chat-lang-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    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: 2px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.5;
    position: relative;
    animation: msgAppear 0.3s ease-out forwards;
}

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

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.bot-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#chat-input-container {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
}

#chat-input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 14px;
    padding: 12px 16px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

#chat-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

#chat-send {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.5);
}

#chat-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.typing-indicator {
    padding: 0 20px 10px;
    font-size: 12px;
    color: #94a3b8;
    display: none;
    align-items: center;
    gap: 4px;
}

.dots {
    display: flex;
    gap: 2px;
}

.dot {
    width: 4px;
    height: 4px;
    background: #94a3b8;
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
}

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

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
}

@media (max-width: 480px) {
    #chat-window {
        width: calc(100vw - 40px);
        height: 70vh;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
    }
}
