#tt-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* Bubble wrap */
#tt-chat-bubble-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
#tt-chat-label {
    background: #111820;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Bubble */
#tt-chat-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
#tt-chat-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(59, 130, 246, 0.5);
}

/* Window */
#tt-chat-window {
    width: 440px;
    height: 620px;
    background: #0f1318;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    animation: tt-slide-up 0.25s ease-out;
}
@keyframes tt-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
#tt-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #111820;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#tt-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
#tt-chat-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d9668;
    animation: tt-pulse 2s ease-in-out infinite;
}
@keyframes tt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
#tt-chat-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
#tt-chat-close:hover { color: #fff; }

/* Messages */
#tt-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#tt-chat-messages::-webkit-scrollbar { width: 4px; }
#tt-chat-messages::-webkit-scrollbar-track { background: transparent; }
#tt-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.tt-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.tt-msg-ai {
    align-self: flex-start;
    background: #1a1f28;
    color: #cbd5e1;
    border-bottom-left-radius: 4px;
}
.tt-msg-user {
    align-self: flex-end;
    background: #3b82f6;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.tt-typing {
    color: #64748b;
    font-style: italic;
}

/* Input */
#tt-chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #111820;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
#tt-chat-input {
    flex: 1;
    background: #1a1f28;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
#tt-chat-input::placeholder { color: #4b5563; }
#tt-chat-input:focus { border-color: rgba(59, 130, 246, 0.4); }

#tt-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #3b82f6;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
#tt-chat-send:hover { background: #2563eb; }
#tt-chat-send:disabled { background: #1e3a5f; cursor: not-allowed; }

/* Mobile */
@media (max-width: 480px) {
    #tt-chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
    }
}
